@nu-art/build-and-install 0.204.96 → 0.204.97

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.96",
3
+ "version": "0.204.97",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "TacB0sS",
@@ -401,7 +401,7 @@ class PhaseRunner extends core_1.BaseUnit {
401
401
  process.exit(0);
402
402
  }
403
403
  catch (error) {
404
- this.logError('Finished with Errors: ', error);
404
+ // this.logError('Finished with Errors: ', error);
405
405
  if (params_1.RuntimeParams.closeOnExit)
406
406
  process.exit(1);
407
407
  }
@@ -1,4 +1,4 @@
1
- import { AsyncVoidFunction, Constructor, Logger } from '@nu-art/ts-common';
1
+ import { AsyncVoidFunction, Constructor, Logger, LogLevel } from '@nu-art/ts-common';
2
2
  import { RunnerParamKey } from '../../phase-runner/RunnerParams';
3
3
  import { CommandoInteractive } from '@nu-art/commando/shell';
4
4
  import { BaseCommando } from '@nu-art/commando/shell/core/BaseCommando';
@@ -30,7 +30,7 @@ export declare class BaseUnit<C extends BaseUnit_Config = BaseUnit_Config, RTC e
30
30
  protected getRunnerParam(key: RunnerParamKey): string | undefined;
31
31
  private initLogClient;
32
32
  protected setErrorStatus(status: string, error: Error): void;
33
- protected setStatus(status: string, type?: 'start' | 'end'): void;
33
+ protected setStatus(status: string, type?: 'start' | 'end', logLevel?: LogLevel): void;
34
34
  protected addToClassStack: (cls: Function) => void;
35
35
  isInstanceOf: (cls: Function) => boolean;
36
36
  getStatus(): string;
@@ -75,10 +75,10 @@ class BaseUnit extends ts_common_1.Logger {
75
75
  ts_common_1.BeLogged.addClient(this.logger);
76
76
  }
77
77
  setErrorStatus(status, error) {
78
- this.setStatus(status, 'end');
78
+ this.setStatus(status, 'end', ts_common_1.LogLevel.Error);
79
79
  this.logError(error);
80
80
  }
81
- setStatus(status, type) {
81
+ setStatus(status, type, logLevel = ts_common_1.LogLevel.Info) {
82
82
  let operationDuration = '';
83
83
  if (type === 'start')
84
84
  this.timeCounter = timeCounter();
@@ -89,7 +89,7 @@ class BaseUnit extends ts_common_1.Logger {
89
89
  operationDuration = ` (${this.timeCounter.format('mm:ss')})`;
90
90
  delete this.timeCounter;
91
91
  }
92
- this.logInfo(`Unit status update: ${this.unitStatus} => ${status}${operationDuration}`);
92
+ this.log(logLevel, false, [`Unit status update: ${this.unitStatus} => ${status}${operationDuration}`]);
93
93
  this.unitStatus = `${status}${operationDuration}`;
94
94
  PhaseRunnerDispatcher_1.dispatcher_UnitStatusChange.dispatch(this);
95
95
  }
@@ -104,6 +104,9 @@ class Unit_TypescriptLib extends Unit_Typescript_1.Unit_Typescript {
104
104
  const commando = this.allocateCommando(nvm_1.Commando_NVM, basic_1.Commando_Basic)
105
105
  .cd(this.runtime.pathTo.pkg)
106
106
  .append(`tsc -p "${pathToTSConfig}" --rootDir "${pathToCompile}" --outDir "${this.runtime.pathTo.output}"`)
107
+ .setLogLevelFilter((log, std) => {
108
+ return ts_common_1.LogLevel.Error;
109
+ })
107
110
  .addLogProcessor((log) => !log.includes('Now using node') && !log.includes('.nvmrc\' with version'));
108
111
  await this.executeAsyncCommando(commando, (stdout, stderr, exitCode) => {
109
112
  if (stderr.length)
@@ -258,7 +258,8 @@ class Unit_FirebaseFunctionsApp extends core_1.Unit_TypescriptLib {
258
258
  const commando = this.allocateCommando(nvm_1.Commando_NVM).applyNVM()
259
259
  .cd(this.runtime.pathTo.pkg)
260
260
  .append('ts-node src/main/proxy.ts');
261
- return this.executeAsyncCommando(commando);
261
+ await this.executeAsyncCommando(commando);
262
+ this.logWarning('PROXY TERMINATED');
262
263
  }
263
264
  async runEmulator() {
264
265
  const commando = this.allocateCommando(nvm_1.Commando_NVM).applyNVM()
@@ -266,7 +267,8 @@ class Unit_FirebaseFunctionsApp extends core_1.Unit_TypescriptLib {
266
267
  .cd(this.runtime.pathTo.pkg)
267
268
  .onLog(/.*Emulator Hub running.*/, () => this.setStatus('Launch Complete'))
268
269
  .append(`firebase emulators:start --export-on-exit --import=.trash/data ${params_1.RuntimeParams.debugBackend ? `--inspect-functions ${this.config.firebaseConfig.debugPort}` : ''}`);
269
- return this.executeAsyncCommando(commando);
270
+ await this.executeAsyncCommando(commando);
271
+ this.logWarning('EMULATORS TERMINATED');
270
272
  }
271
273
  //######################### Deploy Logic #########################
272
274
  async deployImpl() {
@@ -124,7 +124,8 @@ class Unit_FirebaseHostingApp extends core_1.Unit_TypescriptLib {
124
124
  .append(`((\${#array[@]} > 0)) && kill -9 "\${array[@]}"`)
125
125
  .append('echo ')
126
126
  .append('npm run start');
127
- return this.executeAsyncCommando(commando);
127
+ await this.executeAsyncCommando(commando);
128
+ this.logWarning('HOSTING TERMINATED');
128
129
  }
129
130
  //######################### Deploy Logic #########################
130
131
  async deployImpl() {