@eventcatalog/core 2.17.2 → 2.17.3
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-Q27R4PJA.js → chunk-75M7LGPG.js} +1 -1
- package/dist/{chunk-EG3QHOOT.js → chunk-CXVZEF4D.js} +1 -1
- package/dist/{chunk-XSTP7ECG.js → chunk-KRBIPA23.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 +564 -545
- package/eventcatalog/package.json +1 -1
- package/eventcatalog/src/utils/collections/domains.ts +12 -6
- package/package.json +3 -3
|
@@ -11,12 +11,18 @@ interface Props {
|
|
|
11
11
|
getAllVersions?: boolean;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
//
|
|
15
|
-
let cachedDomains: Domain[] =
|
|
14
|
+
// Update cache to store both versions
|
|
15
|
+
let cachedDomains: Record<string, Domain[]> = {
|
|
16
|
+
allVersions: [],
|
|
17
|
+
currentVersions: [],
|
|
18
|
+
};
|
|
16
19
|
|
|
17
20
|
export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise<Domain[]> => {
|
|
18
|
-
|
|
19
|
-
|
|
21
|
+
const cacheKey = getAllVersions ? 'allVersions' : 'currentVersions';
|
|
22
|
+
|
|
23
|
+
// Check if we have cached domains for this specific getAllVersions value
|
|
24
|
+
if (cachedDomains[cacheKey].length > 0) {
|
|
25
|
+
return cachedDomains[cacheKey];
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
// Get all the domains that are not versioned
|
|
@@ -28,7 +34,7 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
|
|
|
28
34
|
const servicesCollection = await getCollection('services');
|
|
29
35
|
|
|
30
36
|
// @ts-ignore // TODO: Fix this type
|
|
31
|
-
cachedDomains = domains.map((domain) => {
|
|
37
|
+
cachedDomains[cacheKey] = domains.map((domain) => {
|
|
32
38
|
const { latestVersion, versions } = getVersionForCollectionItem(domain, domains);
|
|
33
39
|
|
|
34
40
|
// const receives = service.data.receives || [];
|
|
@@ -59,7 +65,7 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
|
|
|
59
65
|
};
|
|
60
66
|
});
|
|
61
67
|
|
|
62
|
-
return cachedDomains;
|
|
68
|
+
return cachedDomains[cacheKey];
|
|
63
69
|
};
|
|
64
70
|
|
|
65
71
|
export const getUbiquitousLanguage = async (domain: Domain): Promise<UbiquitousLanguage[]> => {
|
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.17.
|
|
9
|
+
"version": "2.17.3",
|
|
10
10
|
"publishConfig": {
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"@astrojs/mdx": "^4.0.2",
|
|
46
46
|
"@astrojs/react": "^4.1.0",
|
|
47
47
|
"@astrojs/tailwind": "^5.1.3",
|
|
48
|
-
"remark-comment": "^1.0.0",
|
|
49
48
|
"@asyncapi/avro-schema-parser": "^3.0.24",
|
|
50
49
|
"@asyncapi/react-component": "^2.4.3",
|
|
51
50
|
"@headlessui/react": "^2.0.3",
|
|
@@ -74,11 +73,12 @@
|
|
|
74
73
|
"lodash.debounce": "^4.0.8",
|
|
75
74
|
"lodash.merge": "4.6.2",
|
|
76
75
|
"lucide-react": "^0.453.0",
|
|
77
|
-
"mermaid": "^
|
|
76
|
+
"mermaid": "^11.4.1",
|
|
78
77
|
"rapidoc": "^9.3.4",
|
|
79
78
|
"react": "^18.3.1",
|
|
80
79
|
"react-dom": "^18.3.1",
|
|
81
80
|
"rehype-slug": "^6.0.0",
|
|
81
|
+
"remark-comment": "^1.0.0",
|
|
82
82
|
"remark-directive": "^3.0.0",
|
|
83
83
|
"remark-gfm": "^3.0.1",
|
|
84
84
|
"rimraf": "^5.0.7",
|