1 import * as program from 'commander'
6 } from '../tests/utils/index'
9 .option('-u, --url <url>', 'Server url')
10 .option('-n, --username <username>', 'Username')
11 .option('-p, --password <token>', 'Password')
16 !program['username'] ||
19 throw new Error('All arguments are required.')
25 username: program['username'],
26 password: program['password']
34 getClient(program.url)
36 server.client.id = res.body.client_id
37 server.client.secret = res.body.client_secret
39 return serverLogin(server)
41 .then(accessToken => {
42 console.log(accessToken)