-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
45 lines (38 loc) · 1.37 KB
/
index.js
File metadata and controls
45 lines (38 loc) · 1.37 KB
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
41
42
43
44
45
const pgm = require('commander');
module.exports = () => {
pgm
.version('0.0.1');
pgm
.command('list')
.description('list metadata objects of the designated type')
.option('-u, --user <username>', 'a user email address')
.option('-p, --pswd <password>', 'password string')
.option('-w, --wrkspc <workspace_id>', 'workspace (project) id')
.option('-t, --type <type>', 'type of listing')
.action(function (args) {
require('./cmds/listmeta')(args);
});
pgm
.command('get')
.description('show selected data about the requested metadata object')
.option('-u, --user <username>', 'a user email address')
.option('-p, --pswd <password>', 'password string')
.option('-w, --wrkspc <workspace_id>', 'workspace (project) id')
.option('-o, --object <object_id>', 'object id')
.option('-t, --type <type>', 'object type')
.action(function (args) {
require('./cmds/getmeta')(args);
});
pgm
.command('report')
.description('execute and export the data for a report')
.option('-u, --user <username>', 'a user email address')
.option('-p, --pswd <password>', 'password string')
.option('-w, --wrkspc <workspace_id>', 'workspace (project) id')
.option('-o, --obj <object_id>', 'report object_id')
.option('-f, --filters [filters]', 'filters array JSON')
.action(function (args) {
require('./cmds/report')(args);
});
pgm.parse(process.argv);
}