mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[NO-ISSUE] add check env is up also for CS ans PS (#4640)
* add check env is up also for CS ans PS * remove logs
This commit is contained in:
27
scripts/check-cs-env.js
Executable file
27
scripts/check-cs-env.js
Executable file
@@ -0,0 +1,27 @@
|
||||
let alfrescoApi = require('@alfresco/js-api');
|
||||
let program = require('commander');
|
||||
|
||||
async function main() {
|
||||
|
||||
program
|
||||
.version('0.1.0')
|
||||
.option('--host [type]', 'Remote environment host adf.lab.com ')
|
||||
.option('-p, --password [type]', 'password ')
|
||||
.option('-u, --username [type]', 'username ')
|
||||
.parse(process.argv);
|
||||
|
||||
try {
|
||||
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'BPM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error environment down or inaccessible');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
main();
|
27
scripts/check-ps-env.js
Executable file
27
scripts/check-ps-env.js
Executable file
@@ -0,0 +1,27 @@
|
||||
let alfrescoApi = require('@alfresco/js-api');
|
||||
let program = require('commander');
|
||||
|
||||
async function main() {
|
||||
|
||||
program
|
||||
.version('0.1.0')
|
||||
.option('--host [type]', 'Remote environment host adf.lab.com ')
|
||||
.option('-p, --password [type]', 'password ')
|
||||
.option('-u, --username [type]', 'username ')
|
||||
.parse(process.argv);
|
||||
|
||||
try {
|
||||
|
||||
this.alfrescoJsApi = new alfrescoApi.AlfrescoApiCompatibility({
|
||||
provider: 'ECM',
|
||||
hostEcm: program.host
|
||||
});
|
||||
await this.alfrescoJsApi.login(program.username, program.password);
|
||||
} catch (e) {
|
||||
console.log('Login error environment down or inaccessible');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
main();
|
Reference in New Issue
Block a user