A big commit with a bunch of node modules so I could run puppeteer for Walmart. Added some todos and Headway's templates.

This commit is contained in:
Norm Rasmussen
2024-02-28 17:13:10 -05:00
parent dbcdfc8472
commit 1184fe0cd1
1107 changed files with 76526 additions and 8934 deletions

View File

@ -32,6 +32,7 @@ const tls = __importStar(require("tls"));
const debug_1 = __importDefault(require("debug"));
const events_1 = require("events");
const agent_base_1 = require("agent-base");
const url_1 = require("url");
const debug = (0, debug_1.default)('http-proxy-agent');
/**
* The `HttpProxyAgent` implements an HTTP Agent subclass that connects
@ -40,7 +41,7 @@ const debug = (0, debug_1.default)('http-proxy-agent');
class HttpProxyAgent extends agent_base_1.Agent {
constructor(proxy, opts) {
super(opts);
this.proxy = typeof proxy === 'string' ? new URL(proxy) : proxy;
this.proxy = typeof proxy === 'string' ? new url_1.URL(proxy) : proxy;
this.proxyHeaders = opts?.headers ?? {};
debug('Creating new HttpProxyAgent instance: %o', this.proxy.href);
// Trim off the brackets from IPv6 addresses
@ -67,7 +68,7 @@ class HttpProxyAgent extends agent_base_1.Agent {
const protocol = opts.secureEndpoint ? 'https:' : 'http:';
const hostname = req.getHeader('host') || 'localhost';
const base = `${protocol}//${hostname}`;
const url = new URL(req.path, base);
const url = new url_1.URL(req.path, base);
if (opts.port !== 80) {
url.port = String(opts.port);
}