UNPKG

declapract

Version:

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

23 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validate = void 0; const readDeclarePracticesConfig_1 = require("../../domain.operations/declaration/readDeclarePracticesConfig"); const validate = async ({ declarePracticesConfigPath, }) => { // read the usage config await (0, readDeclarePracticesConfig_1.readDeclarePracticesConfig)({ configPath: declarePracticesConfigPath }); // check that each use case's example passes it's checks; // TODO // await Promise.all( // config.useCases.map(async (useCase) => { // if (!useCase.example) return; // const evaluations = await evaluateProjectAgainstPracticeDeclarations({ // practices: useCase.practices, // projectRootDirectory: useCase.example.projectRootDirectory, // projectVariables: mockProjectVariablesProxyObject, // }); // }), // ); // if it passes all of the above, then its good to go console.log('Declarations have validated successfully 🎉'); // tslint:disable-line no-console }; exports.validate = validate; //# sourceMappingURL=validate.js.map