fix eslint issues in CLI project (#7492)

This commit is contained in:
Denys Vuika
2022-02-08 10:28:55 +00:00
committed by GitHub
parent 3205a3da7c
commit f9be037c4f
19 changed files with 186 additions and 235 deletions

View File

@@ -1,10 +1,10 @@
import { logger } from './../logger';
import alfrescoApi = require('@alfresco/js-api');
const TIMEOUT = 6000;
const MAX_RETRY = 10;
export class CheckEnv {
_alfrescoJsApi: any;
TIMEOUT = 6000;
MAX_RETRY = 10;
counter = 0;
constructor(
@@ -15,7 +15,7 @@ export class CheckEnv {
async checkEnv() {
try {
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility(<any> {
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
provider: 'ALL',
hostBpm: this.host,
hostEcm: this.host,
@@ -25,7 +25,7 @@ export class CheckEnv {
clientId: 'alfresco',
scope: 'openid'
}
});
} as any);
await this.alfrescoJsApi.login(this.username, this.password);
} catch (e) {
if (e.error.code === 'ETIMEDOUT') {
@@ -34,14 +34,14 @@ export class CheckEnv {
}
logger.error('Login error environment down or inaccessible');
this.counter++;
if (this.MAX_RETRY === this.counter) {
if (MAX_RETRY === this.counter) {
logger.error('Give up');
process.exit(1);
} else {
logger.error(
`Retry in 1 minute at main();tempt N ${this.counter}`
);
this.sleep(this.TIMEOUT);
this.sleep(TIMEOUT);
this.checkEnv();
}
}

View File

@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { logger } from '../logger';
import { PluginInterface } from './plugin-model';

View File

@@ -1,3 +1,4 @@
// eslint-disable-next-line no-shadow
export enum PluginTarget {
processService = 'processService',
processAutomation = 'processAutomation',

View File

@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { PluginInterface } from './plugin-model';
import { logger } from '../logger';
import { ProcessAutomationHealth } from './process-automation-health';

View File

@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { PluginInterface } from './plugin-model';
import { logger } from '../logger';
import { ProcessServiceHealth } from './process-services-health';