@eventcatalog/core 4.12.3 → 5.0.0-beta.0
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/LICENSE +226 -95
- package/NOTICE +30 -0
- package/README.md +3 -2
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +43 -16
- package/dist/analytics/log-build.d.cts +6 -5
- package/dist/analytics/log-build.d.ts +6 -5
- package/dist/analytics/log-build.js +4 -3
- package/dist/{chunk-U4YJSTGV.js → chunk-AYNZXUB5.js} +2 -10
- package/dist/{chunk-TV3YAWKQ.js → chunk-CR6AK5LR.js} +1 -1
- package/dist/{chunk-M577VUOX.js → chunk-LR7AGRHN.js} +13 -16
- package/dist/chunk-TQLRG35T.js +203 -0
- package/dist/{chunk-HPC6KUDQ.js → chunk-TWN43V4T.js} +1 -1
- package/dist/{chunk-ZYTCBNB3.js → chunk-WAIADKQE.js} +1 -1
- package/dist/{chunk-5BPN6QEC.js → chunk-ZHKEARLJ.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +407 -291
- package/dist/eventcatalog.config.d.cts +2 -3
- package/dist/eventcatalog.config.d.ts +2 -3
- package/dist/eventcatalog.js +35 -98
- package/dist/federation/content-cache.d.cts +0 -5
- package/dist/federation/content-cache.d.ts +0 -5
- package/dist/federation/diagnostics.d.cts +0 -5
- package/dist/federation/diagnostics.d.ts +0 -5
- package/dist/federation/federate.cjs +0 -9
- package/dist/federation/federate.d.cts +0 -5
- package/dist/federation/federate.d.ts +0 -5
- package/dist/federation/federate.js +4 -5
- package/dist/federation/filesystem-source-provider.d.cts +0 -5
- package/dist/federation/filesystem-source-provider.d.ts +0 -5
- package/dist/federation/github-source-provider.d.cts +0 -5
- package/dist/federation/github-source-provider.d.ts +0 -5
- package/dist/federation/output-transaction.d.cts +0 -4
- package/dist/federation/output-transaction.d.ts +0 -4
- package/dist/federation/public-assets.d.cts +0 -5
- package/dist/federation/public-assets.d.ts +0 -5
- package/dist/federation/source-provider.d.cts +0 -5
- package/dist/federation/source-provider.d.ts +0 -5
- package/dist/federation/types.d.cts +0 -5
- package/dist/federation/types.d.ts +0 -5
- package/dist/generate.cjs +1 -1
- package/dist/generate.js +3 -3
- package/dist/license-C1y-56bb.d.cts +23 -0
- package/dist/license-C1y-56bb.d.ts +23 -0
- package/dist/runtime-dependencies/@eventcatalog__visualiser__layout.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__react.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__ext-apps__server.mjs +3 -0
- package/dist/runtime-dependencies/@modelcontextprotocol__sdk__types.js.mjs +3 -0
- package/dist/runtime-dependencies/manifest.json +12 -1
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__graphql.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__json.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__markup.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__protobuf.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__languages__prism__yaml.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-dark.mjs +3 -0
- package/dist/runtime-dependencies/react-syntax-highlighter__dist__esm__styles__prism__one-light.mjs +3 -0
- package/dist/utils/cli-logger.cjs +1 -1
- package/dist/utils/cli-logger.js +2 -2
- package/dist/utils/license-status.cjs +240 -0
- package/dist/utils/license-status.d.cts +28 -0
- package/dist/utils/license-status.d.ts +28 -0
- package/dist/utils/license-status.js +12 -0
- package/eventcatalog/astro.config.mjs +1 -1
- package/eventcatalog/integrations/eventcatalog-runtime.mjs +1 -1
- package/eventcatalog/src/components/ChatPanel/ChatPanel.tsx +29 -19
- package/eventcatalog/src/components/ChatPanel/OfflineReply.tsx +74 -0
- package/eventcatalog/src/components/FieldsExplorer/FieldFilters.tsx +24 -28
- package/eventcatalog/src/components/FieldsExplorer/FieldNodeGraph.tsx +16 -11
- package/eventcatalog/src/components/FieldsExplorer/FieldsExplorer.tsx +4 -218
- package/eventcatalog/src/components/FieldsExplorer/FieldsTable.tsx +27 -36
- package/eventcatalog/src/components/Header.astro +43 -58
- package/eventcatalog/src/components/Lists/PillListFlat.styles.css +17 -17
- package/eventcatalog/src/components/MDX/EntityMap/EntityMap.astro +1 -1
- package/eventcatalog/src/components/MDX/Flow/Flow.astro +4 -0
- package/eventcatalog/src/components/MDX/NodeGraph/AstroNodeGraph.tsx +14 -0
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.astro +49 -18
- package/eventcatalog/src/components/MDX/RemoteFile.astro +2 -24
- package/eventcatalog/src/components/SchemaExplorer/ApiAccessSection.tsx +59 -93
- package/eventcatalog/src/components/SchemaExplorer/ApiContentViewer.tsx +1 -32
- package/eventcatalog/src/components/SchemaExplorer/DiffViewer.tsx +20 -67
- package/eventcatalog/src/components/SchemaExplorer/SchemaContentViewer.tsx +2 -11
- package/eventcatalog/src/components/SchemaExplorer/SchemaDetailsPanel.tsx +11 -60
- package/eventcatalog/src/components/SchemaExplorer/SchemaExplorer.tsx +1 -3
- package/eventcatalog/src/components/SchemaExplorer/SchemaPageViewer.tsx +0 -3
- package/eventcatalog/src/components/SchemaExplorer/VersionHistoryModal.tsx +2 -9
- package/eventcatalog/src/components/SchemaExplorer/parse-schema.ts +46 -0
- package/eventcatalog/src/components/SchemaExplorer/utils.ts +11 -0
- package/eventcatalog/src/components/Settings/AssistantSettingsForm.tsx +2 -9
- package/eventcatalog/src/components/Settings/LicenseSettings.tsx +288 -0
- package/eventcatalog/src/components/Settings/LlmAccessSettingsForm.tsx +3 -19
- package/eventcatalog/src/components/Settings/McpSettingsForm.tsx +85 -30
- package/eventcatalog/src/components/Settings/SettingsShared.tsx +7 -75
- package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +2 -2
- package/eventcatalog/src/components/TrialBadge.astro +82 -0
- package/eventcatalog/src/content.config.ts +9 -96
- package/eventcatalog/src/{enterprise → features}/ai/chat-api.ts +22 -34
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/ga4.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/gtm.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/adapters/posthog.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsHead.astro +2 -4
- package/eventcatalog/src/{enterprise → features}/analytics/components/AnalyticsTracker.astro +2 -4
- package/eventcatalog/src/{enterprise → features}/analytics/tracker.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/api/catalog.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/[...auth].ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware-auth.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/auth/middleware/middleware.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/custom-pages.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/index.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/collections/resource-docs.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/collection.ts +0 -5
- package/eventcatalog/src/features/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +9 -0
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/index.tsx +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/components/CustomDocsNav/types.ts +0 -5
- package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/index.astro → features/custom-documentation/components/CustomDocumentationPage.astro} +5 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/badge-styles.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/custom-docs.ts +1 -6
- package/eventcatalog/src/{enterprise → features}/custom-documentation/utils/docs-search.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/custom-pages/routes.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/directory/user-team-directory.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/field-extractor.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/field-indexer.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/fields-db.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/fields/pages/api/fields.ts +1 -6
- package/eventcatalog/src/{enterprise → features}/fields/pages/fields.astro +1 -2
- package/eventcatalog/src/{enterprise → features}/integrations/eventcatalog-features.ts +17 -75
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/links.ts +59 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/node-chat.tsx +299 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/shared.ts +14 -0
- package/eventcatalog/src/features/mcp/apps/architecture-diagram/view.tsx +454 -0
- package/eventcatalog/src/features/mcp/apps/generated/viewer.html +432 -0
- package/eventcatalog/src/features/mcp/apps/mermaid-stub.ts +10 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/schema-code.tsx +65 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/shared.ts +23 -0
- package/eventcatalog/src/features/mcp/apps/schema-viewer/view.tsx +170 -0
- package/eventcatalog/src/features/mcp/apps/shared/app-view.tsx +98 -0
- package/eventcatalog/src/features/mcp/apps/shared/resource-types.ts +15 -0
- package/eventcatalog/src/features/mcp/apps/viewer/shared.ts +24 -0
- package/eventcatalog/src/features/mcp/apps/viewer/styles.css +25 -0
- package/eventcatalog/src/features/mcp/apps/viewer/view.tsx +59 -0
- package/eventcatalog/src/features/mcp/mcp-app-icons.ts +63 -0
- package/eventcatalog/src/features/mcp/mcp-apps.ts +160 -0
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-auth.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-scope.ts +7 -7
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-scoped-tools.ts +47 -40
- package/eventcatalog/src/{enterprise → features}/mcp/mcp-server.ts +347 -34
- package/eventcatalog/src/{enterprise → features}/mcp/oauth-protected-resource.ts +0 -5
- package/eventcatalog/src/features/mcp/schema-viewer.ts +24 -0
- package/eventcatalog/src/{enterprise → features}/tools/catalog-tools.ts +133 -102
- package/eventcatalog/src/features/tools/index.ts +5 -0
- package/eventcatalog/src/{enterprise → features}/visualizer-layout/reset.ts +0 -5
- package/eventcatalog/src/{enterprise → features}/visualizer-layout/save.ts +0 -5
- package/eventcatalog/src/layouts/BaseLayout.astro +2 -2
- package/eventcatalog/src/layouts/Footer.astro +31 -39
- package/eventcatalog/src/layouts/SettingsLayout.astro +6 -6
- package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +7 -37
- package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts +0 -22
- package/eventcatalog/src/{enterprise → pages}/api/schemas/services/[id]/[version]/[specification]/index.ts +0 -19
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/_index.data.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro +1 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/_index.data.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/index.astro +1 -5
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].md.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId].mdx.ts +2 -6
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +9 -5
- package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +12 -0
- package/eventcatalog/src/{enterprise/custom-documentation/pages/docs/custom/root-index.astro → pages/docs/custom/index.astro} +1 -23
- package/eventcatalog/src/pages/docs/llm/llms-full.txt.ts +4 -9
- package/eventcatalog/src/pages/docs/llm/llms.txt.ts +4 -4
- package/eventcatalog/src/pages/docs/llm/schemas.txt.ts +0 -11
- package/eventcatalog/src/pages/docs/services/[id]/[docType]/[docId]/index.astro +2 -2
- package/eventcatalog/src/pages/index.astro +2 -2
- package/eventcatalog/src/pages/schemas/[type]/[id]/[version]/index.astro +0 -3
- package/eventcatalog/src/pages/schemas/explorer/index.astro +1 -4
- package/eventcatalog/src/pages/settings/assistant.astro +2 -4
- package/eventcatalog/src/pages/settings/license.astro +18 -0
- package/eventcatalog/src/pages/settings/llm-access.astro +1 -4
- package/eventcatalog/src/pages/settings/mcp.astro +33 -4
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/_index.data.ts +1 -2
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/data/index.astro +2 -45
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/entity-map/index.astro +1 -1
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version].mermaid.ts +7 -109
- package/eventcatalog/src/pages/visualiser/_mermaid-route.ts +78 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/_index.data.ts +44 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/entity-map/index.astro +1 -1
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/index.astro +56 -0
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version]/systems-context/index.astro +3 -40
- package/eventcatalog/src/pages/visualiser/domains/[id]/[version].mermaid.ts +20 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/_index.data.ts +29 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/context/index.astro +3 -38
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version]/index.astro +56 -0
- package/eventcatalog/src/pages/visualiser/systems/[id]/[version].mermaid.ts +20 -0
- package/eventcatalog/src/stores/sidebar-store/builders/agent.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/container.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/data-product.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/domain.ts +7 -32
- package/eventcatalog/src/stores/sidebar-store/builders/entity.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/message.ts +1 -1
- package/eventcatalog/src/stores/sidebar-store/builders/service.ts +2 -8
- package/eventcatalog/src/stores/sidebar-store/builders/system.ts +2 -12
- package/eventcatalog/src/stores/sidebar-store/custom-sidebar.ts +0 -10
- package/eventcatalog/src/stores/sidebar-store/state.ts +4 -6
- package/eventcatalog/src/styles/theme.css +22 -18
- package/eventcatalog/src/styles/themes/forest.css +8 -8
- package/eventcatalog/src/styles/themes/ocean.css +8 -8
- package/eventcatalog/src/styles/themes/sapphire.css +8 -8
- package/eventcatalog/src/styles/themes/sunset.css +8 -8
- package/eventcatalog/src/utils/clipboard.ts +4 -4
- package/eventcatalog/src/utils/collections/flow-step-schema.ts +117 -0
- package/eventcatalog/src/utils/collections/pointer-schema.ts +7 -0
- package/eventcatalog/src/utils/collections/resource-docs.ts +677 -14
- package/eventcatalog/src/utils/collections/schema-loader.ts +0 -5
- package/eventcatalog/src/utils/feature.ts +14 -23
- package/eventcatalog/src/utils/license.ts +114 -0
- package/eventcatalog/src/utils/node-graphs/architecture-diagram-types.ts +32 -0
- package/eventcatalog/src/utils/node-graphs/architecture-diagram.ts +84 -0
- package/eventcatalog/src/utils/node-graphs/channel-node-graph.ts +4 -25
- package/eventcatalog/src/utils/node-graphs/container-node-graph.ts +12 -39
- package/eventcatalog/src/utils/node-graphs/data-products-node-graph.ts +11 -27
- package/eventcatalog/src/utils/node-graphs/domain-levels-node-graph.ts +679 -0
- package/eventcatalog/src/utils/node-graphs/domains-node-graph.ts +3 -20
- package/eventcatalog/src/utils/node-graphs/export-mermaid.ts +51 -4
- package/eventcatalog/src/utils/node-graphs/field-node-graph.ts +8 -23
- package/eventcatalog/src/utils/node-graphs/flow-lanes.ts +119 -0
- package/eventcatalog/src/utils/node-graphs/flows-node-graph.ts +133 -47
- package/eventcatalog/src/utils/node-graphs/layout-node-graph.ts +28 -0
- package/eventcatalog/src/utils/node-graphs/layout-persistence.ts +3 -3
- package/eventcatalog/src/utils/node-graphs/message-node-graph.ts +16 -34
- package/eventcatalog/src/utils/node-graphs/services-node-graph.ts +11 -25
- package/eventcatalog/src/utils/node-graphs/system-context-node-graph.ts +18 -54
- package/eventcatalog/src/utils/node-graphs/system-levels-node-graph.ts +59 -0
- package/eventcatalog/src/utils/node-graphs/systems-node-graph.ts +20 -80
- package/eventcatalog/src/utils/node-graphs/utils/utils.ts +1 -78
- package/eventcatalog/src/utils/trial.ts +36 -0
- package/eventcatalog/tsconfig.json +1 -1
- package/package.json +11 -11
- package/dist/chunk-FV56YFM4.js +0 -7
- package/dist/federation/entitlement.cjs +0 -31
- package/dist/federation/entitlement.d.cts +0 -12
- package/dist/federation/entitlement.d.ts +0 -12
- package/dist/federation/entitlement.js +0 -6
- package/dist/runtime-dependencies/dagre.mjs +0 -3
- package/eventcatalog/src/components/Settings/BillingSettingsForm.tsx +0 -265
- package/eventcatalog/src/enterprise/LICENSE +0 -57
- package/eventcatalog/src/enterprise/README.md +0 -5
- package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +0 -691
- package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNav.astro +0 -9
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro +0 -18
- package/eventcatalog/src/enterprise/custom-documentation/pages/docs/custom/feature.astro +0 -171
- package/eventcatalog/src/enterprise/feature.ts +0 -75
- package/eventcatalog/src/enterprise/tools/index.ts +0 -10
- package/eventcatalog/src/hooks/eventcatalog-visualizer.ts +0 -126
- package/eventcatalog/src/pages/settings/billing.astro +0 -17
- package/eventcatalog/src/pages/visualiser/domain-integrations/index.astro +0 -26
- package/eventcatalog/src/types/mcp-modules.d.ts +0 -67
- package/eventcatalog/src/utils/node-graphs/domains-canvas.ts +0 -261
- package/eventcatalog/src/utils/node-graphs/export-node-graph.ts +0 -91
- /package/eventcatalog/src/{enterprise → features}/auth/error.astro +0 -0
- /package/eventcatalog/src/{enterprise → features}/auth/login.astro +0 -0
- /package/eventcatalog/src/{enterprise → features}/auth/unauthorized.astro +0 -0
- /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path]/_index.data.ts +0 -0
- /package/eventcatalog/src/{enterprise/custom-documentation/pages → pages}/docs/custom/[...path].mdx.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
import VerticalSideBarLayout from './VerticalSideBarLayout.astro';
|
|
3
3
|
import { buildUrl } from '@utils/url-builder';
|
|
4
|
-
import { Settings, Server, Bot, FileText,
|
|
4
|
+
import { Settings, Server, Bot, FileText, BadgeCheck } from 'lucide-react';
|
|
5
5
|
|
|
6
|
-
export type SettingsSection = 'general' | 'mcp' | 'assistant' | 'llm-access' | '
|
|
6
|
+
export type SettingsSection = 'general' | 'mcp' | 'assistant' | 'llm-access' | 'license';
|
|
7
7
|
|
|
8
8
|
interface Props {
|
|
9
9
|
title: string;
|
|
@@ -63,10 +63,10 @@ const groups: SectionGroup[] = [
|
|
|
63
63
|
label: 'Workspace',
|
|
64
64
|
items: [
|
|
65
65
|
{
|
|
66
|
-
id: '
|
|
67
|
-
label: '
|
|
68
|
-
href: buildUrl('/settings/
|
|
69
|
-
icon:
|
|
66
|
+
id: 'license',
|
|
67
|
+
label: 'License',
|
|
68
|
+
href: buildUrl('/settings/license'),
|
|
69
|
+
icon: BadgeCheck,
|
|
70
70
|
},
|
|
71
71
|
],
|
|
72
72
|
},
|
|
@@ -50,12 +50,12 @@ import { getDataProducts } from '@utils/collections/data-products';
|
|
|
50
50
|
import { isCollectionVisibleInCatalog } from '@eventcatalog';
|
|
51
51
|
import { buildUrl } from '@utils/url-builder';
|
|
52
52
|
import { getQueries } from '@utils/collections/queries';
|
|
53
|
-
import { getFirstNavigationPage } from '@
|
|
53
|
+
import { getFirstNavigationPage } from '@features/custom-documentation/utils/custom-docs';
|
|
54
54
|
|
|
55
|
-
import {
|
|
55
|
+
import { isSSR } from '@utils/feature';
|
|
56
56
|
|
|
57
57
|
const customDocs = await getCollection('customPages');
|
|
58
|
-
const firstCustomDocsPage =
|
|
58
|
+
const firstCustomDocsPage = customDocs.length > 0 ? await getFirstNavigationPage() : null;
|
|
59
59
|
|
|
60
60
|
let events: any[] = [];
|
|
61
61
|
let commands: any[] = [];
|
|
@@ -84,11 +84,9 @@ let dataProducts: any[] = [];
|
|
|
84
84
|
]);
|
|
85
85
|
|
|
86
86
|
// Try and load any custom styles if they exist
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
} catch (error) {}
|
|
91
|
-
}
|
|
87
|
+
try {
|
|
88
|
+
await import('@catalog/styles');
|
|
89
|
+
} catch (error) {}
|
|
92
90
|
|
|
93
91
|
const currentPath = Astro.url.pathname;
|
|
94
92
|
const wrapContent = Astro.props.wrapContent ?? true;
|
|
@@ -294,7 +292,7 @@ const builtinNavigationItems: Record<string, Omit<VerticalNavigationItem, 'curre
|
|
|
294
292
|
const defaultNavigationGroups: NavigationGroupConfig[] = [
|
|
295
293
|
{
|
|
296
294
|
id: 'main',
|
|
297
|
-
items: [{ id: '/' }, { id: '/docs/custom', visible:
|
|
295
|
+
items: [{ id: '/' }, { id: '/docs/custom', visible: customDocs.length > 0 }],
|
|
298
296
|
},
|
|
299
297
|
{
|
|
300
298
|
id: 'browse',
|
|
@@ -423,7 +421,6 @@ const clientNavigationItems = navigationGroups.flatMap((group) =>
|
|
|
423
421
|
);
|
|
424
422
|
const { title, description, showNestedSideBar = true, showHeader = true, reducedContentPadding = false } = Astro.props;
|
|
425
423
|
|
|
426
|
-
const canPageBeEmbedded = isEmbedEnabled();
|
|
427
424
|
const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/docs', true)];
|
|
428
425
|
---
|
|
429
426
|
|
|
@@ -600,10 +597,6 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
600
597
|
justify-content: center;
|
|
601
598
|
padding: 0.75rem 0.25rem;
|
|
602
599
|
}
|
|
603
|
-
:root[data-vertical-nav-collapsed='true'] .vertical-nav-rail .nav-premium-icon,
|
|
604
|
-
.vertical-nav-rail[data-collapsed='true'] .nav-premium-icon {
|
|
605
|
-
margin-left: 0;
|
|
606
|
-
}
|
|
607
600
|
:root[data-vertical-nav-collapsed='true'] .vertical-nav-rail .nav-collapse-icon,
|
|
608
601
|
.vertical-nav-rail[data-collapsed='true'] .nav-collapse-icon {
|
|
609
602
|
transform: rotate(180deg);
|
|
@@ -859,22 +852,6 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
859
852
|
)
|
|
860
853
|
}
|
|
861
854
|
</main>
|
|
862
|
-
|
|
863
|
-
<!-- Create a overlay that tells people to purchase backstage plugin if they want to embed the page -->
|
|
864
|
-
<div class="absolute inset-0 bg-black items-center justify-center z-50 hidden" id="embed-overlay">
|
|
865
|
-
<div class="text-white text-center space-y-4">
|
|
866
|
-
<div>
|
|
867
|
-
<h1 class="text-2xl font-bold">EventCatalog Backstage Integration</h1>
|
|
868
|
-
<p class="text-md text-red-500">Missing license key for backstage integration.</p>
|
|
869
|
-
</div>
|
|
870
|
-
<div>
|
|
871
|
-
<p class="text-sm text-gray-500">Please configure the backstage plugin to embed this page into Backstage.</p>
|
|
872
|
-
<a href="https://www.eventcatalog.dev/integrations/backstage" class="text-blue-500 text-xs"
|
|
873
|
-
>Configure backstage plugin →</a
|
|
874
|
-
>
|
|
875
|
-
</div>
|
|
876
|
-
</div>
|
|
877
|
-
</div>
|
|
878
855
|
</div>
|
|
879
856
|
</main>
|
|
880
857
|
</BaseLayout>
|
|
@@ -883,7 +860,6 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
883
860
|
<script
|
|
884
861
|
define:vars={{
|
|
885
862
|
clientNavigationItems,
|
|
886
|
-
canPageBeEmbedded,
|
|
887
863
|
verticalNavAutoCollapsePaths,
|
|
888
864
|
}}
|
|
889
865
|
>
|
|
@@ -1145,12 +1121,6 @@ const verticalNavAutoCollapsePaths = [buildUrl('/discover', true), buildUrl('/do
|
|
|
1145
1121
|
}
|
|
1146
1122
|
};
|
|
1147
1123
|
|
|
1148
|
-
if (embeded && !canPageBeEmbedded) {
|
|
1149
|
-
const overlay = document.getElementById('embed-overlay');
|
|
1150
|
-
overlay.style.display = 'flex';
|
|
1151
|
-
return;
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
1124
|
if (embeded) {
|
|
1155
1125
|
const elementsToHide = [
|
|
1156
1126
|
'eventcatalog-vertical-nav',
|
package/eventcatalog/src/{enterprise → pages}/api/schemas/[collection]/[id]/[version]/index.ts
RENAMED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Licensed under the EventCatalog Commercial License.
|
|
3
|
-
* See /packages/core/eventcatalog/src/enterprise/LICENSE
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
import type { APIRoute } from 'astro';
|
|
7
2
|
import { getCollection } from 'astro:content';
|
|
8
|
-
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
9
3
|
import { sortVersioned } from '@utils/collections/util';
|
|
10
4
|
|
|
11
5
|
const findSchema = async (collection: string | undefined, id: string, version: string | undefined) => {
|
|
@@ -59,22 +53,6 @@ export async function getStaticPaths() {
|
|
|
59
53
|
}
|
|
60
54
|
|
|
61
55
|
export const GET: APIRoute = async ({ props, params }) => {
|
|
62
|
-
if (!isEventCatalogScaleEnabled()) {
|
|
63
|
-
return new Response(
|
|
64
|
-
JSON.stringify({
|
|
65
|
-
error: 'feature_not_available_on_server',
|
|
66
|
-
message: 'Schema API is not enabled for this deployment and supported in EventCatalog Scale.',
|
|
67
|
-
}),
|
|
68
|
-
{
|
|
69
|
-
status: 501,
|
|
70
|
-
headers: {
|
|
71
|
-
'Content-Type': 'application/json',
|
|
72
|
-
'Cache-Control': 'no-store',
|
|
73
|
-
},
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
56
|
// In static mode, props are pre-computed by getStaticPaths
|
|
79
57
|
if (props.schema !== undefined) {
|
|
80
58
|
return new Response(props.schema, {
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Licensed under the EventCatalog Commercial License.
|
|
3
|
-
* See /packages/core/eventcatalog/src/enterprise/LICENSE
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
1
|
import type { APIRoute } from 'astro';
|
|
7
2
|
import { getCollection } from 'astro:content';
|
|
8
3
|
import path from 'node:path';
|
|
9
4
|
import fs from 'node:fs';
|
|
10
5
|
import { getSpecificationsForService } from '@utils/collections/services';
|
|
11
|
-
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
12
6
|
import { resourceFileExists, readResourceFile } from '@utils/resource-files';
|
|
13
7
|
|
|
14
8
|
export async function getStaticPaths() {
|
|
@@ -39,19 +33,6 @@ export async function getStaticPaths() {
|
|
|
39
33
|
}
|
|
40
34
|
|
|
41
35
|
export const GET: APIRoute = async ({ props, params }) => {
|
|
42
|
-
if (!isEventCatalogScaleEnabled()) {
|
|
43
|
-
return new Response(
|
|
44
|
-
JSON.stringify({
|
|
45
|
-
error: 'feature_not_available_on_server',
|
|
46
|
-
message: 'Schema API is not enabled for this deployment and supported in EventCatalog Scale.',
|
|
47
|
-
}),
|
|
48
|
-
{
|
|
49
|
-
status: 501,
|
|
50
|
-
headers: { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' },
|
|
51
|
-
}
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
36
|
// In static mode, props are pre-computed by getStaticPaths
|
|
56
37
|
if (props.schema) {
|
|
57
38
|
return new Response(props.schema, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSSR
|
|
1
|
+
import { isSSR } from '@utils/feature';
|
|
2
2
|
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
3
3
|
import { getResourceDocs, getResourceDocsForResource, type ResourceCollection } from '@utils/collections/resource-docs';
|
|
4
4
|
|
|
@@ -17,7 +17,7 @@ const supportedResourceCollections = new Set<ResourceCollection>([
|
|
|
17
17
|
|
|
18
18
|
export class Page extends HybridPage {
|
|
19
19
|
static async getStaticPaths() {
|
|
20
|
-
if (isSSR()
|
|
20
|
+
if (isSSR()) {
|
|
21
21
|
return [];
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -37,10 +37,6 @@ export class Page extends HybridPage {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
protected static async fetchData(params: any) {
|
|
40
|
-
if (!isResourceDocsEnabled()) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
const decodeParam = (value: string) => {
|
|
45
41
|
try {
|
|
46
42
|
return decodeURIComponent(value);
|
package/eventcatalog/src/pages/docs/[type]/[id]/[version]/[docType]/[docId]/[docVersion]/index.astro
CHANGED
|
@@ -8,7 +8,7 @@ import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
11
|
-
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled
|
|
11
|
+
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
12
12
|
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
13
13
|
import { getIcon } from '@utils/badges';
|
|
14
14
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
@@ -18,10 +18,6 @@ import { Page } from './_index.data';
|
|
|
18
18
|
export const prerender = Page.prerender;
|
|
19
19
|
export const getStaticPaths = Page.getStaticPaths;
|
|
20
20
|
|
|
21
|
-
if (!isResourceDocsEnabled()) {
|
|
22
|
-
return Astro.redirect(buildUrl('/docs/custom/feature'));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
const props = await Page.getData(Astro);
|
|
26
22
|
const { Content, headings } = await render(props);
|
|
27
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSSR
|
|
1
|
+
import { isSSR } from '@utils/feature';
|
|
2
2
|
import { HybridPage } from '@utils/page-loaders/hybrid-page';
|
|
3
3
|
import { getResourceDocs, getResourceDocsForResource, type ResourceCollection } from '@utils/collections/resource-docs';
|
|
4
4
|
|
|
@@ -17,7 +17,7 @@ const supportedResourceCollections = new Set<ResourceCollection>([
|
|
|
17
17
|
|
|
18
18
|
export class Page extends HybridPage {
|
|
19
19
|
static async getStaticPaths() {
|
|
20
|
-
if (isSSR()
|
|
20
|
+
if (isSSR()) {
|
|
21
21
|
return [];
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -37,10 +37,6 @@ export class Page extends HybridPage {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
protected static async fetchData(params: any) {
|
|
40
|
-
if (!isResourceDocsEnabled()) {
|
|
41
|
-
return null;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
const decodeParam = (value: string) => {
|
|
45
41
|
try {
|
|
46
42
|
return decodeURIComponent(value);
|
|
@@ -8,7 +8,7 @@ import CopyAsMarkdown from '@components/CopyAsMarkdown';
|
|
|
8
8
|
import Badge from '@components/Badge.astro';
|
|
9
9
|
import { buildUrl } from '@utils/url-builder';
|
|
10
10
|
import { AlignLeftIcon, HistoryIcon } from 'lucide-react';
|
|
11
|
-
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled
|
|
11
|
+
import { isEventCatalogChatVisible, isMarkdownDownloadEnabled } from '@utils/feature';
|
|
12
12
|
import { getIcon } from '@utils/badges';
|
|
13
13
|
import { collectionToResourceMap } from '@utils/collections/util';
|
|
14
14
|
import { getResourceDocTypeLabel } from '@utils/collections/resource-docs';
|
|
@@ -18,10 +18,6 @@ import { Page } from './_index.data';
|
|
|
18
18
|
export const prerender = Page.prerender;
|
|
19
19
|
export const getStaticPaths = Page.getStaticPaths;
|
|
20
20
|
|
|
21
|
-
if (!isResourceDocsEnabled()) {
|
|
22
|
-
return Astro.redirect(buildUrl('/docs/custom/feature'));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
21
|
const props = await Page.getData(Astro);
|
|
26
22
|
const { Content, headings } = await render(props);
|
|
27
23
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { APIRoute } from 'astro';
|
|
6
6
|
import fs from 'fs';
|
|
7
|
-
import { isLLMSTxtEnabled,
|
|
7
|
+
import { isLLMSTxtEnabled, isSSR } from '@utils/feature';
|
|
8
8
|
import { getResourceDocs, getResourceDocsForResource, type ResourceCollection } from '@utils/collections/resource-docs';
|
|
9
9
|
import { filterMarkdownForAgents } from '@utils/llms';
|
|
10
10
|
|
|
@@ -22,7 +22,7 @@ const supportedResourceCollections = new Set<ResourceCollection>([
|
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
24
|
export async function getStaticPaths() {
|
|
25
|
-
if (isSSR() || !isLLMSTxtEnabled()
|
|
25
|
+
if (isSSR() || !isLLMSTxtEnabled()) {
|
|
26
26
|
return [];
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -46,10 +46,6 @@ export const GET: APIRoute = async ({ params, props }) => {
|
|
|
46
46
|
return new Response('llms.txt is not enabled for this Catalog.', { status: 404 });
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
if (!isResourceDocsEnabled()) {
|
|
50
|
-
return new Response('Resource docs are not enabled for this Catalog.', { status: 404 });
|
|
51
|
-
}
|
|
52
|
-
|
|
53
49
|
let filePath = (props as { filePath?: string } | undefined)?.filePath;
|
|
54
50
|
|
|
55
51
|
if (!filePath && isSSR()) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import type { APIRoute } from 'astro';
|
|
6
6
|
import fs from 'fs';
|
|
7
|
-
import { isLLMSTxtEnabled,
|
|
7
|
+
import { isLLMSTxtEnabled, isSSR } from '@utils/feature';
|
|
8
8
|
import { getResourceDocs, getResourceDocsForResource, type ResourceCollection } from '@utils/collections/resource-docs';
|
|
9
9
|
import { filterMarkdownForAgents } from '@utils/llms';
|
|
10
10
|
|
|
@@ -23,7 +23,7 @@ const supportedResourceCollections = new Set<ResourceCollection>([
|
|
|
23
23
|
]);
|
|
24
24
|
|
|
25
25
|
export async function getStaticPaths() {
|
|
26
|
-
if (isSSR() || !isLLMSTxtEnabled()
|
|
26
|
+
if (isSSR() || !isLLMSTxtEnabled()) {
|
|
27
27
|
return [];
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -47,10 +47,6 @@ export const GET: APIRoute = async ({ params, props }) => {
|
|
|
47
47
|
return new Response('llms.txt is not enabled for this Catalog.', { status: 404 });
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
if (!isResourceDocsEnabled()) {
|
|
51
|
-
return new Response('Resource docs are not enabled for this Catalog.', { status: 404 });
|
|
52
|
-
}
|
|
53
|
-
|
|
54
50
|
let filePath = (props as { filePath?: string } | undefined)?.filePath;
|
|
55
51
|
|
|
56
52
|
if (!filePath && isSSR()) {
|
|
@@ -342,8 +342,8 @@ const flowEmbeds = getMDXComponentsByName(props.body || '', 'Flow') || [];
|
|
|
342
342
|
// portal so it doesn't collide with the page's default diagram.
|
|
343
343
|
//
|
|
344
344
|
// The underlying graph + visualiser link differ per page type:
|
|
345
|
-
// - systems → `systems-context`, links to /visualiser/systems/:id/:version
|
|
346
|
-
// - domains → `domains-systems-context`, links to /visualiser/domains/:id/:version
|
|
345
|
+
// - systems → `systems-context`, links to level 1 of /visualiser/systems/:id/:version
|
|
346
|
+
// - domains → `domains-systems-context`, links to level 1 of /visualiser/domains/:id/:version
|
|
347
347
|
const contextDiagramSupported = props.collection === 'systems' || props.collection === 'domains';
|
|
348
348
|
const contextDiagrams = contextDiagramSupported
|
|
349
349
|
? (getMDXComponentsByName(props.body || '', 'ContextDiagram') || []).map((diagram: any) => {
|
|
@@ -357,8 +357,8 @@ const contextDiagrams = contextDiagramSupported
|
|
|
357
357
|
graphCollection: props.collection === 'domains' ? 'domains-systems-context' : 'systems-context',
|
|
358
358
|
visualiserUrl:
|
|
359
359
|
props.collection === 'domains'
|
|
360
|
-
? buildUrl(`/visualiser/domains/${id}/${version}
|
|
361
|
-
: buildUrl(`/visualiser/systems/${id}/${version}
|
|
360
|
+
? buildUrl(`/visualiser/domains/${id}/${version}?level=1`)
|
|
361
|
+
: buildUrl(`/visualiser/systems/${id}/${version}?level=1`),
|
|
362
362
|
};
|
|
363
363
|
})
|
|
364
364
|
: [];
|
|
@@ -624,11 +624,15 @@ if (!isAdrPage && !hasCurrentFlowEmbed && !hasCurrentPageNodeGraph) {
|
|
|
624
624
|
nodeGraphs.length > 0 &&
|
|
625
625
|
nodeGraphs.map((nodeGraph: any) => {
|
|
626
626
|
const collection = resourceToCollectionMap[nodeGraph.type as keyof typeof resourceToCollectionMap];
|
|
627
|
+
// A domain's graph is its Diagram page's (opening at level 1: the
|
|
628
|
+
// domain, its systems and the domains it talks to)
|
|
629
|
+
const isDomain = collection === 'domains';
|
|
627
630
|
return (
|
|
628
631
|
<NodeGraph
|
|
629
632
|
id={nodeGraph.id}
|
|
630
633
|
version={nodeGraph.version}
|
|
631
|
-
collection={collection}
|
|
634
|
+
collection={isDomain ? 'domains-levels' : collection}
|
|
635
|
+
overview={isDomain ? { label: 'domains it talks to' } : undefined}
|
|
632
636
|
title={nodeGraph.title}
|
|
633
637
|
mode={nodeGraph.mode || 'simple'}
|
|
634
638
|
linksToVisualiser={true}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
import CustomDocumentationPage from '@features/custom-documentation/components/CustomDocumentationPage.astro';
|
|
3
|
+
import { Page } from './_index.data';
|
|
4
|
+
|
|
5
|
+
export const prerender = Page.prerender;
|
|
6
|
+
export const getStaticPaths = Page.getStaticPaths;
|
|
7
|
+
|
|
8
|
+
// Get data
|
|
9
|
+
const props = await Page.getData(Astro);
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
<CustomDocumentationPage {...props} />
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
3
|
import { Code } from 'astro-expressive-code/components';
|
|
4
|
-
import { isCustomDocsEnabled } from '@utils/feature';
|
|
5
4
|
|
|
6
5
|
// Example for folder structure
|
|
7
6
|
const folderStructureExample = `my-catalog/
|
|
@@ -92,10 +91,6 @@ module.exports = {
|
|
|
92
91
|
]
|
|
93
92
|
}
|
|
94
93
|
}`;
|
|
95
|
-
|
|
96
|
-
if (!isCustomDocsEnabled()) {
|
|
97
|
-
return Astro.redirect('/docs/custom/feature');
|
|
98
|
-
}
|
|
99
94
|
---
|
|
100
95
|
|
|
101
96
|
<VerticalSideBarLayout title="Custom Documentation" showNestedSideBar={false}>
|
|
@@ -104,14 +99,7 @@ if (!isCustomDocsEnabled()) {
|
|
|
104
99
|
<div class="mb-12">
|
|
105
100
|
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-6">
|
|
106
101
|
<div>
|
|
107
|
-
<
|
|
108
|
-
<h1 class="text-4xl font-semibold text-[rgb(var(--ec-page-text))] font-inter">Custom Documentation</h1>
|
|
109
|
-
<div
|
|
110
|
-
class="inline-flex items-center px-3 py-1.5 rounded-full text-xs font-medium bg-[rgb(var(--ec-accent-subtle))] text-[rgb(var(--ec-accent-text))] border border-[rgb(var(--ec-accent)/0.3)] shadow-xs"
|
|
111
|
-
>
|
|
112
|
-
Pro feature
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
102
|
+
<h1 class="text-4xl font-semibold text-[rgb(var(--ec-page-text))] font-inter mb-3">Custom Documentation</h1>
|
|
115
103
|
<p class="text-base mb-0 text-[rgb(var(--ec-page-text-muted))] max-w-3xl">
|
|
116
104
|
Add custom documentation to EventCatalog to create a unified source of truth for your team. Document your
|
|
117
105
|
architecture decisions, patterns, and guidelines.
|
|
@@ -124,16 +112,6 @@ if (!isCustomDocsEnabled()) {
|
|
|
124
112
|
>
|
|
125
113
|
Read documentation →
|
|
126
114
|
</a>
|
|
127
|
-
{
|
|
128
|
-
!isCustomDocsEnabled() && (
|
|
129
|
-
<a
|
|
130
|
-
href="https://www.eventcatalog.dev/pro/trial"
|
|
131
|
-
class="inline-flex items-center justify-center px-5 py-2 border border-transparent text-sm font-medium rounded-md text-[rgb(var(--ec-button-text))] bg-gradient-to-r from-[rgb(var(--ec-accent-gradient-from))] to-[rgb(var(--ec-accent-gradient-to))] hover:opacity-90 shadow-xs"
|
|
132
|
-
>
|
|
133
|
-
Start 14-day trial
|
|
134
|
-
</a>
|
|
135
|
-
)
|
|
136
|
-
}
|
|
137
115
|
</div>
|
|
138
116
|
</div>
|
|
139
117
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCollection, type CollectionEntry } from 'astro:content';
|
|
2
2
|
import type { APIRoute } from 'astro';
|
|
3
3
|
import fs from 'fs';
|
|
4
|
-
import {
|
|
4
|
+
import { isLLMSTxtEnabled } from '@utils/feature';
|
|
5
5
|
import { addSchemaToMarkdown, filterMarkdownForAgents } from '@utils/llms';
|
|
6
6
|
|
|
7
7
|
type AllowedCollections =
|
|
@@ -37,7 +37,7 @@ const flows = await getCollection('flows');
|
|
|
37
37
|
const containers = await getCollection('containers');
|
|
38
38
|
const ubiquitousLanguages = await getCollection('ubiquitousLanguages');
|
|
39
39
|
const customDocs = await getCollection('customPages');
|
|
40
|
-
const resourceDocs =
|
|
40
|
+
const resourceDocs = await getCollection('resourceDocs');
|
|
41
41
|
|
|
42
42
|
export const GET: APIRoute = async ({ params, request }) => {
|
|
43
43
|
if (!isLLMSTxtEnabled()) {
|
|
@@ -61,13 +61,8 @@ export const GET: APIRoute = async ({ params, request }) => {
|
|
|
61
61
|
...ubiquitousLanguages,
|
|
62
62
|
];
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
if (isResourceDocsEnabled()) {
|
|
69
|
-
resources.push(...(resourceDocs as CollectionEntry<AllowedCollections>[]));
|
|
70
|
-
}
|
|
64
|
+
resources.push(...(customDocs as CollectionEntry<AllowedCollections>[]));
|
|
65
|
+
resources.push(...(resourceDocs as CollectionEntry<AllowedCollections>[]));
|
|
71
66
|
|
|
72
67
|
const content = resources
|
|
73
68
|
.map((item) => {
|
|
@@ -2,7 +2,7 @@ import { getCollection } from 'astro:content';
|
|
|
2
2
|
import config from '@config';
|
|
3
3
|
import type { APIRoute } from 'astro';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { isLLMSTxtEnabled } from '@utils/feature';
|
|
6
6
|
import { getUbiquitousLanguage } from '@utils/collections/domains';
|
|
7
7
|
import { getResourceDocs } from '@utils/collections/resource-docs';
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ const containers = await getCollection('containers');
|
|
|
25
25
|
const entities = await getCollection('entities');
|
|
26
26
|
|
|
27
27
|
const customDocs = await getCollection('customPages');
|
|
28
|
-
const resourceDocsList =
|
|
28
|
+
const resourceDocsList = await getResourceDocs();
|
|
29
29
|
|
|
30
30
|
const ubiquitousLanguages: Record<string, { id: string; version: string; properties: any }[]> = {};
|
|
31
31
|
|
|
@@ -166,10 +166,10 @@ export const GET: APIRoute = async ({ params, request }) => {
|
|
|
166
166
|
teams.map((item) => formatSimpleItem(item, 'teams')).join('\n'),
|
|
167
167
|
'\n## Users',
|
|
168
168
|
users.map((item) => formatSimpleItem(item, 'users')).join('\n'),
|
|
169
|
-
...(
|
|
169
|
+
...(customDocs.length > 0
|
|
170
170
|
? ['\n## Custom Docs', customDocs.map((item) => formatCustomDoc(item, 'docs/custom')).join('\n')]
|
|
171
171
|
: []),
|
|
172
|
-
...(
|
|
172
|
+
...(resourceDocsList.length > 0 ? ['\n## Resource Docs', renderResourceDocs()] : []),
|
|
173
173
|
].join('\n');
|
|
174
174
|
|
|
175
175
|
return new Response(content, {
|
|
@@ -2,7 +2,6 @@ import { getCollection } from 'astro:content';
|
|
|
2
2
|
import config from '@config';
|
|
3
3
|
import type { APIRoute } from 'astro';
|
|
4
4
|
import { getSpecificationsForService } from '@utils/collections/services';
|
|
5
|
-
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
6
5
|
|
|
7
6
|
type MessageCollection = 'events' | 'commands' | 'queries';
|
|
8
7
|
|
|
@@ -48,16 +47,6 @@ const getMessagesWithSchemas = (collection: MessageCollection) => {
|
|
|
48
47
|
};
|
|
49
48
|
|
|
50
49
|
export const GET: APIRoute = async ({ params, request }) => {
|
|
51
|
-
if (!isEventCatalogScaleEnabled()) {
|
|
52
|
-
return new Response(
|
|
53
|
-
JSON.stringify({
|
|
54
|
-
error: 'feature_not_available_on_server',
|
|
55
|
-
message: 'Schema API is not enabled for this deployment and supported in EventCatalog Scale.',
|
|
56
|
-
}),
|
|
57
|
-
{ status: 501, headers: { 'Content-Type': 'application/json', 'Cache-Control': 'no-store' } }
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
50
|
const url = new URL(request.url);
|
|
62
51
|
const baseUrl = process.env.LLMS_TXT_BASE_URL || `${url.origin}`;
|
|
63
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import LatestVersionRedirect from '@components/LatestVersionRedirect.astro';
|
|
3
|
-
import {
|
|
3
|
+
import { isSSR } from '@utils/feature';
|
|
4
4
|
import { buildUrl } from '@utils/url-builder';
|
|
5
5
|
import { Page as VersionedPage } from '../../../../[type]/[id]/[version]/[docType]/[docId]/_index.data';
|
|
6
6
|
import { getLatestServicePaths, getLatestServiceVersion } from '../../../_latest-version-route';
|
|
@@ -11,7 +11,7 @@ export const getStaticPaths = async () => getLatestServicePaths(await VersionedP
|
|
|
11
11
|
const { id, docType, docId } = Astro.params;
|
|
12
12
|
const version = Astro.props.redirectVersion ?? (id ? await getLatestServiceVersion(id) : undefined);
|
|
13
13
|
|
|
14
|
-
if (!
|
|
14
|
+
if (!id || !docType || !docId || !version) {
|
|
15
15
|
throw new Response(null, { status: 404, statusText: 'Resource documentation not found' });
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -3,7 +3,7 @@ import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
|
3
3
|
import { getMDXComponentsByName, parseMdxBooleanProp } from '@utils/markdown';
|
|
4
4
|
import { resourceToCollectionMap } from '@utils/collections/util';
|
|
5
5
|
import { buildUrl } from '@utils/url-builder';
|
|
6
|
-
import {
|
|
6
|
+
import { isVisualiserEnabled, isArchitectureGraphEnabled } from '@utils/feature';
|
|
7
7
|
import DefaultAstroLandingPage from './_index.astro';
|
|
8
8
|
import CustomHomepage from 'virtual:eventcatalog/homepage';
|
|
9
9
|
import config from '@config';
|
|
@@ -23,7 +23,7 @@ const props = Astro.props;
|
|
|
23
23
|
|
|
24
24
|
const pathToUserDefinedLandingPage = path.join(process.env.PROJECT_DIR || '', 'pages/homepage.astro');
|
|
25
25
|
|
|
26
|
-
if (existsSync(pathToUserDefinedLandingPage)
|
|
26
|
+
if (existsSync(pathToUserDefinedLandingPage)) {
|
|
27
27
|
CustomContent = CustomHomepage;
|
|
28
28
|
|
|
29
29
|
const [{ default: pageComponents }, { default: mdxComponents }] = await Promise.all([
|
|
@@ -8,7 +8,6 @@ import { Page } from './_index.data';
|
|
|
8
8
|
import SchemaPageViewer from '@components/SchemaExplorer/SchemaPageViewer';
|
|
9
9
|
import { pageDataLoader } from '@utils/page-loaders/page-data-loader';
|
|
10
10
|
import { sortVersioned } from '@utils/collections/util';
|
|
11
|
-
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
12
11
|
import { resourceFileExists, readResourceFile } from '@utils/resource-files';
|
|
13
12
|
import path from 'node:path';
|
|
14
13
|
import type { FlowUsage, SchemaItem } from '@components/SchemaExplorer/types';
|
|
@@ -187,7 +186,6 @@ if (isDataProduct && contractPath) {
|
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
188
|
|
|
190
|
-
const apiAccessEnabled = isEventCatalogScaleEnabled();
|
|
191
189
|
// Render the requested tab on the server so the page does not flash the default tab before hydration.
|
|
192
190
|
// Static builds cannot see the query string, so the panel also restores the tab on the client.
|
|
193
191
|
const initialTab = Astro.url.searchParams.get('tab') ?? undefined;
|
|
@@ -216,7 +214,6 @@ const initialTab = Astro.url.searchParams.get('tab') ?? undefined;
|
|
|
216
214
|
client:load
|
|
217
215
|
message={currentMessage}
|
|
218
216
|
availableVersions={sortedVersions}
|
|
219
|
-
apiAccessEnabled={apiAccessEnabled}
|
|
220
217
|
showOwners={true}
|
|
221
218
|
showProducersConsumers={true}
|
|
222
219
|
initialTab={initialTab}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import VerticalSideBarLayout from '@layouts/VerticalSideBarLayout.astro';
|
|
3
3
|
import SchemaExplorer from '@components/SchemaExplorer/SchemaExplorer';
|
|
4
|
-
import { isEventCatalogScaleEnabled } from '@utils/feature';
|
|
5
4
|
import { Page } from './_index.data';
|
|
6
5
|
// Ships the visualiser CSS in the page head for the Usage tab's node graph (see NodeGraph.astro).
|
|
7
6
|
import '@eventcatalog/visualiser/styles-core.css';
|
|
@@ -10,8 +9,6 @@ export const prerender = Page.prerender;
|
|
|
10
9
|
export const getStaticPaths = Page.getStaticPaths;
|
|
11
10
|
|
|
12
11
|
const { schemas } = await Page.getData(Astro);
|
|
13
|
-
|
|
14
|
-
const apiAccessEnabled = isEventCatalogScaleEnabled();
|
|
15
12
|
---
|
|
16
13
|
|
|
17
14
|
<VerticalSideBarLayout title="Schema Explorer - EventCatalog" showNestedSideBar={false}>
|
|
@@ -37,6 +34,6 @@ const apiAccessEnabled = isEventCatalogScaleEnabled();
|
|
|
37
34
|
class="min-h-0 overflow-hidden bg-[rgb(var(--ec-page-bg))]"
|
|
38
35
|
style={`--ec-schema-sidebar-width: 360px; margin-left: calc(var(--ec-app-content-padding-left, 5rem) * -1); margin-right: calc(var(--ec-app-content-padding-right, 5rem) * -1); height: calc(100dvh - 60px);`}
|
|
39
36
|
>
|
|
40
|
-
<SchemaExplorer client:load schemas={schemas as any}
|
|
37
|
+
<SchemaExplorer client:load schemas={schemas as any} />
|
|
41
38
|
</main>
|
|
42
39
|
</VerticalSideBarLayout>
|