@eventcatalog/core 2.7.0 → 2.7.2

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,17 @@
1
1
  # @eventcatalog/core
2
2
 
3
+ ## 2.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - ac64dc4: fix(core): only generate discover page for each collection
8
+
9
+ ## 2.7.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 29ccffc: fix(core): fixed changelogs path matching
14
+
3
15
  ## 2.7.0
4
16
 
5
17
  ### Minor Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@eventcatalog/core",
3
3
  "type": "module",
4
- "version": "2.7.0",
4
+ "version": "2.7.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -15,17 +15,15 @@ export async function getStaticPaths() {
15
15
  const itemTypes: PageTypesWithFlows[] = ['events', 'commands', 'services', 'domains', 'flows'];
16
16
  const allItems = await Promise.all(itemTypes.map((type) => loaders[type]()));
17
17
 
18
- return allItems.flatMap((items, index) =>
19
- items.map((item) => ({
20
- params: {
21
- type: itemTypes[index],
22
- },
23
- props: {
24
- data: items,
25
- type: itemTypes[index],
26
- },
27
- }))
28
- );
18
+ return allItems.flatMap((items, index) => ({
19
+ params: {
20
+ type: itemTypes[index],
21
+ },
22
+ props: {
23
+ data: items,
24
+ type: itemTypes[index],
25
+ },
26
+ }));
29
27
  }
30
28
 
31
29
  const { type, data } = Astro.props;
@@ -4,11 +4,11 @@ import { getCollection, type CollectionEntry } from 'astro:content';
4
4
  export type ChangeLog = CollectionEntry<'changelogs'>;
5
5
 
6
6
  export const getChangeLogs = async (item: CollectionEntry<CollectionTypes>): Promise<ChangeLog[]> => {
7
- const { collection, data } = item;
7
+ const { collection, data, slug } = item;
8
8
 
9
9
  // Get all logs for collection type and filter by given collection
10
10
  const logs = await getCollection('changelogs', (log) => {
11
- return log.id.includes(`${collection}/`) && log.id.includes(`/${data.id}/`);
11
+ return log.id.includes(`${collection}/`) && log.slug.includes(slug);
12
12
  });
13
13
 
14
14
  const hydratedLogs = logs.map((log) => {