node_modules: update (#332)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurlaanddawidd6 authored and GitHub committed 2026-10-01 09:48:38 +02:00
1 parent c1dac70e3a
commit 6bf0a2f26a
95 files changed
+1102 -503

No files matched your search

+4 -2
View File
@@ -80,7 +80,7 @@ declare class SMTPPool extends EventEmitter {
/**
* The Mail instance using this transport, assigned by Mail
*/
mailer?: Mail<SMTPPoolSentMessageInfo> | undefined;
mailer?: Mail<SMTPPoolSentMessageInfo, SMTPPoolOptions> | undefined;
constructor(options?: SMTPPoolOptions | string);
/**
* Placeholder function for creating proxy sockets. This method immediatelly returns
@@ -96,7 +96,7 @@ declare class SMTPPool extends EventEmitter {
* @param mail Mail object
* @param callback Callback function
*/
send(mail: MailMessage, callback: SMTPPoolSendCallback): boolean;
send(mail: MailMessage<SMTPPoolSentMessageInfo>, callback: SMTPPoolSendCallback): boolean;
/**
* Closes all connections in the pool. If there is a message being sent, the connection
* is closed later
@@ -122,4 +122,6 @@ declare namespace SMTPPool {
type MailOptions = SendMailOptions;
type SentMessageInfo = SMTPPoolSentMessageInfo;
}
/** The same aliases as module level exports, for `import * as SMTPPool` and `import SMTPPool = require()` */
export type { SMTPPoolOptions as Options, SendMailOptions as MailOptions, SMTPPoolSentMessageInfo as SentMessageInfo };
export default SMTPPool;
+8 -6
View File
@@ -424,10 +424,12 @@ class SMTPPool extends EventEmitter {
callback = shared.callbackPromise(resolve, reject);
});
}
// the error paths hand over the error alone
const done = callback;
const auth = new PoolResource(this).auth;
this.getSocket(this.options, (err, socketOptions) => {
if (err) {
return callback(err);
return done(err);
}
let options = this.options;
if (socketOptions && socketOptions.connection) {
@@ -449,14 +451,14 @@ class SMTPPool extends EventEmitter {
}
returned = true;
connection.close();
return callback(err);
return done(err);
});
connection.once('end', () => {
if (returned) {
return;
}
returned = true;
return callback(new Error('Connection closed'));
return done(new Error('Connection closed'));
});
const finalize = () => {
if (returned) {
@@ -464,7 +466,7 @@ class SMTPPool extends EventEmitter {
}
returned = true;
connection.quit();
return callback(null, true);
return done(null, true);
};
connection.connect(() => {
if (returned) {
@@ -478,7 +480,7 @@ class SMTPPool extends EventEmitter {
if (err) {
returned = true;
connection.close();
return callback(err);
return done(err);
}
finalize();
});
@@ -488,7 +490,7 @@ class SMTPPool extends EventEmitter {
err.code = errors.ENOAUTH;
returned = true;
connection.close();
return callback(err);
return done(err);
}
else {
finalize();
+1 -3
View File
@@ -100,9 +100,7 @@ export default class PoolResource extends EventEmitter {
}
// still have not returned, this means we have an unexpected connection close
const err = new Error('Unexpected socket close');
if (this.connection &&
this.connection._socket &&
this.connection._socket.upgrading) {
if (this.connection && this.connection.upgrading) {
// starttls connection errors
err.code = errors.ETLS;
}