-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
37 lines (33 loc) · 978 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const inquirer = require('inquirer');
const config = require('./config.json');
const TableAPI = require('./src/table_api');
const DEFAULT_PROTOCOL = 'https';
const TABLE_NAME = 'u_iron_dome_request';
inquirer.prompt([{
type: 'password',
name: 'password',
message: `Enter your ${config.instance} password`
}]).then(answers => {
const options = {
protocol: config.protocol || DEFAULT_PROTOCOL,
domain: config.instance,
username: config.username,
password: answers.password
};
new TableAPI(options, TABLE_NAME).post({
'sys_original.u_iron_dome_request.u_choice_job_type': 'Run Tests',
'u_iron_dome_request.u_choice_job_type': 'Run Tests',
'u_iron_dome_request.u_string_name': 'My iron dome request',
//...
})
.then(data => {
console.log('SUCCESS');
console.log(data);
process.exit(0);
})
.catch(response => {
console.log('ERROR');
console.log(response);
process.exit(1);
});
});