Skip to main content

rmChannelById

Callable

  • rmChannelById(directory: string): (id: string, version?: string, persistFiles?: boolean) => Promise<void>

  • Delete a channel by it's id.

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

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

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

    // deletes the latest InventoryChannel channel
    await rmChannelById('inventory.{env}.events');

    // deletes a specific version of the InventoryChannel channel
    await rmChannelById('inventory.{env}.events', '0.0.1');