getDomains CallablegetDomains(directory: string): (options?: { latestOnly?: boolean }) => Promise<Domain[]>Returns all domains from EventCatalog. You can optionally specify if you want to get the latest version of the domains.@exampleimport utils from '@eventcatalog/utils';const { getDomains } = utils('/path/to/eventcatalog');// Gets all domains (and versions) from the catalogconst domains = await getDomains();// Gets all domains (only latest version) from the catalogconst domains = await getDomains({ latestOnly: true });
Returns all domains from EventCatalog.
You can optionally specify if you want to get the latest version of the domains.