Function: rmServiceById()
rmServiceById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: services.ts:283
Delete a service by it's id.
Optionally specify a version to delete a specific version of the service.
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 { rmServiceById } = utils('/path/to/eventcatalog');
// deletes the latest InventoryService event
await rmServiceById('InventoryService');
// deletes a specific version of the InventoryService event
await rmServiceById('InventoryService', '0.0.1');