@ -233,9 +227,7 @@ async function run({ token, config: { currentTeam, user } }) {
)
)
constelapsed_=ms(newDate()-start_)
constelapsed_=ms(newDate()-start_)
console.log(
console.log(`> ${aliases.length} alias${aliases.length===1?'':'es'} found ${chalk.gray(`[${elapsed_}]`)} under ${chalk.bold((currentTeam&¤tTeam.slug)||user.username||user.email)}`)
`> ${aliases.length} alias${aliases.length===1?'':'es'} found ${chalk.gray(`[${elapsed_}]`)} under ${chalk.bold((currentTeam&¤tTeam.slug)||user.username||user.email)}`
)
if(text){
if(text){
console.log('\n'+text+'\n')
console.log('\n'+text+'\n')
@ -253,9 +245,7 @@ async function run({ token, config: { currentTeam, user } }) {
}
}
if(args.length!==1){
if(args.length!==1){
error(
error(`Invalid number of arguments. Usage: ${chalk.cyan('`now alias rm <id>`')}`)
`Invalid number of arguments. Usage: ${chalk.cyan('`now alias rm <id>`')}`
)
returnexit(1)
returnexit(1)
}
}
@ -280,9 +270,7 @@ async function run({ token, config: { currentTeam, user } }) {
conststart=newDate()
conststart=newDate()
awaitalias.rm(_alias)
awaitalias.rm(_alias)
constelapsed=ms(newDate()-start)
constelapsed=ms(newDate()-start)
console.log(
console.log(`${chalk.cyan('> Success!')} Alias ${chalk.bold(_alias.uid)} removed [${elapsed}]`)
`${chalk.cyan('> Success!')} Alias ${chalk.bold(_alias.uid)} removed [${elapsed}]`
)
}catch(err){
}catch(err){
error(err)
error(err)
exit(1)
exit(1)
@ -297,17 +285,37 @@ async function run({ token, config: { currentTeam, user } }) {
break
break
}
}
if(args.length!==2){
if(args.length!==2){
error(
error(`Invalid number of arguments. Usage: ${chalk.cyan('`now alias set <id> <domain>`')}`)
`Invalid number of arguments. Usage: ${chalk.cyan('`now alias set <id> <domain>`')}`