@eventcatalog/core 2.18.7 → 2.19.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.
- package/dist/analytics/analytics.cjs +1 -1
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/log-build.cjs +1 -1
- package/dist/analytics/log-build.js +3 -3
- package/dist/{chunk-KIJRG7DY.js → chunk-BKJCPC3B.js} +1 -1
- package/dist/{chunk-7GHQF4IY.js → chunk-C5RXW75W.js} +1 -1
- package/dist/{chunk-3B32CY7F.js → chunk-UEGAODIF.js} +1 -1
- package/dist/constants.cjs +1 -1
- package/dist/constants.js +1 -1
- package/dist/eventcatalog.cjs +1 -1
- package/dist/eventcatalog.js +3 -3
- package/eventcatalog/package-lock.json +1074 -142
- package/eventcatalog/package.json +5 -4
- package/eventcatalog/src/components/MDX/Tabs/Tabs.astro +7 -3
- package/eventcatalog/src/components/SideBars/ChannelSideBar.astro +3 -2
- package/eventcatalog/src/components/SideBars/DomainSideBar.astro +4 -2
- package/eventcatalog/src/components/SideBars/MessageSideBar.astro +4 -2
- package/eventcatalog/src/components/SideBars/ServiceSideBar.astro +4 -2
- package/eventcatalog/src/content/config.ts +15 -1
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/changelog/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/docs/[type]/[id]/language/[dictionaryId]/index.astro +227 -0
- package/eventcatalog/src/pages/docs/[type]/[id]/language.astro +19 -60
- package/eventcatalog/src/pages/visualiser/[type]/[id]/[version]/index.astro +2 -2
- package/eventcatalog/src/pages/visualiser/context-map/index.astro +2 -2
- package/eventcatalog/src/utils/collections/owners.ts +43 -0
- package/eventcatalog/src/utils/collections/util.ts +15 -10
- package/package.json +6 -5
|
@@ -14,24 +14,29 @@ export const getVersions = (data: CollectionEntry<CollectionTypes>[]) => {
|
|
|
14
14
|
return { versions, latestVersion };
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
export function findLatestVersion(versions: string[]) {
|
|
18
|
+
// try to coerce semver versions from string input
|
|
19
|
+
const semverVersions = versions.map((v) => ({ original: v, semver: coerce(v) }));
|
|
20
|
+
|
|
21
|
+
// if all versions are semver'ish, use semver to order the versions
|
|
22
|
+
if (semverVersions.every((v) => v.semver != null)) {
|
|
23
|
+
return semverVersions.sort((a, b) => compare(b.semver!, a.semver!))[0].original;
|
|
24
|
+
} else {
|
|
25
|
+
// fallback to default sort
|
|
26
|
+
return versions.sort().reverse()[0];
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
export const getVersionForCollectionItem = (
|
|
18
31
|
item: CollectionEntry<CollectionTypes>,
|
|
19
32
|
collection: CollectionEntry<CollectionTypes>[]
|
|
20
33
|
) => {
|
|
21
|
-
const allVersionsForItem = collection
|
|
22
|
-
.filter((i) => i.data.id === item.data.id)
|
|
23
|
-
.map((i) => i.data.version)
|
|
24
|
-
.sort();
|
|
34
|
+
const allVersionsForItem = collection.filter((i) => i.data.id === item.data.id).map((i) => i.data.version);
|
|
25
35
|
|
|
26
36
|
// unique versions
|
|
27
37
|
const versions = [...new Set(allVersionsForItem)];
|
|
28
38
|
|
|
29
|
-
|
|
30
|
-
const orderedVersions = versions.sort((a, b) => {
|
|
31
|
-
return compare(b, a);
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
const latestVersion = orderedVersions[0];
|
|
39
|
+
let latestVersion = findLatestVersion(versions);
|
|
35
40
|
|
|
36
41
|
return { versions, latestVersion };
|
|
37
42
|
};
|
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.
|
|
9
|
+
"version": "2.19.0",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@astrojs/markdown-remark": "^6.0.1",
|
|
45
|
-
"@astrojs/mdx": "^4.0.
|
|
46
|
-
"@astrojs/react": "^4.1.
|
|
47
|
-
"@astrojs/tailwind": "^5.1.
|
|
45
|
+
"@astrojs/mdx": "^4.0.5",
|
|
46
|
+
"@astrojs/react": "^4.1.3",
|
|
47
|
+
"@astrojs/tailwind": "^5.1.4",
|
|
48
48
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
49
49
|
"@asyncapi/react-component": "^2.4.3",
|
|
50
50
|
"@headlessui/react": "^2.0.3",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@tailwindcss/typography": "^0.5.13",
|
|
57
57
|
"@tanstack/react-table": "^8.17.3",
|
|
58
58
|
"@xyflow/react": "^12.3.6",
|
|
59
|
-
"astro": "^5.1.
|
|
59
|
+
"astro": "^5.1.5",
|
|
60
60
|
"astro-expressive-code": "^0.38.3",
|
|
61
61
|
"astro-pagefind": "^1.6.0",
|
|
62
62
|
"astro-seo": "^0.8.4",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"lodash.debounce": "^4.0.8",
|
|
75
75
|
"lodash.merge": "4.6.2",
|
|
76
76
|
"lucide-react": "^0.453.0",
|
|
77
|
+
"marked": "^15.0.6",
|
|
77
78
|
"mermaid": "^11.4.1",
|
|
78
79
|
"rapidoc": "^9.3.4",
|
|
79
80
|
"react": "^18.3.1",
|