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