@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.
@@ -37,7 +37,7 @@ var import_axios = __toESM(require("axios"), 1);
37
37
  var import_os = __toESM(require("os"), 1);
38
38
 
39
39
  // package.json
40
- var version = "2.18.3";
40
+ var version = "2.18.5";
41
41
 
42
42
  // src/constants.ts
43
43
  var VERSION = version;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "../chunk-Z67TL5JF.js";
4
- import "../chunk-Y65KQS5Z.js";
3
+ } from "../chunk-UNE7F5KJ.js";
4
+ import "../chunk-2K7LWZ4K.js";
5
5
  export {
6
6
  raiseEvent
7
7
  };
@@ -106,7 +106,7 @@ var import_axios = __toESM(require("axios"), 1);
106
106
  var import_os = __toESM(require("os"), 1);
107
107
 
108
108
  // package.json
109
- var version = "2.18.3";
109
+ var version = "2.18.5";
110
110
 
111
111
  // src/constants.ts
112
112
  var VERSION = version;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  log_build_default
3
- } from "../chunk-AFQD2ZW3.js";
4
- import "../chunk-Z67TL5JF.js";
5
- import "../chunk-Y65KQS5Z.js";
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
@@ -1,5 +1,5 @@
1
1
  // package.json
2
- var version = "2.18.3";
2
+ var version = "2.18.5";
3
3
 
4
4
  // src/constants.ts
5
5
  var VERSION = version;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-Y65KQS5Z.js";
3
+ } from "./chunk-2K7LWZ4K.js";
4
4
 
5
5
  // src/analytics/analytics.js
6
6
  import axios from "axios";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  raiseEvent
3
- } from "./chunk-Z67TL5JF.js";
3
+ } from "./chunk-UNE7F5KJ.js";
4
4
  import {
5
5
  getEventCatalogConfigFile,
6
6
  verifyRequiredFieldsAreInCatalogConfigFile
@@ -25,7 +25,7 @@ __export(constants_exports, {
25
25
  module.exports = __toCommonJS(constants_exports);
26
26
 
27
27
  // package.json
28
- var version = "2.18.3";
28
+ var version = "2.18.5";
29
29
 
30
30
  // src/constants.ts
31
31
  var VERSION = version;
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  VERSION
3
- } from "./chunk-Y65KQS5Z.js";
3
+ } from "./chunk-2K7LWZ4K.js";
4
4
  export {
5
5
  VERSION
6
6
  };
@@ -161,7 +161,7 @@ var import_axios = __toESM(require("axios"), 1);
161
161
  var import_os = __toESM(require("os"), 1);
162
162
 
163
163
  // package.json
164
- var version = "2.18.3";
164
+ var version = "2.18.5";
165
165
 
166
166
  // src/constants.ts
167
167
  var VERSION = version;
@@ -3,14 +3,14 @@ import {
3
3
  } from "./chunk-SHCMAL37.js";
4
4
  import {
5
5
  log_build_default
6
- } from "./chunk-AFQD2ZW3.js";
7
- import "./chunk-Z67TL5JF.js";
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-Y65KQS5Z.js";
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: false,
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-300">{footerLabel}</span>
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
- const versions = [...new Set(allVersionsForItem)].reverse();
26
- const latestVersion = versions[0];
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
- return users.map((user) => {
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
  };
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.18.3",
9
+ "version": "2.18.5",
10
10
  "publishConfig": {
11
11
  "access": "public"
12
12
  },