UNPKG

histoire

Version:

A fast story book powered by Vite

21 lines (20 loc) • 728 B
import { parseCatalogListArgs, parseCatalogVariantsArgs } from '@histoire/cli/protocol/catalog'; import { getCatalogService } from '../catalog/index.js'; /** * Handlers of the `catalog.*` namespace: revision-pinned, bounded pages over the * canonical catalog of the current generation. Each validates its own arguments. */ export const catalogHandlers = [ { operation: 'catalog.list', async handle(args, context) { return getCatalogService(context).list(parseCatalogListArgs(args)); }, }, { operation: 'catalog.variants', async handle(args, context) { return getCatalogService(context).variants(parseCatalogVariantsArgs(args)); }, }, ];