@eventcatalog/core 2.30.8 → 2.31.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.
Files changed (49) hide show
  1. package/README.md +1 -1
  2. package/dist/analytics/analytics.cjs +1 -1
  3. package/dist/analytics/analytics.js +2 -2
  4. package/dist/analytics/log-build.cjs +9 -3
  5. package/dist/analytics/log-build.d.cts +4 -1
  6. package/dist/analytics/log-build.d.ts +4 -1
  7. package/dist/analytics/log-build.js +3 -3
  8. package/dist/{chunk-XJBJFIN7.js → chunk-4S3UNXH2.js} +1 -1
  9. package/dist/{chunk-D4IJRFPJ.js → chunk-D7LV5JLL.js} +9 -3
  10. package/dist/{chunk-NALVGTIE.js → chunk-I6OFOESY.js} +1 -1
  11. package/dist/{chunk-XMDPVKIJ.js → chunk-NJGR7XUU.js} +44 -1
  12. package/dist/constants.cjs +1 -1
  13. package/dist/constants.js +1 -1
  14. package/dist/eventcatalog.cjs +74 -14
  15. package/dist/eventcatalog.config.d.cts +28 -0
  16. package/dist/eventcatalog.config.d.ts +28 -0
  17. package/dist/eventcatalog.js +29 -16
  18. package/dist/features.cjs +46 -2
  19. package/dist/features.d.cts +2 -1
  20. package/dist/features.d.ts +2 -1
  21. package/dist/features.js +5 -3
  22. package/eventcatalog/public/images/custom-docs-placeholder.png +0 -0
  23. package/eventcatalog/src/components/MDX/NodeGraph/Nodes/Custom.tsx +0 -2
  24. package/eventcatalog/src/components/MDX/Steps/Step.astro +1 -1
  25. package/eventcatalog/src/components/MDX/Steps/Steps.astro +15 -0
  26. package/eventcatalog/src/components/SideNav/CustomDocsNav/CustomDocsNavWrapper.tsx +11 -0
  27. package/eventcatalog/src/components/SideNav/CustomDocsNav/components/NestedItem.tsx +183 -0
  28. package/eventcatalog/src/components/SideNav/CustomDocsNav/components/NoResultsFound.tsx +21 -0
  29. package/eventcatalog/src/components/SideNav/CustomDocsNav/index.tsx +250 -0
  30. package/eventcatalog/src/components/SideNav/CustomDocsNav/types.ts +29 -0
  31. package/eventcatalog/src/components/SideNav/CustomDocsNav.astro +9 -0
  32. package/eventcatalog/src/content.config.ts +15 -24
  33. package/eventcatalog/src/enterprise/collections/custom-pages.ts +19 -0
  34. package/eventcatalog/src/enterprise/custom-documentation/collection.ts +16 -0
  35. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/CustomDocsNavWrapper.tsx +11 -0
  36. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NestedItem.tsx +183 -0
  37. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/components/NoResultsFound.tsx +21 -0
  38. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/index.tsx +250 -0
  39. package/eventcatalog/src/enterprise/custom-documentation/components/CustomDocsNav/types.ts +29 -0
  40. package/eventcatalog/src/enterprise/custom-documentation/pages/index.astro +389 -0
  41. package/eventcatalog/src/enterprise/custom-documentation/utils/custom-docs.ts +118 -0
  42. package/eventcatalog/src/layouts/VerticalSideBarLayout.astro +58 -9
  43. package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +117 -3
  44. package/eventcatalog/src/pages/docs/custom/[...path]/index.astro +260 -0
  45. package/eventcatalog/src/pages/pro/index.astro +272 -0
  46. package/eventcatalog/src/shared-collections.ts +25 -0
  47. package/eventcatalog/src/utils/eventcatalog-config/catalog.ts +12 -1
  48. package/eventcatalog/src/utils/feature.ts +5 -0
  49. package/package.json +1 -1
@@ -0,0 +1,25 @@
1
+ import { z } from 'astro:content';
2
+
3
+ // Shared schemas used across multiple files
4
+ export const badge = z.object({
5
+ content: z.string(),
6
+ backgroundColor: z.string(),
7
+ textColor: z.string(),
8
+ });
9
+
10
+ // Create a union type for owners
11
+ export const ownerReference = z
12
+ .union([
13
+ // The ID of the user or team
14
+ z.string(),
15
+ // The full object with the ID and collection (keep compatibility with `reference`)
16
+ z.object({
17
+ id: z.string(),
18
+ collection: z.enum(['users', 'teams']),
19
+ }),
20
+ ])
21
+ .transform(
22
+ // This transformation is needed to keep compatibility with `reference`.
23
+ // The utilities `getTeams` and `getUsers` rely on this transformation.
24
+ (lookup) => ({ id: typeof lookup === 'string' ? lookup : lookup.id })
25
+ );
@@ -24,7 +24,18 @@ const getConfigValue = (obj: any, key: string, defaultValue: any) => {
24
24
 
25
25
  export const isCollectionVisibleInCatalog = (collection: string) => {
26
26
  const sidebarConfig = config?.default?.docs?.sidebar || {};
27
- const collections = ['events', 'commands', 'queries', 'domains', 'channels', 'flows', 'services', 'teams', 'users'];
27
+ const collections = [
28
+ 'events',
29
+ 'commands',
30
+ 'queries',
31
+ 'domains',
32
+ 'channels',
33
+ 'flows',
34
+ 'services',
35
+ 'teams',
36
+ 'users',
37
+ 'customDocs',
38
+ ];
28
39
 
29
40
  if (!collections.includes(collection)) return false;
30
41
 
@@ -0,0 +1,5 @@
1
+ // manually setting this value to true is against the rules and licenses of the open source project
2
+ // WARNING: Setting this value manually to true without a valid license is against the terms of use.
3
+ // If you require EventCatalog Pro features, please visit https://www.eventcatalog.dev/pricing
4
+ // to purchase a license. Unauthorized use may violate the project's license agreement.
5
+ export const isEventCatalogProEnabled = () => process.env.EVENTCATALOG_PRO === 'true';
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/event-catalog/eventcatalog.git"
7
7
  },
8
8
  "type": "module",
9
- "version": "2.30.8",
9
+ "version": "2.31.0",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },