node_modules: update (#290)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-04-28 12:50:45 +02:00
committed by GitHub
parent 63e1562580
commit 42942bc2f8
1077 changed files with 12540 additions and 33773 deletions

View File

@@ -106,17 +106,17 @@ class Mail extends EventEmitter {
this.getSocket = false;
}
return this.transporter[method](...args);
} else {
this.logger.warn(
{
tnx: 'transport',
methodName: method
},
'Non existing method %s called for transport',
method
);
return false;
}
this.logger.warn(
{
tnx: 'transport',
methodName: method
},
'Non existing method %s called for transport',
method
);
return false;
};
});
@@ -157,7 +157,7 @@ class Mail extends EventEmitter {
this.getSocket = false;
}
let mail = new MailMessage(this, data);
const mail = new MailMessage(this, data);
this.logger.debug(
{
@@ -207,7 +207,7 @@ class Mail extends EventEmitter {
if (mail.data.dkim || this.dkim) {
mail.message.processFunc(input => {
let dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;
const dkim = mail.data.dkim ? new DKIM(mail.data.dkim) : this.dkim;
this.logger.debug(
{
tnx: 'DKIM',
@@ -259,8 +259,8 @@ class Mail extends EventEmitter {
return callback();
}
let userPlugins = this._userPlugins[step] || [];
let defaultPlugins = this._defaultPlugins[step] || [];
const userPlugins = this._userPlugins[step] || [];
const defaultPlugins = this._defaultPlugins[step] || [];
if (userPlugins.length) {
this.logger.debug(
@@ -281,7 +281,7 @@ class Mail extends EventEmitter {
let pos = 0;
let block = 'default';
let processPlugins = () => {
const processPlugins = () => {
let curplugins = block === 'default' ? defaultPlugins : userPlugins;
if (pos >= curplugins.length) {
if (block === 'default' && userPlugins.length) {
@@ -292,7 +292,7 @@ class Mail extends EventEmitter {
return callback();
}
}
let plugin = curplugins[pos++];
const plugin = curplugins[pos++];
plugin(mail, err => {
if (err) {
return callback(err);
@@ -310,11 +310,11 @@ class Mail extends EventEmitter {
* @param {String} proxyUrl Proxy configuration url
*/
setupProxy(proxyUrl) {
let proxy = urllib.parse(proxyUrl);
const proxy = urllib.parse(proxyUrl);
// setup socket handler for the mailer object
this.getSocket = (options, callback) => {
let protocol = proxy.protocol.replace(/:$/, '').toLowerCase();
const protocol = proxy.protocol.replace(/:$/, '').toLowerCase();
if (this.meta.has('proxy_handler_' + protocol)) {
return this.meta.get('proxy_handler_' + protocol)(proxy, options, callback);
@@ -342,11 +342,11 @@ class Mail extends EventEmitter {
err.code = errors.EPROXY;
return callback(err);
}
let connect = ipaddress => {
let proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;
let socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');
let proxyType = Number(proxy.protocol.replace(/\D/g, '')) || 5;
let connectionOpts = {
const connect = ipaddress => {
const proxyV2 = !!this.meta.get('proxy_socks_module').SocksClient;
const socksClient = proxyV2 ? this.meta.get('proxy_socks_module').SocksClient : this.meta.get('proxy_socks_module');
const proxyType = Number(proxy.protocol.replace(/\D/g, '')) || 5;
const connectionOpts = {
proxy: {
ipaddress,
port: Number(proxy.port),
@@ -360,8 +360,8 @@ class Mail extends EventEmitter {
};
if (proxy.auth) {
let username = decodeURIComponent(proxy.auth.split(':').shift());
let password = decodeURIComponent(proxy.auth.split(':').pop());
const username = decodeURIComponent(proxy.auth.split(':').shift());
const password = decodeURIComponent(proxy.auth.split(':').pop());
if (proxyV2) {
connectionOpts.proxy.userId = username;
connectionOpts.proxy.password = password;
@@ -415,7 +415,7 @@ class Mail extends EventEmitter {
html = (html || '')
.toString()
.replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi, (match, prefix, dataUri, mimeType) => {
let cid = crypto.randomBytes(10).toString('hex') + '@localhost';
const cid = crypto.randomBytes(10).toString('hex') + '@localhost';
if (!mail.data.attachments) {
mail.data.attachments = [];
}

View File

@@ -11,12 +11,10 @@ class MailMessage {
this.message = null;
data = data || {};
let options = mailer.options || {};
let defaults = mailer._defaults || {};
const options = mailer.options || {};
const defaults = mailer._defaults || {};
Object.keys(data).forEach(key => {
this.data[key] = data[key];
});
Object.assign(this.data, data);
this.data.headers = this.data.headers || {};
@@ -47,7 +45,7 @@ class MailMessage {
}
resolveAll(callback) {
let keys = [
const keys = [
[this.data, 'html'],
[this.data, 'text'],
[this.data, 'watchHtml'],
@@ -79,9 +77,9 @@ class MailMessage {
});
}
let mimeNode = new MimeNode();
const mimeNode = new MimeNode();
let addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];
const addressKeys = ['from', 'to', 'cc', 'bcc', 'sender', 'replyTo'];
addressKeys.forEach(address => {
let value;
@@ -97,7 +95,7 @@ class MailMessage {
}
});
let singleKeys = ['from', 'sender'];
const singleKeys = ['from', 'sender'];
singleKeys.forEach(address => {
if (this.data[address]) {
this.data[address] = this.data[address].shift();
@@ -105,11 +103,11 @@ class MailMessage {
});
let pos = 0;
let resolveNext = () => {
const resolveNext = () => {
if (pos >= keys.length) {
return callback(null, this.data);
}
let args = keys[pos++];
const args = keys[pos++];
if (!args[0] || !args[0][args[1]]) {
return resolveNext();
}
@@ -118,7 +116,7 @@ class MailMessage {
return callback(err);
}
let node = {
const node = {
content: value
};
if (args[0][args[1]] && typeof args[0][args[1]] === 'object' && !Buffer.isBuffer(args[0][args[1]])) {
@@ -138,8 +136,8 @@ class MailMessage {
}
normalize(callback) {
let envelope = this.data.envelope || this.message.getEnvelope();
let messageId = this.message.messageId();
const envelope = this.data.envelope || this.message.getEnvelope();
const messageId = this.message.messageId();
this.resolveAll((err, data) => {
if (err) {
@@ -195,7 +193,7 @@ class MailMessage {
});
if (data.list && typeof data.list === 'object') {
let listHeaders = this._getListHeaders(data.list);
const listHeaders = this._getListHeaders(data.list);
listHeaders.forEach(entry => {
data.normalizedHeaders[entry.key] = entry.value.map(val => (val && val.value) || val).join(', ');
});
@@ -245,13 +243,11 @@ class MailMessage {
return;
}
// add optional List-* headers
if (this.data.list && typeof this.data.list === 'object') {
this._getListHeaders(this.data.list).forEach(listHeader => {
listHeader.value.forEach(value => {
this.message.addHeader(listHeader.key, value);
});
this._getListHeaders(this.data.list).forEach(listHeader => {
listHeader.value.forEach(value => {
this.message.addHeader(listHeader.key, value);
});
}
});
}
_getListHeaders(listData) {