Skip to main content

getDataStores

Callable

  • getDataStores(directory: string): (options?: { latestOnly?: boolean }) => Promise<Container[]>

  • Returns all data stores (e.g. databases, caches, etc.) from EventCatalog.

    You can optionally specify if you want to get the latest version of the data stores.

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

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

    // Gets all data stores (and versions) from the catalog
    const containers = await getDataStores();

    // Gets all data stores (only latest version) from the catalog
    const containers = await getDataStores({ latestOnly: true });