node_modules: update

This commit is contained in:
Dawid Dziurla 2020-11-12 16:31:20 +01:00
parent 345c86e5c4
commit d1b07d9ed7
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
15 changed files with 52 additions and 91 deletions

View File

@ -1,5 +1,9 @@
# CHANGELOG
## 6.4.16 2020-11-12
- Applied updated prettier formating rules
## 6.4.15 2020-11-06
- Minor changes in header key casing

View File

@ -146,10 +146,7 @@ class MessageParser extends Transform {
return lines
.filter(line => line.trim())
.map(line => ({
key: line
.substr(0, line.indexOf(':'))
.trim()
.toLowerCase(),
key: line.substr(0, line.indexOf(':')).trim().toLowerCase(),
line
}));
}

View File

@ -110,10 +110,7 @@ class Cookies {
.split(';')
.forEach(cookiePart => {
let valueParts = cookiePart.split('=');
let key = valueParts
.shift()
.trim()
.toLowerCase();
let key = valueParts.shift().trim().toLowerCase();
let value = valueParts.join('=').trim();
let domain;

View File

@ -33,11 +33,7 @@ function fetch(url, options) {
let fetchRes = options.fetchRes;
let parsed = urllib.parse(url);
let method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'GET';
let method = (options.method || '').toString().trim().toUpperCase() || 'GET';
let finished = false;
let cookies;
let body;
@ -115,11 +111,7 @@ function fetch(url, options) {
headers['Content-Length'] = body.length;
}
// if method is not provided, use POST instead of GET
method =
(options.method || '')
.toString()
.trim()
.toUpperCase() || 'POST';
method = (options.method || '').toString().trim().toUpperCase() || 'POST';
}
let req;

View File

@ -64,12 +64,7 @@ class MailMessage {
if (this.data.attachments && this.data.attachments.length) {
this.data.attachments.forEach((attachment, i) => {
if (!attachment.filename) {
attachment.filename =
(attachment.path || attachment.href || '')
.split('/')
.pop()
.split('?')
.shift() || 'attachment-' + (i + 1);
attachment.filename = (attachment.path || attachment.href || '').split('/').pop().split('?').shift() || 'attachment-' + (i + 1);
if (attachment.filename.indexOf('.') < 0) {
attachment.filename += '.' + mimeFuncs.detectExtension(attachment.contentType);
}

View File

@ -2063,11 +2063,7 @@ module.exports = {
}
let parsed = path.parse(filename);
let extension = (parsed.ext.substr(1) || parsed.name || '')
.split('?')
.shift()
.trim()
.toLowerCase();
let extension = (parsed.ext.substr(1) || parsed.name || '').split('?').shift().trim().toLowerCase();
let value = defaultMimeType;
if (extensions.has(extension)) {
@ -2084,10 +2080,7 @@ module.exports = {
if (!mimeType) {
return defaultExtension;
}
let parts = (mimeType || '')
.toLowerCase()
.trim()
.split('/');
let parts = (mimeType || '').toLowerCase().trim().split('/');
let rootType = parts.shift().trim();
let subType = parts.join('/').trim();

View File

@ -13,12 +13,7 @@ const packageData = require('../package.json');
const ETHEREAL_API = (process.env.ETHEREAL_API || 'https://api.nodemailer.com').replace(/\/+$/, '');
const ETHEREAL_WEB = (process.env.ETHEREAL_WEB || 'https://ethereal.email').replace(/\/+$/, '');
const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes(
(process.env.ETHEREAL_CACHE || 'yes')
.toString()
.trim()
.toLowerCase()
);
const ETHEREAL_CACHE = ['true', 'yes', 'y', '1'].includes((process.env.ETHEREAL_CACHE || 'yes').toString().trim().toLowerCase());
let testAccount = false;

View File

@ -70,6 +70,14 @@ class SendmailTransport {
let returned;
let transform;
const hasInvalidAddresses = []
.concat(envelope.from || [])
.concat(envelope.to || [])
.some(addr => /^-/.test(addr));
if (hasInvalidAddresses) {
return done(new Error('Can not send mail. Invalid envelope addresses.'));
}
if (this.args) {
// force -i to keep single dots
args = ['-i'].concat(this.args).concat(envelope.to);

View File

@ -489,15 +489,7 @@ function createDefaultLogger(levels) {
message = util.format(message, ...args);
message.split(/\r?\n/).forEach(line => {
console.log(
'[%s] %s %s',
new Date()
.toISOString()
.substr(0, 19)
.replace(/T/, ' '),
levelNames.get(level),
prefix + line
);
console.log('[%s] %s %s', new Date().toISOString().substr(0, 19).replace(/T/, ' '), levelNames.get(level), prefix + line);
});
};

View File

@ -45,10 +45,7 @@ class SMTPConnection extends EventEmitter {
constructor(options) {
super(options);
this.id = crypto
.randomBytes(8)
.toString('base64')
.replace(/\W/g, '');
this.id = crypto.randomBytes(8).toString('base64').replace(/\W/g, '');
this.stage = 'init';
this.options = options || {};
@ -73,10 +70,7 @@ class SMTPConnection extends EventEmitter {
this.customAuth = new Map();
Object.keys(this.options.customAuth || {}).forEach(key => {
let mapKey = (key || '')
.toString()
.trim()
.toUpperCase();
let mapKey = (key || '').toString().trim().toUpperCase();
if (!mapKey) {
return;
}
@ -424,11 +418,7 @@ class SMTPConnection extends EventEmitter {
this._auth = authData || {};
// Select SASL authentication method
this._authMethod =
(this._auth.method || '')
.toString()
.trim()
.toUpperCase() || false;
this._authMethod = (this._auth.method || '').toString().trim().toUpperCase() || false;
if (!this._authMethod && this._auth.oauth2 && !this._auth.credentials) {
this._authMethod = 'XOAUTH2';

28
node_modules/nodemailer/package.json generated vendored
View File

@ -1,31 +1,27 @@
{
"_args": [
[
"nodemailer@6.4.15",
"/home/dawidd6/github/dawidd6/action-send-mail"
]
],
"_from": "nodemailer@6.4.15",
"_id": "nodemailer@6.4.15",
"_from": "nodemailer@6.4.16",
"_id": "nodemailer@6.4.16",
"_inBundle": false,
"_integrity": "sha512-2/z13dBTWdgTRlxVMAK6C13dCI22GEShET4+jFLlQsxpblxYhojnucfcTZO1QBu5CsHvABsBj2JCGO3vl0HSQA==",
"_integrity": "sha512-68K0LgZ6hmZ7PVmwL78gzNdjpj5viqBdFqKrTtr9bZbJYj6BRj5W6WGkxXrEnUl3Co3CBXi3CZBUlpV/foGnOQ==",
"_location": "/nodemailer",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "nodemailer@6.4.15",
"raw": "nodemailer@6.4.16",
"name": "nodemailer",
"escapedName": "nodemailer",
"rawSpec": "6.4.15",
"rawSpec": "6.4.16",
"saveSpec": null,
"fetchSpec": "6.4.15"
"fetchSpec": "6.4.16"
},
"_requiredBy": [
"#USER",
"/"
],
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.15.tgz",
"_spec": "6.4.15",
"_resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.4.16.tgz",
"_shasum": "5cb6391b1d79ab7eff32d6f9f48366b5a7117293",
"_spec": "nodemailer@6.4.16",
"_where": "/home/dawidd6/github/dawidd6/action-send-mail",
"author": {
"name": "Andris Reinman"
@ -33,7 +29,9 @@
"bugs": {
"url": "https://github.com/nodemailer/nodemailer/issues"
},
"bundleDependencies": false,
"dependencies": {},
"deprecated": false,
"description": "Easy as cake e-mail sending from your Node.js applications",
"devDependencies": {
"bunyan": "1.8.14",
@ -71,5 +69,5 @@
"scripts": {
"test": "grunt"
},
"version": "6.4.15"
"version": "6.4.16"
}