Skip to main content

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

ParameterType
directorystring

Returns

Function

Parameters

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