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