react-server-dom-webpack 19.2.0-canary-280ff6fe-20250606 → 19.2.0-canary-56408a5b-20250610
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 +38 -64
- package/cjs/react-server-dom-webpack-client.edge.development.js +36 -62
- package/cjs/react-server-dom-webpack-client.node.development.js +36 -62
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +36 -62
- package/cjs/react-server-dom-webpack-server.browser.development.js +132 -92
- package/cjs/react-server-dom-webpack-server.edge.development.js +132 -92
- package/cjs/react-server-dom-webpack-server.node.development.js +298 -118
- package/cjs/react-server-dom-webpack-server.node.production.js +166 -25
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +298 -118
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +166 -25
- package/package.json +3 -3
- package/server.node.js +3 -1
- package/server.node.unbundled.js +3 -1
- package/static.node.js +3 -0
@@ -12,6 +12,14 @@
|
|
12
12
|
"production" !== process.env.NODE_ENV &&
|
13
13
|
(function () {
|
14
14
|
function voidHandler() {}
|
15
|
+
function getIteratorFn(maybeIterable) {
|
16
|
+
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
17
|
+
return null;
|
18
|
+
maybeIterable =
|
19
|
+
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
20
|
+
maybeIterable["@@iterator"];
|
21
|
+
return "function" === typeof maybeIterable ? maybeIterable : null;
|
22
|
+
}
|
15
23
|
function _defineProperty(obj, key, value) {
|
16
24
|
a: if ("object" == typeof key && key) {
|
17
25
|
var e = key[Symbol.toPrimitive];
|
@@ -351,14 +359,6 @@
|
|
351
359
|
temporaryReferences.set(reference, id);
|
352
360
|
return reference;
|
353
361
|
}
|
354
|
-
function getIteratorFn(maybeIterable) {
|
355
|
-
if (null === maybeIterable || "object" !== typeof maybeIterable)
|
356
|
-
return null;
|
357
|
-
maybeIterable =
|
358
|
-
(MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
|
359
|
-
maybeIterable["@@iterator"];
|
360
|
-
return "function" === typeof maybeIterable ? maybeIterable : null;
|
361
|
-
}
|
362
362
|
function noop() {}
|
363
363
|
function trackUsedThenable(thenableState, thenable, index) {
|
364
364
|
index = thenableState[index];
|
@@ -882,17 +882,22 @@
|
|
882
882
|
task.debugStack,
|
883
883
|
task.debugTask
|
884
884
|
);
|
885
|
-
(task = thenable._debugInfo) &&
|
886
|
-
forwardDebugInfo(request, newTask.id, task);
|
887
885
|
switch (thenable.status) {
|
888
886
|
case "fulfilled":
|
889
887
|
return (
|
888
|
+
(task = thenable._debugInfo) &&
|
889
|
+
forwardDebugInfo(request, newTask, task),
|
890
890
|
(newTask.model = thenable.value),
|
891
891
|
pingTask(request, newTask),
|
892
892
|
newTask.id
|
893
893
|
);
|
894
894
|
case "rejected":
|
895
|
-
return
|
895
|
+
return (
|
896
|
+
(task = thenable._debugInfo) &&
|
897
|
+
forwardDebugInfo(request, newTask, task),
|
898
|
+
erroredTask(request, newTask, thenable.reason),
|
899
|
+
newTask.id
|
900
|
+
);
|
896
901
|
default:
|
897
902
|
if (request.status === ABORTING)
|
898
903
|
return (
|
@@ -918,10 +923,14 @@
|
|
918
923
|
}
|
919
924
|
thenable.then(
|
920
925
|
function (value) {
|
926
|
+
var _debugInfo2 = thenable._debugInfo;
|
927
|
+
_debugInfo2 && forwardDebugInfo(request, newTask, _debugInfo2);
|
921
928
|
newTask.model = value;
|
922
929
|
pingTask(request, newTask);
|
923
930
|
},
|
924
931
|
function (reason) {
|
932
|
+
var _debugInfo3 = thenable._debugInfo;
|
933
|
+
_debugInfo3 && forwardDebugInfo(request, newTask, _debugInfo3);
|
925
934
|
newTask.status === PENDING$1 &&
|
926
935
|
(erroredTask(request, newTask, reason), enqueueFlush(request));
|
927
936
|
}
|
@@ -1063,7 +1072,7 @@
|
|
1063
1072
|
task = streamTask.id.toString(16) + ":" + (isIterator ? "x" : "X") + "\n";
|
1064
1073
|
request.completedRegularChunks.push(task);
|
1065
1074
|
(iterable = iterable._debugInfo) &&
|
1066
|
-
forwardDebugInfo(request, streamTask
|
1075
|
+
forwardDebugInfo(request, streamTask, iterable);
|
1067
1076
|
var aborted = !1;
|
1068
1077
|
request.abortListeners.add(abortIterable);
|
1069
1078
|
callIteratorInDEV(iterator, progress, error);
|
@@ -1202,33 +1211,34 @@
|
|
1202
1211
|
) {
|
1203
1212
|
var prevThenableState = task.thenableState;
|
1204
1213
|
task.thenableState = null;
|
1205
|
-
if (
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1214
|
+
if (canEmitDebugInfo)
|
1215
|
+
if (null !== prevThenableState)
|
1216
|
+
var componentDebugInfo = prevThenableState._componentDebugInfo;
|
1217
|
+
else {
|
1218
|
+
var componentDebugID = task.id;
|
1219
|
+
componentDebugInfo = Component.displayName || Component.name || "";
|
1220
|
+
var componentEnv = (0, request.environmentName)();
|
1221
|
+
request.pendingChunks++;
|
1222
|
+
componentDebugInfo = {
|
1223
|
+
name: componentDebugInfo,
|
1224
|
+
env: componentEnv,
|
1225
|
+
key: key,
|
1226
|
+
owner: task.debugOwner
|
1227
|
+
};
|
1228
|
+
componentDebugInfo.stack =
|
1229
|
+
null === task.debugStack
|
1230
|
+
? null
|
1231
|
+
: filterStackTrace(request, parseStackTrace(task.debugStack, 1));
|
1232
|
+
componentDebugInfo.props = props;
|
1233
|
+
componentDebugInfo.debugStack = task.debugStack;
|
1234
|
+
componentDebugInfo.debugTask = task.debugTask;
|
1235
|
+
outlineComponentInfo(request, componentDebugInfo);
|
1236
|
+
emitDebugChunk(request, componentDebugID, componentDebugInfo);
|
1237
|
+
task.environmentName = componentEnv;
|
1238
|
+
2 === validated &&
|
1239
|
+
warnForMissingKey(request, key, componentDebugInfo, task.debugTask);
|
1240
|
+
}
|
1241
|
+
else return outlineTask(request, task);
|
1232
1242
|
thenableIndexCounter = 0;
|
1233
1243
|
thenableState = prevThenableState;
|
1234
1244
|
currentComponentDebugInfo = componentDebugInfo;
|
@@ -1333,8 +1343,8 @@
|
|
1333
1343
|
task.implicitSlot ? [request] : request
|
1334
1344
|
);
|
1335
1345
|
if ((i = children._debugInfo)) {
|
1336
|
-
if (
|
1337
|
-
|
1346
|
+
if (canEmitDebugInfo) forwardDebugInfo(request, task, i);
|
1347
|
+
else return outlineTask(request, task);
|
1338
1348
|
children = Array.from(children);
|
1339
1349
|
}
|
1340
1350
|
return children;
|
@@ -1864,10 +1874,10 @@
|
|
1864
1874
|
_writtenObjects.set(value, elementReference)));
|
1865
1875
|
}
|
1866
1876
|
if (serializedSize > MAX_ROW_SIZE) return deferTask(request, task);
|
1867
|
-
if ((_existingReference = value._debugInfo))
|
1868
|
-
if (
|
1869
|
-
|
1870
|
-
|
1877
|
+
if ((_existingReference = value._debugInfo))
|
1878
|
+
if (canEmitDebugInfo)
|
1879
|
+
forwardDebugInfo(request, task, _existingReference);
|
1880
|
+
else return outlineTask(request, task);
|
1871
1881
|
_existingReference = value.props;
|
1872
1882
|
var refProp = _existingReference.ref;
|
1873
1883
|
task.debugOwner = value._owner;
|
@@ -1893,10 +1903,10 @@
|
|
1893
1903
|
task.thenableState = null;
|
1894
1904
|
elementReference = callLazyInitInDEV(value);
|
1895
1905
|
if (request.status === ABORTING) throw null;
|
1896
|
-
if ((_writtenObjects = value._debugInfo))
|
1897
|
-
if (
|
1898
|
-
|
1899
|
-
|
1906
|
+
if ((_writtenObjects = value._debugInfo))
|
1907
|
+
if (canEmitDebugInfo)
|
1908
|
+
forwardDebugInfo(request, task, _writtenObjects);
|
1909
|
+
else return outlineTask(request, task);
|
1900
1910
|
return renderModelDestructive(
|
1901
1911
|
request,
|
1902
1912
|
task,
|
@@ -2262,11 +2272,19 @@
|
|
2262
2272
|
objectLimit = { objectLimit: objectLimit };
|
2263
2273
|
var componentDebugInfo = {
|
2264
2274
|
name: componentInfo.name,
|
2265
|
-
|
2266
|
-
key: componentInfo.key,
|
2267
|
-
owner: componentInfo.owner
|
2275
|
+
key: componentInfo.key
|
2268
2276
|
};
|
2269
|
-
|
2277
|
+
null != componentInfo.env &&
|
2278
|
+
(componentDebugInfo.env = componentInfo.env);
|
2279
|
+
null != componentInfo.owner &&
|
2280
|
+
(componentDebugInfo.owner = componentInfo.owner);
|
2281
|
+
null == componentInfo.stack && null != componentInfo.debugStack
|
2282
|
+
? (componentDebugInfo.stack = filterStackTrace(
|
2283
|
+
request,
|
2284
|
+
parseStackTrace(componentInfo.debugStack, 1)
|
2285
|
+
))
|
2286
|
+
: null != componentInfo.stack &&
|
2287
|
+
(componentDebugInfo.stack = componentInfo.stack);
|
2270
2288
|
componentDebugInfo.props = componentInfo.props;
|
2271
2289
|
objectLimit = outlineConsoleValue(
|
2272
2290
|
request,
|
@@ -2577,46 +2595,66 @@
|
|
2577
2595
|
}
|
2578
2596
|
request.completedRegularChunks.push(":W" + json + "\n");
|
2579
2597
|
}
|
2580
|
-
function forwardDebugInfo(request$jscomp$0,
|
2581
|
-
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
emitDebugChunk(request$jscomp$0,
|
2589
|
-
else if (
|
2590
|
-
var ioInfo =
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
request.
|
2595
|
-
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2608
|
-
|
2609
|
-
|
2610
|
-
|
2611
|
-
|
2598
|
+
function forwardDebugInfo(request$jscomp$0, task, debugInfo) {
|
2599
|
+
task = task.id;
|
2600
|
+
for (var i = 0; i < debugInfo.length; i++) {
|
2601
|
+
var info = debugInfo[i];
|
2602
|
+
if ("number" !== typeof info.time)
|
2603
|
+
if ("string" === typeof info.name)
|
2604
|
+
outlineComponentInfo(request$jscomp$0, info),
|
2605
|
+
request$jscomp$0.pendingChunks++,
|
2606
|
+
emitDebugChunk(request$jscomp$0, task, info);
|
2607
|
+
else if (info.awaited) {
|
2608
|
+
var ioInfo = info.awaited;
|
2609
|
+
if (!(ioInfo.end <= request$jscomp$0.timeOrigin)) {
|
2610
|
+
var request = request$jscomp$0,
|
2611
|
+
ioInfo$jscomp$0 = ioInfo;
|
2612
|
+
if (!request.writtenObjects.has(ioInfo$jscomp$0)) {
|
2613
|
+
request.pendingChunks++;
|
2614
|
+
var id = request.nextChunkId++,
|
2615
|
+
owner = ioInfo$jscomp$0.owner;
|
2616
|
+
null != owner && outlineComponentInfo(request, owner);
|
2617
|
+
var debugStack =
|
2618
|
+
null == ioInfo$jscomp$0.stack &&
|
2619
|
+
null != ioInfo$jscomp$0.debugStack
|
2620
|
+
? filterStackTrace(
|
2621
|
+
request,
|
2622
|
+
parseStackTrace(ioInfo$jscomp$0.debugStack, 1)
|
2623
|
+
)
|
2624
|
+
: ioInfo$jscomp$0.stack;
|
2625
|
+
emitIOInfoChunk(
|
2626
|
+
request,
|
2627
|
+
id,
|
2628
|
+
ioInfo$jscomp$0.name,
|
2629
|
+
ioInfo$jscomp$0.start,
|
2630
|
+
ioInfo$jscomp$0.end,
|
2631
|
+
ioInfo$jscomp$0.env,
|
2632
|
+
owner,
|
2633
|
+
debugStack
|
2634
|
+
);
|
2635
|
+
request.writtenObjects.set(
|
2636
|
+
ioInfo$jscomp$0,
|
2637
|
+
serializeByValueID(id)
|
2638
|
+
);
|
2639
|
+
}
|
2640
|
+
debugStack =
|
2641
|
+
null == info.stack && null != info.debugStack
|
2642
|
+
? filterStackTrace(
|
2643
|
+
request$jscomp$0,
|
2644
|
+
parseStackTrace(info.debugStack, 1)
|
2645
|
+
)
|
2646
|
+
: info.stack;
|
2647
|
+
ioInfo = { awaited: ioInfo };
|
2648
|
+
null != info.env && (ioInfo.env = info.env);
|
2649
|
+
null != info.owner && (ioInfo.owner = info.owner);
|
2650
|
+
null != debugStack && (ioInfo.stack = debugStack);
|
2651
|
+
request$jscomp$0.pendingChunks++;
|
2652
|
+
emitDebugChunk(request$jscomp$0, task, ioInfo);
|
2612
2653
|
}
|
2613
|
-
|
2614
|
-
|
2615
|
-
|
2616
|
-
|
2617
|
-
stack: debugInfo[i].stack
|
2618
|
-
});
|
2619
|
-
} else emitDebugChunk(request$jscomp$0, id$jscomp$0, debugInfo[i]);
|
2654
|
+
} else
|
2655
|
+
request$jscomp$0.pendingChunks++,
|
2656
|
+
emitDebugChunk(request$jscomp$0, task, info);
|
2657
|
+
}
|
2620
2658
|
}
|
2621
2659
|
function emitChunk(request, task, value) {
|
2622
2660
|
var id = task.id;
|
@@ -2660,12 +2698,12 @@
|
|
2660
2698
|
}
|
2661
2699
|
function retryTask(request, task) {
|
2662
2700
|
if (task.status === PENDING$1) {
|
2663
|
-
var
|
2701
|
+
var prevCanEmitDebugInfo = canEmitDebugInfo;
|
2664
2702
|
task.status = RENDERING;
|
2665
2703
|
var parentSerializedSize = serializedSize;
|
2666
2704
|
try {
|
2667
2705
|
modelRoot = task.model;
|
2668
|
-
|
2706
|
+
canEmitDebugInfo = !0;
|
2669
2707
|
var resolvedModel = renderModelDestructive(
|
2670
2708
|
request,
|
2671
2709
|
task,
|
@@ -2673,7 +2711,7 @@
|
|
2673
2711
|
"",
|
2674
2712
|
task.model
|
2675
2713
|
);
|
2676
|
-
|
2714
|
+
canEmitDebugInfo = !1;
|
2677
2715
|
modelRoot = resolvedModel;
|
2678
2716
|
task.keyPath = null;
|
2679
2717
|
task.implicitSlot = !1;
|
@@ -2717,18 +2755,20 @@
|
|
2717
2755
|
} else erroredTask(request, task, x);
|
2718
2756
|
}
|
2719
2757
|
} finally {
|
2720
|
-
(
|
2758
|
+
(canEmitDebugInfo = prevCanEmitDebugInfo),
|
2759
|
+
(serializedSize = parentSerializedSize);
|
2721
2760
|
}
|
2722
2761
|
}
|
2723
2762
|
}
|
2724
2763
|
function tryStreamTask(request, task) {
|
2725
|
-
var
|
2726
|
-
|
2764
|
+
var prevCanEmitDebugInfo = canEmitDebugInfo;
|
2765
|
+
canEmitDebugInfo = !1;
|
2727
2766
|
var parentSerializedSize = serializedSize;
|
2728
2767
|
try {
|
2729
2768
|
emitChunk(request, task, task.model);
|
2730
2769
|
} finally {
|
2731
|
-
(serializedSize = parentSerializedSize),
|
2770
|
+
(serializedSize = parentSerializedSize),
|
2771
|
+
(canEmitDebugInfo = prevCanEmitDebugInfo);
|
2732
2772
|
}
|
2733
2773
|
}
|
2734
2774
|
function performWork(request) {
|
@@ -3673,7 +3713,24 @@
|
|
3673
3713
|
abort(request, Error(reason));
|
3674
3714
|
};
|
3675
3715
|
}
|
3676
|
-
function
|
3716
|
+
function createFakeWritableFromReadableStreamController(controller) {
|
3717
|
+
return {
|
3718
|
+
write: function (chunk) {
|
3719
|
+
"string" === typeof chunk && (chunk = textEncoder.encode(chunk));
|
3720
|
+
controller.enqueue(chunk);
|
3721
|
+
return !0;
|
3722
|
+
},
|
3723
|
+
end: function () {
|
3724
|
+
controller.close();
|
3725
|
+
},
|
3726
|
+
destroy: function (error) {
|
3727
|
+
"function" === typeof controller.error
|
3728
|
+
? controller.error(error)
|
3729
|
+
: controller.close();
|
3730
|
+
}
|
3731
|
+
};
|
3732
|
+
}
|
3733
|
+
function createFakeWritableFromNodeReadable(readable) {
|
3677
3734
|
return {
|
3678
3735
|
write: function (chunk) {
|
3679
3736
|
return readable.push(chunk);
|
@@ -3692,6 +3749,19 @@
|
|
3692
3749
|
var async_hooks = require("async_hooks"),
|
3693
3750
|
ReactDOM = require("react-dom"),
|
3694
3751
|
React = require("react"),
|
3752
|
+
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
3753
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
3754
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
3755
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
3756
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
3757
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
3758
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
3759
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
3760
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
3761
|
+
REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
|
3762
|
+
Symbol.for("react.postpone");
|
3763
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
3764
|
+
ASYNC_ITERATOR = Symbol.asyncIterator,
|
3695
3765
|
scheduleMicrotask = queueMicrotask,
|
3696
3766
|
currentView = null,
|
3697
3767
|
writtenBytes = 0,
|
@@ -3935,19 +4005,6 @@
|
|
3935
4005
|
);
|
3936
4006
|
}
|
3937
4007
|
},
|
3938
|
-
REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
|
3939
|
-
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
3940
|
-
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
3941
|
-
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
3942
|
-
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
3943
|
-
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
3944
|
-
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
3945
|
-
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
3946
|
-
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
3947
|
-
REACT_MEMO_CACHE_SENTINEL = Symbol.for("react.memo_cache_sentinel");
|
3948
|
-
Symbol.for("react.postpone");
|
3949
|
-
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
|
3950
|
-
ASYNC_ITERATOR = Symbol.asyncIterator,
|
3951
4008
|
SuspenseException = Error(
|
3952
4009
|
"Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."
|
3953
4010
|
),
|
@@ -4127,7 +4184,7 @@
|
|
4127
4184
|
PRERENDER = 21,
|
4128
4185
|
defaultPostponeHandler = noop,
|
4129
4186
|
currentRequest = null,
|
4130
|
-
|
4187
|
+
canEmitDebugInfo = !1,
|
4131
4188
|
serializedSize = 0,
|
4132
4189
|
MAX_ROW_SIZE = 3200,
|
4133
4190
|
modelRoot = !1,
|
@@ -4224,6 +4281,37 @@
|
|
4224
4281
|
close(body);
|
4225
4282
|
return webpackMap;
|
4226
4283
|
};
|
4284
|
+
exports.decodeReplyFromAsyncIterable = function (
|
4285
|
+
iterable,
|
4286
|
+
webpackMap,
|
4287
|
+
options
|
4288
|
+
) {
|
4289
|
+
function progress(entry) {
|
4290
|
+
if (entry.done) close(response);
|
4291
|
+
else {
|
4292
|
+
var _entry$value = entry.value;
|
4293
|
+
entry = _entry$value[0];
|
4294
|
+
_entry$value = _entry$value[1];
|
4295
|
+
"string" === typeof _entry$value
|
4296
|
+
? resolveField(response, entry, _entry$value)
|
4297
|
+
: response._formData.append(entry, _entry$value);
|
4298
|
+
iterator.next().then(progress, error);
|
4299
|
+
}
|
4300
|
+
}
|
4301
|
+
function error(reason) {
|
4302
|
+
reportGlobalError(response, reason);
|
4303
|
+
"function" === typeof iterator.throw &&
|
4304
|
+
iterator.throw(reason).then(error, error);
|
4305
|
+
}
|
4306
|
+
var iterator = iterable[ASYNC_ITERATOR](),
|
4307
|
+
response = createResponse(
|
4308
|
+
webpackMap,
|
4309
|
+
"",
|
4310
|
+
options ? options.temporaryReferences : void 0
|
4311
|
+
);
|
4312
|
+
iterator.next().then(progress, error);
|
4313
|
+
return getChunk(response, 0);
|
4314
|
+
};
|
4227
4315
|
exports.decodeReplyFromBusboy = function (
|
4228
4316
|
busboyStream,
|
4229
4317
|
webpackMap,
|
@@ -4249,12 +4337,12 @@
|
|
4249
4337
|
"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."
|
4250
4338
|
);
|
4251
4339
|
pendingFiles++;
|
4252
|
-
var
|
4340
|
+
var JSCompiler_object_inline_chunks_174 = [];
|
4253
4341
|
value.on("data", function (chunk) {
|
4254
|
-
|
4342
|
+
JSCompiler_object_inline_chunks_174.push(chunk);
|
4255
4343
|
});
|
4256
4344
|
value.on("end", function () {
|
4257
|
-
var blob = new Blob(
|
4345
|
+
var blob = new Blob(JSCompiler_object_inline_chunks_174, {
|
4258
4346
|
type: mimeType
|
4259
4347
|
});
|
4260
4348
|
response._formData.append(name, blob, filename);
|
@@ -4341,6 +4429,98 @@
|
|
4341
4429
|
}
|
4342
4430
|
};
|
4343
4431
|
};
|
4432
|
+
exports.renderToReadableStream = function (model, webpackMap, options) {
|
4433
|
+
var request = createRequest(
|
4434
|
+
model,
|
4435
|
+
webpackMap,
|
4436
|
+
options ? options.onError : void 0,
|
4437
|
+
options ? options.identifierPrefix : void 0,
|
4438
|
+
options ? options.onPostpone : void 0,
|
4439
|
+
options ? options.temporaryReferences : void 0,
|
4440
|
+
options ? options.environmentName : void 0,
|
4441
|
+
options ? options.filterStackFrame : void 0
|
4442
|
+
);
|
4443
|
+
if (options && options.signal) {
|
4444
|
+
var signal = options.signal;
|
4445
|
+
if (signal.aborted) abort(request, signal.reason);
|
4446
|
+
else {
|
4447
|
+
var listener = function () {
|
4448
|
+
abort(request, signal.reason);
|
4449
|
+
signal.removeEventListener("abort", listener);
|
4450
|
+
};
|
4451
|
+
signal.addEventListener("abort", listener);
|
4452
|
+
}
|
4453
|
+
}
|
4454
|
+
var writable;
|
4455
|
+
return new ReadableStream(
|
4456
|
+
{
|
4457
|
+
type: "bytes",
|
4458
|
+
start: function (controller) {
|
4459
|
+
writable =
|
4460
|
+
createFakeWritableFromReadableStreamController(controller);
|
4461
|
+
startWork(request);
|
4462
|
+
},
|
4463
|
+
pull: function () {
|
4464
|
+
startFlowing(request, writable);
|
4465
|
+
},
|
4466
|
+
cancel: function (reason) {
|
4467
|
+
request.destination = null;
|
4468
|
+
abort(request, reason);
|
4469
|
+
}
|
4470
|
+
},
|
4471
|
+
{ highWaterMark: 0 }
|
4472
|
+
);
|
4473
|
+
};
|
4474
|
+
exports.unstable_prerender = function (model, webpackMap, options) {
|
4475
|
+
return new Promise(function (resolve, reject) {
|
4476
|
+
var request = createPrerenderRequest(
|
4477
|
+
model,
|
4478
|
+
webpackMap,
|
4479
|
+
function () {
|
4480
|
+
var writable,
|
4481
|
+
stream = new ReadableStream(
|
4482
|
+
{
|
4483
|
+
type: "bytes",
|
4484
|
+
start: function (controller) {
|
4485
|
+
writable =
|
4486
|
+
createFakeWritableFromReadableStreamController(
|
4487
|
+
controller
|
4488
|
+
);
|
4489
|
+
},
|
4490
|
+
pull: function () {
|
4491
|
+
startFlowing(request, writable);
|
4492
|
+
},
|
4493
|
+
cancel: function (reason) {
|
4494
|
+
request.destination = null;
|
4495
|
+
abort(request, reason);
|
4496
|
+
}
|
4497
|
+
},
|
4498
|
+
{ highWaterMark: 0 }
|
4499
|
+
);
|
4500
|
+
resolve({ prelude: stream });
|
4501
|
+
},
|
4502
|
+
reject,
|
4503
|
+
options ? options.onError : void 0,
|
4504
|
+
options ? options.identifierPrefix : void 0,
|
4505
|
+
options ? options.onPostpone : void 0,
|
4506
|
+
options ? options.temporaryReferences : void 0,
|
4507
|
+
options ? options.environmentName : void 0,
|
4508
|
+
options ? options.filterStackFrame : void 0
|
4509
|
+
);
|
4510
|
+
if (options && options.signal) {
|
4511
|
+
var signal = options.signal;
|
4512
|
+
if (signal.aborted) abort(request, signal.reason);
|
4513
|
+
else {
|
4514
|
+
var listener = function () {
|
4515
|
+
abort(request, signal.reason);
|
4516
|
+
signal.removeEventListener("abort", listener);
|
4517
|
+
};
|
4518
|
+
signal.addEventListener("abort", listener);
|
4519
|
+
}
|
4520
|
+
}
|
4521
|
+
startWork(request);
|
4522
|
+
});
|
4523
|
+
};
|
4344
4524
|
exports.unstable_prerenderToNodeStream = function (
|
4345
4525
|
model,
|
4346
4526
|
webpackMap,
|
@@ -4356,7 +4536,7 @@
|
|
4356
4536
|
startFlowing(request, writable);
|
4357
4537
|
}
|
4358
4538
|
}),
|
4359
|
-
writable =
|
4539
|
+
writable = createFakeWritableFromNodeReadable(readable);
|
4360
4540
|
resolve({ prelude: readable });
|
4361
4541
|
},
|
4362
4542
|
reject,
|