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

@@ -8,6 +8,7 @@ const PassThrough = require('stream').PassThrough;
const Cookies = require('./cookies');
const packageData = require('../../package.json');
const net = require('net');
const errors = require('../errors');
const MAX_REDIRECTS = 5;
@@ -76,7 +77,7 @@ function nmfetch(url, options) {
return;
}
finished = true;
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
});
@@ -99,7 +100,7 @@ function nmfetch(url, options) {
return;
}
finished = true;
E.type = 'FETCH';
E.code = errors.EFETCH;
E.sourceUrl = url;
fetchRes.emit('error', E);
return;
@@ -147,7 +148,7 @@ function nmfetch(url, options) {
} catch (E) {
finished = true;
setImmediate(() => {
E.type = 'FETCH';
E.code = errors.EFETCH;
E.sourceUrl = url;
fetchRes.emit('error', E);
});
@@ -162,7 +163,7 @@ function nmfetch(url, options) {
finished = true;
req.abort();
let err = new Error('Request Timeout');
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
});
@@ -173,7 +174,7 @@ function nmfetch(url, options) {
return;
}
finished = true;
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
});
@@ -204,7 +205,7 @@ function nmfetch(url, options) {
if (options.redirects > options.maxRedirects) {
finished = true;
let err = new Error('Maximum redirect count exceeded');
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
req.abort();
@@ -222,7 +223,7 @@ function nmfetch(url, options) {
if (res.statusCode >= 300 && !options.allowErrorResponse) {
finished = true;
let err = new Error('Invalid status code ' + res.statusCode);
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
req.abort();
@@ -234,7 +235,7 @@ function nmfetch(url, options) {
return;
}
finished = true;
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
req.abort();
@@ -247,7 +248,7 @@ function nmfetch(url, options) {
return;
}
finished = true;
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
req.abort();
@@ -267,7 +268,7 @@ function nmfetch(url, options) {
}
} catch (err) {
finished = true;
err.type = 'FETCH';
err.code = errors.EFETCH;
err.sourceUrl = url;
fetchRes.emit('error', err);
return;