-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli.js
executable file
·40 lines (38 loc) · 953 Bytes
/
cli.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
40
#!/usr/bin/env node
require('yargs/yargs')(process.argv.slice(2))
.strict()
.help()
.commandDir('src/commands')
// Global options that can be used by all commands
// options provided will be used over quant.json.
.option('clientid', {
alias: 'c',
describe: 'Project customer id for QuantCDN',
type: 'string',
})
.option('project', {
alias: 'p',
describe: 'Project name for QuantCDN',
type: 'string',
})
.option('token', {
alias: 't',
describe: 'Project token for QuantCDN',
type: 'string',
})
.option('endpoint', {
alias: 'e',
describe: 'API endpoint for QuantCDN',
type: 'string',
})
.option('bearer', {
describe: 'Scoped API berarer token',
type: 'string',
})
.demandCommand()
.wrap(100)
.argv;
process.on('SIGINT', function() {
console.log('Caught interrupt signal');
process.exit();
});