react-server-dom-parcel 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-parcel-client.browser.development.js +76 -45
- package/cjs/react-server-dom-parcel-client.browser.production.js +72 -43
- package/cjs/react-server-dom-parcel-client.edge.development.js +74 -43
- package/cjs/react-server-dom-parcel-client.edge.production.js +72 -43
- package/cjs/react-server-dom-parcel-client.node.development.js +74 -43
- package/cjs/react-server-dom-parcel-client.node.production.js +72 -43
- package/cjs/react-server-dom-parcel-server.browser.development.js +169 -179
- package/cjs/react-server-dom-parcel-server.browser.production.js +164 -173
- package/cjs/react-server-dom-parcel-server.edge.development.js +169 -179
- package/cjs/react-server-dom-parcel-server.edge.production.js +164 -173
- package/cjs/react-server-dom-parcel-server.node.development.js +172 -182
- package/cjs/react-server-dom-parcel-server.node.production.js +167 -176
- package/package.json +3 -3
|
@@ -439,13 +439,23 @@
|
|
|
439
439
|
pendingParts--;
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
+
parentReference = writtenObjects.get(value);
|
|
442
443
|
if ("function" === typeof value.then) {
|
|
444
|
+
if (void 0 !== parentReference)
|
|
445
|
+
if (modelRoot === value) modelRoot = null;
|
|
446
|
+
else return parentReference;
|
|
443
447
|
null === formData && (formData = new FormData());
|
|
444
448
|
pendingParts++;
|
|
445
449
|
var promiseId = nextPartId++;
|
|
450
|
+
key = "$@" + promiseId.toString(16);
|
|
451
|
+
writtenObjects.set(value, key);
|
|
446
452
|
value.then(function (partValue) {
|
|
447
453
|
try {
|
|
448
|
-
var
|
|
454
|
+
var previousReference = writtenObjects.get(partValue);
|
|
455
|
+
var _partJSON3 =
|
|
456
|
+
void 0 !== previousReference
|
|
457
|
+
? JSON.stringify(previousReference)
|
|
458
|
+
: serializeModel(partValue, promiseId);
|
|
449
459
|
partValue = formData;
|
|
450
460
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
451
461
|
pendingParts--;
|
|
@@ -454,9 +464,8 @@
|
|
|
454
464
|
reject(reason);
|
|
455
465
|
}
|
|
456
466
|
}, reject);
|
|
457
|
-
return
|
|
467
|
+
return key;
|
|
458
468
|
}
|
|
459
|
-
parentReference = writtenObjects.get(value);
|
|
460
469
|
if (void 0 !== parentReference)
|
|
461
470
|
if (modelRoot === value) modelRoot = null;
|
|
462
471
|
else return parentReference;
|
|
@@ -614,7 +623,7 @@
|
|
|
614
623
|
null === formData && (formData = new FormData()),
|
|
615
624
|
(parentReference = nextPartId++),
|
|
616
625
|
formData.set(formFieldPrefix + parentReference, key),
|
|
617
|
-
"$
|
|
626
|
+
"$h" + parentReference.toString(16)
|
|
618
627
|
);
|
|
619
628
|
if (
|
|
620
629
|
void 0 !== temporaryReferences &&
|
|
@@ -991,6 +1000,7 @@
|
|
|
991
1000
|
rejectListeners = chunk.reason;
|
|
992
1001
|
chunk.status = "resolved_module";
|
|
993
1002
|
chunk.value = value;
|
|
1003
|
+
chunk.reason = null;
|
|
994
1004
|
null !== resolveListeners &&
|
|
995
1005
|
(initializeModuleChunk(chunk),
|
|
996
1006
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1020,6 +1030,7 @@
|
|
|
1020
1030
|
}
|
|
1021
1031
|
chunk.status = "fulfilled";
|
|
1022
1032
|
chunk.value = value;
|
|
1033
|
+
chunk.reason = null;
|
|
1023
1034
|
} catch (error) {
|
|
1024
1035
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1025
1036
|
} finally {
|
|
@@ -1031,6 +1042,7 @@
|
|
|
1031
1042
|
var value = requireModule(chunk.value);
|
|
1032
1043
|
chunk.status = "fulfilled";
|
|
1033
1044
|
chunk.value = value;
|
|
1045
|
+
chunk.reason = null;
|
|
1034
1046
|
} catch (error) {
|
|
1035
1047
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1036
1048
|
}
|
|
@@ -1039,7 +1051,11 @@
|
|
|
1039
1051
|
response._closed = !0;
|
|
1040
1052
|
response._closedReason = error;
|
|
1041
1053
|
response._chunks.forEach(function (chunk) {
|
|
1042
|
-
"pending" === chunk.status
|
|
1054
|
+
"pending" === chunk.status
|
|
1055
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1056
|
+
: "fulfilled" === chunk.status &&
|
|
1057
|
+
null !== chunk.reason &&
|
|
1058
|
+
chunk.reason.error(error);
|
|
1043
1059
|
});
|
|
1044
1060
|
}
|
|
1045
1061
|
function nullRefGetter() {
|
|
@@ -1126,6 +1142,7 @@
|
|
|
1126
1142
|
((value = i.value),
|
|
1127
1143
|
(i.status = "fulfilled"),
|
|
1128
1144
|
(i.value = handler.value),
|
|
1145
|
+
(i.reason = null),
|
|
1129
1146
|
null !== value && wakeChunk(value, handler.value)));
|
|
1130
1147
|
}
|
|
1131
1148
|
function reject(error) {
|
|
@@ -1239,6 +1256,7 @@
|
|
|
1239
1256
|
((boundArgs = resolvedValue.value),
|
|
1240
1257
|
(resolvedValue.status = "fulfilled"),
|
|
1241
1258
|
(resolvedValue.value = handler.value),
|
|
1259
|
+
(resolvedValue.reason = null),
|
|
1242
1260
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1243
1261
|
},
|
|
1244
1262
|
function (error) {
|
|
@@ -1391,7 +1409,7 @@
|
|
|
1391
1409
|
return getChunk(response, parentObject);
|
|
1392
1410
|
case "S":
|
|
1393
1411
|
return Symbol.for(value.slice(2));
|
|
1394
|
-
case "
|
|
1412
|
+
case "h":
|
|
1395
1413
|
return (
|
|
1396
1414
|
(value = value.slice(2)),
|
|
1397
1415
|
getOutlinedModel(
|
|
@@ -1617,7 +1635,8 @@
|
|
|
1617
1635
|
);
|
|
1618
1636
|
}
|
|
1619
1637
|
function startReadableStream(response, id, type) {
|
|
1620
|
-
var controller = null
|
|
1638
|
+
var controller = null,
|
|
1639
|
+
closed = !1;
|
|
1621
1640
|
type = new ReadableStream({
|
|
1622
1641
|
type: type,
|
|
1623
1642
|
start: function (c) {
|
|
@@ -1672,24 +1691,28 @@
|
|
|
1672
1691
|
}
|
|
1673
1692
|
},
|
|
1674
1693
|
close: function () {
|
|
1675
|
-
if (
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1694
|
+
if (!closed)
|
|
1695
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1696
|
+
controller.close();
|
|
1697
|
+
else {
|
|
1698
|
+
var blockedChunk = previousBlockedChunk;
|
|
1699
|
+
previousBlockedChunk = null;
|
|
1700
|
+
blockedChunk.then(function () {
|
|
1701
|
+
return controller.close();
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1683
1704
|
},
|
|
1684
1705
|
error: function (error) {
|
|
1685
|
-
if (
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1706
|
+
if (!closed)
|
|
1707
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1708
|
+
controller.error(error);
|
|
1709
|
+
else {
|
|
1710
|
+
var blockedChunk = previousBlockedChunk;
|
|
1711
|
+
previousBlockedChunk = null;
|
|
1712
|
+
blockedChunk.then(function () {
|
|
1713
|
+
return controller.error(error);
|
|
1714
|
+
});
|
|
1715
|
+
}
|
|
1693
1716
|
}
|
|
1694
1717
|
});
|
|
1695
1718
|
}
|
|
@@ -1744,6 +1767,7 @@
|
|
|
1744
1767
|
rejectListeners = chunk.reason;
|
|
1745
1768
|
chunk.status = "fulfilled";
|
|
1746
1769
|
chunk.value = { done: !1, value: value };
|
|
1770
|
+
chunk.reason = null;
|
|
1747
1771
|
null !== resolveListeners &&
|
|
1748
1772
|
wakeChunkIfInitialized(
|
|
1749
1773
|
chunk,
|
|
@@ -1764,30 +1788,37 @@
|
|
|
1764
1788
|
nextWriteIndex++;
|
|
1765
1789
|
},
|
|
1766
1790
|
close: function (value) {
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1791
|
+
if (!closed)
|
|
1792
|
+
for (
|
|
1793
|
+
closed = !0,
|
|
1794
|
+
nextWriteIndex === buffer.length
|
|
1795
|
+
? (buffer[nextWriteIndex] =
|
|
1796
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
1797
|
+
: resolveIteratorResultChunk(
|
|
1798
|
+
buffer[nextWriteIndex],
|
|
1799
|
+
value,
|
|
1800
|
+
!0
|
|
1801
|
+
),
|
|
1802
|
+
nextWriteIndex++;
|
|
1803
|
+
nextWriteIndex < buffer.length;
|
|
1804
|
+
|
|
1805
|
+
)
|
|
1806
|
+
resolveIteratorResultChunk(
|
|
1807
|
+
buffer[nextWriteIndex++],
|
|
1808
|
+
'"$undefined"',
|
|
1772
1809
|
!0
|
|
1773
|
-
)
|
|
1774
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1775
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1776
|
-
resolveIteratorResultChunk(
|
|
1777
|
-
buffer[nextWriteIndex++],
|
|
1778
|
-
'"$undefined"',
|
|
1779
|
-
!0
|
|
1780
|
-
);
|
|
1810
|
+
);
|
|
1781
1811
|
},
|
|
1782
1812
|
error: function (error) {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1813
|
+
if (!closed)
|
|
1814
|
+
for (
|
|
1815
|
+
closed = !0,
|
|
1816
|
+
nextWriteIndex === buffer.length &&
|
|
1817
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1818
|
+
nextWriteIndex < buffer.length;
|
|
1788
1819
|
|
|
1789
|
-
|
|
1790
|
-
|
|
1820
|
+
)
|
|
1821
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1791
1822
|
}
|
|
1792
1823
|
}
|
|
1793
1824
|
);
|
|
@@ -2634,10 +2665,10 @@
|
|
|
2634
2665
|
return hook.checkDCE ? !0 : !1;
|
|
2635
2666
|
})({
|
|
2636
2667
|
bundleType: 1,
|
|
2637
|
-
version: "19.1.
|
|
2668
|
+
version: "19.1.3",
|
|
2638
2669
|
rendererPackageName: "react-server-dom-parcel",
|
|
2639
2670
|
currentDispatcherRef: ReactSharedInternals,
|
|
2640
|
-
reconcilerVersion: "19.1.
|
|
2671
|
+
reconcilerVersion: "19.1.3",
|
|
2641
2672
|
getCurrentComponentInfo: function () {
|
|
2642
2673
|
return currentOwnerInDEV;
|
|
2643
2674
|
}
|
|
@@ -223,13 +223,23 @@ function processReply(
|
|
|
223
223
|
pendingParts--;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
+
parentReference = writtenObjects.get(value);
|
|
226
227
|
if ("function" === typeof value.then) {
|
|
228
|
+
if (void 0 !== parentReference)
|
|
229
|
+
if (modelRoot === value) modelRoot = null;
|
|
230
|
+
else return parentReference;
|
|
227
231
|
null === formData && (formData = new FormData());
|
|
228
232
|
pendingParts++;
|
|
229
233
|
var promiseId = nextPartId++;
|
|
234
|
+
key = "$@" + promiseId.toString(16);
|
|
235
|
+
writtenObjects.set(value, key);
|
|
230
236
|
value.then(function (partValue) {
|
|
231
237
|
try {
|
|
232
|
-
var
|
|
238
|
+
var previousReference = writtenObjects.get(partValue);
|
|
239
|
+
var partJSON$28 =
|
|
240
|
+
void 0 !== previousReference
|
|
241
|
+
? JSON.stringify(previousReference)
|
|
242
|
+
: serializeModel(partValue, promiseId);
|
|
233
243
|
partValue = formData;
|
|
234
244
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
235
245
|
pendingParts--;
|
|
@@ -238,9 +248,8 @@ function processReply(
|
|
|
238
248
|
reject(reason);
|
|
239
249
|
}
|
|
240
250
|
}, reject);
|
|
241
|
-
return
|
|
251
|
+
return key;
|
|
242
252
|
}
|
|
243
|
-
parentReference = writtenObjects.get(value);
|
|
244
253
|
if (void 0 !== parentReference)
|
|
245
254
|
if (modelRoot === value) modelRoot = null;
|
|
246
255
|
else return parentReference;
|
|
@@ -364,7 +373,7 @@ function processReply(
|
|
|
364
373
|
null === formData && (formData = new FormData()),
|
|
365
374
|
(parentReference = nextPartId++),
|
|
366
375
|
formData.set(formFieldPrefix + parentReference, key),
|
|
367
|
-
"$
|
|
376
|
+
"$h" + parentReference.toString(16)
|
|
368
377
|
);
|
|
369
378
|
if (
|
|
370
379
|
void 0 !== temporaryReferences &&
|
|
@@ -578,6 +587,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
578
587
|
rejectListeners = chunk.reason;
|
|
579
588
|
chunk.status = "resolved_module";
|
|
580
589
|
chunk.value = value;
|
|
590
|
+
chunk.reason = null;
|
|
581
591
|
null !== resolveListeners &&
|
|
582
592
|
(initializeModuleChunk(chunk),
|
|
583
593
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -608,6 +618,7 @@ function initializeModelChunk(chunk) {
|
|
|
608
618
|
}
|
|
609
619
|
chunk.status = "fulfilled";
|
|
610
620
|
chunk.value = value;
|
|
621
|
+
chunk.reason = null;
|
|
611
622
|
} catch (error) {
|
|
612
623
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
613
624
|
} finally {
|
|
@@ -619,6 +630,7 @@ function initializeModuleChunk(chunk) {
|
|
|
619
630
|
var value = requireModule(chunk.value);
|
|
620
631
|
chunk.status = "fulfilled";
|
|
621
632
|
chunk.value = value;
|
|
633
|
+
chunk.reason = null;
|
|
622
634
|
} catch (error) {
|
|
623
635
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
624
636
|
}
|
|
@@ -627,7 +639,11 @@ function reportGlobalError(response, error) {
|
|
|
627
639
|
response._closed = !0;
|
|
628
640
|
response._closedReason = error;
|
|
629
641
|
response._chunks.forEach(function (chunk) {
|
|
630
|
-
"pending" === chunk.status
|
|
642
|
+
"pending" === chunk.status
|
|
643
|
+
? triggerErrorOnChunk(chunk, error)
|
|
644
|
+
: "fulfilled" === chunk.status &&
|
|
645
|
+
null !== chunk.reason &&
|
|
646
|
+
chunk.reason.error(error);
|
|
631
647
|
});
|
|
632
648
|
}
|
|
633
649
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -685,6 +701,7 @@ function waitForReference(
|
|
|
685
701
|
((value = i.value),
|
|
686
702
|
(i.status = "fulfilled"),
|
|
687
703
|
(i.value = handler.value),
|
|
704
|
+
(i.reason = null),
|
|
688
705
|
null !== value && wakeChunk(value, handler.value)));
|
|
689
706
|
}
|
|
690
707
|
function reject(error) {
|
|
@@ -767,6 +784,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
767
784
|
((boundArgs = resolvedValue.value),
|
|
768
785
|
(resolvedValue.status = "fulfilled"),
|
|
769
786
|
(resolvedValue.value = handler.value),
|
|
787
|
+
(resolvedValue.reason = null),
|
|
770
788
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
771
789
|
},
|
|
772
790
|
function (error) {
|
|
@@ -882,7 +900,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
882
900
|
return getChunk(response, parentObject);
|
|
883
901
|
case "S":
|
|
884
902
|
return Symbol.for(value.slice(2));
|
|
885
|
-
case "
|
|
903
|
+
case "h":
|
|
886
904
|
return (
|
|
887
905
|
(value = value.slice(2)),
|
|
888
906
|
getOutlinedModel(
|
|
@@ -1030,7 +1048,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1030
1048
|
);
|
|
1031
1049
|
}
|
|
1032
1050
|
function startReadableStream(response, id, type) {
|
|
1033
|
-
var controller = null
|
|
1051
|
+
var controller = null,
|
|
1052
|
+
closed = !1;
|
|
1034
1053
|
type = new ReadableStream({
|
|
1035
1054
|
type: type,
|
|
1036
1055
|
start: function (c) {
|
|
@@ -1080,24 +1099,27 @@ function startReadableStream(response, id, type) {
|
|
|
1080
1099
|
}
|
|
1081
1100
|
},
|
|
1082
1101
|
close: function () {
|
|
1083
|
-
if (
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1102
|
+
if (!closed)
|
|
1103
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1104
|
+
else {
|
|
1105
|
+
var blockedChunk = previousBlockedChunk;
|
|
1106
|
+
previousBlockedChunk = null;
|
|
1107
|
+
blockedChunk.then(function () {
|
|
1108
|
+
return controller.close();
|
|
1109
|
+
});
|
|
1110
|
+
}
|
|
1091
1111
|
},
|
|
1092
1112
|
error: function (error) {
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1113
|
+
if (!closed)
|
|
1114
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1115
|
+
controller.error(error);
|
|
1116
|
+
else {
|
|
1117
|
+
var blockedChunk = previousBlockedChunk;
|
|
1118
|
+
previousBlockedChunk = null;
|
|
1119
|
+
blockedChunk.then(function () {
|
|
1120
|
+
return controller.error(error);
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1101
1123
|
}
|
|
1102
1124
|
});
|
|
1103
1125
|
}
|
|
@@ -1155,6 +1177,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1155
1177
|
rejectListeners = chunk.reason;
|
|
1156
1178
|
chunk.status = "fulfilled";
|
|
1157
1179
|
chunk.value = { done: !1, value: value };
|
|
1180
|
+
chunk.reason = null;
|
|
1158
1181
|
null !== resolveListeners &&
|
|
1159
1182
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1160
1183
|
}
|
|
@@ -1171,30 +1194,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1171
1194
|
nextWriteIndex++;
|
|
1172
1195
|
},
|
|
1173
1196
|
close: function (value) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1197
|
+
if (!closed)
|
|
1198
|
+
for (
|
|
1199
|
+
closed = !0,
|
|
1200
|
+
nextWriteIndex === buffer.length
|
|
1201
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1202
|
+
response,
|
|
1203
|
+
value,
|
|
1204
|
+
!0
|
|
1205
|
+
))
|
|
1206
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1207
|
+
nextWriteIndex++;
|
|
1208
|
+
nextWriteIndex < buffer.length;
|
|
1209
|
+
|
|
1210
|
+
)
|
|
1211
|
+
resolveIteratorResultChunk(
|
|
1212
|
+
buffer[nextWriteIndex++],
|
|
1213
|
+
'"$undefined"',
|
|
1179
1214
|
!0
|
|
1180
|
-
)
|
|
1181
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1182
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1183
|
-
resolveIteratorResultChunk(
|
|
1184
|
-
buffer[nextWriteIndex++],
|
|
1185
|
-
'"$undefined"',
|
|
1186
|
-
!0
|
|
1187
|
-
);
|
|
1215
|
+
);
|
|
1188
1216
|
},
|
|
1189
1217
|
error: function (error) {
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1218
|
+
if (!closed)
|
|
1219
|
+
for (
|
|
1220
|
+
closed = !0,
|
|
1221
|
+
nextWriteIndex === buffer.length &&
|
|
1222
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1223
|
+
nextWriteIndex < buffer.length;
|
|
1195
1224
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1225
|
+
)
|
|
1226
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1198
1227
|
}
|
|
1199
1228
|
}
|
|
1200
1229
|
);
|
|
@@ -449,13 +449,23 @@
|
|
|
449
449
|
pendingParts--;
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
+
parentReference = writtenObjects.get(value);
|
|
452
453
|
if ("function" === typeof value.then) {
|
|
454
|
+
if (void 0 !== parentReference)
|
|
455
|
+
if (modelRoot === value) modelRoot = null;
|
|
456
|
+
else return parentReference;
|
|
453
457
|
null === formData && (formData = new FormData());
|
|
454
458
|
pendingParts++;
|
|
455
459
|
var promiseId = nextPartId++;
|
|
460
|
+
key = "$@" + promiseId.toString(16);
|
|
461
|
+
writtenObjects.set(value, key);
|
|
456
462
|
value.then(function (partValue) {
|
|
457
463
|
try {
|
|
458
|
-
var
|
|
464
|
+
var previousReference = writtenObjects.get(partValue);
|
|
465
|
+
var _partJSON3 =
|
|
466
|
+
void 0 !== previousReference
|
|
467
|
+
? JSON.stringify(previousReference)
|
|
468
|
+
: serializeModel(partValue, promiseId);
|
|
459
469
|
partValue = formData;
|
|
460
470
|
partValue.append(formFieldPrefix + promiseId, _partJSON3);
|
|
461
471
|
pendingParts--;
|
|
@@ -464,9 +474,8 @@
|
|
|
464
474
|
reject(reason);
|
|
465
475
|
}
|
|
466
476
|
}, reject);
|
|
467
|
-
return
|
|
477
|
+
return key;
|
|
468
478
|
}
|
|
469
|
-
parentReference = writtenObjects.get(value);
|
|
470
479
|
if (void 0 !== parentReference)
|
|
471
480
|
if (modelRoot === value) modelRoot = null;
|
|
472
481
|
else return parentReference;
|
|
@@ -624,7 +633,7 @@
|
|
|
624
633
|
null === formData && (formData = new FormData()),
|
|
625
634
|
(parentReference = nextPartId++),
|
|
626
635
|
formData.set(formFieldPrefix + parentReference, key),
|
|
627
|
-
"$
|
|
636
|
+
"$h" + parentReference.toString(16)
|
|
628
637
|
);
|
|
629
638
|
if (
|
|
630
639
|
void 0 !== temporaryReferences &&
|
|
@@ -1155,6 +1164,7 @@
|
|
|
1155
1164
|
rejectListeners = chunk.reason;
|
|
1156
1165
|
chunk.status = "resolved_module";
|
|
1157
1166
|
chunk.value = value;
|
|
1167
|
+
chunk.reason = null;
|
|
1158
1168
|
null !== resolveListeners &&
|
|
1159
1169
|
(initializeModuleChunk(chunk),
|
|
1160
1170
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -1184,6 +1194,7 @@
|
|
|
1184
1194
|
}
|
|
1185
1195
|
chunk.status = "fulfilled";
|
|
1186
1196
|
chunk.value = value;
|
|
1197
|
+
chunk.reason = null;
|
|
1187
1198
|
} catch (error) {
|
|
1188
1199
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1189
1200
|
} finally {
|
|
@@ -1195,6 +1206,7 @@
|
|
|
1195
1206
|
var value = requireModule(chunk.value);
|
|
1196
1207
|
chunk.status = "fulfilled";
|
|
1197
1208
|
chunk.value = value;
|
|
1209
|
+
chunk.reason = null;
|
|
1198
1210
|
} catch (error) {
|
|
1199
1211
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
1200
1212
|
}
|
|
@@ -1203,7 +1215,11 @@
|
|
|
1203
1215
|
response._closed = !0;
|
|
1204
1216
|
response._closedReason = error;
|
|
1205
1217
|
response._chunks.forEach(function (chunk) {
|
|
1206
|
-
"pending" === chunk.status
|
|
1218
|
+
"pending" === chunk.status
|
|
1219
|
+
? triggerErrorOnChunk(chunk, error)
|
|
1220
|
+
: "fulfilled" === chunk.status &&
|
|
1221
|
+
null !== chunk.reason &&
|
|
1222
|
+
chunk.reason.error(error);
|
|
1207
1223
|
});
|
|
1208
1224
|
}
|
|
1209
1225
|
function nullRefGetter() {
|
|
@@ -1290,6 +1306,7 @@
|
|
|
1290
1306
|
((value = i.value),
|
|
1291
1307
|
(i.status = "fulfilled"),
|
|
1292
1308
|
(i.value = handler.value),
|
|
1309
|
+
(i.reason = null),
|
|
1293
1310
|
null !== value && wakeChunk(value, handler.value)));
|
|
1294
1311
|
}
|
|
1295
1312
|
function reject(error) {
|
|
@@ -1410,6 +1427,7 @@
|
|
|
1410
1427
|
((boundArgs = resolvedValue.value),
|
|
1411
1428
|
(resolvedValue.status = "fulfilled"),
|
|
1412
1429
|
(resolvedValue.value = handler.value),
|
|
1430
|
+
(resolvedValue.reason = null),
|
|
1413
1431
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1414
1432
|
},
|
|
1415
1433
|
function (error) {
|
|
@@ -1562,7 +1580,7 @@
|
|
|
1562
1580
|
return getChunk(response, parentObject);
|
|
1563
1581
|
case "S":
|
|
1564
1582
|
return Symbol.for(value.slice(2));
|
|
1565
|
-
case "
|
|
1583
|
+
case "h":
|
|
1566
1584
|
return (
|
|
1567
1585
|
(value = value.slice(2)),
|
|
1568
1586
|
getOutlinedModel(
|
|
@@ -1793,7 +1811,8 @@
|
|
|
1793
1811
|
);
|
|
1794
1812
|
}
|
|
1795
1813
|
function startReadableStream(response, id, type) {
|
|
1796
|
-
var controller = null
|
|
1814
|
+
var controller = null,
|
|
1815
|
+
closed = !1;
|
|
1797
1816
|
type = new ReadableStream({
|
|
1798
1817
|
type: type,
|
|
1799
1818
|
start: function (c) {
|
|
@@ -1848,24 +1867,28 @@
|
|
|
1848
1867
|
}
|
|
1849
1868
|
},
|
|
1850
1869
|
close: function () {
|
|
1851
|
-
if (
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1870
|
+
if (!closed)
|
|
1871
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1872
|
+
controller.close();
|
|
1873
|
+
else {
|
|
1874
|
+
var blockedChunk = previousBlockedChunk;
|
|
1875
|
+
previousBlockedChunk = null;
|
|
1876
|
+
blockedChunk.then(function () {
|
|
1877
|
+
return controller.close();
|
|
1878
|
+
});
|
|
1879
|
+
}
|
|
1859
1880
|
},
|
|
1860
1881
|
error: function (error) {
|
|
1861
|
-
if (
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1882
|
+
if (!closed)
|
|
1883
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1884
|
+
controller.error(error);
|
|
1885
|
+
else {
|
|
1886
|
+
var blockedChunk = previousBlockedChunk;
|
|
1887
|
+
previousBlockedChunk = null;
|
|
1888
|
+
blockedChunk.then(function () {
|
|
1889
|
+
return controller.error(error);
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1869
1892
|
}
|
|
1870
1893
|
});
|
|
1871
1894
|
}
|
|
@@ -1920,6 +1943,7 @@
|
|
|
1920
1943
|
rejectListeners = chunk.reason;
|
|
1921
1944
|
chunk.status = "fulfilled";
|
|
1922
1945
|
chunk.value = { done: !1, value: value };
|
|
1946
|
+
chunk.reason = null;
|
|
1923
1947
|
null !== resolveListeners &&
|
|
1924
1948
|
wakeChunkIfInitialized(
|
|
1925
1949
|
chunk,
|
|
@@ -1940,30 +1964,37 @@
|
|
|
1940
1964
|
nextWriteIndex++;
|
|
1941
1965
|
},
|
|
1942
1966
|
close: function (value) {
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1967
|
+
if (!closed)
|
|
1968
|
+
for (
|
|
1969
|
+
closed = !0,
|
|
1970
|
+
nextWriteIndex === buffer.length
|
|
1971
|
+
? (buffer[nextWriteIndex] =
|
|
1972
|
+
createResolvedIteratorResultChunk(response, value, !0))
|
|
1973
|
+
: resolveIteratorResultChunk(
|
|
1974
|
+
buffer[nextWriteIndex],
|
|
1975
|
+
value,
|
|
1976
|
+
!0
|
|
1977
|
+
),
|
|
1978
|
+
nextWriteIndex++;
|
|
1979
|
+
nextWriteIndex < buffer.length;
|
|
1980
|
+
|
|
1981
|
+
)
|
|
1982
|
+
resolveIteratorResultChunk(
|
|
1983
|
+
buffer[nextWriteIndex++],
|
|
1984
|
+
'"$undefined"',
|
|
1948
1985
|
!0
|
|
1949
|
-
)
|
|
1950
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1951
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1952
|
-
resolveIteratorResultChunk(
|
|
1953
|
-
buffer[nextWriteIndex++],
|
|
1954
|
-
'"$undefined"',
|
|
1955
|
-
!0
|
|
1956
|
-
);
|
|
1986
|
+
);
|
|
1957
1987
|
},
|
|
1958
1988
|
error: function (error) {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1989
|
+
if (!closed)
|
|
1990
|
+
for (
|
|
1991
|
+
closed = !0,
|
|
1992
|
+
nextWriteIndex === buffer.length &&
|
|
1993
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1994
|
+
nextWriteIndex < buffer.length;
|
|
1964
1995
|
|
|
1965
|
-
|
|
1966
|
-
|
|
1996
|
+
)
|
|
1997
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1967
1998
|
}
|
|
1968
1999
|
}
|
|
1969
2000
|
);
|