Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// Project Modules
import { authService } from '../_service/auth.service';
import { messages } from '../consts/msg';
import { auth_url } from '../consts/urls';
import makeId from '../utils/make-id';
import { writeOverview, writeToken } from '../utils/writer';
import { common } from '../utils/common';
export default class Login extends Command {
static description = 'Login to Sakku cli interface.';
static examples = [
`$ sakku login
? there are two ways you can login: (Use arrow keys)
${color.cyan('❯ Login by Username & Password')}
Login by Browser`
];
static flags = {
help: flags.help({ char: 'h' })
};
async run() {
let user: { username: string, password: string } = { username: '', password: '' };
const question = {
name: 'way',
message: 'There are two ways you can login:',
type: 'list',
choices: [{ name: 'Login by Username & Password' }, { name: 'Login by Browser' }]
};