|
|
@ -113,6 +113,8 @@ async function run (token) { |
|
|
|
const list = await certs.ls(); |
|
|
|
const elapsed = ms(new Date() - start); |
|
|
|
console.log(`> ${list.length} certificate${list.length > 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`); |
|
|
|
|
|
|
|
if (0 < list.length) { |
|
|
|
const cur = Date.now(); |
|
|
|
list.sort((a, b) => { |
|
|
|
return a.cn.localeCompare(b.cn); |
|
|
@ -131,6 +133,7 @@ async function run (token) { |
|
|
|
]; |
|
|
|
})), { align: ['l', 'r', 'l', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen }); |
|
|
|
if (out) console.log('\n' + out + '\n'); |
|
|
|
} |
|
|
|
} else if ('create' === subcommand) { |
|
|
|
if (1 !== args.length) { |
|
|
|
error(`Invalid number of arguments. Usage: ${chalk.cyan('`now certs create <cn>`')}`); |
|
|
|