@eventcatalog/core 2.18.3 → 2.18.5
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-Y65KQS5Z.js → chunk-2K7LWZ4K.js} +1 -1
- package/dist/{chunk-Z67TL5JF.js → chunk-UNE7F5KJ.js} +1 -1
- package/dist/{chunk-AFQD2ZW3.js → chunk-YEN4MQY6.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/astro.config.mjs +1 -1
- package/eventcatalog/src/components/MDX/NodeGraph/NodeGraph.tsx +1 -1
- package/eventcatalog/src/utils/channels.ts +5 -0
- package/eventcatalog/src/utils/collections/domains.ts +5 -0
- package/eventcatalog/src/utils/collections/flows.ts +5 -0
- package/eventcatalog/src/utils/collections/services.ts +5 -0
- package/eventcatalog/src/utils/collections/util.ts +12 -3
- package/eventcatalog/src/utils/commands.ts +5 -0
- package/eventcatalog/src/utils/events.ts +5 -0
- package/eventcatalog/src/utils/queries.ts +5 -0
- package/eventcatalog/src/utils/teams.ts +5 -0
- package/eventcatalog/src/utils/users.ts +8 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log_build_default
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-YEN4MQY6.js";
|
|
4
|
+
import "../chunk-UNE7F5KJ.js";
|
|
5
|
+
import "../chunk-2K7LWZ4K.js";
|
|
6
6
|
import "../chunk-E7TXTI7G.js";
|
|
7
7
|
export {
|
|
8
8
|
log_build_default as default
|
package/dist/constants.cjs
CHANGED
package/dist/constants.js
CHANGED
package/dist/eventcatalog.cjs
CHANGED
package/dist/eventcatalog.js
CHANGED
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-SHCMAL37.js";
|
|
4
4
|
import {
|
|
5
5
|
log_build_default
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-YEN4MQY6.js";
|
|
7
|
+
import "./chunk-UNE7F5KJ.js";
|
|
8
8
|
import {
|
|
9
9
|
catalogToAstro
|
|
10
10
|
} from "./chunk-WF34R5UT.js";
|
|
11
11
|
import {
|
|
12
12
|
VERSION
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2K7LWZ4K.js";
|
|
14
14
|
import {
|
|
15
15
|
generate
|
|
16
16
|
} from "./chunk-YEQVKHST.js";
|
|
@@ -47,7 +47,7 @@ export default defineConfig({
|
|
|
47
47
|
// https://docs.astro.build/en/guides/integrations-guide/mdx/#optimize
|
|
48
48
|
optimize: config.mdxOptimize || false,
|
|
49
49
|
remarkPlugins: [remarkDirective, remarkDirectives, remarkComment, mermaid],
|
|
50
|
-
gfm:
|
|
50
|
+
gfm: true,
|
|
51
51
|
}),
|
|
52
52
|
pagefind(),
|
|
53
53
|
],
|
|
@@ -422,7 +422,7 @@ const NodeGraph = ({
|
|
|
422
422
|
<div className="flex justify-between" id="visualiser-footer">
|
|
423
423
|
{footerLabel && (
|
|
424
424
|
<div className="py-2 w-full text-left ">
|
|
425
|
-
<span className=" text-sm no-underline py-2 text-gray-
|
|
425
|
+
<span className=" text-sm no-underline py-2 text-gray-500">{footerLabel}</span>
|
|
426
426
|
</div>
|
|
427
427
|
)}
|
|
428
428
|
|
|
@@ -74,5 +74,10 @@ export const getChannels = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
74
74
|
};
|
|
75
75
|
});
|
|
76
76
|
|
|
77
|
+
// order them by the name of the channel
|
|
78
|
+
cachedChannels[cacheKey].sort((a, b) => {
|
|
79
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
80
|
+
});
|
|
81
|
+
|
|
77
82
|
return cachedChannels[cacheKey];
|
|
78
83
|
};
|
|
@@ -65,6 +65,11 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
|
|
|
65
65
|
};
|
|
66
66
|
});
|
|
67
67
|
|
|
68
|
+
// order them by the name of the domain
|
|
69
|
+
cachedDomains[cacheKey].sort((a, b) => {
|
|
70
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
71
|
+
});
|
|
72
|
+
|
|
68
73
|
return cachedDomains[cacheKey];
|
|
69
74
|
};
|
|
70
75
|
|
|
@@ -69,5 +69,10 @@ export const getFlows = async ({ getAllVersions = true }: Props = {}): Promise<F
|
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
// order them by the name of the flow
|
|
73
|
+
cachedFlows[cacheKey].sort((a, b) => {
|
|
74
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
75
|
+
});
|
|
76
|
+
|
|
72
77
|
return cachedFlows[cacheKey];
|
|
73
78
|
};
|
|
@@ -79,6 +79,11 @@ export const getServices = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
79
79
|
};
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
+
// order them by the name of the service
|
|
83
|
+
cachedServices[cacheKey].sort((a, b) => {
|
|
84
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
85
|
+
});
|
|
86
|
+
|
|
82
87
|
return cachedServices[cacheKey];
|
|
83
88
|
};
|
|
84
89
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CollectionTypes } from '@types';
|
|
2
2
|
import type { CollectionEntry } from 'astro:content';
|
|
3
|
-
import { coerce, satisfies as satisfiesRange } from 'semver';
|
|
3
|
+
import { coerce, satisfies as satisfiesRange, compare } from 'semver';
|
|
4
4
|
|
|
5
5
|
export const getPreviousVersion = (version: string, versions: string[]) => {
|
|
6
6
|
const index = versions.indexOf(version);
|
|
@@ -22,8 +22,17 @@ export const getVersionForCollectionItem = (
|
|
|
22
22
|
.filter((i) => i.data.id === item.data.id)
|
|
23
23
|
.map((i) => i.data.version)
|
|
24
24
|
.sort();
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
// unique versions
|
|
27
|
+
const versions = [...new Set(allVersionsForItem)];
|
|
28
|
+
|
|
29
|
+
// Use semver to order the versions
|
|
30
|
+
const orderedVersions = versions.sort((a, b) => {
|
|
31
|
+
return compare(b, a);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
const latestVersion = orderedVersions[0];
|
|
35
|
+
|
|
27
36
|
return { versions, latestVersion };
|
|
28
37
|
};
|
|
29
38
|
|
|
@@ -80,5 +80,10 @@ export const getCommands = async ({ getAllVersions = true }: Props = {}): Promis
|
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
// order them by the name of the command
|
|
84
|
+
cachedCommands[cacheKey].sort((a, b) => {
|
|
85
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
86
|
+
});
|
|
87
|
+
|
|
83
88
|
return cachedCommands[cacheKey];
|
|
84
89
|
};
|
|
@@ -80,5 +80,10 @@ export const getEvents = async ({ getAllVersions = true }: Props = {}): Promise<
|
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
// order them by the name of the event
|
|
84
|
+
cachedEvents[cacheKey].sort((a, b) => {
|
|
85
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
86
|
+
});
|
|
87
|
+
|
|
83
88
|
return cachedEvents[cacheKey];
|
|
84
89
|
};
|
|
@@ -80,5 +80,10 @@ export const getQueries = async ({ getAllVersions = true }: Props = {}): Promise
|
|
|
80
80
|
};
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
+
// order them by the name of the query
|
|
84
|
+
cachedQueries[cacheKey].sort((a, b) => {
|
|
85
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
86
|
+
});
|
|
87
|
+
|
|
83
88
|
return cachedQueries[cacheKey];
|
|
84
89
|
};
|
|
@@ -58,5 +58,10 @@ export const getTeams = async (): Promise<Team[]> => {
|
|
|
58
58
|
};
|
|
59
59
|
});
|
|
60
60
|
|
|
61
|
+
// order them by the name of the team
|
|
62
|
+
cachedTeams.sort((a, b) => {
|
|
63
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
64
|
+
});
|
|
65
|
+
|
|
61
66
|
return cachedTeams;
|
|
62
67
|
};
|
|
@@ -26,7 +26,7 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
26
26
|
return team.data.hidden !== true;
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
const mappedUsers = users.map((user) => {
|
|
30
30
|
const associatedTeams = teams.filter((team) => {
|
|
31
31
|
return team.data.members?.some((member) => member.id === user.data.id);
|
|
32
32
|
});
|
|
@@ -66,4 +66,11 @@ export const getUsers = async (): Promise<User[]> => {
|
|
|
66
66
|
},
|
|
67
67
|
};
|
|
68
68
|
});
|
|
69
|
+
|
|
70
|
+
// order them by the name of the user
|
|
71
|
+
mappedUsers.sort((a, b) => {
|
|
72
|
+
return (a.data.name || a.data.id).localeCompare(b.data.name || b.data.id);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
return mappedUsers;
|
|
69
76
|
};
|