@eventcatalog/core 3.35.1 → 3.36.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.
Files changed (87) 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-4SNN54V4.js → chunk-6D65JSOA.js} +1 -1
  6. package/dist/{chunk-B7C4DHFE.js → chunk-C7JCOHTI.js} +1 -1
  7. package/dist/chunk-D6IBLY3O.js +320 -0
  8. package/dist/{chunk-R4DR3YAH.js → chunk-HDENGAZL.js} +1 -1
  9. package/dist/{chunk-JEQZWJWP.js → chunk-UJ7DX4SA.js} +3 -3
  10. package/dist/{chunk-3KXCGYET.js → chunk-ULZYHF3V.js} +5 -0
  11. package/dist/{chunk-VJ357XOI.js → chunk-V22QY5Q3.js} +1 -1
  12. package/dist/constants.cjs +1 -1
  13. package/dist/constants.js +1 -1
  14. package/dist/docs/api/02-config.md +22 -0
  15. package/dist/docs/api/_category_.json +1 -1
  16. package/dist/docs/contributing/_category_.json +1 -1
  17. package/dist/docs/development/_category_.json +1 -1
  18. package/dist/docs/development/ask-your-architecture/02-eventcatalog-assistant/_category_.json +1 -1
  19. package/dist/docs/development/ask-your-architecture/03-mcp-server/_category_.json +1 -1
  20. package/dist/docs/development/ask-your-architecture/04-skills/_category_.json +1 -1
  21. package/dist/docs/development/authentication/providers/_category_.json +1 -1
  22. package/dist/docs/development/bring-your-own-documentation/custom-pages/_category_.json +1 -1
  23. package/dist/docs/development/customization/01-customize-landing-page.md +1 -1
  24. package/dist/docs/development/customization/03-search.md +79 -0
  25. package/dist/docs/development/customization/custom-components/_category_.json +1 -1
  26. package/dist/docs/development/customization/customize-sidebars/_category_.json +1 -1
  27. package/dist/docs/development/customization/customize-visualizer/_category_.json +1 -1
  28. package/dist/docs/development/design/_category_.json +1 -1
  29. package/dist/docs/development/guides/changelogs/_category_.json +1 -1
  30. package/dist/docs/development/guides/channels/_category_.json +1 -1
  31. package/dist/docs/development/guides/channels/ownership-and-components/_category_.json +1 -1
  32. package/dist/docs/development/guides/channels/versioning-and-lifecycle/_category_.json +1 -1
  33. package/dist/docs/development/guides/data/_category_.json +1 -1
  34. package/dist/docs/development/guides/data/ownership-and-components/_category_.json +1 -1
  35. package/dist/docs/development/guides/data-products/_category_.json +1 -1
  36. package/dist/docs/development/guides/domains/02-creating-domains/_category_.json +1 -1
  37. package/dist/docs/development/guides/domains/03-ownership-and-language/_category_.json +1 -1
  38. package/dist/docs/development/guides/domains/05-entities/_category_.json +1 -1
  39. package/dist/docs/development/guides/domains/_category_.json +1 -1
  40. package/dist/docs/development/guides/flows/_category_.json +1 -1
  41. package/dist/docs/development/guides/messages/_category_.json +1 -1
  42. package/dist/docs/development/guides/messages/commands/_category_.json +1 -1
  43. package/dist/docs/development/guides/messages/common/_category_.json +1 -1
  44. package/dist/docs/development/guides/messages/events/_category_.json +1 -1
  45. package/dist/docs/development/guides/messages/queries/_category_.json +1 -1
  46. package/dist/docs/development/guides/owners/_category_.json +1 -1
  47. package/dist/docs/development/guides/owners/teams/_category_.json +1 -1
  48. package/dist/docs/development/guides/owners/users/_category_.json +1 -1
  49. package/dist/docs/development/guides/schemas/_category_.json +1 -1
  50. package/dist/docs/development/guides/services/_category_.json +1 -1
  51. package/dist/docs/development/guides/services/adding-to-services/_category_.json +1 -1
  52. package/dist/docs/development/guides/services/ownership-and-components/_category_.json +1 -1
  53. package/dist/docs/development/guides/services/versioning-and-lifecycle/_category_.json +1 -1
  54. package/dist/docs/plugins/_category_.json +1 -1
  55. package/dist/docs/plugins/amazon-apigateway/_category_.json +1 -1
  56. package/dist/docs/plugins/asyncapi/_category_.json +1 -1
  57. package/dist/docs/plugins/aws-glue-registry/_category_.json +1 -1
  58. package/dist/docs/plugins/backstage/_category_.json +1 -1
  59. package/dist/docs/plugins/confluent-schema-registry/_category_.json +1 -1
  60. package/dist/docs/plugins/eventbridge/_category_.json +1 -1
  61. package/dist/docs/plugins/eventcatalog-federation/_category_.json +1 -1
  62. package/dist/docs/plugins/github/_category_.json +1 -1
  63. package/dist/docs/plugins/graphql/_category_.json +1 -1
  64. package/dist/docs/plugins/hookdeck/_category_.json +1 -1
  65. package/dist/docs/plugins/openapi/_category_.json +1 -1
  66. package/dist/eventcatalog.cjs +434 -35
  67. package/dist/eventcatalog.config.d.cts +8 -0
  68. package/dist/eventcatalog.config.d.ts +8 -0
  69. package/dist/eventcatalog.js +87 -10
  70. package/dist/features.cjs +6 -0
  71. package/dist/features.d.cts +2 -1
  72. package/dist/features.d.ts +2 -1
  73. package/dist/features.js +3 -1
  74. package/dist/generate.cjs +1 -1
  75. package/dist/generate.js +3 -3
  76. package/dist/search-indexer.cjs +356 -0
  77. package/dist/search-indexer.d.cts +30 -0
  78. package/dist/search-indexer.d.ts +30 -0
  79. package/dist/search-indexer.js +10 -0
  80. package/dist/utils/cli-logger.cjs +1 -1
  81. package/dist/utils/cli-logger.js +2 -2
  82. package/eventcatalog/astro.config.mjs +28 -32
  83. package/eventcatalog/src/components/Search/SearchModal.tsx +248 -148
  84. package/eventcatalog/src/components/Search/search-utils.spec.ts +138 -1
  85. package/eventcatalog/src/components/Search/search-utils.ts +271 -0
  86. package/eventcatalog/src/env.d.ts +1 -0
  87. package/package.json +3 -2
@@ -1,21 +1,20 @@
1
-
2
1
  import { defineConfig } from 'astro/config';
3
2
  import tailwindcss from '@tailwindcss/vite';
4
3
  import mdx from '@astrojs/mdx';
5
4
  import react from '@astrojs/react';
6
5
  import { searchForWorkspaceRoot } from 'vite';
7
- import { mermaid } from "./src/remark-plugins/mermaid"
8
- import { plantuml } from "./src/remark-plugins/plantuml"
6
+ import { mermaid } from './src/remark-plugins/mermaid';
7
+ import { plantuml } from './src/remark-plugins/plantuml';
9
8
  import { join } from 'node:path';
10
9
  import remarkDirective from 'remark-directive';
11
- import { remarkDirectives } from "./src/remark-plugins/directives"
12
- import { remarkResourceRef } from "./src/remark-plugins/resource-ref"
10
+ import { remarkDirectives } from './src/remark-plugins/directives';
11
+ import { remarkResourceRef } from './src/remark-plugins/resource-ref';
13
12
  import node from '@astrojs/node';
14
- import remarkComment from 'remark-comment'
13
+ import remarkComment from 'remark-comment';
15
14
  import rehypeSlug from 'rehype-slug';
16
15
  import rehypeAutolinkHeadings from 'rehype-autolink-headings';
17
16
 
18
- import rehypeExpressiveCode from 'rehype-expressive-code'
17
+ import rehypeExpressiveCode from 'rehype-expressive-code';
19
18
 
20
19
  /** @type {import('bin/eventcatalog.config').Config} */
21
20
  import config from './eventcatalog.config';
@@ -28,8 +27,8 @@ const base = config.base || '/';
28
27
  const host = config.host || false;
29
28
  const compress = config.compress ?? false;
30
29
  const isDevMode = process.env.EVENTCATALOG_DEV_MODE === 'true';
31
- const effectiveOutput = isDevMode ? 'server' : (config.output || 'static');
32
-
30
+ const effectiveOutput = isDevMode ? 'server' : config.output || 'static';
31
+ const searchType = config.search?.type || 'resource';
33
32
 
34
33
  const expressiveCodeConfig = {
35
34
  themes: ['github-light', 'github-dark'],
@@ -57,9 +56,7 @@ export default defineConfig({
57
56
  site: config.homepageLink || 'https://eventcatalog.dev/',
58
57
 
59
58
  // https://docs.astro.build/en/reference/configuration-reference/#trailingslash
60
- trailingSlash: config.trailingSlash === true ? "always" : "ignore",
61
-
62
-
59
+ trailingSlash: config.trailingSlash === true ? 'always' : 'ignore',
63
60
 
64
61
  // just turn this off for all users (for now...)
65
62
  devToolbar: { enabled: false },
@@ -73,9 +70,12 @@ export default defineConfig({
73
70
  optimize: config.mdxOptimize || false,
74
71
  remarkPlugins: [remarkDirective, remarkDirectives, remarkComment, mermaid, plantuml, remarkResourceRef],
75
72
  rehypePlugins: [
76
- [rehypeExpressiveCode, {
73
+ [
74
+ rehypeExpressiveCode,
75
+ {
77
76
  ...expressiveCodeConfig,
78
- }],
77
+ },
78
+ ],
79
79
  rehypeSlug,
80
80
  [
81
81
  rehypeAutolinkHeadings,
@@ -87,10 +87,12 @@ export default defineConfig({
87
87
  ],
88
88
  gfm: true,
89
89
  }),
90
- effectiveOutput !== 'server' && compress && (await import("astro-compress")).default({
91
- Logger: 0,
92
- CSS: false,
93
- }),
90
+ effectiveOutput !== 'server' &&
91
+ compress &&
92
+ (await import('astro-compress')).default({
93
+ Logger: 0,
94
+ CSS: false,
95
+ }),
94
96
  ecstudioWatcher(),
95
97
  eventCatalogIntegration(),
96
98
  ].filter(Boolean),
@@ -99,20 +101,17 @@ export default defineConfig({
99
101
  define: {
100
102
  /**
101
103
  * Trailing slash is exposed as global variable here principally for `@utils/url-builder`.
102
- * The utility is used by client components and because of that it can't direct import
104
+ * The utility is used by client components and because of that it can't direct import
103
105
  * the eventcatalog.config, as the config use packages that only run in node environments,
104
106
  * such as `node:path`.
105
107
  */
106
- '__EC_TRAILING_SLASH__': JSON.stringify(config.trailingSlash === true),
107
- '__EC_BASE__': JSON.stringify(base),
108
+ __EC_TRAILING_SLASH__: JSON.stringify(config.trailingSlash === true),
109
+ __EC_BASE__: JSON.stringify(base),
110
+ __EC_SEARCH_TYPE__: JSON.stringify(searchType),
108
111
  },
109
112
  server: {
110
113
  fs: {
111
- allow: [
112
- '..',
113
- './node_modules/@fontsource',
114
- searchForWorkspaceRoot(process.cwd()),
115
- ]
114
+ allow: ['..', './node_modules/@fontsource', searchForWorkspaceRoot(process.cwd())],
116
115
  },
117
116
  // Prevent stale FSEvents from triggering a config-dependency restart on first run.
118
117
  // During startup, catalogToAstro copies eventcatalog.config.js into .eventcatalog-core
@@ -138,10 +137,7 @@ export default defineConfig({
138
137
  './src/components/Header.astro',
139
138
  './src/components/SideNav/SideNav.astro',
140
139
  ],
141
- clientFiles: [
142
- './src/components/SideNav/NestedSideBar/index.tsx',
143
- './src/components/Search/SearchModal.tsx',
144
- ],
140
+ clientFiles: ['./src/components/SideNav/NestedSideBar/index.tsx', './src/components/Search/SearchModal.tsx'],
145
141
  },
146
142
  },
147
143
  worker: {
@@ -150,7 +146,7 @@ export default defineConfig({
150
146
  build: {
151
147
  commonjsOptions: {
152
148
  transformMixedEsModules: true,
153
- }
149
+ },
154
150
  },
155
151
  ssr: {
156
152
  noExternal: ['@xyflow/react'],
@@ -177,5 +173,5 @@ export default defineConfig({
177
173
  jsx: 'automatic',
178
174
  },
179
175
  },
180
- }
176
+ },
181
177
  });