Function: rmDiagramById()
rmDiagramById(
directory): (id,version?,persistFiles?) =>Promise<void>
Defined in: diagrams.ts:162
Delete a diagram by its id.
Optionally specify a version to delete a specific version of the diagram.
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 { rmDiagramById } = utils('/path/to/eventcatalog');
// deletes the latest ArchitectureDiagram diagram
await rmDiagramById('ArchitectureDiagram');
// deletes a specific version of the ArchitectureDiagram diagram
await rmDiagramById('ArchitectureDiagram', '0.0.1');