diff --git a/bin/now-alias b/bin/now-alias index 809be5a..d792425 100755 --- a/bin/now-alias +++ b/bin/now-alias @@ -128,9 +128,19 @@ async function run (token) { const text = sorted.map(([target, _aliases]) => { return table(_aliases.map((_alias) => { const _url = chalk.underline(`https://${_alias.alias}`); - const _sourceUrl = chalk.underline(`https://${urls.get(target)}`); + const _sourceUrl = urls.get(target) + ? chalk.underline(`https://${urls.get(target)}`) + : chalk.gray(''); + const time = chalk.gray(ms(current - new Date(_alias.created)) + ' ago'); - return [_alias.uid, _sourceUrl, _url, time]; + return [ + // we default to `''` because some early aliases didn't + // have an uid associated + null == _alias.uid ? '' : _alias.uid, + _sourceUrl, + _url, + time + ]; }), { align: ['l', 'r', 'l'], hsep: ' '.repeat(3) }); }).join('\n\n');