UNPKG

@whook/whook

Version:

Build strong and efficient REST web services.

22 lines 935 B
import { autoService, location } from 'knifecycle'; import { stdout } from 'node:process'; import { DEFAULT_SCHEMA_VALIDATORS_OPTIONS, buildSchemaValidatorsMap, } from '../services/schemaValidators.js'; export const definition = { name: 'generateSchemaValidators', description: 'Build the schema validators with AJV', example: `whook generateSchemaValidators`, arguments: [], }; async function initGenerateSchemaValidatorsCommand({ DEBUG_NODE_ENVS, SCHEMA_VALIDATORS_OPTIONS = DEFAULT_SCHEMA_VALIDATORS_OPTIONS, API, ENV, log, outstream = stdout, }) { return async () => { outstream.write(await buildSchemaValidatorsMap({ DEBUG_NODE_ENVS, SCHEMA_VALIDATORS_OPTIONS, API, ENV, log, })); }; } export default location(autoService(initGenerateSchemaValidatorsCommand), import.meta.url); //# sourceMappingURL=generateSchemaValidators.js.map