Skip to content

Commit

Permalink
fix(core): fixed matching for ubiquitous lang (#1068)
Browse files Browse the repository at this point in the history
* fix(core): fixed matching for ubiquitous lang

* Create eight-badgers-try.md
  • Loading branch information
boyney123 authored Jan 5, 2025
1 parent 6d28aab commit 1a9b102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-badgers-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@eventcatalog/core": patch
---

fix(core): fixed matching for ubiquitous lang
7 changes: 3 additions & 4 deletions eventcatalog/src/utils/collections/domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,9 @@ export const getDomains = async ({ getAllVersions = true }: Props = {}): Promise
};

export const getUbiquitousLanguage = async (domain: Domain): Promise<UbiquitousLanguage[]> => {
const { collection, data } = domain;

const ubiquitousLanguages = await getCollection('ubiquitousLanguages', (ubiquitousLanguage) => {
return ubiquitousLanguage.id.toLowerCase().includes(`${collection}/${data.name}`.toLowerCase());
const ubiquitousLanguages = await getCollection('ubiquitousLanguages', (ubiquitousLanguage: UbiquitousLanguage) => {
const folderPath = ubiquitousLanguage.id.replace('ubiquitous-language', '');
return domain.filePath?.toLowerCase().includes(folderPath.toLowerCase());
});

return ubiquitousLanguages;
Expand Down

0 comments on commit 1a9b102

Please sign in to comment.