@eventcatalog/core 2.0.23 → 2.0.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 109ce19: feat(core): added optimize flag to make eventcatalog work with large catalogs
8
+
9
+ ## 2.0.24
10
+
11
+ ### Patch Changes
12
+
13
+ - db66733: fix(core): favicon having invalid url with default base url configuration
14
+ - 26a4a37: fix perf issues for discover pages in build step
15
+ - f29d718: fix(core): sidebar configuration for section visibility is now optional
16
+ - 3426ea8: fix(core): temp fix for domains for users
17
+
3
18
  ## 2.0.23
4
19
 
5
20
  ### Patch Changes
package/astro.config.mjs CHANGED
@@ -2,16 +2,12 @@ import { defineConfig } from 'astro/config';
2
2
  import tailwind from '@astrojs/tailwind';
3
3
  import mdx from '@astrojs/mdx';
4
4
  import react from '@astrojs/react';
5
- // import { rehypeHeadingIds } from '@astrojs/markdown-remark';
6
- // import rehypeMinifyHtml from 'rehype-minify-html';
7
- import rehypeSlug from 'rehype-slug';
8
- import remarkGFM from 'remark-gfm';
9
5
  import pagefind from "astro-pagefind";
10
6
  import { mermaid } from "./src/remark-plugins/mermaid"
11
7
 
12
-
13
- import expressiveCode from 'astro-expressive-code';
8
+ /** @type {import('bin/eventcatalog.config').Config} */
14
9
  import config from './eventcatalog.config';
10
+ import expressiveCode from 'astro-expressive-code';
15
11
 
16
12
  // https://astro.build/config
17
13
  export default defineConfig({
@@ -30,27 +26,13 @@ export default defineConfig({
30
26
  react(),
31
27
  tailwind(),
32
28
  expressiveCode({
33
- // themes: ['github-light'],
34
29
  themes: ['github-light'],
35
30
  }),
36
31
 
37
32
  mdx({
38
- remarkPlugins: [
39
- // Add ids to headings
40
- // rehypeSlug,
41
- // remarkGFM
42
- ],
43
- // rehypePlugins: [rehypeMinifyHtml],
44
- // syntaxHighlight: 'shiki',
45
- // shikiConfig: {
46
- // theme: 'github-light',
47
- // langs: ['yaml']
48
- // },
49
-
33
+ // https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize
34
+ optimize: config.mdxOptimize || false,
50
35
  remarkPlugins: [mermaid],
51
- // remarkRehype: {
52
- // footnoteLabel: 'Footnotes',
53
- // },
54
36
  gfm: false,
55
37
  }),
56
38
  pagefind(),
@@ -15,6 +15,7 @@ interface Config {
15
15
  src: string;
16
16
  text?: string;
17
17
  };
18
+ mdxOptimize?: boolean;
18
19
  docs: {
19
20
  sidebar: {
20
21
  showPageHeadings: true;
@@ -15,6 +15,7 @@ interface Config {
15
15
  src: string;
16
16
  text?: string;
17
17
  };
18
+ mdxOptimize?: boolean;
18
19
  docs: {
19
20
  sidebar: {
20
21
  showPageHeadings: true;
@@ -16,6 +16,7 @@ export interface Config {
16
16
  src: string;
17
17
  text?: string;
18
18
  };
19
+ mdxOptimize?: boolean;
19
20
  docs: {
20
21
  sidebar: {
21
22
  showPageHeadings: true;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.0.23",
4
+ "version": "2.0.25",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -2,6 +2,7 @@
2
2
  import { SEO } from 'astro-seo';
3
3
  import config from '@config';
4
4
  import defaultImageFile from '../../public/opengraph.png';
5
+ import { buildUrl } from '@utils/url-builder';
5
6
 
6
7
  const {
7
8
  title = config.title,
@@ -30,7 +31,7 @@ if (typeof _image === 'string') {
30
31
  <meta charset="UTF-8" />
31
32
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
32
33
  <meta name="viewport" content="width=device-width" />
33
- <link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}/favicon.ico`} />
34
+ <link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico')} />
34
35
 
35
36
  <SEO
36
37
  title={title}
@@ -8,6 +8,7 @@ const { title } = Astro.props;
8
8
  import Header from '@components/Header.astro';
9
9
  import SideBar from '@components/DocsNavigation.astro';
10
10
  import catalog from '@eventcatalog';
11
+ import { buildUrl } from '@utils/url-builder';
11
12
  ---
12
13
 
13
14
  <!doctype html>
@@ -16,7 +17,7 @@ import catalog from '@eventcatalog';
16
17
  <meta charset="UTF-8" />
17
18
  <meta name="description" content="Astro description" />
18
19
  <meta name="viewport" content="width=device-width" />
19
- <link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}/favicon.ico`} />
20
+ <link rel="icon" type="image/svg+xml" href={buildUrl('/favicon.ico')} />
20
21
  <meta name="generator" content={Astro.generator} />
21
22
  <title>EventCatalog</title>
22
23
  </head>
@@ -8,26 +8,29 @@ import { getServices } from '@utils/services/services';
8
8
  import { getDomains } from '@utils/domains/domains';
9
9
 
10
10
  export async function getStaticPaths() {
11
- const events = await getEvents();
12
- const commands = await getCommands();
13
- const services = await getServices();
14
- const domains = await getDomains();
11
+ const events = await getEvents();
12
+ const commands = await getCommands();
13
+ const services = await getServices();
14
+ const domains = await getDomains();
15
15
 
16
- const buildPages = (collection: CollectionEntry<CollectionTypes>[]) => {
17
- return collection.map((item) => ({
18
- params: {
19
- type: item.collection,
20
- },
21
- props: {
22
- type: item.collection,
23
- data: collection,
24
- },
25
- }));
26
- };
27
-
28
- const pages = [events, commands, services, domains];
29
- return pages.flatMap(buildPages);
16
+ const buildPage = (type: string, collection: CollectionEntry<CollectionTypes>[]) => {
17
+ return {
18
+ params: {
19
+ type,
20
+ },
21
+ props: {
22
+ type,
23
+ data: collection,
24
+ },
25
+ };
26
+ };
30
27
 
28
+ return [
29
+ buildPage('events', events),
30
+ buildPage('commands', commands),
31
+ buildPage('services', services),
32
+ buildPage('domains', domains),
33
+ ];
31
34
  }
32
35
 
33
36
  const { type, data } = Astro.props;
@@ -91,20 +91,20 @@ const associatedTeams = teams.map((o) => ({
91
91
  <div class="border-b border-gray-200">
92
92
  <div class="mx-auto max-w-7xl px-6 lg:px-8">
93
93
  <div class="mx-auto max-w-2xl lg:max-w-none">
94
- <dl class="grid grid-cols-1 gap-0.5 overflow-hidden rounded-2xl text-center sm:grid-cols-2 lg:grid-cols-4">
95
- <div class="flex flex-col bg-gray-400/5 p-8">
94
+ <dl class="hidden lg:grid grid-cols-1 gap-0.5 overflow-hidden rounded-2xl text-center sm:grid-cols-3 lg:grid-cols-3">
95
+ <div class="flex flex-col p-8">
96
96
  <dt class="text-sm font-semibold leading-6 text-gray-600"># owned services</dt>
97
97
  <dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{ownedServicesList.length}</dd>
98
98
  </div>
99
- <div class="flex flex-col bg-gray-400/5 p-8">
99
+ <div class="flex flex-col p-8">
100
100
  <dt class="text-sm font-semibold leading-6 text-gray-600"># owned messages</dt>
101
101
  <dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{ownedMessageList.length}</dd>
102
102
  </div>
103
- <div class="flex flex-col bg-gray-400/5 p-8">
103
+ <!-- <div class="flex flex-col p-8">
104
104
  <dt class="text-sm font-semibold leading-6 text-gray-600"># owned domains</dt>
105
105
  <dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">2</dd>
106
- </div>
107
- <div class="flex flex-col bg-gray-400/5 p-8">
106
+ </div> -->
107
+ <div class="flex flex-col p-8">
108
108
  <dt class="text-sm font-semibold leading-6 text-gray-600"># teams joined</dt>
109
109
  <dd class="order-first text-3xl font-semibold tracking-tight text-gray-900">{associatedTeams.length}</dd>
110
110
  </div>
@@ -8,11 +8,11 @@ export type CatalogConfig = {
8
8
  docs: {
9
9
  sidebar: {
10
10
  showPageHeadings?: boolean;
11
- domains: SideBarItemConfig;
12
- services: SideBarItemConfig;
13
- messages: SideBarItemConfig;
14
- teams: SideBarItemConfig;
15
- users: SideBarItemConfig;
11
+ domains?: SideBarItemConfig;
12
+ services?: SideBarItemConfig;
13
+ messages?: SideBarItemConfig;
14
+ teams?: SideBarItemConfig;
15
+ users?: SideBarItemConfig;
16
16
  };
17
17
  };
18
18
  };