mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* [ACA-4227] Create a generic script to check plugin status before running e2e tests by plugin name * * Added governace env check * * Added AAE plugin check * * Updated script * small improvements, add uiName parameter for the command * * Fixed comments * * Moved check-plugin script in the common place * * Added table format to show plugin status Co-authored-by: adomi <ardit.domi@alfresco.com>
45 lines
1.1 KiB
TypeScript
45 lines
1.1 KiB
TypeScript
import { PluginInterface } from './plugin-model';
|
|
import { logger } from '../logger';
|
|
|
|
export class PluginConfiguration {
|
|
constructor(
|
|
private plugInInfo: PluginInterface,
|
|
private alfrescoJsApi: any
|
|
) {}
|
|
|
|
async getAppConfig(url: string) {
|
|
return this.callCustomApi(url);
|
|
}
|
|
|
|
async callCustomApi(url: string) {
|
|
const pathParams = {},
|
|
headerParams = {},
|
|
formParams = {},
|
|
bodyParam = {},
|
|
queryParams = {},
|
|
contentTypes = ['application/json'],
|
|
accepts = ['application/json'];
|
|
try {
|
|
const response = await this.alfrescoJsApi.oauth2Auth.callCustomApi(
|
|
url,
|
|
'GET',
|
|
pathParams,
|
|
queryParams,
|
|
headerParams,
|
|
formParams,
|
|
bodyParam,
|
|
contentTypes,
|
|
accepts
|
|
);
|
|
|
|
return response;
|
|
} catch (error) {
|
|
logger.error(
|
|
`${this.plugInInfo.host} is not reachable error: `,
|
|
error
|
|
);
|
|
return {};
|
|
}
|
|
}
|
|
}
|