@eventcatalog/core 3.26.10 → 3.26.12

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-R2DZZEDF.js → chunk-2YOG7LP3.js} +1 -1
  6. package/dist/{chunk-36UOEJB6.js → chunk-7H5F3UIH.js} +1 -1
  7. package/dist/{chunk-MCI7EV4M.js → chunk-H2UBNF2W.js} +1 -1
  8. package/dist/{chunk-MWXKKEYC.js → chunk-QFQIAUDF.js} +1 -1
  9. package/dist/{chunk-3WNDAYNT.js → chunk-ZLQPYLNW.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 +1 -1
  19. package/eventcatalog/src/components/SideNav/NestedSideBar/index.tsx +2 -0
  20. package/eventcatalog/src/content.config.ts +3 -16
  21. package/eventcatalog/src/enterprise/LICENSE +57 -0
  22. package/eventcatalog/src/enterprise/ai/chat-api.ts +5 -0
  23. package/eventcatalog/src/enterprise/analytics/adapters/ga4.ts +5 -0
  24. package/eventcatalog/src/enterprise/analytics/adapters/gtm.ts +5 -0
  25. package/eventcatalog/src/enterprise/analytics/adapters/posthog.ts +5 -0
  26. package/eventcatalog/src/enterprise/analytics/tracker.ts +5 -0
  27. package/eventcatalog/src/enterprise/api/catalog.ts +5 -0
  28. package/eventcatalog/src/{pages → enterprise}/api/schemas/[collection]/[id]/[version]/index.ts +5 -0
  29. package/eventcatalog/src/{pages → enterprise}/api/schemas/services/[id]/[version]/[specification]/index.ts +5 -0
  30. package/eventcatalog/src/enterprise/auth/[...auth].ts +5 -0
  31. package/eventcatalog/src/enterprise/auth/middleware/middleware-auth.ts +5 -0
  32. package/eventcatalog/src/enterprise/auth/middleware/middleware.ts +5 -0
  33. package/eventcatalog/src/enterprise/collections/custom-pages.ts +5 -0
  34. package/eventcatalog/src/enterprise/collections/index.ts +6 -0
  35. package/eventcatalog/src/enterprise/collections/resource-docs-utils.ts +647 -0
  36. package/eventcatalog/src/enterprise/collections/resource-docs.ts +24 -0
  37. package/eventcatalog/src/enterprise/custom-documentation/collection.ts +5 -0
  38. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +5 -0
  39. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +5 -0
  40. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +5 -0
  41. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +5 -0
  42. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/types.ts +5 -0
  43. package/eventcatalog/src/enterprise/custom-documentation/utils/badge-styles.ts +5 -0
  44. package/eventcatalog/src/enterprise/custom-documentation/utils/custom-docs.ts +5 -0
  45. package/eventcatalog/src/enterprise/feature.ts +68 -0
  46. package/eventcatalog/src/enterprise/fields/field-extractor.test.ts +5 -0
  47. package/eventcatalog/src/enterprise/fields/field-extractor.ts +5 -0
  48. package/eventcatalog/src/enterprise/fields/field-indexer.ts +5 -0
  49. package/eventcatalog/src/enterprise/fields/fields-db.test.ts +5 -0
  50. package/eventcatalog/src/enterprise/fields/fields-db.ts +5 -0
  51. package/eventcatalog/src/enterprise/fields/pages/api/fields.ts +5 -0
  52. package/eventcatalog/{integrations → src/enterprise/integrations}/eventcatalog-features.ts +48 -2
  53. package/eventcatalog/src/enterprise/mcp/mcp-server.ts +5 -0
  54. package/eventcatalog/src/enterprise/print/_message.data.ts +5 -0
  55. package/eventcatalog/src/enterprise/print/components/PrintSchemaViewer.tsx +5 -0
  56. package/eventcatalog/src/enterprise/print/utils.ts +5 -0
  57. package/eventcatalog/src/enterprise/tools/catalog-tools.ts +5 -0
  58. package/eventcatalog/src/enterprise/tools/index.ts +5 -0
  59. package/eventcatalog/src/enterprise/visualizer-layout/reset.ts +5 -0
  60. package/eventcatalog/src/enterprise/visualizer-layout/save.ts +5 -0
  61. package/eventcatalog/src/utils/collections/resource-docs.ts +13 -642
  62. package/eventcatalog/src/utils/feature.ts +27 -75
  63. package/package.json +6 -5
  64. package/LICENSE.md +0 -30
  65. package/eventcatalog/src/enterprise/LICENSE.txt +0 -4
  66. /package/eventcatalog/src/{pages → enterprise/custom-documentation/pages}/docs/custom/[...path]/_index.data.ts +0 -0
  67. /package/eventcatalog/src/{pages → enterprise/custom-documentation/pages}/docs/custom/[...path]/index.astro +0 -0
  68. /package/eventcatalog/src/{pages → enterprise/custom-documentation/pages}/docs/custom/[...path].mdx.ts +0 -0
  69. /package/eventcatalog/src/{pages → enterprise/custom-documentation/pages}/docs/custom/feature.astro +0 -0
  70. /package/eventcatalog/src/{pages/docs/custom/index.astro → enterprise/custom-documentation/pages/docs/custom/root-index.astro} +0 -0
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import React, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
2
7
  import { ChevronDoubleDownIcon, ChevronDoubleUpIcon } from '@heroicons/react/24/outline';
3
8
  import { buildUrl } from '@utils/url-builder';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  export interface SidebarItem {
2
7
  label: string;
3
8
  slug?: string;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  type ThemeBadgeType = 'domain' | 'service' | 'event' | 'command' | 'query' | 'design' | 'channel' | 'default';
2
7
 
3
8
  const THEME_BADGE_CLASSES: Record<ThemeBadgeType, string> = {
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import config from '@config';
2
7
  import fs from 'node:fs';
3
8
  import path from 'node:path';
@@ -0,0 +1,68 @@
1
+ /**
2
+ * This file is licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE for the full terms.
4
+ *
5
+ * Modifying, disabling, or circumventing the license key functionality
6
+ * in this file without a valid Commercial Subscription is prohibited.
7
+ *
8
+ * To obtain a license: https://www.eventcatalog.dev/pricing
9
+ * Free 14-day trial: https://eventcatalog.cloud/
10
+ */
11
+
12
+ import fs from 'fs';
13
+ import { join } from 'path';
14
+ import config from '../../eventcatalog.config.js';
15
+ import { isSSR } from '../utils/feature';
16
+
17
+ // These functions check for valid, legally obtained access to premium features
18
+ export const isEventCatalogStarterEnabled = () => process.env.EVENTCATALOG_STARTER === 'true';
19
+ export const isEventCatalogScaleEnabled = () => process.env.EVENTCATALOG_SCALE === 'true';
20
+
21
+ export const isPrivateRemoteSchemaEnabled = () => isEventCatalogScaleEnabled() || isEventCatalogStarterEnabled();
22
+
23
+ export const isEmbedEnabled = () => process.env.ENABLE_EMBED === 'true';
24
+
25
+ export const showEventCatalogBranding = () => {
26
+ const override = process.env.EVENTCATALOG_SHOW_BRANDING;
27
+ // if any value we return true
28
+ if (override) {
29
+ return true;
30
+ }
31
+ return !isEventCatalogStarterEnabled() && !isEventCatalogScaleEnabled();
32
+ };
33
+
34
+ export const showCustomBranding = () => {
35
+ return isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
36
+ };
37
+
38
+ export const isCustomDocsEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
39
+ export const isResourceDocsEnabled = () => isEventCatalogScaleEnabled();
40
+
41
+ export const isEventCatalogChatEnabled = () => {
42
+ const isFeatureEnabledFromPlan = isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
43
+ const directory = process.env.PROJECT_DIR || process.cwd();
44
+ const hasChatConfigurationFile = fs.existsSync(join(directory, 'eventcatalog.chat.js'));
45
+ return isFeatureEnabledFromPlan && hasChatConfigurationFile && isSSR();
46
+ };
47
+
48
+ export const isEventCatalogUpgradeEnabled = () => !isEventCatalogStarterEnabled() && !isEventCatalogScaleEnabled();
49
+ export const isCustomLandingPageEnabled = () => isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
50
+
51
+ export const isAuthEnabled = () => {
52
+ const isAuthEnabledInCatalog = config?.auth?.enabled ?? false;
53
+ const directory = process.env.PROJECT_DIR || process.cwd();
54
+ const hasAuthConfigurationFile = fs.existsSync(join(directory, 'eventcatalog.auth.js'));
55
+ return (isAuthEnabledInCatalog && hasAuthConfigurationFile && isSSR() && isEventCatalogScaleEnabled()) || false;
56
+ };
57
+
58
+ export const isCustomStylesEnabled = () => {
59
+ return isEventCatalogStarterEnabled() || isEventCatalogScaleEnabled();
60
+ };
61
+
62
+ export const isDiagramComparisonEnabled = () => isEventCatalogScaleEnabled();
63
+
64
+ export const isEventCatalogMCPEnabled = () => isEventCatalogScaleEnabled() && isSSR();
65
+
66
+ export const isIntegrationsEnabled = () => isEventCatalogScaleEnabled();
67
+
68
+ export const isExportPDFEnabled = () => true;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import { describe, it, expect } from 'vitest';
2
7
  import { extractSchemaFieldsDeep } from './field-extractor';
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  export interface DeepSchemaField {
2
7
  path: string;
3
8
  type: string;
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import path from 'node:path';
2
7
  import fs from 'node:fs';
3
8
  import { FieldsDatabase } from './fields-db';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import { describe, it, expect, beforeEach, afterEach } from 'vitest';
2
7
  import { FieldsDatabase } from './fields-db';
3
8
  import path from 'node:path';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import initSqlJs, { type Database as SqlJsDatabase } from 'sql.js';
2
7
  import fs from 'node:fs';
3
8
 
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import type { APIRoute } from 'astro';
2
7
  import { Hono } from 'hono';
3
8
  import { getFieldsDatabase } from '@enterprise/fields/fields-db';
@@ -1,6 +1,11 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import type { AstroIntegration } from 'astro';
2
7
  import path from 'path';
3
- import config from '../eventcatalog.config.js';
8
+ import config from '../../../eventcatalog.config.js';
4
9
  import {
5
10
  isEventCatalogChatEnabled,
6
11
  isAuthEnabled,
@@ -11,8 +16,9 @@ import {
11
16
  isDevMode,
12
17
  isIntegrationsEnabled,
13
18
  isExportPDFEnabled,
19
+ isCustomDocsEnabled,
14
20
  isSSR,
15
- } from '../src/utils/feature';
21
+ } from '../../utils/feature';
16
22
 
17
23
  const catalogDirectory = process.env.CATALOG_DIR || process.cwd();
18
24
 
@@ -79,6 +85,46 @@ export default function eventCatalogIntegration(): AstroIntegration {
79
85
  });
80
86
  }
81
87
 
88
+ // Custom documentation routes (Starter/Scale plan)
89
+ if (isCustomDocsEnabled()) {
90
+ params.injectRoute({
91
+ pattern: '/docs/custom',
92
+ entrypoint: path.join(catalogDirectory, 'src/enterprise/custom-documentation/pages/docs/custom/root-index.astro'),
93
+ });
94
+ params.injectRoute({
95
+ pattern: '/docs/custom/[...path]',
96
+ entrypoint: path.join(
97
+ catalogDirectory,
98
+ 'src/enterprise/custom-documentation/pages/docs/custom/[...path]/index.astro'
99
+ ),
100
+ });
101
+ params.injectRoute({
102
+ pattern: '/docs/custom/[...path].mdx',
103
+ entrypoint: path.join(catalogDirectory, 'src/enterprise/custom-documentation/pages/docs/custom/[...path].mdx.ts'),
104
+ });
105
+ } else {
106
+ // Show feature page for non-paying users
107
+ params.injectRoute({
108
+ pattern: '/docs/custom',
109
+ entrypoint: path.join(catalogDirectory, 'src/enterprise/custom-documentation/pages/docs/custom/feature.astro'),
110
+ });
111
+ }
112
+
113
+ // Schema API routes (Scale plan)
114
+ if (isEventCatalogScaleEnabled()) {
115
+ params.injectRoute({
116
+ pattern: '/api/schemas/[collection]/[id]/[version]',
117
+ entrypoint: path.join(catalogDirectory, 'src/enterprise/api/schemas/[collection]/[id]/[version]/index.ts'),
118
+ });
119
+ params.injectRoute({
120
+ pattern: '/api/schemas/services/[id]/[version]/[specification]',
121
+ entrypoint: path.join(
122
+ catalogDirectory,
123
+ 'src/enterprise/api/schemas/services/[id]/[version]/[specification]/index.ts'
124
+ ),
125
+ });
126
+ }
127
+
82
128
  // Full catalog API route (opt-in)
83
129
  if (isFullCatalogAPIEnabled()) {
84
130
  params.injectRoute({
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import type { APIRoute } from 'astro';
2
7
  import { Hono, type Context } from 'hono';
3
8
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import { isSSR } from '@utils/feature';
2
7
  import { HybridPage } from '@utils/page-loaders/hybrid-page';
3
8
  import type { PageTypes } from '@types';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
2
7
  import { oneLight } from 'react-syntax-highlighter/dist/cjs/styles/prism';
3
8
  import { getLanguageForHighlight } from '@components/SchemaExplorer/utils';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import { getOwnerNames } from '@utils/collections/owners';
2
7
  import { satisfies, getResourceTypeLabel, getPointerField } from '@utils/collections/util';
3
8
  import { getDomainsForService } from '@utils/collections/domains';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  /**
2
7
  * Shared catalog tools for accessing EventCatalog resources.
3
8
  * Used by both the AI Chat feature and MCP Server.
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  /**
2
7
  * Enterprise tools for EventCatalog
3
8
  * Shared utilities for AI Chat and MCP Server features
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import type { APIRoute } from 'astro';
2
7
  import fs from 'node:fs';
3
8
  import { getLayoutFilePath } from '@utils/node-graphs/layout-persistence';
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Licensed under the EventCatalog Commercial License.
3
+ * See /packages/core/eventcatalog/src/enterprise/LICENSE
4
+ */
5
+
1
6
  import type { APIRoute } from 'astro';
2
7
  import fs from 'node:fs';
3
8
  import path from 'node:path';