node_modules: update (#259)

Co-authored-by: dawidd6 <9713907+dawidd6@users.noreply.github.com>
This commit is contained in:
Dawid Dziurla
2026-02-05 08:49:11 +01:00
committed by GitHub
parent a4eb4faebc
commit 62a2d05b79
16 changed files with 335 additions and 131 deletions

View File

@@ -13,6 +13,7 @@ const qp = require('../qp');
const base64 = require('../base64');
const addressparser = require('../addressparser');
const nmfetch = require('../fetch');
const errors = require('../errors');
const LastNewline = require('./last-newline');
const LeWindows = require('./le-windows');
@@ -979,7 +980,11 @@ class MimeNode {
} else if (content && typeof content.path === 'string' && !content.href) {
if (this.disableFileAccess) {
contentStream = new PassThrough();
setImmediate(() => contentStream.emit('error', new Error('File access rejected for ' + content.path)));
setImmediate(() => {
let err = new Error('File access rejected for ' + content.path);
err.code = errors.EFILEACCESS;
contentStream.emit('error', err);
});
return contentStream;
}
// read file
@@ -987,7 +992,11 @@ class MimeNode {
} else if (content && typeof content.href === 'string') {
if (this.disableUrlAccess) {
contentStream = new PassThrough();
setImmediate(() => contentStream.emit('error', new Error('Url access rejected for ' + content.href)));
setImmediate(() => {
let err = new Error('Url access rejected for ' + content.href);
err.code = errors.EURLACCESS;
contentStream.emit('error', err);
});
return contentStream;
}
// fetch URL