mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2025-08-19 12:04:41 +07:00
node_modules: update
This commit is contained in:
3
node_modules/nodemailer/lib/mail-composer/index.js
generated
vendored
3
node_modules/nodemailer/lib/mail-composer/index.js
generated
vendored
@ -470,7 +470,8 @@ class MailComposer {
|
||||
textEncoding: this.mail.textEncoding,
|
||||
boundaryPrefix: this.mail.boundaryPrefix,
|
||||
disableUrlAccess: this.mail.disableUrlAccess,
|
||||
disableFileAccess: this.mail.disableFileAccess
|
||||
disableFileAccess: this.mail.disableFileAccess,
|
||||
normalizeHeaderKey: this.mail.normalizeHeaderKey
|
||||
});
|
||||
} else {
|
||||
node = parentNode.createChild(element.contentType, {
|
||||
|
31
node_modules/nodemailer/lib/mime-funcs/index.js
generated
vendored
31
node_modules/nodemailer/lib/mime-funcs/index.js
generated
vendored
@ -13,8 +13,9 @@ module.exports = {
|
||||
* @param {String} value String to be tested
|
||||
* @returns {Boolean} true if it is a plaintext string
|
||||
*/
|
||||
isPlainText(value) {
|
||||
if (typeof value !== 'string' || /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/.test(value)) {
|
||||
isPlainText(value, isParam) {
|
||||
const re = isParam ? /[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/ : /[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;
|
||||
if (typeof value !== 'string' || re.test(value)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
@ -49,11 +50,7 @@ module.exports = {
|
||||
* @return {String} Single or several mime words joined together
|
||||
*/
|
||||
encodeWord(data, mimeWordEncoding, maxLength) {
|
||||
mimeWordEncoding = (mimeWordEncoding || 'Q')
|
||||
.toString()
|
||||
.toUpperCase()
|
||||
.trim()
|
||||
.charAt(0);
|
||||
mimeWordEncoding = (mimeWordEncoding || 'Q').toString().toUpperCase().trim().charAt(0);
|
||||
maxLength = maxLength || 0;
|
||||
|
||||
let encodedStr;
|
||||
@ -66,10 +63,7 @@ module.exports = {
|
||||
if (mimeWordEncoding === 'Q') {
|
||||
// https://tools.ietf.org/html/rfc2047#section-5 rule (3)
|
||||
encodedStr = qp.encode(data).replace(/[^a-z0-9!*+\-/=]/gi, chr => {
|
||||
let ord = chr
|
||||
.charCodeAt(0)
|
||||
.toString(16)
|
||||
.toUpperCase();
|
||||
let ord = chr.charCodeAt(0).toString(16).toUpperCase();
|
||||
if (chr === ' ') {
|
||||
return '_';
|
||||
} else {
|
||||
@ -131,8 +125,8 @@ module.exports = {
|
||||
|
||||
let encodedValue;
|
||||
|
||||
// find first word with a non-printable ascii in it
|
||||
let firstMatch = value.match(/(?:^|\s)([^\s]*[\u0080-\uFFFF])/);
|
||||
// find first word with a non-printable ascii or special symbol in it
|
||||
let firstMatch = value.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);
|
||||
if (!firstMatch) {
|
||||
return value;
|
||||
}
|
||||
@ -144,7 +138,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
// find the last word with a non-printable ascii in it
|
||||
let lastMatch = value.match(/([\u0080-\uFFFF][^\s]*)[^\u0080-\uFFFF]*$/);
|
||||
let lastMatch = value.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);
|
||||
if (!lastMatch) {
|
||||
// should not happen
|
||||
return value;
|
||||
@ -181,7 +175,7 @@ module.exports = {
|
||||
// filename might include unicode characters so it is a special case
|
||||
// other values probably do not
|
||||
let value = structured.params[param];
|
||||
if (!this.isPlainText(value) || value.length >= 75) {
|
||||
if (!this.isPlainText(value, true) || value.length >= 75) {
|
||||
this.buildHeaderParam(param, value, 50).forEach(encodedParam => {
|
||||
if (!/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(encodedParam.value) || encodedParam.key.substr(-1) === '*') {
|
||||
paramsArray.push(encodedParam.key + '=' + encodedParam.value);
|
||||
@ -226,7 +220,7 @@ module.exports = {
|
||||
maxLength = maxLength || 50;
|
||||
|
||||
// process ascii only text
|
||||
if (this.isPlainText(data)) {
|
||||
if (this.isPlainText(data, true)) {
|
||||
// check if conversion is even needed
|
||||
if (encodedStr.length <= maxLength) {
|
||||
return [
|
||||
@ -591,10 +585,7 @@ module.exports = {
|
||||
|
||||
encodeURICharComponent: chr => {
|
||||
let res = '';
|
||||
let ord = chr
|
||||
.charCodeAt(0)
|
||||
.toString(16)
|
||||
.toUpperCase();
|
||||
let ord = chr.charCodeAt(0).toString(16).toUpperCase();
|
||||
|
||||
if (ord.length % 2) {
|
||||
ord = '0' + ord;
|
||||
|
9
node_modules/nodemailer/lib/mime-node/index.js
generated
vendored
9
node_modules/nodemailer/lib/mime-node/index.js
generated
vendored
@ -530,6 +530,7 @@ class MimeNode {
|
||||
}
|
||||
value = mimeFuncs.buildHeaderValue(structured);
|
||||
break;
|
||||
|
||||
case 'Content-Type':
|
||||
structured = mimeFuncs.parseHeaderValue(value);
|
||||
|
||||
@ -554,6 +555,7 @@ class MimeNode {
|
||||
value += '; name=' + param;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'Bcc':
|
||||
if (!this.keepBcc) {
|
||||
// skip BCC values
|
||||
@ -997,7 +999,7 @@ class MimeNode {
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
// use uppercase words, except MIME
|
||||
.replace(/^X-SMTPAPI$|^(MIME|DKIM)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
|
||||
.replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi, c => c.toUpperCase())
|
||||
// special case
|
||||
.replace(/^Content-Features$/i, 'Content-features');
|
||||
|
||||
@ -1099,6 +1101,11 @@ class MimeNode {
|
||||
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
|
||||
return this._encodeWords(value);
|
||||
|
||||
case 'Content-Type':
|
||||
case 'Content-Disposition':
|
||||
// if it includes a filename then it is already encoded
|
||||
return (value || '').toString().replace(/\r?\n|\r/g, ' ');
|
||||
|
||||
default:
|
||||
value = (value || '').toString().replace(/\r?\n|\r/g, ' ');
|
||||
// encodeWords only encodes if needed, otherwise the original string is returned
|
||||
|
2
node_modules/nodemailer/lib/ses-transport/index.js
generated
vendored
2
node_modules/nodemailer/lib/ses-transport/index.js
generated
vendored
@ -38,7 +38,7 @@ class SESTransport extends EventEmitter {
|
||||
// max messages per second
|
||||
this.sendingRate = Number(this.options.sendingRate) || Infinity;
|
||||
this.sendingRateTTL = null;
|
||||
this.rateInterval = 1000;
|
||||
this.rateInterval = 1000; // milliseconds
|
||||
this.rateMessages = [];
|
||||
|
||||
this.pending = [];
|
||||
|
6
node_modules/nodemailer/lib/well-known/services.json
generated
vendored
6
node_modules/nodemailer/lib/well-known/services.json
generated
vendored
@ -22,6 +22,12 @@
|
||||
"host": "smtp.dynect.net",
|
||||
"port": 25
|
||||
},
|
||||
|
||||
"Ethereal": {
|
||||
"aliases": ["ethereal.email"],
|
||||
"host": "smtp.ethereal.email",
|
||||
"port": 587
|
||||
},
|
||||
|
||||
"FastMail": {
|
||||
"domains": ["fastmail.fm"],
|
||||
|
10
node_modules/nodemailer/lib/xoauth2/index.js
generated
vendored
10
node_modules/nodemailer/lib/xoauth2/index.js
generated
vendored
@ -261,7 +261,15 @@ class XOAuth2 extends Stream {
|
||||
);
|
||||
|
||||
if (data.error) {
|
||||
return callback(new Error(data.error));
|
||||
// Error Response : https://tools.ietf.org/html/rfc6749#section-5.2
|
||||
let errorMessage = data.error;
|
||||
if(data.error_description) {
|
||||
errorMessage += ': ' + data.error_description;
|
||||
}
|
||||
if(data.error_uri) {
|
||||
errorMessage += ' (' + data.error_uri + ')';
|
||||
}
|
||||
return callback(new Error(errorMessage));
|
||||
}
|
||||
|
||||
if (data.access_token) {
|
||||
|
Reference in New Issue
Block a user