nodemailer
Advanced tools
Comparing version 6.4.7 to 6.4.8
{ | ||
"name": "nodemailer", | ||
"version": "6.4.7", | ||
"version": "6.4.8", | ||
"description": "Easy as cake e-mail sending from your Node.js applications", | ||
@@ -5,0 +5,0 @@ "main": "lib/nodemailer.js", |
@@ -8,11 +8,23 @@ /* eslint no-control-regex:0 */ | ||
const text = `=== Nodemailer ${packageData.version} === | ||
const title = `=== Nodemailer ${packageData.version} ===`; | ||
const text = ` | ||
Thank you for using Nodemailer for your email sending needs! While Nodemailer itself is mostly meant to be a SMTP client there are other related projects in the Nodemailer project as well. | ||
For example: | ||
> IMAP API ( https://imapapi.com ) is a server application to easily access IMAP accounts via REST API | ||
> ImapFlow ( https://imapflow.com/ ) is an async IMAP client library for Node.js | ||
> NodemailerApp ( https://nodemailer.com/app/ ) is a cross platform GUI app to debug emails | ||
> Project Pending ( https://projectpending.com/ ) allows you to park your project domains | ||
> Ethereal Email ( https://ethereal.email/ ) is an email testing service that accepts all your test emails | ||
`; | ||
const secs = 4; | ||
const formatCentered = (row, columns) => { | ||
if (columns <= row.length) { | ||
return row; | ||
} | ||
return ' '.repeat(Math.round(columns / 2 - row.length / 2)) + row; | ||
}; | ||
const formatRow = (row, columns) => { | ||
@@ -31,6 +43,8 @@ if (row.length <= columns) { | ||
let prefix = slice.charAt(0) === '>' ? ' ' : ''; | ||
let match = slice.match(/(\s+)[^\s]*$/); | ||
if (match && match.index) { | ||
let line = row.substr(0, match.index); | ||
row = row.substr(line.length + match[1].length); | ||
row = prefix + row.substr(line.length + match[1].length); | ||
lines.push(line); | ||
@@ -49,3 +63,3 @@ } else { | ||
return text | ||
return (formatCentered(title, columns) + '\n' + text) | ||
.split('\n') | ||
@@ -62,1 +76,15 @@ .flatMap(row => formatRow(row, columns)) | ||
console.log(canUseColor ? banner : banner.replace(/\u001B\[\d+m/g, '')); | ||
if (canUseColor) { | ||
process.stdout.write('\u001B[96m'); | ||
} | ||
setInterval(() => { | ||
process.stdout.write('.'); | ||
}, 500); | ||
setTimeout(() => { | ||
if (canUseColor) { | ||
process.stdout.write('\u001B[0m\n'); | ||
} | ||
process.exit(0); | ||
}, secs * 1000 + 100); |
464699
11395