From 8263401d6ae815ee5a550feee13d8cedd8e0886c Mon Sep 17 00:00:00 2001 From: Nick Alteen Date: Mon, 3 Feb 2025 16:28:24 -0500 Subject: [PATCH] Rebuild dist --- dist/index.js | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/dist/index.js b/dist/index.js index 325e0a1..d7477c9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -12,7 +12,7 @@ import require$$0$2 from 'util'; import require$$0$4 from 'stream'; import require$$7 from 'buffer'; import require$$8 from 'querystring'; -import require$$13 from 'stream/web'; +import require$$14 from 'stream/web'; import require$$0$7 from 'node:stream'; import require$$1$2 from 'node:util'; import require$$0$6 from 'node:events'; @@ -1484,7 +1484,7 @@ function requireUtil$6 () { let ReadableStream; function ReadableStreamFrom (iterable) { if (!ReadableStream) { - ReadableStream = require$$13.ReadableStream; + ReadableStream = require$$14.ReadableStream; } if (ReadableStream.from) { @@ -4535,7 +4535,7 @@ function requireUtil$5 () { function isReadableStreamLike (stream) { if (!ReadableStream) { - ReadableStream = require$$13.ReadableStream; + ReadableStream = require$$14.ReadableStream; } return stream instanceof ReadableStream || ( @@ -6675,6 +6675,14 @@ function requireBody () { const { File: UndiciFile } = requireFile(); const { parseMIMEType, serializeAMimeType } = requireDataURL(); + let random; + try { + const crypto = require('node:crypto'); + random = (max) => crypto.randomInt(0, max); + } catch { + random = (max) => Math.floor(Math.random(max)); + } + let ReadableStream = globalThis.ReadableStream; /** @type {globalThis['File']} */ @@ -6685,7 +6693,7 @@ function requireBody () { // https://fetch.spec.whatwg.org/#concept-bodyinit-extract function extractBody (object, keepalive = false) { if (!ReadableStream) { - ReadableStream = require$$13.ReadableStream; + ReadableStream = require$$14.ReadableStream; } // 1. Let stream be null. @@ -6760,7 +6768,7 @@ function requireBody () { // Set source to a copy of the bytes held by object. source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength)); } else if (util.isFormDataLike(object)) { - const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`; + const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`; const prefix = `--${boundary}\r\nContent-Disposition: form-data`; /*! formdata-polyfill. MIT License. Jimmy Wärting */ @@ -6906,7 +6914,7 @@ function requireBody () { function safelyExtractBody (object, keepalive = false) { if (!ReadableStream) { // istanbul ignore next - ReadableStream = require$$13.ReadableStream; + ReadableStream = require$$14.ReadableStream; } // To safely extract a body and a `Content-Type` value from @@ -15562,7 +15570,7 @@ function requireResponse () { const assert = require$$0$3; const { types } = require$$0$2; - const ReadableStream = globalThis.ReadableStream || require$$13.ReadableStream; + const ReadableStream = globalThis.ReadableStream || require$$14.ReadableStream; const textEncoder = new TextEncoder('utf-8'); // https://fetch.spec.whatwg.org/#response-class @@ -16631,7 +16639,7 @@ function requireRequest () { // 2. Set finalBody to the result of creating a proxy for inputBody. if (!TransformStream) { - TransformStream = require$$13.TransformStream; + TransformStream = require$$14.TransformStream; } // https://streams.spec.whatwg.org/#readablestream-create-a-proxy @@ -17124,7 +17132,7 @@ function requireFetch () { const { Readable, pipeline } = require$$0$4; const { addAbortListener, isErrored, isReadable, nodeMajor, nodeMinor } = requireUtil$6(); const { dataURLProcessor, serializeAMimeType } = requireDataURL(); - const { TransformStream } = require$$13; + const { TransformStream } = require$$14; const { getGlobalDispatcher } = requireGlobal(); const { webidl } = requireWebidl(); const { STATUS_CODES } = require$$2$1; @@ -18794,7 +18802,7 @@ function requireFetch () { // cancelAlgorithm set to cancelAlgorithm, highWaterMark set to // highWaterMark, and sizeAlgorithm set to sizeAlgorithm. if (!ReadableStream) { - ReadableStream = require$$13.ReadableStream; + ReadableStream = require$$14.ReadableStream; } const stream = new ReadableStream(