@nu-art/build-and-install 0.300.4 → 0.300.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/build-and-install",
3
- "version": "0.300.4",
3
+ "version": "0.300.6",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -105,6 +105,7 @@ exports.phase_Watch = {
105
105
  key: exports.phaseKey_Watch,
106
106
  name: 'Watch',
107
107
  method: 'watch',
108
+ breakPhases: true,
108
109
  filter: () => params_1.RuntimeParams.watch,
109
110
  };
110
111
  exports.phases_Build = [
@@ -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
- const willExecutePhase = await this.phaseFilter(phase);
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.logVerbose(`will NOT run phase #${index}: ${phase.name}`);
280
+ unit.logWarning(`will NOT run phase #${index}: ${phase.name}`);
272
281
  else
273
282
  unit.logWarning(`running phase #${index}: ${phase.name}`);
274
283
  }
@@ -377,8 +386,10 @@ class PhaseRunner extends core_1.BaseUnit {
377
386
  this.killed = true;
378
387
  this.logInfo('Completed successfully');
379
388
  ts_common_1.StaticLogger.logInfo('-----------', '---------------------------------- Process Completed successfully ----------------------------------');
389
+ if (params_1.RuntimeParams.closeOnExit)
390
+ process.exit(0);
380
391
  }
381
- finally {
392
+ catch (e) {
382
393
  if (params_1.RuntimeParams.closeOnExit)
383
394
  process.exit(1);
384
395
  }