react-server-dom-webpack 19.2.0-canary-96c61b7f-20250709 → 19.2.0-canary-97cdd5d3-20250710
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/react-server-dom-webpack-client.browser.development.js +240 -94
- package/cjs/react-server-dom-webpack-client.browser.production.js +29 -22
- package/cjs/react-server-dom-webpack-client.edge.development.js +23 -10
- package/cjs/react-server-dom-webpack-client.edge.production.js +17 -12
- package/cjs/react-server-dom-webpack-client.node.development.js +53 -42
- package/cjs/react-server-dom-webpack-client.node.production.js +38 -35
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +53 -42
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +38 -35
- package/cjs/react-server-dom-webpack-server.browser.development.js +228 -141
- package/cjs/react-server-dom-webpack-server.browser.production.js +45 -45
- package/cjs/react-server-dom-webpack-server.edge.development.js +228 -141
- package/cjs/react-server-dom-webpack-server.edge.production.js +45 -45
- package/cjs/react-server-dom-webpack-server.node.development.js +287 -152
- package/cjs/react-server-dom-webpack-server.node.production.js +68 -69
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +287 -152
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +68 -69
- package/package.json +3 -3
@@ -41,6 +41,9 @@
|
|
41
41
|
: (obj[key] = value);
|
42
42
|
return obj;
|
43
43
|
}
|
44
|
+
function flushBuffered(destination) {
|
45
|
+
"function" === typeof destination.flush && destination.flush();
|
46
|
+
}
|
44
47
|
function writeToDestination(destination, view) {
|
45
48
|
destination = destination.write(view);
|
46
49
|
destinationHasCapacity = destinationHasCapacity && destination;
|
@@ -107,6 +110,14 @@
|
|
107
110
|
(writtenBytes = 0))));
|
108
111
|
return destinationHasCapacity;
|
109
112
|
}
|
113
|
+
function completeWriting(destination) {
|
114
|
+
currentView &&
|
115
|
+
0 < writtenBytes &&
|
116
|
+
destination.write(currentView.subarray(0, writtenBytes));
|
117
|
+
currentView = null;
|
118
|
+
writtenBytes = 0;
|
119
|
+
destinationHasCapacity = !0;
|
120
|
+
}
|
110
121
|
function byteLengthOfChunk(chunk) {
|
111
122
|
return "string" === typeof chunk
|
112
123
|
? Buffer.byteLength(chunk, "utf8")
|
@@ -904,6 +915,7 @@
|
|
904
915
|
this.onFatalError = onFatalError;
|
905
916
|
this.pendingDebugChunks = 0;
|
906
917
|
this.completedDebugChunks = [];
|
918
|
+
this.debugDestination = null;
|
907
919
|
this.environmentName =
|
908
920
|
void 0 === environmentName
|
909
921
|
? function () {
|
@@ -1413,7 +1425,7 @@
|
|
1413
1425
|
var componentDebugID = task.id;
|
1414
1426
|
componentDebugInfo = Component.displayName || Component.name || "";
|
1415
1427
|
var componentEnv = (0, request.environmentName)();
|
1416
|
-
request.
|
1428
|
+
request.pendingChunks++;
|
1417
1429
|
componentDebugInfo = {
|
1418
1430
|
name: componentDebugInfo,
|
1419
1431
|
env: componentEnv,
|
@@ -2541,9 +2553,16 @@
|
|
2541
2553
|
request.completedDebugChunks.push(id);
|
2542
2554
|
}
|
2543
2555
|
function emitDebugChunk(request, id, debugInfo) {
|
2544
|
-
|
2545
|
-
|
2546
|
-
|
2556
|
+
var json = serializeDebugModel(request, 500, debugInfo);
|
2557
|
+
null !== request.debugDestination
|
2558
|
+
? ((debugInfo = request.nextChunkId++),
|
2559
|
+
(json = debugInfo.toString(16) + ":" + json + "\n"),
|
2560
|
+
request.pendingDebugChunks++,
|
2561
|
+
request.completedDebugChunks.push(json),
|
2562
|
+
(id = id.toString(16) + ':D"$' + debugInfo.toString(16) + '"\n'),
|
2563
|
+
request.completedRegularChunks.push(id))
|
2564
|
+
: ((id = id.toString(16) + ":D" + json + "\n"),
|
2565
|
+
request.completedRegularChunks.push(id));
|
2547
2566
|
}
|
2548
2567
|
function outlineComponentInfo(request, componentInfo) {
|
2549
2568
|
if (!request.writtenDebugObjects.has(componentInfo)) {
|
@@ -2968,7 +2987,7 @@
|
|
2968
2987
|
if ("number" !== typeof info.time)
|
2969
2988
|
if ("string" === typeof info.name)
|
2970
2989
|
outlineComponentInfo(request$jscomp$1, info),
|
2971
|
-
request$jscomp$1.
|
2990
|
+
request$jscomp$1.pendingChunks++,
|
2972
2991
|
emitDebugChunk(request$jscomp$1, task, info);
|
2973
2992
|
else if (info.awaited) {
|
2974
2993
|
var ioInfo = info.awaited;
|
@@ -3026,11 +3045,11 @@
|
|
3026
3045
|
null != info.env && (ioInfo.env = info.env);
|
3027
3046
|
null != info.owner && (ioInfo.owner = info.owner);
|
3028
3047
|
null != request && (ioInfo.stack = request);
|
3029
|
-
request$jscomp$1.
|
3048
|
+
request$jscomp$1.pendingChunks++;
|
3030
3049
|
emitDebugChunk(request$jscomp$1, task, ioInfo);
|
3031
3050
|
}
|
3032
3051
|
} else
|
3033
|
-
request$jscomp$1.
|
3052
|
+
request$jscomp$1.pendingChunks++,
|
3034
3053
|
emitDebugChunk(request$jscomp$1, task, info);
|
3035
3054
|
}
|
3036
3055
|
}
|
@@ -3120,7 +3139,7 @@
|
|
3120
3139
|
task.implicitSlot = !1;
|
3121
3140
|
var currentEnv = (0, request.environmentName)();
|
3122
3141
|
currentEnv !== task.environmentName &&
|
3123
|
-
(request.
|
3142
|
+
(request.pendingChunks++,
|
3124
3143
|
emitDebugChunk(request, task.id, { env: currentEnv }));
|
3125
3144
|
if ("object" === typeof resolvedModel && null !== resolvedModel)
|
3126
3145
|
request.writtenObjects.set(
|
@@ -3186,8 +3205,7 @@
|
|
3186
3205
|
request.pingedTasks = [];
|
3187
3206
|
for (var i = 0; i < pingedTasks.length; i++)
|
3188
3207
|
retryTask(request, pingedTasks[i]);
|
3189
|
-
|
3190
|
-
flushCompletedChunks(request, request.destination);
|
3208
|
+
flushCompletedChunks(request);
|
3191
3209
|
} catch (error) {
|
3192
3210
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3193
3211
|
} finally {
|
@@ -3211,87 +3229,134 @@
|
|
3211
3229
|
request.completedErrorChunks.push(task);
|
3212
3230
|
}
|
3213
3231
|
}
|
3214
|
-
function flushCompletedChunks(request
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3246
|
-
|
3247
|
-
|
3248
|
-
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3252
|
-
|
3253
|
-
|
3254
|
-
|
3255
|
-
|
3256
|
-
|
3257
|
-
)
|
3258
|
-
|
3259
|
-
|
3260
|
-
|
3261
|
-
|
3262
|
-
|
3263
|
-
|
3264
|
-
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
) {
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3232
|
+
function flushCompletedChunks(request) {
|
3233
|
+
if (null !== request.debugDestination) {
|
3234
|
+
var debugDestination = request.debugDestination;
|
3235
|
+
currentView = new Uint8Array(2048);
|
3236
|
+
writtenBytes = 0;
|
3237
|
+
destinationHasCapacity = !0;
|
3238
|
+
try {
|
3239
|
+
for (
|
3240
|
+
var debugChunks = request.completedDebugChunks, i = 0;
|
3241
|
+
i < debugChunks.length;
|
3242
|
+
i++
|
3243
|
+
)
|
3244
|
+
request.pendingDebugChunks--,
|
3245
|
+
writeChunkAndReturn(debugDestination, debugChunks[i]);
|
3246
|
+
debugChunks.splice(0, i);
|
3247
|
+
} finally {
|
3248
|
+
completeWriting(debugDestination);
|
3249
|
+
}
|
3250
|
+
flushBuffered(debugDestination);
|
3251
|
+
}
|
3252
|
+
debugDestination = request.destination;
|
3253
|
+
if (null !== debugDestination) {
|
3254
|
+
currentView = new Uint8Array(2048);
|
3255
|
+
writtenBytes = 0;
|
3256
|
+
destinationHasCapacity = !0;
|
3257
|
+
try {
|
3258
|
+
var importsChunks = request.completedImportChunks;
|
3259
|
+
for (
|
3260
|
+
debugChunks = 0;
|
3261
|
+
debugChunks < importsChunks.length;
|
3262
|
+
debugChunks++
|
3263
|
+
)
|
3264
|
+
if (
|
3265
|
+
(request.pendingChunks--,
|
3266
|
+
!writeChunkAndReturn(
|
3267
|
+
debugDestination,
|
3268
|
+
importsChunks[debugChunks]
|
3269
|
+
))
|
3270
|
+
) {
|
3271
|
+
request.destination = null;
|
3272
|
+
debugChunks++;
|
3273
|
+
break;
|
3274
|
+
}
|
3275
|
+
importsChunks.splice(0, debugChunks);
|
3276
|
+
var hintChunks = request.completedHintChunks;
|
3277
|
+
for (debugChunks = 0; debugChunks < hintChunks.length; debugChunks++)
|
3278
|
+
if (
|
3279
|
+
!writeChunkAndReturn(debugDestination, hintChunks[debugChunks])
|
3280
|
+
) {
|
3281
|
+
request.destination = null;
|
3282
|
+
debugChunks++;
|
3283
|
+
break;
|
3284
|
+
}
|
3285
|
+
hintChunks.splice(0, debugChunks);
|
3286
|
+
if (null === request.debugDestination) {
|
3287
|
+
var _debugChunks = request.completedDebugChunks;
|
3288
|
+
for (
|
3289
|
+
debugChunks = 0;
|
3290
|
+
debugChunks < _debugChunks.length;
|
3291
|
+
debugChunks++
|
3292
|
+
)
|
3293
|
+
if (
|
3294
|
+
(request.pendingDebugChunks--,
|
3295
|
+
!writeChunkAndReturn(
|
3296
|
+
debugDestination,
|
3297
|
+
_debugChunks[debugChunks]
|
3298
|
+
))
|
3299
|
+
) {
|
3300
|
+
request.destination = null;
|
3301
|
+
debugChunks++;
|
3302
|
+
break;
|
3303
|
+
}
|
3304
|
+
_debugChunks.splice(0, debugChunks);
|
3272
3305
|
}
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
|
3278
|
-
|
3279
|
-
|
3280
|
-
|
3281
|
-
|
3306
|
+
var regularChunks = request.completedRegularChunks;
|
3307
|
+
for (
|
3308
|
+
debugChunks = 0;
|
3309
|
+
debugChunks < regularChunks.length;
|
3310
|
+
debugChunks++
|
3311
|
+
)
|
3312
|
+
if (
|
3313
|
+
(request.pendingChunks--,
|
3314
|
+
!writeChunkAndReturn(
|
3315
|
+
debugDestination,
|
3316
|
+
regularChunks[debugChunks]
|
3317
|
+
))
|
3318
|
+
) {
|
3319
|
+
request.destination = null;
|
3320
|
+
debugChunks++;
|
3321
|
+
break;
|
3322
|
+
}
|
3323
|
+
regularChunks.splice(0, debugChunks);
|
3324
|
+
var errorChunks = request.completedErrorChunks;
|
3325
|
+
for (debugChunks = 0; debugChunks < errorChunks.length; debugChunks++)
|
3326
|
+
if (
|
3327
|
+
(request.pendingChunks--,
|
3328
|
+
!writeChunkAndReturn(debugDestination, errorChunks[debugChunks]))
|
3329
|
+
) {
|
3330
|
+
request.destination = null;
|
3331
|
+
debugChunks++;
|
3332
|
+
break;
|
3333
|
+
}
|
3334
|
+
errorChunks.splice(0, debugChunks);
|
3335
|
+
} finally {
|
3336
|
+
(request.flushScheduled = !1), completeWriting(debugDestination);
|
3337
|
+
}
|
3338
|
+
flushBuffered(debugDestination);
|
3282
3339
|
}
|
3283
|
-
"function" === typeof destination.flush && destination.flush();
|
3284
3340
|
0 === request.pendingChunks &&
|
3285
|
-
|
3286
|
-
|
3287
|
-
|
3288
|
-
|
3289
|
-
|
3290
|
-
|
3291
|
-
|
3292
|
-
|
3293
|
-
|
3294
|
-
|
3341
|
+
((importsChunks = request.debugDestination),
|
3342
|
+
0 === request.pendingDebugChunks
|
3343
|
+
? (null !== importsChunks &&
|
3344
|
+
(importsChunks.end(), (request.debugDestination = null)),
|
3345
|
+
request.status < ABORTING &&
|
3346
|
+
request.cacheController.abort(
|
3347
|
+
Error(
|
3348
|
+
"This render completed successfully. All cacheSignals are now aborted to allow clean up of any unused resources."
|
3349
|
+
)
|
3350
|
+
),
|
3351
|
+
(request.status = CLOSED),
|
3352
|
+
null !== request.destination &&
|
3353
|
+
(request.destination.end(), (request.destination = null)),
|
3354
|
+
null !== request.debugDestination &&
|
3355
|
+
(request.debugDestination.end(),
|
3356
|
+
(request.debugDestination = null)))
|
3357
|
+
: null !== importsChunks &&
|
3358
|
+
null !== request.destination &&
|
3359
|
+
(request.destination.end(), (request.destination = null)));
|
3295
3360
|
}
|
3296
3361
|
function startWork(request) {
|
3297
3362
|
request.flushScheduled = null !== request.destination;
|
@@ -3303,14 +3368,13 @@
|
|
3303
3368
|
});
|
3304
3369
|
}
|
3305
3370
|
function enqueueFlush(request) {
|
3306
|
-
!1
|
3307
|
-
0
|
3308
|
-
null
|
3371
|
+
!1 !== request.flushScheduled ||
|
3372
|
+
0 !== request.pingedTasks.length ||
|
3373
|
+
(null === request.destination && null === request.debugDestination) ||
|
3309
3374
|
((request.flushScheduled = !0),
|
3310
3375
|
setImmediate(function () {
|
3311
3376
|
request.flushScheduled = !1;
|
3312
|
-
|
3313
|
-
destination && flushCompletedChunks(request, destination);
|
3377
|
+
flushCompletedChunks(request);
|
3314
3378
|
}));
|
3315
3379
|
}
|
3316
3380
|
function callOnAllReadyIfReady(request) {
|
@@ -3323,7 +3387,19 @@
|
|
3323
3387
|
else if (request.status !== CLOSED && null === request.destination) {
|
3324
3388
|
request.destination = destination;
|
3325
3389
|
try {
|
3326
|
-
flushCompletedChunks(request
|
3390
|
+
flushCompletedChunks(request);
|
3391
|
+
} catch (error) {
|
3392
|
+
logRecoverableError(request, error, null), fatalError(request, error);
|
3393
|
+
}
|
3394
|
+
}
|
3395
|
+
}
|
3396
|
+
function startFlowingDebug(request, debugDestination) {
|
3397
|
+
if (13 === request.status)
|
3398
|
+
(request.status = CLOSED), debugDestination.destroy(request.fatalError);
|
3399
|
+
else if (request.status !== CLOSED && null === request.debugDestination) {
|
3400
|
+
request.debugDestination = debugDestination;
|
3401
|
+
try {
|
3402
|
+
flushCompletedChunks(request);
|
3327
3403
|
} catch (error) {
|
3328
3404
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3329
3405
|
}
|
@@ -3336,8 +3412,7 @@
|
|
3336
3412
|
});
|
3337
3413
|
var onAllReady = request.onAllReady;
|
3338
3414
|
onAllReady();
|
3339
|
-
|
3340
|
-
flushCompletedChunks(request, request.destination);
|
3415
|
+
flushCompletedChunks(request);
|
3341
3416
|
} catch (error) {
|
3342
3417
|
logRecoverableError(request, error, null), fatalError(request, error);
|
3343
3418
|
}
|
@@ -3375,8 +3450,7 @@
|
|
3375
3450
|
} else {
|
3376
3451
|
var onAllReady = request.onAllReady;
|
3377
3452
|
onAllReady();
|
3378
|
-
|
3379
|
-
flushCompletedChunks(request, request.destination);
|
3453
|
+
flushCompletedChunks(request);
|
3380
3454
|
}
|
3381
3455
|
} catch (error$2) {
|
3382
3456
|
logRecoverableError(request, error$2, null),
|
@@ -3392,52 +3466,55 @@
|
|
3392
3466
|
throw Error(
|
3393
3467
|
"resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
|
3394
3468
|
);
|
3395
|
-
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3402
|
-
|
3403
|
-
|
3404
|
-
deferredDebugObjects.retained.delete(id),
|
3405
|
-
deferredDebugObjects.existing.delete(retainedValue),
|
3406
|
-
enqueueFlush(request));
|
3407
|
-
}
|
3408
|
-
break;
|
3409
|
-
case 81:
|
3410
|
-
for (command = 0; command < message.length; command++)
|
3411
|
-
(id = message[command]),
|
3412
|
-
(retainedValue = deferredDebugObjects.retained.get(id)),
|
3469
|
+
if ("" === message) closeDebugChannel(request);
|
3470
|
+
else {
|
3471
|
+
var command = message.charCodeAt(0);
|
3472
|
+
message = message.slice(2).split(",").map(fromHex);
|
3473
|
+
switch (command) {
|
3474
|
+
case 82:
|
3475
|
+
for (command = 0; command < message.length; command++) {
|
3476
|
+
var id = message[command],
|
3477
|
+
retainedValue = deferredDebugObjects.retained.get(id);
|
3413
3478
|
void 0 !== retainedValue &&
|
3414
|
-
(
|
3479
|
+
(request.pendingDebugChunks--,
|
3480
|
+
deferredDebugObjects.retained.delete(id),
|
3415
3481
|
deferredDebugObjects.existing.delete(retainedValue),
|
3416
|
-
emitOutlinedDebugModelChunk(
|
3417
|
-
request,
|
3418
|
-
id,
|
3419
|
-
{ objectLimit: 10 },
|
3420
|
-
retainedValue
|
3421
|
-
),
|
3422
3482
|
enqueueFlush(request));
|
3423
|
-
|
3424
|
-
|
3425
|
-
|
3426
|
-
(
|
3427
|
-
(
|
3428
|
-
|
3429
|
-
|
3430
|
-
|
3431
|
-
|
3432
|
-
|
3433
|
-
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3440
|
-
|
3483
|
+
}
|
3484
|
+
break;
|
3485
|
+
case 81:
|
3486
|
+
for (command = 0; command < message.length; command++)
|
3487
|
+
(id = message[command]),
|
3488
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
3489
|
+
void 0 !== retainedValue &&
|
3490
|
+
(deferredDebugObjects.retained.delete(id),
|
3491
|
+
deferredDebugObjects.existing.delete(retainedValue),
|
3492
|
+
emitOutlinedDebugModelChunk(
|
3493
|
+
request,
|
3494
|
+
id,
|
3495
|
+
{ objectLimit: 10 },
|
3496
|
+
retainedValue
|
3497
|
+
),
|
3498
|
+
enqueueFlush(request));
|
3499
|
+
break;
|
3500
|
+
case 80:
|
3501
|
+
for (command = 0; command < message.length; command++)
|
3502
|
+
(id = message[command]),
|
3503
|
+
(retainedValue = deferredDebugObjects.retained.get(id)),
|
3504
|
+
void 0 !== retainedValue &&
|
3505
|
+
(deferredDebugObjects.retained.delete(id),
|
3506
|
+
emitRequestedDebugThenable(
|
3507
|
+
request,
|
3508
|
+
id,
|
3509
|
+
{ objectLimit: 10 },
|
3510
|
+
retainedValue
|
3511
|
+
));
|
3512
|
+
break;
|
3513
|
+
default:
|
3514
|
+
throw Error(
|
3515
|
+
"Unknown command. The debugChannel was not wired up properly."
|
3516
|
+
);
|
3517
|
+
}
|
3441
3518
|
}
|
3442
3519
|
}
|
3443
3520
|
function closeDebugChannel(request) {
|
@@ -4230,6 +4307,25 @@
|
|
4230
4307
|
stream.on("error", onError),
|
4231
4308
|
stream.on("end", onClose));
|
4232
4309
|
}
|
4310
|
+
function createFakeWritableFromWebSocket(webSocket) {
|
4311
|
+
return {
|
4312
|
+
write: function (chunk) {
|
4313
|
+
webSocket.send(chunk);
|
4314
|
+
return !0;
|
4315
|
+
},
|
4316
|
+
end: function () {
|
4317
|
+
webSocket.close();
|
4318
|
+
},
|
4319
|
+
destroy: function (reason) {
|
4320
|
+
"object" === typeof reason &&
|
4321
|
+
null !== reason &&
|
4322
|
+
(reason = reason.message);
|
4323
|
+
"string" === typeof reason
|
4324
|
+
? webSocket.close(1011, reason)
|
4325
|
+
: webSocket.close(1011);
|
4326
|
+
}
|
4327
|
+
};
|
4328
|
+
}
|
4233
4329
|
function createFakeWritableFromReadableStreamController(controller) {
|
4234
4330
|
return {
|
4235
4331
|
write: function (chunk) {
|
@@ -4886,12 +4982,12 @@
|
|
4886
4982
|
"React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
|
4887
4983
|
);
|
4888
4984
|
pendingFiles++;
|
4889
|
-
var
|
4985
|
+
var JSCompiler_object_inline_chunks_226 = [];
|
4890
4986
|
value.on("data", function (chunk) {
|
4891
|
-
|
4987
|
+
JSCompiler_object_inline_chunks_226.push(chunk);
|
4892
4988
|
});
|
4893
4989
|
value.on("end", function () {
|
4894
|
-
var blob = new Blob(
|
4990
|
+
var blob = new Blob(JSCompiler_object_inline_chunks_226, {
|
4895
4991
|
type: mimeType
|
4896
4992
|
});
|
4897
4993
|
response._formData.append(name, blob, filename);
|
@@ -4940,7 +5036,21 @@
|
|
4940
5036
|
};
|
4941
5037
|
exports.renderToPipeableStream = function (model, webpackMap, options) {
|
4942
5038
|
var debugChannel = options ? options.debugChannel : void 0,
|
4943
|
-
|
5039
|
+
debugChannelReadable =
|
5040
|
+
void 0 === debugChannel ||
|
5041
|
+
("function" !== typeof debugChannel.read &&
|
5042
|
+
"number" !== typeof debugChannel.readyState)
|
5043
|
+
? void 0
|
5044
|
+
: debugChannel;
|
5045
|
+
debugChannel =
|
5046
|
+
void 0 !== debugChannel
|
5047
|
+
? "function" === typeof debugChannel.write
|
5048
|
+
? debugChannel
|
5049
|
+
: "function" === typeof debugChannel.send
|
5050
|
+
? createFakeWritableFromWebSocket(debugChannel)
|
5051
|
+
: void 0
|
5052
|
+
: void 0;
|
5053
|
+
var request = createRequest(
|
4944
5054
|
model,
|
4945
5055
|
webpackMap,
|
4946
5056
|
options ? options.onError : void 0,
|
@@ -4949,12 +5059,13 @@
|
|
4949
5059
|
options ? options.temporaryReferences : void 0,
|
4950
5060
|
options ? options.environmentName : void 0,
|
4951
5061
|
options ? options.filterStackFrame : void 0,
|
4952
|
-
void 0 !==
|
5062
|
+
void 0 !== debugChannelReadable
|
4953
5063
|
),
|
4954
5064
|
hasStartedFlowing = !1;
|
4955
5065
|
startWork(request);
|
4956
|
-
void 0 !== debugChannel &&
|
4957
|
-
|
5066
|
+
void 0 !== debugChannel && startFlowingDebug(request, debugChannel);
|
5067
|
+
void 0 !== debugChannelReadable &&
|
5068
|
+
startReadingFromDebugChannelReadable(request, debugChannelReadable);
|
4958
5069
|
return {
|
4959
5070
|
pipe: function (destination) {
|
4960
5071
|
if (hasStartedFlowing)
|
@@ -4971,10 +5082,14 @@
|
|
4971
5082
|
"The destination stream errored while writing data."
|
4972
5083
|
)
|
4973
5084
|
);
|
4974
|
-
|
4975
|
-
|
4976
|
-
|
4977
|
-
|
5085
|
+
if (void 0 === debugChannelReadable)
|
5086
|
+
destination.on(
|
5087
|
+
"close",
|
5088
|
+
createCancelHandler(
|
5089
|
+
request,
|
5090
|
+
"The destination stream closed early."
|
5091
|
+
)
|
5092
|
+
);
|
4978
5093
|
return destination;
|
4979
5094
|
},
|
4980
5095
|
abort: function (reason) {
|
@@ -4987,6 +5102,10 @@
|
|
4987
5102
|
options && options.debugChannel
|
4988
5103
|
? options.debugChannel.readable
|
4989
5104
|
: void 0,
|
5105
|
+
debugChannelWritable =
|
5106
|
+
options && options.debugChannel
|
5107
|
+
? options.debugChannel.writable
|
5108
|
+
: void 0,
|
4990
5109
|
request = createRequest(
|
4991
5110
|
model,
|
4992
5111
|
webpackMap,
|
@@ -5009,6 +5128,22 @@
|
|
5009
5128
|
signal.addEventListener("abort", listener);
|
5010
5129
|
}
|
5011
5130
|
}
|
5131
|
+
if (void 0 !== debugChannelWritable) {
|
5132
|
+
var debugWritable;
|
5133
|
+
new ReadableStream(
|
5134
|
+
{
|
5135
|
+
type: "bytes",
|
5136
|
+
start: function (controller) {
|
5137
|
+
debugWritable =
|
5138
|
+
createFakeWritableFromReadableStreamController(controller);
|
5139
|
+
},
|
5140
|
+
pull: function () {
|
5141
|
+
startFlowingDebug(request, debugWritable);
|
5142
|
+
}
|
5143
|
+
},
|
5144
|
+
{ highWaterMark: 0 }
|
5145
|
+
).pipeTo(debugChannelWritable);
|
5146
|
+
}
|
5012
5147
|
void 0 !== debugChannelReadable &&
|
5013
5148
|
startReadingFromDebugChannelReadableStream(
|
5014
5149
|
request,
|