react-server-dom-webpack 19.1.2 → 19.1.3
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 +76 -45
- package/cjs/react-server-dom-webpack-client.browser.production.js +72 -43
- package/cjs/react-server-dom-webpack-client.edge.development.js +74 -43
- package/cjs/react-server-dom-webpack-client.edge.production.js +72 -43
- package/cjs/react-server-dom-webpack-client.node.development.js +74 -43
- package/cjs/react-server-dom-webpack-client.node.production.js +72 -43
- package/cjs/react-server-dom-webpack-server.browser.development.js +169 -179
- package/cjs/react-server-dom-webpack-server.browser.production.js +164 -173
- package/cjs/react-server-dom-webpack-server.edge.development.js +169 -179
- package/cjs/react-server-dom-webpack-server.edge.production.js +164 -173
- package/cjs/react-server-dom-webpack-server.node.development.js +172 -182
- package/cjs/react-server-dom-webpack-server.node.production.js +167 -176
- package/package.json +6 -21
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +0 -2962
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +0 -1859
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +0 -4406
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +0 -3111
- package/client.node.unbundled.js +0 -7
- package/server.node.unbundled.js +0 -18
- package/static.node.unbundled.js +0 -12
|
@@ -517,13 +517,23 @@
|
|
|
517
517
|
pendingParts--;
|
|
518
518
|
}
|
|
519
519
|
}
|
|
520
|
+
parentReference = writtenObjects.get(value);
|
|
520
521
|
if ("function" === typeof value.then) {
|
|
522
|
+
if (void 0 !== parentReference)
|
|
523
|
+
if (modelRoot === value) modelRoot = null;
|
|
524
|
+
else return parentReference;
|
|
521
525
|
null === formData && (formData = new FormData());
|
|
522
526
|
pendingParts++;
|
|
523
527
|
var promiseId = nextPartId++;
|
|
528
|
+
key = "$@" + promiseId.toString(16);
|
|
529
|
+
writtenObjects.set(value, key);
|
|
524
530
|
value.then(function (partValue) {
|
|
525
531
|
try {
|
|
526
|
-
var
|
|
532
|
+
var previousReference = writtenObjects.get(partValue);
|
|
533
|
+
var _partJSON3 =
|
|
534
|
+
void 0 !== previousReference
|
|
535
|
+
? JSON.stringify(previousReference)
|
|
536
|
+
: serializeModel(partValue, promiseId);
|
|
527
537
|
partValue = formData;
|
|
528
538
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
529
539
|
pendingParts--;
|
|
@@ -532,9 +542,8 @@
|
|
|
532
542
|
reject(reason);
|
|
533
543
|
}
|
|
534
544
|
}, reject);
|
|
535
|
-
return
|
|
545
|
+
return key;
|
|
536
546
|
}
|
|
537
|
-
parentReference = writtenObjects.get(value);
|
|
538
547
|
if (void 0 !== parentReference)
|
|
539
548
|
if (modelRoot === value) modelRoot = null;
|
|
540
549
|
else return parentReference;
|
|
@@ -692,7 +701,7 @@
|
|
|
692
701
|
null === formData && (formData = new FormData()),
|
|
693
702
|
(parentReference = nextPartId++),
|
|
694
703
|
formData.set(formFieldPrefix + parentReference, key),
|
|
695
|
-
"$
|
|
704
|
+
"$h" + parentReference.toString(16)
|
|
696
705
|
);
|
|
697
706
|
if (
|
|
698
707
|
void 0 !== temporaryReferences &&
|
|
@@ -1036,6 +1045,7 @@
|
|
|
1036
1045
|
rejectListeners = chunk.reason;
|
|
1037
1046
|
chunk.status = "resolved_module";
|
|
1038
1047
|
chunk.value = value;
|
|
1048
|
+
chunk.reason = null;
|
|
1039
1049
|
null !== resolveListeners &&
|
|
1040
1050
|
(initializeModuleChunk(chunk),
|
|
1041
1051
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1065,6 +1075,7 @@
|
|
|
1065
1075
|
}
|
|
1066
1076
|
chunk.status = "fulfilled";
|
|
1067
1077
|
chunk.value = value;
|
|
1078
|
+
chunk.reason = null;
|
|
1068
1079
|
} catch (error) {
|
|
1069
1080
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1070
1081
|
} finally {
|
|
@@ -1076,6 +1087,7 @@
|
|
|
1076
1087
|
var value = requireModule(chunk.value);
|
|
1077
1088
|
chunk.status = "fulfilled";
|
|
1078
1089
|
chunk.value = value;
|
|
1090
|
+
chunk.reason = null;
|
|
1079
1091
|
} catch (error) {
|
|
1080
1092
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1081
1093
|
}
|
|
@@ -1084,7 +1096,11 @@
|
|
|
1084
1096
|
response._closed = !0;
|
|
1085
1097
|
response._closedReason = error;
|
|
1086
1098
|
response._chunks.forEach(function (chunk) {
|
|
1087
|
-
"pending" === chunk.status
|
|
1099
|
+
"pending" === chunk.status
|
|
1100
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1101
|
+
: "fulfilled" === chunk.status &&
|
|
1102
|
+
null !== chunk.reason &&
|
|
1103
|
+
chunk.reason.error(error);
|
|
1088
1104
|
});
|
|
1089
1105
|
}
|
|
1090
1106
|
function nullRefGetter() {
|
|
@@ -1171,6 +1187,7 @@
|
|
|
1171
1187
|
((value = i.value),
|
|
1172
1188
|
(i.status = "fulfilled"),
|
|
1173
1189
|
(i.value = handler.value),
|
|
1190
|
+
(i.reason = null),
|
|
1174
1191
|
null !== value && wakeChunk(value, handler.value)));
|
|
1175
1192
|
}
|
|
1176
1193
|
function reject(error) {
|
|
@@ -1284,6 +1301,7 @@
|
|
|
1284
1301
|
((boundArgs = resolvedValue.value),
|
|
1285
1302
|
(resolvedValue.status = "fulfilled"),
|
|
1286
1303
|
(resolvedValue.value = handler.value),
|
|
1304
|
+
(resolvedValue.reason = null),
|
|
1287
1305
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1288
1306
|
},
|
|
1289
1307
|
function (error) {
|
|
@@ -1436,7 +1454,7 @@
|
|
|
1436
1454
|
return getChunk(response, parentObject);
|
|
1437
1455
|
case "S":
|
|
1438
1456
|
return Symbol.for(value.slice(2));
|
|
1439
|
-
case "
|
|
1457
|
+
case "h":
|
|
1440
1458
|
return (
|
|
1441
1459
|
(value = value.slice(2)),
|
|
1442
1460
|
getOutlinedModel(
|
|
@@ -1666,7 +1684,8 @@
|
|
|
1666
1684
|
);
|
|
1667
1685
|
}
|
|
1668
1686
|
function startReadableStream(response, id, type) {
|
|
1669
|
-
var controller = null
|
|
1687
|
+
var controller = null,
|
|
1688
|
+
closed = !1;
|
|
1670
1689
|
type = new ReadableStream({
|
|
1671
1690
|
type: type,
|
|
1672
1691
|
start: function (c) {
|
|
@@ -1721,24 +1740,28 @@
|
|
|
1721
1740
|
}
|
|
1722
1741
|
},
|
|
1723
1742
|
close: function () {
|
|
1724
|
-
if (
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1743
|
+
if (!closed)
|
|
1744
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1745
|
+
controller.close();
|
|
1746
|
+
else {
|
|
1747
|
+
var blockedChunk = previousBlockedChunk;
|
|
1748
|
+
previousBlockedChunk = null;
|
|
1749
|
+
blockedChunk.then(function () {
|
|
1750
|
+
return controller.close();
|
|
1751
|
+
});
|
|
1752
|
+
}
|
|
1732
1753
|
},
|
|
1733
1754
|
error: function (error) {
|
|
1734
|
-
if (
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1755
|
+
if (!closed)
|
|
1756
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1757
|
+
controller.error(error);
|
|
1758
|
+
else {
|
|
1759
|
+
var blockedChunk = previousBlockedChunk;
|
|
1760
|
+
previousBlockedChunk = null;
|
|
1761
|
+
blockedChunk.then(function () {
|
|
1762
|
+
return controller.error(error);
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1742
1765
|
}
|
|
1743
1766
|
});
|
|
1744
1767
|
}
|
|
@@ -1793,6 +1816,7 @@
|
|
|
1793
1816
|
rejectListeners = chunk.reason;
|
|
1794
1817
|
chunk.status = "fulfilled";
|
|
1795
1818
|
chunk.value = { done: !1, value: value };
|
|
1819
|
+
chunk.reason = null;
|
|
1796
1820
|
null !== resolveListeners &&
|
|
1797
1821
|
wakeChunkIfInitialized(
|
|
1798
1822
|
chunk,
|
|
@@ -1813,30 +1837,37 @@
|
|
|
1813
1837
|
nextWriteIndex++;
|
|
1814
1838
|
},
|
|
1815
1839
|
close: function (value) {
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1840
|
+
if (!closed)
|
|
1841
|
+
for (
|
|
1842
|
+
closed = !0,
|
|
1843
|
+
nextWriteIndex === buffer.length
|
|
1844
|
+
? (buffer[nextWriteIndex] =
|
|
1845
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
1846
|
+
: resolveIteratorResultChunk(
|
|
1847
|
+
buffer[nextWriteIndex],
|
|
1848
|
+
value,
|
|
1849
|
+
!0
|
|
1850
|
+
),
|
|
1851
|
+
nextWriteIndex++;
|
|
1852
|
+
nextWriteIndex < buffer.length;
|
|
1853
|
+
|
|
1854
|
+
)
|
|
1855
|
+
resolveIteratorResultChunk(
|
|
1856
|
+
buffer[nextWriteIndex++],
|
|
1857
|
+
'"$undefined"',
|
|
1821
1858
|
!0
|
|
1822
|
-
)
|
|
1823
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1824
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1825
|
-
resolveIteratorResultChunk(
|
|
1826
|
-
buffer[nextWriteIndex++],
|
|
1827
|
-
'"$undefined"',
|
|
1828
|
-
!0
|
|
1829
|
-
);
|
|
1859
|
+
);
|
|
1830
1860
|
},
|
|
1831
1861
|
error: function (error) {
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1862
|
+
if (!closed)
|
|
1863
|
+
for (
|
|
1864
|
+
closed = !0,
|
|
1865
|
+
nextWriteIndex === buffer.length &&
|
|
1866
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1867
|
+
nextWriteIndex < buffer.length;
|
|
1837
1868
|
|
|
1838
|
-
|
|
1839
|
-
|
|
1869
|
+
)
|
|
1870
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1840
1871
|
}
|
|
1841
1872
|
}
|
|
1842
1873
|
);
|
|
@@ -2690,10 +2721,10 @@
|
|
|
2690
2721
|
return hook.checkDCE ? !0 : !1;
|
|
2691
2722
|
})({
|
|
2692
2723
|
bundleType: 1,
|
|
2693
|
-
version: "19.1.
|
|
2724
|
+
version: "19.1.3",
|
|
2694
2725
|
rendererPackageName: "react-server-dom-webpack",
|
|
2695
2726
|
currentDispatcherRef: ReactSharedInternals,
|
|
2696
|
-
reconcilerVersion: "19.1.
|
|
2727
|
+
reconcilerVersion: "19.1.3",
|
|
2697
2728
|
getCurrentComponentInfo: function () {
|
|
2698
2729
|
return currentOwnerInDEV;
|
|
2699
2730
|
}
|
|
@@ -303,13 +303,23 @@ function processReply(
|
|
|
303
303
|
pendingParts--;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
+
parentReference = writtenObjects.get(value);
|
|
306
307
|
if ("function" === typeof value.then) {
|
|
308
|
+
if (void 0 !== parentReference)
|
|
309
|
+
if (modelRoot === value) modelRoot = null;
|
|
310
|
+
else return parentReference;
|
|
307
311
|
null === formData && (formData = new FormData());
|
|
308
312
|
pendingParts++;
|
|
309
313
|
var promiseId = nextPartId++;
|
|
314
|
+
key = "$@" + promiseId.toString(16);
|
|
315
|
+
writtenObjects.set(value, key);
|
|
310
316
|
value.then(function (partValue) {
|
|
311
317
|
try {
|
|
312
|
-
var
|
|
318
|
+
var previousReference = writtenObjects.get(partValue);
|
|
319
|
+
var partJSON$28 =
|
|
320
|
+
void 0 !== previousReference
|
|
321
|
+
? JSON.stringify(previousReference)
|
|
322
|
+
: serializeModel(partValue, promiseId);
|
|
313
323
|
partValue = formData;
|
|
314
324
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
315
325
|
pendingParts--;
|
|
@@ -318,9 +328,8 @@ function processReply(
|
|
|
318
328
|
reject(reason);
|
|
319
329
|
}
|
|
320
330
|
}, reject);
|
|
321
|
-
return
|
|
331
|
+
return key;
|
|
322
332
|
}
|
|
323
|
-
parentReference = writtenObjects.get(value);
|
|
324
333
|
if (void 0 !== parentReference)
|
|
325
334
|
if (modelRoot === value) modelRoot = null;
|
|
326
335
|
else return parentReference;
|
|
@@ -444,7 +453,7 @@ function processReply(
|
|
|
444
453
|
null === formData && (formData = new FormData()),
|
|
445
454
|
(parentReference = nextPartId++),
|
|
446
455
|
formData.set(formFieldPrefix + parentReference, key),
|
|
447
|
-
"$
|
|
456
|
+
"$h" + parentReference.toString(16)
|
|
448
457
|
);
|
|
449
458
|
if (
|
|
450
459
|
void 0 !== temporaryReferences &&
|
|
@@ -650,6 +659,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
650
659
|
rejectListeners = chunk.reason;
|
|
651
660
|
chunk.status = "resolved_module";
|
|
652
661
|
chunk.value = value;
|
|
662
|
+
chunk.reason = null;
|
|
653
663
|
null !== resolveListeners &&
|
|
654
664
|
(initializeModuleChunk(chunk),
|
|
655
665
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -680,6 +690,7 @@ function initializeModelChunk(chunk) {
|
|
|
680
690
|
}
|
|
681
691
|
chunk.status = "fulfilled";
|
|
682
692
|
chunk.value = value;
|
|
693
|
+
chunk.reason = null;
|
|
683
694
|
} catch (error) {
|
|
684
695
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
685
696
|
} finally {
|
|
@@ -691,6 +702,7 @@ function initializeModuleChunk(chunk) {
|
|
|
691
702
|
var value = requireModule(chunk.value);
|
|
692
703
|
chunk.status = "fulfilled";
|
|
693
704
|
chunk.value = value;
|
|
705
|
+
chunk.reason = null;
|
|
694
706
|
} catch (error) {
|
|
695
707
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
696
708
|
}
|
|
@@ -699,7 +711,11 @@ function reportGlobalError(response, error) {
|
|
|
699
711
|
response._closed = !0;
|
|
700
712
|
response._closedReason = error;
|
|
701
713
|
response._chunks.forEach(function (chunk) {
|
|
702
|
-
"pending" === chunk.status
|
|
714
|
+
"pending" === chunk.status
|
|
715
|
+
? triggerErrorOnChunk(chunk, error)
|
|
716
|
+
: "fulfilled" === chunk.status &&
|
|
717
|
+
null !== chunk.reason &&
|
|
718
|
+
chunk.reason.error(error);
|
|
703
719
|
});
|
|
704
720
|
}
|
|
705
721
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -757,6 +773,7 @@ function waitForReference(
|
|
|
757
773
|
((value = i.value),
|
|
758
774
|
(i.status = "fulfilled"),
|
|
759
775
|
(i.value = handler.value),
|
|
776
|
+
(i.reason = null),
|
|
760
777
|
null !== value && wakeChunk(value, handler.value)));
|
|
761
778
|
}
|
|
762
779
|
function reject(error) {
|
|
@@ -839,6 +856,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
839
856
|
((boundArgs = resolvedValue.value),
|
|
840
857
|
(resolvedValue.status = "fulfilled"),
|
|
841
858
|
(resolvedValue.value = handler.value),
|
|
859
|
+
(resolvedValue.reason = null),
|
|
842
860
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
843
861
|
},
|
|
844
862
|
function (error) {
|
|
@@ -954,7 +972,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
954
972
|
return getChunk(response, parentObject);
|
|
955
973
|
case "S":
|
|
956
974
|
return Symbol.for(value.slice(2));
|
|
957
|
-
case "
|
|
975
|
+
case "h":
|
|
958
976
|
return (
|
|
959
977
|
(value = value.slice(2)),
|
|
960
978
|
getOutlinedModel(
|
|
@@ -1103,7 +1121,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1103
1121
|
);
|
|
1104
1122
|
}
|
|
1105
1123
|
function startReadableStream(response, id, type) {
|
|
1106
|
-
var controller = null
|
|
1124
|
+
var controller = null,
|
|
1125
|
+
closed = !1;
|
|
1107
1126
|
type = new ReadableStream({
|
|
1108
1127
|
type: type,
|
|
1109
1128
|
start: function (c) {
|
|
@@ -1153,24 +1172,27 @@ function startReadableStream(response, id, type) {
|
|
|
1153
1172
|
}
|
|
1154
1173
|
},
|
|
1155
1174
|
close: function () {
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1175
|
+
if (!closed)
|
|
1176
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1177
|
+
else {
|
|
1178
|
+
var blockedChunk = previousBlockedChunk;
|
|
1179
|
+
previousBlockedChunk = null;
|
|
1180
|
+
blockedChunk.then(function () {
|
|
1181
|
+
return controller.close();
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1164
1184
|
},
|
|
1165
1185
|
error: function (error) {
|
|
1166
|
-
if (
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1186
|
+
if (!closed)
|
|
1187
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1188
|
+
controller.error(error);
|
|
1189
|
+
else {
|
|
1190
|
+
var blockedChunk = previousBlockedChunk;
|
|
1191
|
+
previousBlockedChunk = null;
|
|
1192
|
+
blockedChunk.then(function () {
|
|
1193
|
+
return controller.error(error);
|
|
1194
|
+
});
|
|
1195
|
+
}
|
|
1174
1196
|
}
|
|
1175
1197
|
});
|
|
1176
1198
|
}
|
|
@@ -1228,6 +1250,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1228
1250
|
rejectListeners = chunk.reason;
|
|
1229
1251
|
chunk.status = "fulfilled";
|
|
1230
1252
|
chunk.value = { done: !1, value: value };
|
|
1253
|
+
chunk.reason = null;
|
|
1231
1254
|
null !== resolveListeners &&
|
|
1232
1255
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1233
1256
|
}
|
|
@@ -1244,30 +1267,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1244
1267
|
nextWriteIndex++;
|
|
1245
1268
|
},
|
|
1246
1269
|
close: function (value) {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1270
|
+
if (!closed)
|
|
1271
|
+
for (
|
|
1272
|
+
closed = !0,
|
|
1273
|
+
nextWriteIndex === buffer.length
|
|
1274
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1275
|
+
response,
|
|
1276
|
+
value,
|
|
1277
|
+
!0
|
|
1278
|
+
))
|
|
1279
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1280
|
+
nextWriteIndex++;
|
|
1281
|
+
nextWriteIndex < buffer.length;
|
|
1282
|
+
|
|
1283
|
+
)
|
|
1284
|
+
resolveIteratorResultChunk(
|
|
1285
|
+
buffer[nextWriteIndex++],
|
|
1286
|
+
'"$undefined"',
|
|
1252
1287
|
!0
|
|
1253
|
-
)
|
|
1254
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1255
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1256
|
-
resolveIteratorResultChunk(
|
|
1257
|
-
buffer[nextWriteIndex++],
|
|
1258
|
-
'"$undefined"',
|
|
1259
|
-
!0
|
|
1260
|
-
);
|
|
1288
|
+
);
|
|
1261
1289
|
},
|
|
1262
1290
|
error: function (error) {
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1291
|
+
if (!closed)
|
|
1292
|
+
for (
|
|
1293
|
+
closed = !0,
|
|
1294
|
+
nextWriteIndex === buffer.length &&
|
|
1295
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1296
|
+
nextWriteIndex < buffer.length;
|
|
1268
1297
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1298
|
+
)
|
|
1299
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1271
1300
|
}
|
|
1272
1301
|
}
|
|
1273
1302
|
);
|
|
@@ -538,13 +538,23 @@
|
|
|
538
538
|
pendingParts--;
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
+
parentReference = writtenObjects.get(value);
|
|
541
542
|
if ("function" === typeof value.then) {
|
|
543
|
+
if (void 0 !== parentReference)
|
|
544
|
+
if (modelRoot === value) modelRoot = null;
|
|
545
|
+
else return parentReference;
|
|
542
546
|
null === formData && (formData = new FormData());
|
|
543
547
|
pendingParts++;
|
|
544
548
|
var promiseId = nextPartId++;
|
|
549
|
+
key = "$@" + promiseId.toString(16);
|
|
550
|
+
writtenObjects.set(value, key);
|
|
545
551
|
value.then(function (partValue) {
|
|
546
552
|
try {
|
|
547
|
-
var
|
|
553
|
+
var previousReference = writtenObjects.get(partValue);
|
|
554
|
+
var _partJSON3 =
|
|
555
|
+
void 0 !== previousReference
|
|
556
|
+
? JSON.stringify(previousReference)
|
|
557
|
+
: serializeModel(partValue, promiseId);
|
|
548
558
|
partValue = formData;
|
|
549
559
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
550
560
|
pendingParts--;
|
|
@@ -553,9 +563,8 @@
|
|
|
553
563
|
reject(reason);
|
|
554
564
|
}
|
|
555
565
|
}, reject);
|
|
556
|
-
return
|
|
566
|
+
return key;
|
|
557
567
|
}
|
|
558
|
-
parentReference = writtenObjects.get(value);
|
|
559
568
|
if (void 0 !== parentReference)
|
|
560
569
|
if (modelRoot === value) modelRoot = null;
|
|
561
570
|
else return parentReference;
|
|
@@ -713,7 +722,7 @@
|
|
|
713
722
|
null === formData && (formData = new FormData()),
|
|
714
723
|
(parentReference = nextPartId++),
|
|
715
724
|
formData.set(formFieldPrefix + parentReference, key),
|
|
716
|
-
"$
|
|
725
|
+
"$h" + parentReference.toString(16)
|
|
717
726
|
);
|
|
718
727
|
if (
|
|
719
728
|
void 0 !== temporaryReferences &&
|
|
@@ -1244,6 +1253,7 @@
|
|
|
1244
1253
|
rejectListeners = chunk.reason;
|
|
1245
1254
|
chunk.status = "resolved_module";
|
|
1246
1255
|
chunk.value = value;
|
|
1256
|
+
chunk.reason = null;
|
|
1247
1257
|
null !== resolveListeners &&
|
|
1248
1258
|
(initializeModuleChunk(chunk),
|
|
1249
1259
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1273,6 +1283,7 @@
|
|
|
1273
1283
|
}
|
|
1274
1284
|
chunk.status = "fulfilled";
|
|
1275
1285
|
chunk.value = value;
|
|
1286
|
+
chunk.reason = null;
|
|
1276
1287
|
} catch (error) {
|
|
1277
1288
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1278
1289
|
} finally {
|
|
@@ -1284,6 +1295,7 @@
|
|
|
1284
1295
|
var value = requireModule(chunk.value);
|
|
1285
1296
|
chunk.status = "fulfilled";
|
|
1286
1297
|
chunk.value = value;
|
|
1298
|
+
chunk.reason = null;
|
|
1287
1299
|
} catch (error) {
|
|
1288
1300
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1289
1301
|
}
|
|
@@ -1292,7 +1304,11 @@
|
|
|
1292
1304
|
response._closed = !0;
|
|
1293
1305
|
response._closedReason = error;
|
|
1294
1306
|
response._chunks.forEach(function (chunk) {
|
|
1295
|
-
"pending" === chunk.status
|
|
1307
|
+
"pending" === chunk.status
|
|
1308
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1309
|
+
: "fulfilled" === chunk.status &&
|
|
1310
|
+
null !== chunk.reason &&
|
|
1311
|
+
chunk.reason.error(error);
|
|
1296
1312
|
});
|
|
1297
1313
|
}
|
|
1298
1314
|
function nullRefGetter() {
|
|
@@ -1379,6 +1395,7 @@
|
|
|
1379
1395
|
((value = i.value),
|
|
1380
1396
|
(i.status = "fulfilled"),
|
|
1381
1397
|
(i.value = handler.value),
|
|
1398
|
+
(i.reason = null),
|
|
1382
1399
|
null !== value && wakeChunk(value, handler.value)));
|
|
1383
1400
|
}
|
|
1384
1401
|
function reject(error) {
|
|
@@ -1499,6 +1516,7 @@
|
|
|
1499
1516
|
((boundArgs = resolvedValue.value),
|
|
1500
1517
|
(resolvedValue.status = "fulfilled"),
|
|
1501
1518
|
(resolvedValue.value = handler.value),
|
|
1519
|
+
(resolvedValue.reason = null),
|
|
1502
1520
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1503
1521
|
},
|
|
1504
1522
|
function (error) {
|
|
@@ -1651,7 +1669,7 @@
|
|
|
1651
1669
|
return getChunk(response, parentObject);
|
|
1652
1670
|
case "S":
|
|
1653
1671
|
return Symbol.for(value.slice(2));
|
|
1654
|
-
case "
|
|
1672
|
+
case "h":
|
|
1655
1673
|
return (
|
|
1656
1674
|
(value = value.slice(2)),
|
|
1657
1675
|
getOutlinedModel(
|
|
@@ -1886,7 +1904,8 @@
|
|
|
1886
1904
|
);
|
|
1887
1905
|
}
|
|
1888
1906
|
function startReadableStream(response, id, type) {
|
|
1889
|
-
var controller = null
|
|
1907
|
+
var controller = null,
|
|
1908
|
+
closed = !1;
|
|
1890
1909
|
type = new ReadableStream({
|
|
1891
1910
|
type: type,
|
|
1892
1911
|
start: function (c) {
|
|
@@ -1941,24 +1960,28 @@
|
|
|
1941
1960
|
}
|
|
1942
1961
|
},
|
|
1943
1962
|
close: function () {
|
|
1944
|
-
if (
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1963
|
+
if (!closed)
|
|
1964
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1965
|
+
controller.close();
|
|
1966
|
+
else {
|
|
1967
|
+
var blockedChunk = previousBlockedChunk;
|
|
1968
|
+
previousBlockedChunk = null;
|
|
1969
|
+
blockedChunk.then(function () {
|
|
1970
|
+
return controller.close();
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1952
1973
|
},
|
|
1953
1974
|
error: function (error) {
|
|
1954
|
-
if (
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1975
|
+
if (!closed)
|
|
1976
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1977
|
+
controller.error(error);
|
|
1978
|
+
else {
|
|
1979
|
+
var blockedChunk = previousBlockedChunk;
|
|
1980
|
+
previousBlockedChunk = null;
|
|
1981
|
+
blockedChunk.then(function () {
|
|
1982
|
+
return controller.error(error);
|
|
1983
|
+
});
|
|
1984
|
+
}
|
|
1962
1985
|
}
|
|
1963
1986
|
});
|
|
1964
1987
|
}
|
|
@@ -2013,6 +2036,7 @@
|
|
|
2013
2036
|
rejectListeners = chunk.reason;
|
|
2014
2037
|
chunk.status = "fulfilled";
|
|
2015
2038
|
chunk.value = { done: !1, value: value };
|
|
2039
|
+
chunk.reason = null;
|
|
2016
2040
|
null !== resolveListeners &&
|
|
2017
2041
|
wakeChunkIfInitialized(
|
|
2018
2042
|
chunk,
|
|
@@ -2033,30 +2057,37 @@
|
|
|
2033
2057
|
nextWriteIndex++;
|
|
2034
2058
|
},
|
|
2035
2059
|
close: function (value) {
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2060
|
+
if (!closed)
|
|
2061
|
+
for (
|
|
2062
|
+
closed = !0,
|
|
2063
|
+
nextWriteIndex === buffer.length
|
|
2064
|
+
? (buffer[nextWriteIndex] =
|
|
2065
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
2066
|
+
: resolveIteratorResultChunk(
|
|
2067
|
+
buffer[nextWriteIndex],
|
|
2068
|
+
value,
|
|
2069
|
+
!0
|
|
2070
|
+
),
|
|
2071
|
+
nextWriteIndex++;
|
|
2072
|
+
nextWriteIndex < buffer.length;
|
|
2073
|
+
|
|
2074
|
+
)
|
|
2075
|
+
resolveIteratorResultChunk(
|
|
2076
|
+
buffer[nextWriteIndex++],
|
|
2077
|
+
'"$undefined"',
|
|
2041
2078
|
!0
|
|
2042
|
-
)
|
|
2043
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
2044
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
2045
|
-
resolveIteratorResultChunk(
|
|
2046
|
-
buffer[nextWriteIndex++],
|
|
2047
|
-
'"$undefined"',
|
|
2048
|
-
!0
|
|
2049
|
-
);
|
|
2079
|
+
);
|
|
2050
2080
|
},
|
|
2051
2081
|
error: function (error) {
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2082
|
+
if (!closed)
|
|
2083
|
+
for (
|
|
2084
|
+
closed = !0,
|
|
2085
|
+
nextWriteIndex === buffer.length &&
|
|
2086
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
2087
|
+
nextWriteIndex < buffer.length;
|
|
2057
2088
|
|
|
2058
|
-
|
|
2059
|
-
|
|
2089
|
+
)
|
|
2090
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
2060
2091
|
}
|
|
2061
2092
|
}
|
|
2062
2093
|
);
|