declapract
Version:
A tool to declaratively define best practices, maintainable evolve them, and scalably enforce them.
22 lines • 1.34 kB
JavaScript
;
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.applyPlans = void 0;
const sortFileActionPlansByPaths_1 = require("../sortFileActionPlansByPaths");
const applyPlan_1 = require("./applyPlan");
const applyPlans = (_a) => __awaiter(void 0, [_a], void 0, function* ({ plans, projectRootDirectory, }) {
const sortedPlans = (0, sortFileActionPlansByPaths_1.sortFileActionPlansByPaths)({ plans });
for (const plan of sortedPlans) {
yield (0, applyPlan_1.applyPlan)({ plan, projectRootDirectory }); // one at a time, sequentially
}
});
exports.applyPlans = applyPlans;
//# sourceMappingURL=applyPlans.js.map