Skip to content

Commit ef06831

Browse files
check faiures fix
1 parent ee7abde commit ef06831

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.licenses/npm/undici.dep.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26223,6 +26223,14 @@ const { isUint8Array, isArrayBuffer } = __nccwpck_require__(9830)
2622326223
const { File: UndiciFile } = __nccwpck_require__(8511)
2622426224
const { parseMIMEType, serializeAMimeType } = __nccwpck_require__(685)
2622526225

26226+
let random
26227+
try {
26228+
const crypto = __nccwpck_require__(6005)
26229+
random = (max) => crypto.randomInt(0, max)
26230+
} catch {
26231+
random = (max) => Math.floor(Math.random(max))
26232+
}
26233+
2622626234
let ReadableStream = globalThis.ReadableStream
2622726235

2622826236
/** @type {globalThis['File']} */
@@ -26308,7 +26316,7 @@ function extractBody (object, keepalive = false) {
2630826316
// Set source to a copy of the bytes held by object.
2630926317
source = new Uint8Array(object.buffer.slice(object.byteOffset, object.byteOffset + object.byteLength))
2631026318
} else if (util.isFormDataLike(object)) {
26311-
const boundary = `----formdata-undici-0${`${Math.floor(Math.random() * 1e11)}`.padStart(11, '0')}`
26319+
const boundary = `----formdata-undici-0${`${random(1e11)}`.padStart(11, '0')}`
2631226320
const prefix = `--${boundary}\r\nContent-Disposition: form-data`
2631326321

2631426322
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
@@ -40493,6 +40501,14 @@ module.exports = require("net");
4049340501

4049440502
/***/ }),
4049540503

40504+
/***/ 6005:
40505+
/***/ ((module) => {
40506+
40507+
"use strict";
40508+
module.exports = require("node:crypto");
40509+
40510+
/***/ }),
40511+
4049640512
/***/ 5673:
4049740513
/***/ ((module) => {
4049840514

0 commit comments

Comments
 (0)