UNPKG

piral-cli

Version:

The standard CLI for creating and building a Piral instance or a Pilet.

24 lines 828 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ruleSummary = ruleSummary; exports.runRules = runRules; const log_1 = require("./log"); function ruleSummary(errors, warnings) { if (errors.length > 0) { (0, log_1.fail)('validationFailed_0080', errors.length); } else if (warnings.length > 0) { (0, log_1.log)('validationWarned_0081', warnings.length); } else { (0, log_1.logDone)('Validation successful. No errors or warnings.'); } } async function runRules(rules, context, configurations = {}) { for (const rule of rules) { (0, log_1.log)('generalDebug_0003', `Running rule "${rule?.name}" ...`); const options = configurations[rule.name]; await rule.run(context, options); } } //# sourceMappingURL=rules.js.map