Skip to main content

Function: rmCommandById()

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

Defined in: commands.ts:210

Delete a command by it's id.

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

Parameters​

ParameterType
directorystring

Returns​

Function

Parameters​

ParameterType
idstring
version?string
persistFiles?boolean

Returns​

Promise<void>

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');