Skip to main content
New project sponsor 🪝Hookdeck: Serverless infrastructure for event-driven architecture. Learn more.

versionService

Callable

  • versionService(directory: string): (id: string) => Promise<void>

  • Version a service by it's id.

    Takes the latest service and moves it to a versioned directory. All files with this service are also versioned. (e.g /services/InventoryService/openapi.yml)

    @example
    import utils from '@eventcatalog/utils';

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

    // moves the latest InventoryService service to a versioned directory
    // the version within that service is used as the version number.
    await versionService('InventoryService');