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) {
|
@@ -4267,6 +4344,25 @@
|
|
4267
4344
|
stream.on("error", onError),
|
4268
4345
|
stream.on("end", onClose));
|
4269
4346
|
}
|
4347
|
+
function createFakeWritableFromWebSocket(webSocket) {
|
4348
|
+
return {
|
4349
|
+
write: function (chunk) {
|
4350
|
+
webSocket.send(chunk);
|
4351
|
+
return !0;
|
4352
|
+
},
|
4353
|
+
end: function () {
|
4354
|
+
webSocket.close();
|
4355
|
+
},
|
4356
|
+
destroy: function (reason) {
|
4357
|
+
"object" === typeof reason &&
|
4358
|
+
null !== reason &&
|
4359
|
+
(reason = reason.message);
|
4360
|
+
"string" === typeof reason
|
4361
|
+
? webSocket.close(1011, reason)
|
4362
|
+
: webSocket.close(1011);
|
4363
|
+
}
|
4364
|
+
};
|
4365
|
+
}
|
4270
4366
|
function createFakeWritableFromReadableStreamController(controller) {
|
4271
4367
|
return {
|
4272
4368
|
write: function (chunk) {
|
@@ -4923,12 +5019,12 @@
|
|
4923
5019
|
"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."
|
4924
5020
|
);
|
4925
5021
|
pendingFiles++;
|
4926
|
-
var
|
5022
|
+
var JSCompiler_object_inline_chunks_226 = [];
|
4927
5023
|
value.on("data", function (chunk) {
|
4928
|
-
|
5024
|
+
JSCompiler_object_inline_chunks_226.push(chunk);
|
4929
5025
|
});
|
4930
5026
|
value.on("end", function () {
|
4931
|
-
var blob = new Blob(
|
5027
|
+
var blob = new Blob(JSCompiler_object_inline_chunks_226, {
|
4932
5028
|
type: mimeType
|
4933
5029
|
});
|
4934
5030
|
response._formData.append(name, blob, filename);
|
@@ -4977,7 +5073,21 @@
|
|
4977
5073
|
};
|
4978
5074
|
exports.renderToPipeableStream = function (model, webpackMap, options) {
|
4979
5075
|
var debugChannel = options ? options.debugChannel : void 0,
|
4980
|
-
|
5076
|
+
debugChannelReadable =
|
5077
|
+
void 0 === debugChannel ||
|
5078
|
+
("function" !== typeof debugChannel.read &&
|
5079
|
+
"number" !== typeof debugChannel.readyState)
|
5080
|
+
? void 0
|
5081
|
+
: debugChannel;
|
5082
|
+
debugChannel =
|
5083
|
+
void 0 !== debugChannel
|
5084
|
+
? "function" === typeof debugChannel.write
|
5085
|
+
? debugChannel
|
5086
|
+
: "function" === typeof debugChannel.send
|
5087
|
+
? createFakeWritableFromWebSocket(debugChannel)
|
5088
|
+
: void 0
|
5089
|
+
: void 0;
|
5090
|
+
var request = createRequest(
|
4981
5091
|
model,
|
4982
5092
|
webpackMap,
|
4983
5093
|
options ? options.onError : void 0,
|
@@ -4986,12 +5096,13 @@
|
|
4986
5096
|
options ? options.temporaryReferences : void 0,
|
4987
5097
|
options ? options.environmentName : void 0,
|
4988
5098
|
options ? options.filterStackFrame : void 0,
|
4989
|
-
void 0 !==
|
5099
|
+
void 0 !== debugChannelReadable
|
4990
5100
|
),
|
4991
5101
|
hasStartedFlowing = !1;
|
4992
5102
|
startWork(request);
|
4993
|
-
void 0 !== debugChannel &&
|
4994
|
-
|
5103
|
+
void 0 !== debugChannel && startFlowingDebug(request, debugChannel);
|
5104
|
+
void 0 !== debugChannelReadable &&
|
5105
|
+
startReadingFromDebugChannelReadable(request, debugChannelReadable);
|
4995
5106
|
return {
|
4996
5107
|
pipe: function (destination) {
|
4997
5108
|
if (hasStartedFlowing)
|
@@ -5008,10 +5119,14 @@
|
|
5008
5119
|
"The destination stream errored while writing data."
|
5009
5120
|
)
|
5010
5121
|
);
|
5011
|
-
|
5012
|
-
|
5013
|
-
|
5014
|
-
|
5122
|
+
if (void 0 === debugChannelReadable)
|
5123
|
+
destination.on(
|
5124
|
+
"close",
|
5125
|
+
createCancelHandler(
|
5126
|
+
request,
|
5127
|
+
"The destination stream closed early."
|
5128
|
+
)
|
5129
|
+
);
|
5015
5130
|
return destination;
|
5016
5131
|
},
|
5017
5132
|
abort: function (reason) {
|
@@ -5024,6 +5139,10 @@
|
|
5024
5139
|
options && options.debugChannel
|
5025
5140
|
? options.debugChannel.readable
|
5026
5141
|
: void 0,
|
5142
|
+
debugChannelWritable =
|
5143
|
+
options && options.debugChannel
|
5144
|
+
? options.debugChannel.writable
|
5145
|
+
: void 0,
|
5027
5146
|
request = createRequest(
|
5028
5147
|
model,
|
5029
5148
|
webpackMap,
|
@@ -5046,6 +5165,22 @@
|
|
5046
5165
|
signal.addEventListener("abort", listener);
|
5047
5166
|
}
|
5048
5167
|
}
|
5168
|
+
if (void 0 !== debugChannelWritable) {
|
5169
|
+
var debugWritable;
|
5170
|
+
new ReadableStream(
|
5171
|
+
{
|
5172
|
+
type: "bytes",
|
5173
|
+
start: function (controller) {
|
5174
|
+
debugWritable =
|
5175
|
+
createFakeWritableFromReadableStreamController(controller);
|
5176
|
+
},
|
5177
|
+
pull: function () {
|
5178
|
+
startFlowingDebug(request, debugWritable);
|
5179
|
+
}
|
5180
|
+
},
|
5181
|
+
{ highWaterMark: 0 }
|
5182
|
+
).pipeTo(debugChannelWritable);
|
5183
|
+
}
|
5049
5184
|
void 0 !== debugChannelReadable &&
|
5050
5185
|
startReadingFromDebugChannelReadableStream(
|
5051
5186
|
request,
|