react-server-dom-turbopack 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-turbopack-client.browser.development.js +76 -45
- package/cjs/react-server-dom-turbopack-client.browser.production.js +72 -43
- package/cjs/react-server-dom-turbopack-client.edge.development.js +74 -43
- package/cjs/react-server-dom-turbopack-client.edge.production.js +72 -43
- package/cjs/react-server-dom-turbopack-client.node.development.js +74 -43
- package/cjs/react-server-dom-turbopack-client.node.production.js +72 -43
- package/cjs/react-server-dom-turbopack-server.browser.development.js +169 -179
- package/cjs/react-server-dom-turbopack-server.browser.production.js +164 -173
- package/cjs/react-server-dom-turbopack-server.edge.development.js +169 -179
- package/cjs/react-server-dom-turbopack-server.edge.production.js +164 -173
- package/cjs/react-server-dom-turbopack-server.node.development.js +172 -182
- package/cjs/react-server-dom-turbopack-server.node.production.js +167 -176
- package/package.json +3 -3
|
@@ -510,13 +510,23 @@
|
|
|
510
510
|
pendingParts--;
|
|
511
511
|
}
|
|
512
512
|
}
|
|
513
|
+
parentReference = writtenObjects.get(value);
|
|
513
514
|
if ("function" === typeof value.then) {
|
|
515
|
+
if (void 0 !== parentReference)
|
|
516
|
+
if (modelRoot === value) modelRoot = null;
|
|
517
|
+
else return parentReference;
|
|
514
518
|
null === formData && (formData = new FormData());
|
|
515
519
|
pendingParts++;
|
|
516
520
|
var promiseId = nextPartId++;
|
|
521
|
+
key = "$@" + promiseId.toString(16);
|
|
522
|
+
writtenObjects.set(value, key);
|
|
517
523
|
value.then(function (partValue) {
|
|
518
524
|
try {
|
|
519
|
-
var
|
|
525
|
+
var previousReference = writtenObjects.get(partValue);
|
|
526
|
+
var _partJSON3 =
|
|
527
|
+
void 0 !== previousReference
|
|
528
|
+
? JSON.stringify(previousReference)
|
|
529
|
+
: serializeModel(partValue, promiseId);
|
|
520
530
|
partValue = formData;
|
|
521
531
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
522
532
|
pendingParts--;
|
|
@@ -525,9 +535,8 @@
|
|
|
525
535
|
reject(reason);
|
|
526
536
|
}
|
|
527
537
|
}, reject);
|
|
528
|
-
return
|
|
538
|
+
return key;
|
|
529
539
|
}
|
|
530
|
-
parentReference = writtenObjects.get(value);
|
|
531
540
|
if (void 0 !== parentReference)
|
|
532
541
|
if (modelRoot === value) modelRoot = null;
|
|
533
542
|
else return parentReference;
|
|
@@ -685,7 +694,7 @@
|
|
|
685
694
|
null === formData && (formData = new FormData()),
|
|
686
695
|
(parentReference = nextPartId++),
|
|
687
696
|
formData.set(formFieldPrefix + parentReference, key),
|
|
688
|
-
"$
|
|
697
|
+
"$h" + parentReference.toString(16)
|
|
689
698
|
);
|
|
690
699
|
if (
|
|
691
700
|
void 0 !== temporaryReferences &&
|
|
@@ -1029,6 +1038,7 @@
|
|
|
1029
1038
|
rejectListeners = chunk.reason;
|
|
1030
1039
|
chunk.status = "resolved_module";
|
|
1031
1040
|
chunk.value = value;
|
|
1041
|
+
chunk.reason = null;
|
|
1032
1042
|
null !== resolveListeners &&
|
|
1033
1043
|
(initializeModuleChunk(chunk),
|
|
1034
1044
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1058,6 +1068,7 @@
|
|
|
1058
1068
|
}
|
|
1059
1069
|
chunk.status = "fulfilled";
|
|
1060
1070
|
chunk.value = value;
|
|
1071
|
+
chunk.reason = null;
|
|
1061
1072
|
} catch (error) {
|
|
1062
1073
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1063
1074
|
} finally {
|
|
@@ -1069,6 +1080,7 @@
|
|
|
1069
1080
|
var value = requireModule(chunk.value);
|
|
1070
1081
|
chunk.status = "fulfilled";
|
|
1071
1082
|
chunk.value = value;
|
|
1083
|
+
chunk.reason = null;
|
|
1072
1084
|
} catch (error) {
|
|
1073
1085
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1074
1086
|
}
|
|
@@ -1077,7 +1089,11 @@
|
|
|
1077
1089
|
response._closed = !0;
|
|
1078
1090
|
response._closedReason = error;
|
|
1079
1091
|
response._chunks.forEach(function (chunk) {
|
|
1080
|
-
"pending" === chunk.status
|
|
1092
|
+
"pending" === chunk.status
|
|
1093
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1094
|
+
: "fulfilled" === chunk.status &&
|
|
1095
|
+
null !== chunk.reason &&
|
|
1096
|
+
chunk.reason.error(error);
|
|
1081
1097
|
});
|
|
1082
1098
|
}
|
|
1083
1099
|
function nullRefGetter() {
|
|
@@ -1164,6 +1180,7 @@
|
|
|
1164
1180
|
((value = i.value),
|
|
1165
1181
|
(i.status = "fulfilled"),
|
|
1166
1182
|
(i.value = handler.value),
|
|
1183
|
+
(i.reason = null),
|
|
1167
1184
|
null !== value && wakeChunk(value, handler.value)));
|
|
1168
1185
|
}
|
|
1169
1186
|
function reject(error) {
|
|
@@ -1277,6 +1294,7 @@
|
|
|
1277
1294
|
((boundArgs = resolvedValue.value),
|
|
1278
1295
|
(resolvedValue.status = "fulfilled"),
|
|
1279
1296
|
(resolvedValue.value = handler.value),
|
|
1297
|
+
(resolvedValue.reason = null),
|
|
1280
1298
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1281
1299
|
},
|
|
1282
1300
|
function (error) {
|
|
@@ -1429,7 +1447,7 @@
|
|
|
1429
1447
|
return getChunk(response, parentObject);
|
|
1430
1448
|
case "S":
|
|
1431
1449
|
return Symbol.for(value.slice(2));
|
|
1432
|
-
case "
|
|
1450
|
+
case "h":
|
|
1433
1451
|
return (
|
|
1434
1452
|
(value = value.slice(2)),
|
|
1435
1453
|
getOutlinedModel(
|
|
@@ -1659,7 +1677,8 @@
|
|
|
1659
1677
|
);
|
|
1660
1678
|
}
|
|
1661
1679
|
function startReadableStream(response, id, type) {
|
|
1662
|
-
var controller = null
|
|
1680
|
+
var controller = null,
|
|
1681
|
+
closed = !1;
|
|
1663
1682
|
type = new ReadableStream({
|
|
1664
1683
|
type: type,
|
|
1665
1684
|
start: function (c) {
|
|
@@ -1714,24 +1733,28 @@
|
|
|
1714
1733
|
}
|
|
1715
1734
|
},
|
|
1716
1735
|
close: function () {
|
|
1717
|
-
if (
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1736
|
+
if (!closed)
|
|
1737
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1738
|
+
controller.close();
|
|
1739
|
+
else {
|
|
1740
|
+
var blockedChunk = previousBlockedChunk;
|
|
1741
|
+
previousBlockedChunk = null;
|
|
1742
|
+
blockedChunk.then(function () {
|
|
1743
|
+
return controller.close();
|
|
1744
|
+
});
|
|
1745
|
+
}
|
|
1725
1746
|
},
|
|
1726
1747
|
error: function (error) {
|
|
1727
|
-
if (
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1748
|
+
if (!closed)
|
|
1749
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1750
|
+
controller.error(error);
|
|
1751
|
+
else {
|
|
1752
|
+
var blockedChunk = previousBlockedChunk;
|
|
1753
|
+
previousBlockedChunk = null;
|
|
1754
|
+
blockedChunk.then(function () {
|
|
1755
|
+
return controller.error(error);
|
|
1756
|
+
});
|
|
1757
|
+
}
|
|
1735
1758
|
}
|
|
1736
1759
|
});
|
|
1737
1760
|
}
|
|
@@ -1786,6 +1809,7 @@
|
|
|
1786
1809
|
rejectListeners = chunk.reason;
|
|
1787
1810
|
chunk.status = "fulfilled";
|
|
1788
1811
|
chunk.value = { done: !1, value: value };
|
|
1812
|
+
chunk.reason = null;
|
|
1789
1813
|
null !== resolveListeners &&
|
|
1790
1814
|
wakeChunkIfInitialized(
|
|
1791
1815
|
chunk,
|
|
@@ -1806,30 +1830,37 @@
|
|
|
1806
1830
|
nextWriteIndex++;
|
|
1807
1831
|
},
|
|
1808
1832
|
close: function (value) {
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1833
|
+
if (!closed)
|
|
1834
|
+
for (
|
|
1835
|
+
closed = !0,
|
|
1836
|
+
nextWriteIndex === buffer.length
|
|
1837
|
+
? (buffer[nextWriteIndex] =
|
|
1838
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
1839
|
+
: resolveIteratorResultChunk(
|
|
1840
|
+
buffer[nextWriteIndex],
|
|
1841
|
+
value,
|
|
1842
|
+
!0
|
|
1843
|
+
),
|
|
1844
|
+
nextWriteIndex++;
|
|
1845
|
+
nextWriteIndex < buffer.length;
|
|
1846
|
+
|
|
1847
|
+
)
|
|
1848
|
+
resolveIteratorResultChunk(
|
|
1849
|
+
buffer[nextWriteIndex++],
|
|
1850
|
+
'"$undefined"',
|
|
1814
1851
|
!0
|
|
1815
|
-
)
|
|
1816
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1817
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1818
|
-
resolveIteratorResultChunk(
|
|
1819
|
-
buffer[nextWriteIndex++],
|
|
1820
|
-
'"$undefined"',
|
|
1821
|
-
!0
|
|
1822
|
-
);
|
|
1852
|
+
);
|
|
1823
1853
|
},
|
|
1824
1854
|
error: function (error) {
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1855
|
+
if (!closed)
|
|
1856
|
+
for (
|
|
1857
|
+
closed = !0,
|
|
1858
|
+
nextWriteIndex === buffer.length &&
|
|
1859
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1860
|
+
nextWriteIndex < buffer.length;
|
|
1830
1861
|
|
|
1831
|
-
|
|
1832
|
-
|
|
1862
|
+
)
|
|
1863
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1833
1864
|
}
|
|
1834
1865
|
}
|
|
1835
1866
|
);
|
|
@@ -2675,10 +2706,10 @@
|
|
|
2675
2706
|
return hook.checkDCE ? !0 : !1;
|
|
2676
2707
|
})({
|
|
2677
2708
|
bundleType: 1,
|
|
2678
|
-
version: "19.1.
|
|
2709
|
+
version: "19.1.3",
|
|
2679
2710
|
rendererPackageName: "react-server-dom-turbopack",
|
|
2680
2711
|
currentDispatcherRef: ReactSharedInternals,
|
|
2681
|
-
reconcilerVersion: "19.1.
|
|
2712
|
+
reconcilerVersion: "19.1.3",
|
|
2682
2713
|
getCurrentComponentInfo: function () {
|
|
2683
2714
|
return currentOwnerInDEV;
|
|
2684
2715
|
}
|
|
@@ -291,13 +291,23 @@ function processReply(
|
|
|
291
291
|
pendingParts--;
|
|
292
292
|
}
|
|
293
293
|
}
|
|
294
|
+
parentReference = writtenObjects.get(value);
|
|
294
295
|
if ("function" === typeof value.then) {
|
|
296
|
+
if (void 0 !== parentReference)
|
|
297
|
+
if (modelRoot === value) modelRoot = null;
|
|
298
|
+
else return parentReference;
|
|
295
299
|
null === formData && (formData = new FormData());
|
|
296
300
|
pendingParts++;
|
|
297
301
|
var promiseId = nextPartId++;
|
|
302
|
+
key = "$@" + promiseId.toString(16);
|
|
303
|
+
writtenObjects.set(value, key);
|
|
298
304
|
value.then(function (partValue) {
|
|
299
305
|
try {
|
|
300
|
-
var
|
|
306
|
+
var previousReference = writtenObjects.get(partValue);
|
|
307
|
+
var partJSON$28 =
|
|
308
|
+
void 0 !== previousReference
|
|
309
|
+
? JSON.stringify(previousReference)
|
|
310
|
+
: serializeModel(partValue, promiseId);
|
|
301
311
|
partValue = formData;
|
|
302
312
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
303
313
|
pendingParts--;
|
|
@@ -306,9 +316,8 @@ function processReply(
|
|
|
306
316
|
reject(reason);
|
|
307
317
|
}
|
|
308
318
|
}, reject);
|
|
309
|
-
return
|
|
319
|
+
return key;
|
|
310
320
|
}
|
|
311
|
-
parentReference = writtenObjects.get(value);
|
|
312
321
|
if (void 0 !== parentReference)
|
|
313
322
|
if (modelRoot === value) modelRoot = null;
|
|
314
323
|
else return parentReference;
|
|
@@ -432,7 +441,7 @@ function processReply(
|
|
|
432
441
|
null === formData && (formData = new FormData()),
|
|
433
442
|
(parentReference = nextPartId++),
|
|
434
443
|
formData.set(formFieldPrefix + parentReference, key),
|
|
435
|
-
"$
|
|
444
|
+
"$h" + parentReference.toString(16)
|
|
436
445
|
);
|
|
437
446
|
if (
|
|
438
447
|
void 0 !== temporaryReferences &&
|
|
@@ -638,6 +647,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
638
647
|
rejectListeners = chunk.reason;
|
|
639
648
|
chunk.status = "resolved_module";
|
|
640
649
|
chunk.value = value;
|
|
650
|
+
chunk.reason = null;
|
|
641
651
|
null !== resolveListeners &&
|
|
642
652
|
(initializeModuleChunk(chunk),
|
|
643
653
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -668,6 +678,7 @@ function initializeModelChunk(chunk) {
|
|
|
668
678
|
}
|
|
669
679
|
chunk.status = "fulfilled";
|
|
670
680
|
chunk.value = value;
|
|
681
|
+
chunk.reason = null;
|
|
671
682
|
} catch (error) {
|
|
672
683
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
673
684
|
} finally {
|
|
@@ -679,6 +690,7 @@ function initializeModuleChunk(chunk) {
|
|
|
679
690
|
var value = requireModule(chunk.value);
|
|
680
691
|
chunk.status = "fulfilled";
|
|
681
692
|
chunk.value = value;
|
|
693
|
+
chunk.reason = null;
|
|
682
694
|
} catch (error) {
|
|
683
695
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
684
696
|
}
|
|
@@ -687,7 +699,11 @@ function reportGlobalError(response, error) {
|
|
|
687
699
|
response._closed = !0;
|
|
688
700
|
response._closedReason = error;
|
|
689
701
|
response._chunks.forEach(function (chunk) {
|
|
690
|
-
"pending" === chunk.status
|
|
702
|
+
"pending" === chunk.status
|
|
703
|
+
? triggerErrorOnChunk(chunk, error)
|
|
704
|
+
: "fulfilled" === chunk.status &&
|
|
705
|
+
null !== chunk.reason &&
|
|
706
|
+
chunk.reason.error(error);
|
|
691
707
|
});
|
|
692
708
|
}
|
|
693
709
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -745,6 +761,7 @@ function waitForReference(
|
|
|
745
761
|
((value = i.value),
|
|
746
762
|
(i.status = "fulfilled"),
|
|
747
763
|
(i.value = handler.value),
|
|
764
|
+
(i.reason = null),
|
|
748
765
|
null !== value && wakeChunk(value, handler.value)));
|
|
749
766
|
}
|
|
750
767
|
function reject(error) {
|
|
@@ -827,6 +844,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
827
844
|
((boundArgs = resolvedValue.value),
|
|
828
845
|
(resolvedValue.status = "fulfilled"),
|
|
829
846
|
(resolvedValue.value = handler.value),
|
|
847
|
+
(resolvedValue.reason = null),
|
|
830
848
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
831
849
|
},
|
|
832
850
|
function (error) {
|
|
@@ -942,7 +960,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
942
960
|
return getChunk(response, parentObject);
|
|
943
961
|
case "S":
|
|
944
962
|
return Symbol.for(value.slice(2));
|
|
945
|
-
case "
|
|
963
|
+
case "h":
|
|
946
964
|
return (
|
|
947
965
|
(value = value.slice(2)),
|
|
948
966
|
getOutlinedModel(
|
|
@@ -1091,7 +1109,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1091
1109
|
);
|
|
1092
1110
|
}
|
|
1093
1111
|
function startReadableStream(response, id, type) {
|
|
1094
|
-
var controller = null
|
|
1112
|
+
var controller = null,
|
|
1113
|
+
closed = !1;
|
|
1095
1114
|
type = new ReadableStream({
|
|
1096
1115
|
type: type,
|
|
1097
1116
|
start: function (c) {
|
|
@@ -1141,24 +1160,27 @@ function startReadableStream(response, id, type) {
|
|
|
1141
1160
|
}
|
|
1142
1161
|
},
|
|
1143
1162
|
close: function () {
|
|
1144
|
-
if (
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1163
|
+
if (!closed)
|
|
1164
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1165
|
+
else {
|
|
1166
|
+
var blockedChunk = previousBlockedChunk;
|
|
1167
|
+
previousBlockedChunk = null;
|
|
1168
|
+
blockedChunk.then(function () {
|
|
1169
|
+
return controller.close();
|
|
1170
|
+
});
|
|
1171
|
+
}
|
|
1152
1172
|
},
|
|
1153
1173
|
error: function (error) {
|
|
1154
|
-
if (
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1174
|
+
if (!closed)
|
|
1175
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1176
|
+
controller.error(error);
|
|
1177
|
+
else {
|
|
1178
|
+
var blockedChunk = previousBlockedChunk;
|
|
1179
|
+
previousBlockedChunk = null;
|
|
1180
|
+
blockedChunk.then(function () {
|
|
1181
|
+
return controller.error(error);
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1162
1184
|
}
|
|
1163
1185
|
});
|
|
1164
1186
|
}
|
|
@@ -1216,6 +1238,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1216
1238
|
rejectListeners = chunk.reason;
|
|
1217
1239
|
chunk.status = "fulfilled";
|
|
1218
1240
|
chunk.value = { done: !1, value: value };
|
|
1241
|
+
chunk.reason = null;
|
|
1219
1242
|
null !== resolveListeners &&
|
|
1220
1243
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1221
1244
|
}
|
|
@@ -1232,30 +1255,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1232
1255
|
nextWriteIndex++;
|
|
1233
1256
|
},
|
|
1234
1257
|
close: function (value) {
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1258
|
+
if (!closed)
|
|
1259
|
+
for (
|
|
1260
|
+
closed = !0,
|
|
1261
|
+
nextWriteIndex === buffer.length
|
|
1262
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1263
|
+
response,
|
|
1264
|
+
value,
|
|
1265
|
+
!0
|
|
1266
|
+
))
|
|
1267
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1268
|
+
nextWriteIndex++;
|
|
1269
|
+
nextWriteIndex < buffer.length;
|
|
1270
|
+
|
|
1271
|
+
)
|
|
1272
|
+
resolveIteratorResultChunk(
|
|
1273
|
+
buffer[nextWriteIndex++],
|
|
1274
|
+
'"$undefined"',
|
|
1240
1275
|
!0
|
|
1241
|
-
)
|
|
1242
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1243
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1244
|
-
resolveIteratorResultChunk(
|
|
1245
|
-
buffer[nextWriteIndex++],
|
|
1246
|
-
'"$undefined"',
|
|
1247
|
-
!0
|
|
1248
|
-
);
|
|
1276
|
+
);
|
|
1249
1277
|
},
|
|
1250
1278
|
error: function (error) {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1279
|
+
if (!closed)
|
|
1280
|
+
for (
|
|
1281
|
+
closed = !0,
|
|
1282
|
+
nextWriteIndex === buffer.length &&
|
|
1283
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1284
|
+
nextWriteIndex < buffer.length;
|
|
1256
1285
|
|
|
1257
|
-
|
|
1258
|
-
|
|
1286
|
+
)
|
|
1287
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1259
1288
|
}
|
|
1260
1289
|
}
|
|
1261
1290
|
);
|
|
@@ -535,13 +535,23 @@
|
|
|
535
535
|
pendingParts--;
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
+
parentReference = writtenObjects.get(value);
|
|
538
539
|
if ("function" === typeof value.then) {
|
|
540
|
+
if (void 0 !== parentReference)
|
|
541
|
+
if (modelRoot === value) modelRoot = null;
|
|
542
|
+
else return parentReference;
|
|
539
543
|
null === formData && (formData = new FormData());
|
|
540
544
|
pendingParts++;
|
|
541
545
|
var promiseId = nextPartId++;
|
|
546
|
+
key = "$@" + promiseId.toString(16);
|
|
547
|
+
writtenObjects.set(value, key);
|
|
542
548
|
value.then(function (partValue) {
|
|
543
549
|
try {
|
|
544
|
-
var
|
|
550
|
+
var previousReference = writtenObjects.get(partValue);
|
|
551
|
+
var _partJSON3 =
|
|
552
|
+
void 0 !== previousReference
|
|
553
|
+
? JSON.stringify(previousReference)
|
|
554
|
+
: serializeModel(partValue, promiseId);
|
|
545
555
|
partValue = formData;
|
|
546
556
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
547
557
|
pendingParts--;
|
|
@@ -550,9 +560,8 @@
|
|
|
550
560
|
reject(reason);
|
|
551
561
|
}
|
|
552
562
|
}, reject);
|
|
553
|
-
return
|
|
563
|
+
return key;
|
|
554
564
|
}
|
|
555
|
-
parentReference = writtenObjects.get(value);
|
|
556
565
|
if (void 0 !== parentReference)
|
|
557
566
|
if (modelRoot === value) modelRoot = null;
|
|
558
567
|
else return parentReference;
|
|
@@ -710,7 +719,7 @@
|
|
|
710
719
|
null === formData && (formData = new FormData()),
|
|
711
720
|
(parentReference = nextPartId++),
|
|
712
721
|
formData.set(formFieldPrefix + parentReference, key),
|
|
713
|
-
"$
|
|
722
|
+
"$h" + parentReference.toString(16)
|
|
714
723
|
);
|
|
715
724
|
if (
|
|
716
725
|
void 0 !== temporaryReferences &&
|
|
@@ -1241,6 +1250,7 @@
|
|
|
1241
1250
|
rejectListeners = chunk.reason;
|
|
1242
1251
|
chunk.status = "resolved_module";
|
|
1243
1252
|
chunk.value = value;
|
|
1253
|
+
chunk.reason = null;
|
|
1244
1254
|
null !== resolveListeners &&
|
|
1245
1255
|
(initializeModuleChunk(chunk),
|
|
1246
1256
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1270,6 +1280,7 @@
|
|
|
1270
1280
|
}
|
|
1271
1281
|
chunk.status = "fulfilled";
|
|
1272
1282
|
chunk.value = value;
|
|
1283
|
+
chunk.reason = null;
|
|
1273
1284
|
} catch (error) {
|
|
1274
1285
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1275
1286
|
} finally {
|
|
@@ -1281,6 +1292,7 @@
|
|
|
1281
1292
|
var value = requireModule(chunk.value);
|
|
1282
1293
|
chunk.status = "fulfilled";
|
|
1283
1294
|
chunk.value = value;
|
|
1295
|
+
chunk.reason = null;
|
|
1284
1296
|
} catch (error) {
|
|
1285
1297
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1286
1298
|
}
|
|
@@ -1289,7 +1301,11 @@
|
|
|
1289
1301
|
response._closed = !0;
|
|
1290
1302
|
response._closedReason = error;
|
|
1291
1303
|
response._chunks.forEach(function (chunk) {
|
|
1292
|
-
"pending" === chunk.status
|
|
1304
|
+
"pending" === chunk.status
|
|
1305
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1306
|
+
: "fulfilled" === chunk.status &&
|
|
1307
|
+
null !== chunk.reason &&
|
|
1308
|
+
chunk.reason.error(error);
|
|
1293
1309
|
});
|
|
1294
1310
|
}
|
|
1295
1311
|
function nullRefGetter() {
|
|
@@ -1376,6 +1392,7 @@
|
|
|
1376
1392
|
((value = i.value),
|
|
1377
1393
|
(i.status = "fulfilled"),
|
|
1378
1394
|
(i.value = handler.value),
|
|
1395
|
+
(i.reason = null),
|
|
1379
1396
|
null !== value && wakeChunk(value, handler.value)));
|
|
1380
1397
|
}
|
|
1381
1398
|
function reject(error) {
|
|
@@ -1496,6 +1513,7 @@
|
|
|
1496
1513
|
((boundArgs = resolvedValue.value),
|
|
1497
1514
|
(resolvedValue.status = "fulfilled"),
|
|
1498
1515
|
(resolvedValue.value = handler.value),
|
|
1516
|
+
(resolvedValue.reason = null),
|
|
1499
1517
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1500
1518
|
},
|
|
1501
1519
|
function (error) {
|
|
@@ -1648,7 +1666,7 @@
|
|
|
1648
1666
|
return getChunk(response, parentObject);
|
|
1649
1667
|
case "S":
|
|
1650
1668
|
return Symbol.for(value.slice(2));
|
|
1651
|
-
case "
|
|
1669
|
+
case "h":
|
|
1652
1670
|
return (
|
|
1653
1671
|
(value = value.slice(2)),
|
|
1654
1672
|
getOutlinedModel(
|
|
@@ -1883,7 +1901,8 @@
|
|
|
1883
1901
|
);
|
|
1884
1902
|
}
|
|
1885
1903
|
function startReadableStream(response, id, type) {
|
|
1886
|
-
var controller = null
|
|
1904
|
+
var controller = null,
|
|
1905
|
+
closed = !1;
|
|
1887
1906
|
type = new ReadableStream({
|
|
1888
1907
|
type: type,
|
|
1889
1908
|
start: function (c) {
|
|
@@ -1938,24 +1957,28 @@
|
|
|
1938
1957
|
}
|
|
1939
1958
|
},
|
|
1940
1959
|
close: function () {
|
|
1941
|
-
if (
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1960
|
+
if (!closed)
|
|
1961
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1962
|
+
controller.close();
|
|
1963
|
+
else {
|
|
1964
|
+
var blockedChunk = previousBlockedChunk;
|
|
1965
|
+
previousBlockedChunk = null;
|
|
1966
|
+
blockedChunk.then(function () {
|
|
1967
|
+
return controller.close();
|
|
1968
|
+
});
|
|
1969
|
+
}
|
|
1949
1970
|
},
|
|
1950
1971
|
error: function (error) {
|
|
1951
|
-
if (
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1972
|
+
if (!closed)
|
|
1973
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1974
|
+
controller.error(error);
|
|
1975
|
+
else {
|
|
1976
|
+
var blockedChunk = previousBlockedChunk;
|
|
1977
|
+
previousBlockedChunk = null;
|
|
1978
|
+
blockedChunk.then(function () {
|
|
1979
|
+
return controller.error(error);
|
|
1980
|
+
});
|
|
1981
|
+
}
|
|
1959
1982
|
}
|
|
1960
1983
|
});
|
|
1961
1984
|
}
|
|
@@ -2010,6 +2033,7 @@
|
|
|
2010
2033
|
rejectListeners = chunk.reason;
|
|
2011
2034
|
chunk.status = "fulfilled";
|
|
2012
2035
|
chunk.value = { done: !1, value: value };
|
|
2036
|
+
chunk.reason = null;
|
|
2013
2037
|
null !== resolveListeners &&
|
|
2014
2038
|
wakeChunkIfInitialized(
|
|
2015
2039
|
chunk,
|
|
@@ -2030,30 +2054,37 @@
|
|
|
2030
2054
|
nextWriteIndex++;
|
|
2031
2055
|
},
|
|
2032
2056
|
close: function (value) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2057
|
+
if (!closed)
|
|
2058
|
+
for (
|
|
2059
|
+
closed = !0,
|
|
2060
|
+
nextWriteIndex === buffer.length
|
|
2061
|
+
? (buffer[nextWriteIndex] =
|
|
2062
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
2063
|
+
: resolveIteratorResultChunk(
|
|
2064
|
+
buffer[nextWriteIndex],
|
|
2065
|
+
value,
|
|
2066
|
+
!0
|
|
2067
|
+
),
|
|
2068
|
+
nextWriteIndex++;
|
|
2069
|
+
nextWriteIndex < buffer.length;
|
|
2070
|
+
|
|
2071
|
+
)
|
|
2072
|
+
resolveIteratorResultChunk(
|
|
2073
|
+
buffer[nextWriteIndex++],
|
|
2074
|
+
'"$undefined"',
|
|
2038
2075
|
!0
|
|
2039
|
-
)
|
|
2040
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
2041
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
2042
|
-
resolveIteratorResultChunk(
|
|
2043
|
-
buffer[nextWriteIndex++],
|
|
2044
|
-
'"$undefined"',
|
|
2045
|
-
!0
|
|
2046
|
-
);
|
|
2076
|
+
);
|
|
2047
2077
|
},
|
|
2048
2078
|
error: function (error) {
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2079
|
+
if (!closed)
|
|
2080
|
+
for (
|
|
2081
|
+
closed = !0,
|
|
2082
|
+
nextWriteIndex === buffer.length &&
|
|
2083
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
2084
|
+
nextWriteIndex < buffer.length;
|
|
2054
2085
|
|
|
2055
|
-
|
|
2056
|
-
|
|
2086
|
+
)
|
|
2087
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
2057
2088
|
}
|
|
2058
2089
|
}
|
|
2059
2090
|
);
|