Function: versionChannel()
versionChannel(
directory): (id) =>Promise<void>
Defined in: channels.ts:179
Version a channel by it's id.
Takes the latest channel and moves it to a versioned directory.
Parameters
| Parameter | Type |
|---|---|
directory | string |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
Promise<void>
Example
import utils from '@eventcatalog/utils';
const { versionChannel } = utils('/path/to/eventcatalog');
// moves the latest inventory.{env}.events channel to a versioned directory
// the version within that channel is used as the version number.
await versionChannel('inventory.{env}.events');