mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
fix eslint issues in CLI project (#7492)
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,5 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
|
||||
import { logger } from '../logger';
|
||||
import { PluginInterface } from './plugin-model';
|
||||
|
||||
|
@@ -1,3 +1,4 @@
|
||||
// eslint-disable-next-line no-shadow
|
||||
export enum PluginTarget {
|
||||
processService = 'processService',
|
||||
processAutomation = 'processAutomation',
|
||||
|
@@ -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';
|
||||
|
@@ -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';
|
||||
|
Reference in New Issue
Block a user