-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
executable file
·39 lines (31 loc) · 958 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
38
39
#!/usr/bin/env node
/**
* dependancy-updater
* Cli tool to update Devendancies and related functionalities.
*
* @author Shashwat Gupta (Shashtag) <https://github.com/shashtag>
*/
const init = require('./utils/init');
const cli = require('./utils/cli');
const handleInputErrors = require('./utils/handleInputError');
const getCsvData = require('./utils/getCsvData');
const handleMissingInputs = require('./utils/handleMissingInputs');
const loading = require('loading-cli');
const inputGhPat = require('./utils/inputGhPat');
global.csvData = [];
global.flags = cli.flags;
global.inputPackageName = '';
global.inputPackageVersion = '';
global.load = loading('Performing operations');
const input = cli.input;
const { clear, debug } = flags;
(async () => {
init({ clear });
input.includes(`help`) && cli.showHelp(0);
if (flags.csv && flags.package) {
handleInputErrors();
await inputGhPat();
getCsvData();
}
handleMissingInputs();
})();