Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

rmCommandById

Callable

  • rmCommandById(directory: string): (id: string, version?: string) => Promise<void>

  • Delete a command by it's id.

    Optionally specify a version to delete a specific version of the command.

    @example
    import utils from '@eventcatalog/utils';

    const { rmCommandById } = utils('/path/to/eventcatalog');

    // deletes the latest UpdateInventory command
    await rmCommandById('UpdateInventory');

    // deletes a specific version of the UpdateInventory command
    await rmCommandById('UpdateInventory', '0.0.1');