@whatwg-node/node-fetch 0.4.13-alpha-20230821124424-6f3a2b1 → 0.4.13-alpha-20230821130056-5e4e382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/Body.js +3 -1
- package/esm/Body.js +3 -1
- package/package.json +1 -1
package/cjs/Body.js
CHANGED
@@ -158,7 +158,7 @@ class PonyfillBody {
|
|
158
158
|
reject(new Error(`File size limit exceeded: ${formDataLimits?.fileSize} bytes`));
|
159
159
|
});
|
160
160
|
fileStream.on('data', chunk => {
|
161
|
-
chunks.push(
|
161
|
+
chunks.push(chunk);
|
162
162
|
});
|
163
163
|
fileStream.on('close', () => {
|
164
164
|
if (fileStream.truncated) {
|
@@ -306,6 +306,7 @@ function processBodyInit(bodyInit) {
|
|
306
306
|
}
|
307
307
|
if (isBlob(bodyInit)) {
|
308
308
|
return {
|
309
|
+
bodyType: BodyInitType.Blob,
|
309
310
|
contentType: bodyInit.type,
|
310
311
|
contentLength: bodyInit.size,
|
311
312
|
bodyFactory() {
|
@@ -331,6 +332,7 @@ function processBodyInit(bodyInit) {
|
|
331
332
|
const boundary = Math.random().toString(36).substr(2);
|
332
333
|
const contentType = `multipart/form-data; boundary=${boundary}`;
|
333
334
|
return {
|
335
|
+
bodyType: BodyInitType.FormData,
|
334
336
|
contentType,
|
335
337
|
contentLength: null,
|
336
338
|
bodyFactory() {
|
package/esm/Body.js
CHANGED
@@ -154,7 +154,7 @@ export class PonyfillBody {
|
|
154
154
|
reject(new Error(`File size limit exceeded: ${formDataLimits?.fileSize} bytes`));
|
155
155
|
});
|
156
156
|
fileStream.on('data', chunk => {
|
157
|
-
chunks.push(
|
157
|
+
chunks.push(chunk);
|
158
158
|
});
|
159
159
|
fileStream.on('close', () => {
|
160
160
|
if (fileStream.truncated) {
|
@@ -301,6 +301,7 @@ function processBodyInit(bodyInit) {
|
|
301
301
|
}
|
302
302
|
if (isBlob(bodyInit)) {
|
303
303
|
return {
|
304
|
+
bodyType: BodyInitType.Blob,
|
304
305
|
contentType: bodyInit.type,
|
305
306
|
contentLength: bodyInit.size,
|
306
307
|
bodyFactory() {
|
@@ -326,6 +327,7 @@ function processBodyInit(bodyInit) {
|
|
326
327
|
const boundary = Math.random().toString(36).substr(2);
|
327
328
|
const contentType = `multipart/form-data; boundary=${boundary}`;
|
328
329
|
return {
|
330
|
+
bodyType: BodyInitType.FormData,
|
329
331
|
contentType,
|
330
332
|
contentLength: null,
|
331
333
|
bodyFactory() {
|
package/package.json
CHANGED