From cb41c558aeea6a53698706d149fa40fb2b8c1c7d Mon Sep 17 00:00:00 2001 From: Maxim Mazurok Date: Tue, 8 Jan 2019 17:54:15 -0800 Subject: [PATCH] fixed typos --- .../node_modules/addressparser/lib/addressparser.js | 4 ++-- .../notifications-mailer/node_modules/httpntlm/README.md | 2 +- .../node_modules/libbase64/lib/libbase64.js | 4 ++-- .../node_modules/libmime/lib/libmime.js | 8 ++++---- .../notifications-mailer/node_modules/libqp/lib/libqp.js | 4 ++-- .../nodemailer-direct-transport/lib/direct-transport.js | 4 ++-- .../nodemailer-direct-transport/lib/message-queue.js | 2 +- .../node_modules/nodemailer-smtp-pool/lib/assign.js | 2 +- .../node_modules/nodemailer-smtp-pool/lib/smtp-pool.js | 8 ++++---- .../nodemailer-smtp-transport/lib/smtp-transport.js | 6 +++--- .../node_modules/nodemailer/README.md | 2 +- .../node_modules/smtp-connection/lib/smtp-connection.js | 6 +++--- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/init_dist/example-mods/notifications-mailer/node_modules/addressparser/lib/addressparser.js b/init_dist/example-mods/notifications-mailer/node_modules/addressparser/lib/addressparser.js index a6d5db9..8857c71 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/addressparser/lib/addressparser.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/addressparser/lib/addressparser.js @@ -144,13 +144,13 @@ function _handleAddress(tokens) { } } - // If there's still is no text but a comment exixts, replace the two + // If there's still is no text but a comment exists, replace the two if (!data.text.length && data.comment.length) { data.text = data.comment; data.comment = []; } - // Keep only the first address occurence, push others to regular text + // Keep only the first address occurrence, push others to regular text if (data.address.length > 1) { data.text = data.text.concat(data.address.splice(1)); } diff --git a/init_dist/example-mods/notifications-mailer/node_modules/httpntlm/README.md b/init_dist/example-mods/notifications-mailer/node_modules/httpntlm/README.md index 5cced4a..9d51e1f 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/httpntlm/README.md +++ b/init_dist/example-mods/notifications-mailer/node_modules/httpntlm/README.md @@ -2,7 +2,7 @@ __httpntlm__ is a Node.js library to do HTTP NTLM authentication -It's a port from the Python libary [python-ntml](https://code.google.com/p/python-ntlm/) +It's a port from the Python library [python-ntml](https://code.google.com/p/python-ntlm/) ## Install diff --git a/init_dist/example-mods/notifications-mailer/node_modules/libbase64/lib/libbase64.js b/init_dist/example-mods/notifications-mailer/node_modules/libbase64/lib/libbase64.js index 3ebcc90..30ec6a2 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/libbase64/lib/libbase64.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/libbase64/lib/libbase64.js @@ -61,7 +61,7 @@ function wrap(str, lineLength) { * * @constructor * @param {Object} options Stream options - * @param {Number} [options.lineLength=76] Maximum lenght for lines, set to false to disable wrapping + * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping */ function Encoder(options) { // init Transform @@ -198,4 +198,4 @@ Decoder.prototype._flush = function(done) { this._curLine = ''; } done(); -}; \ No newline at end of file +}; diff --git a/init_dist/example-mods/notifications-mailer/node_modules/libmime/lib/libmime.js b/init_dist/example-mods/notifications-mailer/node_modules/libmime/lib/libmime.js index 70e12c1..c749a77 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/libmime/lib/libmime.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/libmime/lib/libmime.js @@ -22,7 +22,7 @@ var libmime = module.exports = { }, /** - * Checks if a multi line string containes lines longer than the selected value. + * Checks if a multi line string contains lines longer than the selected value. * * Useful when detecting if a mail message needs any processing at all – * if only plaintext characters are used and lines are short, then there is @@ -201,7 +201,7 @@ var libmime = module.exports = { * @param {String|Buffer} data String to be encoded * @param {String} mimeWordEncoding='Q' Encoding for the mime word, either Q or B * @param {Number} [maxLength=0] If set, split mime words into several chunks if needed - * @param {String} [fromCharset='UTF-8'] Source sharacter set + * @param {String} [fromCharset='UTF-8'] Source character set * @return {String} String with possible mime words */ encodeWords: function (data, mimeWordEncoding, maxLength, fromCharset) { @@ -531,7 +531,7 @@ var libmime = module.exports = { } else { if (/[\uD800-\uDBFF]/.test(encodedStr)) { - // string containts surrogate pairs, so normalize it to an array of bytes + // string contains surrogate pairs, so normalize it to an array of bytes encodedStrArr = []; for (i = 0, len = encodedStr.length; i < len; i++) { chr = encodedStr.charAt(i); @@ -807,6 +807,6 @@ function safeEncodeURIComponent(str) { return str.replace(/[^\x00-\x1F *'()<>@,;:\\"\[\]?=\u007F-\uFFFF]+/g, ''); } - // ensure chars that are not handled by encodeURICompent are converted as well + // ensure chars that are not handled by encodeURIComponent are converted as well return str.replace(/[\x00-\x1F *'()<>@,;:\\"\[\]?=\u007F-\uFFFF]/g, encodeURICharComponent); } diff --git a/init_dist/example-mods/notifications-mailer/node_modules/libqp/lib/libqp.js b/init_dist/example-mods/notifications-mailer/node_modules/libqp/lib/libqp.js index c1bbcf4..1d3465c 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/libqp/lib/libqp.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/libqp/lib/libqp.js @@ -195,7 +195,7 @@ function checkRanges(nr, ranges) { * * @constructor * @param {Object} options Stream options - * @param {Number} [options.lineLength=76] Maximum lenght for lines, set to false to disable wrapping + * @param {Number} [options.lineLength=76] Maximum length for lines, set to false to disable wrapping */ function Encoder(options) { // init Transform @@ -310,4 +310,4 @@ Decoder.prototype._flush = function(done) { this.push(buf); } done(); -}; \ No newline at end of file +}; diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/direct-transport.js b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/direct-transport.js index b9448d2..eed0780 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/direct-transport.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/direct-transport.js @@ -51,14 +51,14 @@ Object.defineProperty(DirectMailer.prototype, 'length', { }); /** - * Placeholder function for creating proxy sockets. This method immediatelly returns + * Placeholder function for creating proxy sockets. This method immediately returns * without a socket * * @param {Object} options Connection options * @param {Function} callback Callback function to run with the socket keys */ DirectMailer.prototype.getSocket = function (options, callback) { - // return immediatelly + // return immediately return callback(null, false); }; diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/message-queue.js b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/message-queue.js index 8d86697..74602ed 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/message-queue.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-direct-transport/lib/message-queue.js @@ -32,7 +32,7 @@ MessageQueue.prototype.get = function (callback) { /** * Adds an element to the queue. If delay (ms) is set, the data will not be available before - * specified delay has passed. Otherwise the data will be available for processing immediatelly. + * specified delay has passed. Otherwise the data will be available for processing immediately. * * @param {Mixed} data Value to be queued * @param {Number} [delay] If set, delay the availability of the data by {delay} milliseconds diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/assign.js b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/assign.js index 197bdbc..8ddc38e 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/assign.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/assign.js @@ -15,7 +15,7 @@ function assign( /* target, ... sources */ ) { // tls and auth are special keys that need to be enumerated separately // other objects are passed as is if (!target[key]) { - // esnure that target has this key + // ensure that target has this key target[key] = {}; } Object.keys(source[key]).forEach(function (subKey) { diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/smtp-pool.js b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/smtp-pool.js index 5900c1f..0cc690e 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/smtp-pool.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-pool/lib/smtp-pool.js @@ -82,14 +82,14 @@ function SMTPPool(options) { util.inherits(SMTPPool, EventEmitter); /** - * Placeholder function for creating proxy sockets. This method immediatelly returns + * Placeholder function for creating proxy sockets. This method immediately returns * without a socket * * @param {Object} options Connection options * @param {Function} callback Callback function to run with the socket keys */ SMTPPool.prototype.getSocket = function (options, callback) { - // return immediatelly + // return immediately return callback(null, false); }; @@ -264,7 +264,7 @@ SMTPPool.prototype._createConnection = function () { if (err.code !== 'EMAXLIMIT') { this.logger.error('Pool Error for #%s: %s', connection.id, err.message); } else { - this.logger.debug('Max messages limit exchausted for #%s', connection.id); + this.logger.debug('Max messages limit exhausted for #%s', connection.id); } if (connection.queueElement) { @@ -276,7 +276,7 @@ SMTPPool.prototype._createConnection = function () { connection.queueElement = false; } - // remove the erroneus connection from connections list + // remove the erroneous connection from connections list this._removeConnection(connection); this._continueProcessing(); diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-transport/lib/smtp-transport.js b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-transport/lib/smtp-transport.js index 5948e44..72fd90b 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-transport/lib/smtp-transport.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer-smtp-transport/lib/smtp-transport.js @@ -59,14 +59,14 @@ function SMTPTransport(options) { util.inherits(SMTPTransport, EventEmitter); /** - * Placeholder function for creating proxy sockets. This method immediatelly returns + * Placeholder function for creating proxy sockets. This method immediately returns * without a socket * * @param {Object} options Connection options * @param {Function} callback Callback function to run with the socket keys */ SMTPTransport.prototype.getSocket = function (options, callback) { - // return immediatelly + // return immediately return callback(null, false); }; @@ -266,7 +266,7 @@ function assign( /* target, ... sources */ ) { // tls and auth are special keys that need to be enumerated separately // other objects are passed as is if (!target[key]) { - // esnure that target has this key + // ensure that target has this key target[key] = {}; } Object.keys(source[key]).forEach(function (subKey) { diff --git a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer/README.md b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer/README.md index 9c80fda..f278271 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/nodemailer/README.md +++ b/init_dist/example-mods/notifications-mailer/node_modules/nodemailer/README.md @@ -921,7 +921,7 @@ To prevent having login issues you should either use XOAUTH2 (see details [here] # Delivering Bulk Mail Here are some tips how to handle bulk mail, for example if you need to send 10 million messages at once (originally published as a [blog post](http://www.andrisreinman.com/delivering-bulk-mail-with-nodemailer/)). - 1. **Use a dedicated SMTP provider** like [SendGrid](http://mbsy.co/sendgrid/12237825) or [Mailgun](http://www.mailgun.com/) or any other. Do not use services that offer SMTP as a sideline or for free (that's Gmail or the SMTP of your homepage hosting company) to send bulk mail – you'll hit all the hard limits immediatelly or get labelled as spam. Basically you get what you pay for and if you pay zero then your deliverability is near zero as well. E-mail might seem free but it is only free to a certain amount and that amount certainly does not include 10 million e-mails in a short period of time. + 1. **Use a dedicated SMTP provider** like [SendGrid](http://mbsy.co/sendgrid/12237825) or [Mailgun](http://www.mailgun.com/) or any other. Do not use services that offer SMTP as a sideline or for free (that's Gmail or the SMTP of your homepage hosting company) to send bulk mail – you'll hit all the hard limits immediately or get labelled as spam. Basically you get what you pay for and if you pay zero then your deliverability is near zero as well. E-mail might seem free but it is only free to a certain amount and that amount certainly does not include 10 million e-mails in a short period of time. 2. **Use a dedicated queue manager,** for example [RabbitMQ](http://www.rabbitmq.com/) for queueing the e-mails. Nodemailer creates a callback function with related scopes etc. for every message so it might be hard on memory if you pile up the data for 10 million messages at once. Better to take the data from a queue when there's a free spot in the connection pool (previously sent message returns its callback). See [rabbit-queue](examples/rabbit-queue) for an example of using RabbitMQ queues with Nodemailer connection pool. 3. **Use [nodemailer-smtp-pool](https://github.com/nodemailer/nodemailer-smtp-pool) transport.** You do not want to have the overhead of creating a new connection and doing the SMTP handshake dance for every single e-mail. Pooled connections make it possible to bring this overhead to a minimum. 4. **Set `maxMessages` option to `Infinity`** for the nodemailer-smtp-pool transport. Dedicated SMTP providers happily accept all your e-mails as long you are paying for these, so no need to disconnect in the middle if everything is going smoothly. The default value is 100 which means that once a connection is used to send 100 messages it is removed from the pool and a new connection is created. diff --git a/init_dist/example-mods/notifications-mailer/node_modules/smtp-connection/lib/smtp-connection.js b/init_dist/example-mods/notifications-mailer/node_modules/smtp-connection/lib/smtp-connection.js index f4fe419..e720ef4 100644 --- a/init_dist/example-mods/notifications-mailer/node_modules/smtp-connection/lib/smtp-connection.js +++ b/init_dist/example-mods/notifications-mailer/node_modules/smtp-connection/lib/smtp-connection.js @@ -1020,7 +1020,7 @@ SMTPConnection.prototype._actionHELO = function (str) { /** * Handles server response for STARTTLS command. If there's an error * try HELO instead, otherwise initiate TLS upgrade. If the upgrade - * succeedes restart the EHLO + * succeeded restart the EHLO * * @param {String} str Message from the server */ @@ -1357,7 +1357,7 @@ SMTPConnection.prototype._actionSMTPStream = function (str, callback) { // Message failed return callback(this._formatError('Message failed', 'EMESSAGE', str, 'DATA')); } else { - // Message sent succesfully + // Message sent successfully return callback(null, str); } }; @@ -1426,7 +1426,7 @@ SMTPConnection.prototype._buildXOAuth2Token = function (user, token) { }; SMTPConnection.prototype._getHostname = function () { - // defaul hostname is machine hostname or [IP] + // default hostname is machine hostname or [IP] var defaultHostname = os.hostname() || ''; // ignore if not FQDN