@nu-art/build-and-install 0.204.75 → 0.204.77

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.204.75",
3
+ "version": "0.204.77",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -167,8 +167,17 @@ class PhaseRunner extends core_1.BaseUnit {
167
167
  const projectDefaultFileRoutes = RunnerParams_1.MemKey_ProjectConfig.get().defaultFileRoutes;
168
168
  return (0, ts_common_1.merge)(defaultFileRoutes, projectDefaultFileRoutes);
169
169
  }
170
- buildUnitDependencyTree() {
170
+ async buildUnitDependencyTree() {
171
171
  const units = [...this.units];
172
+ // Filter out units by their filter
173
+ for (const unit of units) {
174
+ if ((0, ts_common_1.exists)(unit.config.filter) && !(await unit.config.filter())) {
175
+ (0, ts_common_1.removeItemFromArray)(units, unit);
176
+ // @ts-ignore
177
+ unit.setStatus('Will not run');
178
+ unit.logInfo('unit will not run, did not pass unit filter');
179
+ }
180
+ }
172
181
  const allDependencies = units.map(unit => unit.runtime.dependencyName);
173
182
  const resolvedUnitNames = [];
174
183
  const dependencyTree = [];
@@ -378,12 +387,14 @@ class PhaseRunner extends core_1.BaseUnit {
378
387
  async execute() {
379
388
  return new MemStorage_1.MemStorage().init(async () => {
380
389
  await this.init();
381
- this.buildUnitDependencyTree();
390
+ await this.buildUnitDependencyTree();
382
391
  await this.executeImpl();
383
392
  });
384
393
  }
385
394
  async killRunner() {
395
+ this.logDebug('Killing units');
386
396
  await Promise.all(this.units.map(unit => unit.kill()));
397
+ this.logDebug('Units killed');
387
398
  await this.setRunningStatus();
388
399
  }
389
400
  setScreen(screen) {
@@ -15,7 +15,6 @@ class Unit_Python extends BaseUnit_1.BaseUnit {
15
15
  this.runtime.pathTo = {
16
16
  pkg: (0, tools_1.convertToFullPath)(this.config.pathToPackage),
17
17
  };
18
- this.logWarning(`Python Path ${this.runtime.pathTo.pkg}`);
19
18
  await this.initCommando();
20
19
  }
21
20
  //######################### Internal Logic #########################
@@ -287,10 +287,12 @@ class Unit_FirebaseFunctionsApp extends core_1.Unit_TypescriptLib {
287
287
  async kill() {
288
288
  if (!this.launchCommandos)
289
289
  return;
290
+ this.logWarning(`Killing unit - ${this.config.label}`);
290
291
  const emulatorPid = this.getPID(this.listeners.emulator.pid);
291
292
  const proxyPid = this.getPID(this.listeners.proxy.pid);
292
293
  await this.launchCommandos.emulator.gracefullyKill(emulatorPid);
293
294
  await this.launchCommandos.proxy.gracefullyKill(proxyPid);
295
+ this.logWarning(`Unit killed - ${this.config.label}`);
294
296
  }
295
297
  //######################### Deploy Logic #########################
296
298
  async printFiles() {
@@ -145,8 +145,10 @@ class Unit_FirebaseHostingApp extends core_1.Unit_TypescriptLib {
145
145
  var _a;
146
146
  if (!this.launchCommando)
147
147
  return;
148
+ this.logWarning(`Killing unit - ${this.config.label}`);
148
149
  const appPid = this.getPID();
149
150
  await ((_a = this.launchCommando) === null || _a === void 0 ? void 0 : _a.gracefullyKill(appPid));
151
+ this.logWarning(`Unit killed - ${this.config.label}`);
150
152
  }
151
153
  //######################### Deploy Logic #########################
152
154
  async deployImpl() {