@nu-art/build-and-install 0.300.3 → 0.300.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/v2/phase/consts.js +1 -0
- package/v2/phase-runner/PhaseRunner.js +11 -2
package/package.json
CHANGED
package/v2/phase/consts.js
CHANGED
|
@@ -223,14 +223,21 @@ class PhaseRunner extends core_1.BaseUnit {
|
|
|
223
223
|
this.unitDependencyTree = dependencyTree;
|
|
224
224
|
}
|
|
225
225
|
async executeImpl() {
|
|
226
|
+
var _a;
|
|
226
227
|
const phasesBlocks = [];
|
|
227
228
|
let phasesBlock = [];
|
|
228
229
|
let lastPhase;
|
|
230
|
+
const reversedPhases = [...this.phases].reverse();
|
|
229
231
|
for (const phase of this.phases) {
|
|
230
232
|
if (lastPhase === null || lastPhase === void 0 ? void 0 : lastPhase.terminateAfterPhase)
|
|
231
233
|
continue;
|
|
232
234
|
try {
|
|
233
|
-
|
|
235
|
+
let willExecutePhase = await this.phaseFilter(phase);
|
|
236
|
+
for (const _phase of reversedPhases) {
|
|
237
|
+
if (await this.phaseFilter(_phase) && ((_a = _phase.dependencyPhaseKeys) === null || _a === void 0 ? void 0 : _a.includes(phase.key))) {
|
|
238
|
+
willExecutePhase = true;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
234
241
|
if (!willExecutePhase) {
|
|
235
242
|
this.logDebug(`Will not execute phase: ${phase.name}, did not pass filter`);
|
|
236
243
|
lastPhase = undefined;
|
|
@@ -253,6 +260,8 @@ class PhaseRunner extends core_1.BaseUnit {
|
|
|
253
260
|
}
|
|
254
261
|
if (phasesBlock.length)
|
|
255
262
|
phasesBlocks.push(phasesBlock);
|
|
263
|
+
if (params_1.RuntimeParams.debug)
|
|
264
|
+
this.logDebug('phasesBlock: ', phasesBlock);
|
|
256
265
|
const executionQueue = phasesBlocks.map((_phasesBlock, index) => {
|
|
257
266
|
return async () => {
|
|
258
267
|
return (0, ts_common_1.Promise_all_sequentially)(this.unitDependencyTree.map(unitGroup => () => {
|
|
@@ -268,7 +277,7 @@ class PhaseRunner extends core_1.BaseUnit {
|
|
|
268
277
|
if (!params_1.RuntimeParams.dryRun)
|
|
269
278
|
return (_b = (_a = unit)[phase.method]) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
270
279
|
if (!(await this.willUnitRunForPhase(phase, unit)))
|
|
271
|
-
unit.
|
|
280
|
+
unit.logWarning(`will NOT run phase #${index}: ${phase.name}`);
|
|
272
281
|
else
|
|
273
282
|
unit.logWarning(`running phase #${index}: ${phase.name}`);
|
|
274
283
|
}
|