diff --git a/bin/now-alias b/bin/now-alias index a7374be..cdd0139 100755 --- a/bin/now-alias +++ b/bin/now-alias @@ -126,7 +126,8 @@ async function run (token) { aliases.sort((a, b) => new Date(b.created) - new Date(a.created)); const current = new Date(); - const text = table(aliases.map((_alias) => { + const header = [['', 'id', 'source', 'url', 'created'].map(s => chalk.dim(s))]; + const text = table(header.concat(aliases.map((_alias) => { const _url = chalk.underline(`https://${_alias.alias}`); const target = _alias.deploymentId; const _sourceUrl = urls.get(target) @@ -143,7 +144,7 @@ async function run (token) { _url, time ]; - }), { align: ['l', 'r', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen }); + })), { align: ['l', 'r', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen }); const elapsed_ = ms(new Date() - start_); console.log(`> ${aliases.length} alias${aliases.length > 1 ? 'es' : ''} found ${chalk.gray(`[${elapsed_}]`)}`); diff --git a/bin/now-secrets b/bin/now-secrets index 5632837..a755202 100755 --- a/bin/now-secrets +++ b/bin/now-secrets @@ -113,14 +113,15 @@ async function run (token) { const elapsed = ms(new Date() - start); console.log(`> ${list.length} secret${list.length > 1 ? 's' : ''} found ${chalk.gray(`[${elapsed}]`)}`); const cur = Date.now(); - const out = table(list.map((secret) => { + const header = [['', 'id', 'name', 'created'].map(s => chalk.dim(s))]; + const out = table(header.concat(list.map((secret) => { return [ '', secret.uid, chalk.bold(secret.name), chalk.gray(ms(cur - new Date(secret.created)) + ' ago') ]; - }), { align: ['l', 'r', 'l'], hsep: ' '.repeat(2), stringLength: strlen }); + })), { align: ['l', 'r', 'l', 'l'], hsep: ' '.repeat(2), stringLength: strlen }); if (out) console.log('\n' + out + '\n'); return secrets.close(); }