node_modules: update (#297)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-06-15 07:32:52 +02:00
committed by GitHub
parent d86d472c50
commit 1369c5b90d
27 changed files with 662 additions and 159 deletions
+19 -7
View File
@@ -3,9 +3,22 @@
const EventEmitter = require('events');
const packageData = require('../../package.json');
const shared = require('../shared');
const errors = require('../errors');
const LeWindows = require('../mime-node/le-windows');
const MimeNode = require('../mime-node');
/**
* Tags AWS SDK rejections that carry no `code` property (SDK v3 errors only
* have a `name`) with the generic SES transport error code, keeping the
* original error object intact
*/
function tagSesError(err) {
if (err && typeof err === 'object' && !err.code) {
err.code = errors.ESES;
}
return err;
}
/**
* Generates a Transport object for AWS SES
*
@@ -157,6 +170,7 @@ class SESTransport extends EventEmitter {
});
})
.catch(err => {
tagSesError(err);
this.logger.error(
{
err,
@@ -188,7 +202,7 @@ class SESTransport extends EventEmitter {
const cb = err => {
if (err && !['InvalidParameterValue', 'MessageRejected'].includes(err.code || err.Code || err.name)) {
return callback(err);
return callback(tagSesError(err));
}
return callback(null, true);
};
@@ -205,15 +219,13 @@ class SESTransport extends EventEmitter {
}
};
this.getRegion((err, region) => {
if (err || !region) {
region = 'us-east-1';
}
// the region value is not used for anything when verifying, but the lookup
// exercises the client configuration the same way as send() does
this.getRegion(() => {
const command = new this.ses.SendEmailCommand(sesMessage);
const sendPromise = this.ses.sesClient.send(command);
sendPromise.then(data => cb(null, data)).catch(err => cb(err));
sendPromise.then(() => cb(null)).catch(err => cb(err));
});
return promise;