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