UNPKG

declapract

Version:

A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.

28 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@oclif/core"); const validate_1 = require("../../logic/commands/validate"); // eslint-disable-next-line import/no-default-export class Validate extends core_1.Command { async run() { const { flags } = await this.parse(Validate); const config = flags.config; // generate the code const configPath = config.slice(0, 1) === '/' ? config : `${process.cwd()}/${config}`; // if starts with /, consider it as an absolute path await (0, validate_1.validate)({ declarePracticesConfigPath: configPath, }); } } Validate.description = "validate the declared practices, use cases, and examples; checks that these declarations are usable and don't contain declaration errors"; Validate.flags = { help: core_1.Flags.help({ char: 'h' }), config: core_1.Flags.string({ char: 'c', description: 'path to the declapract declarations config yml', required: true, default: 'declapract.declare.yml', }), }; exports.default = Validate; //# sourceMappingURL=validate.js.map