@@ -236,10 +236,10 @@ var require_proxy = __commonJS({
236236 })();
237237 if (proxyVar) {
238238 try {
239- return new URL (proxyVar);
239+ return new DecodedURL (proxyVar);
240240 } catch (_a) {
241241 if (!proxyVar.startsWith("http://") && !proxyVar.startsWith("https://"))
242- return new URL (`http://${proxyVar}`);
242+ return new DecodedURL (`http://${proxyVar}`);
243243 }
244244 } else {
245245 return void 0;
@@ -282,6 +282,19 @@ var require_proxy = __commonJS({
282282 const hostLower = host.toLowerCase();
283283 return hostLower === "localhost" || hostLower.startsWith("127.") || hostLower.startsWith("[::1]") || hostLower.startsWith("[0:0:0:0:0:0:0:1]");
284284 }
285+ var DecodedURL = class extends URL {
286+ constructor(url, base) {
287+ super(url, base);
288+ this._decodedUsername = decodeURIComponent(super.username);
289+ this._decodedPassword = decodeURIComponent(super.password);
290+ }
291+ get username() {
292+ return this._decodedUsername;
293+ }
294+ get password() {
295+ return this._decodedPassword;
296+ }
297+ };
285298 }
286299});
287300
@@ -5267,6 +5280,13 @@ var require_body = __commonJS({
52675280 var { isUint8Array, isArrayBuffer } = require("util/types");
52685281 var { File: UndiciFile } = require_file();
52695282 var { parseMIMEType, serializeAMimeType } = require_dataURL();
5283+ var random;
5284+ try {
5285+ const crypto = require("crypto");
5286+ random = (max) => crypto.randomInt(0, max);
5287+ } catch {
5288+ random = (max) => Math.floor(Math.random(max));
5289+ }
52705290 var ReadableStream = globalThis.ReadableStream;
52715291 var File = NativeFile ?? UndiciFile;
52725292 var textEncoder = new TextEncoder();
@@ -5309,7 +5329,7 @@ var require_body = __commonJS({
53095329 } else if (ArrayBuffer.isView(object)) {
53105330 source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength));
53115331 } else if (util.isFormDataLike(object)) {
5312- const boundary = `----formdata-undici-0${`${Math.floor(Math. random() * 1e11)}`.padStart(11, "0")}`;
5332+ const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, "0")}`;
53135333 const prefix = `--${boundary}\r
53145334Content-Disposition: form-data`;
53155335 const escape2 = (str) => str.replace(/\n/g, "%0A").replace(/\r/g, "%0D").replace(/"/g, "%22");
@@ -17825,7 +17845,7 @@ var require_lib = __commonJS({
1782517845 }
1782617846 const usingSsl = parsedUrl.protocol === "https:";
1782717847 proxyAgent = new undici_1.ProxyAgent(Object.assign({ uri: proxyUrl.href, pipelining: !this._keepAlive ? 0 : 1 }, (proxyUrl.username || proxyUrl.password) && {
17828- token: `${ proxyUrl.username}:${proxyUrl.password}`
17848+ token: `Basic ${Buffer.from(`${ proxyUrl.username}:${proxyUrl.password}`).toString("base64") }`
1782917849 }));
1783017850 this._proxyAgentDispatcher = proxyAgent;
1783117851 if (usingSsl && this._ignoreSslError) {
@@ -31520,7 +31540,7 @@ var LRUCache = class _LRUCache {
3152031540 }
3152131541 /**
3152231542 * Return an array of [key, {@link LRUCache.Entry}] tuples which can be
31523- * passed to {@link LRLUCache #load}.
31543+ * passed to {@link LRUCache #load}.
3152431544 *
3152531545 * The `start` fields are calculated relative to a portable `Date.now()`
3152631546 * timestamp, even if `performance.now()` is available.
0 commit comments