Skip to main content
View as Markdown

Function: flowHasVersion()

flowHasVersion(directory): (id, version?) => Promise<boolean>

Defined in: flows.ts:307

Check to see if the catalog has a version for the given flow.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
idstring
version?string

Returns

Promise<boolean>

Example

import utils from '@eventcatalog/utils';

const { flowHasVersion } = utils('/path/to/eventcatalog');

await flowHasVersion('PaymentFlow', '0.0.1');
await flowHasVersion('PaymentFlow', 'latest');
await flowHasVersion('PaymentFlow', '0.0.x');