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
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
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');