You can optionally specify if you want to get the latest version of the events.
@example
import utils from'@eventcatalog/utils'; const{ getCommands }=utils('/path/to/eventcatalog'); // Gets all commands (and versions) from the catalog const commands =awaitgetCommands(); // Gets all commands (only latest version) from the catalog const commands =awaitgetCommands({ latestOnly:true}); // Gets all commands with the schema attached const commands =awaitgetCommands({ attachSchema:true});
Returns all commands from EventCatalog.
You can optionally specify if you want to get the latest version of the events.