react-server-dom-parcel 19.1.2 → 19.1.4
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 +170 -179
- package/cjs/react-server-dom-parcel-server.browser.production.js +165 -173
- package/cjs/react-server-dom-parcel-server.edge.development.js +170 -179
- package/cjs/react-server-dom-parcel-server.edge.production.js +165 -173
- package/cjs/react-server-dom-parcel-server.node.development.js +173 -182
- package/cjs/react-server-dom-parcel-server.node.production.js +168 -176
- package/package.json +3 -3
|
@@ -233,13 +233,23 @@ function processReply(
|
|
|
233
233
|
pendingParts--;
|
|
234
234
|
}
|
|
235
235
|
}
|
|
236
|
+
parentReference = writtenObjects.get(value);
|
|
236
237
|
if ("function" === typeof value.then) {
|
|
238
|
+
if (void 0 !== parentReference)
|
|
239
|
+
if (modelRoot === value) modelRoot = null;
|
|
240
|
+
else return parentReference;
|
|
237
241
|
null === formData && (formData = new FormData());
|
|
238
242
|
pendingParts++;
|
|
239
243
|
var promiseId = nextPartId++;
|
|
244
|
+
key = "$@" + promiseId.toString(16);
|
|
245
|
+
writtenObjects.set(value, key);
|
|
240
246
|
value.then(function (partValue) {
|
|
241
247
|
try {
|
|
242
|
-
var
|
|
248
|
+
var previousReference = writtenObjects.get(partValue);
|
|
249
|
+
var partJSON$28 =
|
|
250
|
+
void 0 !== previousReference
|
|
251
|
+
? JSON.stringify(previousReference)
|
|
252
|
+
: serializeModel(partValue, promiseId);
|
|
243
253
|
partValue = formData;
|
|
244
254
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
245
255
|
pendingParts--;
|
|
@@ -248,9 +258,8 @@ function processReply(
|
|
|
248
258
|
reject(reason);
|
|
249
259
|
}
|
|
250
260
|
}, reject);
|
|
251
|
-
return
|
|
261
|
+
return key;
|
|
252
262
|
}
|
|
253
|
-
parentReference = writtenObjects.get(value);
|
|
254
263
|
if (void 0 !== parentReference)
|
|
255
264
|
if (modelRoot === value) modelRoot = null;
|
|
256
265
|
else return parentReference;
|
|
@@ -374,7 +383,7 @@ function processReply(
|
|
|
374
383
|
null === formData && (formData = new FormData()),
|
|
375
384
|
(parentReference = nextPartId++),
|
|
376
385
|
formData.set(formFieldPrefix + parentReference, key),
|
|
377
|
-
"$
|
|
386
|
+
"$h" + parentReference.toString(16)
|
|
378
387
|
);
|
|
379
388
|
if (
|
|
380
389
|
void 0 !== temporaryReferences &&
|
|
@@ -729,6 +738,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
729
738
|
rejectListeners = chunk.reason;
|
|
730
739
|
chunk.status = "resolved_module";
|
|
731
740
|
chunk.value = value;
|
|
741
|
+
chunk.reason = null;
|
|
732
742
|
null !== resolveListeners &&
|
|
733
743
|
(initializeModuleChunk(chunk),
|
|
734
744
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -759,6 +769,7 @@ function initializeModelChunk(chunk) {
|
|
|
759
769
|
}
|
|
760
770
|
chunk.status = "fulfilled";
|
|
761
771
|
chunk.value = value;
|
|
772
|
+
chunk.reason = null;
|
|
762
773
|
} catch (error) {
|
|
763
774
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
764
775
|
} finally {
|
|
@@ -770,6 +781,7 @@ function initializeModuleChunk(chunk) {
|
|
|
770
781
|
var value = requireModule(chunk.value);
|
|
771
782
|
chunk.status = "fulfilled";
|
|
772
783
|
chunk.value = value;
|
|
784
|
+
chunk.reason = null;
|
|
773
785
|
} catch (error) {
|
|
774
786
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
775
787
|
}
|
|
@@ -778,7 +790,11 @@ function reportGlobalError(response, error) {
|
|
|
778
790
|
response._closed = !0;
|
|
779
791
|
response._closedReason = error;
|
|
780
792
|
response._chunks.forEach(function (chunk) {
|
|
781
|
-
"pending" === chunk.status
|
|
793
|
+
"pending" === chunk.status
|
|
794
|
+
? triggerErrorOnChunk(chunk, error)
|
|
795
|
+
: "fulfilled" === chunk.status &&
|
|
796
|
+
null !== chunk.reason &&
|
|
797
|
+
chunk.reason.error(error);
|
|
782
798
|
});
|
|
783
799
|
}
|
|
784
800
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -836,6 +852,7 @@ function waitForReference(
|
|
|
836
852
|
((value = i.value),
|
|
837
853
|
(i.status = "fulfilled"),
|
|
838
854
|
(i.value = handler.value),
|
|
855
|
+
(i.reason = null),
|
|
839
856
|
null !== value && wakeChunk(value, handler.value)));
|
|
840
857
|
}
|
|
841
858
|
function reject(error) {
|
|
@@ -933,6 +950,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
933
950
|
((boundArgs = resolvedValue.value),
|
|
934
951
|
(resolvedValue.status = "fulfilled"),
|
|
935
952
|
(resolvedValue.value = handler.value),
|
|
953
|
+
(resolvedValue.reason = null),
|
|
936
954
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
937
955
|
},
|
|
938
956
|
function (error) {
|
|
@@ -1048,7 +1066,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
1048
1066
|
return getChunk(response, parentObject);
|
|
1049
1067
|
case "S":
|
|
1050
1068
|
return Symbol.for(value.slice(2));
|
|
1051
|
-
case "
|
|
1069
|
+
case "h":
|
|
1052
1070
|
return (
|
|
1053
1071
|
(value = value.slice(2)),
|
|
1054
1072
|
getOutlinedModel(
|
|
@@ -1206,7 +1224,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1206
1224
|
);
|
|
1207
1225
|
}
|
|
1208
1226
|
function startReadableStream(response, id, type) {
|
|
1209
|
-
var controller = null
|
|
1227
|
+
var controller = null,
|
|
1228
|
+
closed = !1;
|
|
1210
1229
|
type = new ReadableStream({
|
|
1211
1230
|
type: type,
|
|
1212
1231
|
start: function (c) {
|
|
@@ -1256,24 +1275,27 @@ function startReadableStream(response, id, type) {
|
|
|
1256
1275
|
}
|
|
1257
1276
|
},
|
|
1258
1277
|
close: function () {
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1278
|
+
if (!closed)
|
|
1279
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1280
|
+
else {
|
|
1281
|
+
var blockedChunk = previousBlockedChunk;
|
|
1282
|
+
previousBlockedChunk = null;
|
|
1283
|
+
blockedChunk.then(function () {
|
|
1284
|
+
return controller.close();
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1267
1287
|
},
|
|
1268
1288
|
error: function (error) {
|
|
1269
|
-
if (
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1289
|
+
if (!closed)
|
|
1290
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1291
|
+
controller.error(error);
|
|
1292
|
+
else {
|
|
1293
|
+
var blockedChunk = previousBlockedChunk;
|
|
1294
|
+
previousBlockedChunk = null;
|
|
1295
|
+
blockedChunk.then(function () {
|
|
1296
|
+
return controller.error(error);
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1277
1299
|
}
|
|
1278
1300
|
});
|
|
1279
1301
|
}
|
|
@@ -1331,6 +1353,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1331
1353
|
rejectListeners = chunk.reason;
|
|
1332
1354
|
chunk.status = "fulfilled";
|
|
1333
1355
|
chunk.value = { done: !1, value: value };
|
|
1356
|
+
chunk.reason = null;
|
|
1334
1357
|
null !== resolveListeners &&
|
|
1335
1358
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1336
1359
|
}
|
|
@@ -1347,30 +1370,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1347
1370
|
nextWriteIndex++;
|
|
1348
1371
|
},
|
|
1349
1372
|
close: function (value) {
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1373
|
+
if (!closed)
|
|
1374
|
+
for (
|
|
1375
|
+
closed = !0,
|
|
1376
|
+
nextWriteIndex === buffer.length
|
|
1377
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1378
|
+
response,
|
|
1379
|
+
value,
|
|
1380
|
+
!0
|
|
1381
|
+
))
|
|
1382
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1383
|
+
nextWriteIndex++;
|
|
1384
|
+
nextWriteIndex < buffer.length;
|
|
1385
|
+
|
|
1386
|
+
)
|
|
1387
|
+
resolveIteratorResultChunk(
|
|
1388
|
+
buffer[nextWriteIndex++],
|
|
1389
|
+
'"$undefined"',
|
|
1355
1390
|
!0
|
|
1356
|
-
)
|
|
1357
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1358
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1359
|
-
resolveIteratorResultChunk(
|
|
1360
|
-
buffer[nextWriteIndex++],
|
|
1361
|
-
'"$undefined"',
|
|
1362
|
-
!0
|
|
1363
|
-
);
|
|
1391
|
+
);
|
|
1364
1392
|
},
|
|
1365
1393
|
error: function (error) {
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1394
|
+
if (!closed)
|
|
1395
|
+
for (
|
|
1396
|
+
closed = !0,
|
|
1397
|
+
nextWriteIndex === buffer.length &&
|
|
1398
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1399
|
+
nextWriteIndex < buffer.length;
|
|
1371
1400
|
|
|
1372
|
-
|
|
1373
|
-
|
|
1401
|
+
)
|
|
1402
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1374
1403
|
}
|
|
1375
1404
|
}
|
|
1376
1405
|
);
|
|
@@ -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
|
);
|
|
@@ -234,13 +234,23 @@ function processReply(
|
|
|
234
234
|
pendingParts--;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
+
parentReference = writtenObjects.get(value);
|
|
237
238
|
if ("function" === typeof value.then) {
|
|
239
|
+
if (void 0 !== parentReference)
|
|
240
|
+
if (modelRoot === value) modelRoot = null;
|
|
241
|
+
else return parentReference;
|
|
238
242
|
null === formData && (formData = new FormData());
|
|
239
243
|
pendingParts++;
|
|
240
244
|
var promiseId = nextPartId++;
|
|
245
|
+
key = "$@" + promiseId.toString(16);
|
|
246
|
+
writtenObjects.set(value, key);
|
|
241
247
|
value.then(function (partValue) {
|
|
242
248
|
try {
|
|
243
|
-
var
|
|
249
|
+
var previousReference = writtenObjects.get(partValue);
|
|
250
|
+
var partJSON$28 =
|
|
251
|
+
void 0 !== previousReference
|
|
252
|
+
? JSON.stringify(previousReference)
|
|
253
|
+
: serializeModel(partValue, promiseId);
|
|
244
254
|
partValue = formData;
|
|
245
255
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
246
256
|
pendingParts--;
|
|
@@ -249,9 +259,8 @@ function processReply(
|
|
|
249
259
|
reject(reason);
|
|
250
260
|
}
|
|
251
261
|
}, reject);
|
|
252
|
-
return
|
|
262
|
+
return key;
|
|
253
263
|
}
|
|
254
|
-
parentReference = writtenObjects.get(value);
|
|
255
264
|
if (void 0 !== parentReference)
|
|
256
265
|
if (modelRoot === value) modelRoot = null;
|
|
257
266
|
else return parentReference;
|
|
@@ -375,7 +384,7 @@ function processReply(
|
|
|
375
384
|
null === formData && (formData = new FormData()),
|
|
376
385
|
(parentReference = nextPartId++),
|
|
377
386
|
formData.set(formFieldPrefix + parentReference, key),
|
|
378
|
-
"$
|
|
387
|
+
"$h" + parentReference.toString(16)
|
|
379
388
|
);
|
|
380
389
|
if (
|
|
381
390
|
void 0 !== temporaryReferences &&
|
|
@@ -730,6 +739,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
730
739
|
rejectListeners = chunk.reason;
|
|
731
740
|
chunk.status = "resolved_module";
|
|
732
741
|
chunk.value = value;
|
|
742
|
+
chunk.reason = null;
|
|
733
743
|
null !== resolveListeners &&
|
|
734
744
|
(initializeModuleChunk(chunk),
|
|
735
745
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -760,6 +770,7 @@ function initializeModelChunk(chunk) {
|
|
|
760
770
|
}
|
|
761
771
|
chunk.status = "fulfilled";
|
|
762
772
|
chunk.value = value;
|
|
773
|
+
chunk.reason = null;
|
|
763
774
|
} catch (error) {
|
|
764
775
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
765
776
|
} finally {
|
|
@@ -771,6 +782,7 @@ function initializeModuleChunk(chunk) {
|
|
|
771
782
|
var value = requireModule(chunk.value);
|
|
772
783
|
chunk.status = "fulfilled";
|
|
773
784
|
chunk.value = value;
|
|
785
|
+
chunk.reason = null;
|
|
774
786
|
} catch (error) {
|
|
775
787
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
776
788
|
}
|
|
@@ -779,7 +791,11 @@ function reportGlobalError(response, error) {
|
|
|
779
791
|
response._closed = !0;
|
|
780
792
|
response._closedReason = error;
|
|
781
793
|
response._chunks.forEach(function (chunk) {
|
|
782
|
-
"pending" === chunk.status
|
|
794
|
+
"pending" === chunk.status
|
|
795
|
+
? triggerErrorOnChunk(chunk, error)
|
|
796
|
+
: "fulfilled" === chunk.status &&
|
|
797
|
+
null !== chunk.reason &&
|
|
798
|
+
chunk.reason.error(error);
|
|
783
799
|
});
|
|
784
800
|
}
|
|
785
801
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -837,6 +853,7 @@ function waitForReference(
|
|
|
837
853
|
((value = i.value),
|
|
838
854
|
(i.status = "fulfilled"),
|
|
839
855
|
(i.value = handler.value),
|
|
856
|
+
(i.reason = null),
|
|
840
857
|
null !== value && wakeChunk(value, handler.value)));
|
|
841
858
|
}
|
|
842
859
|
function reject(error) {
|
|
@@ -934,6 +951,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
934
951
|
((boundArgs = resolvedValue.value),
|
|
935
952
|
(resolvedValue.status = "fulfilled"),
|
|
936
953
|
(resolvedValue.value = handler.value),
|
|
954
|
+
(resolvedValue.reason = null),
|
|
937
955
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
938
956
|
},
|
|
939
957
|
function (error) {
|
|
@@ -1049,7 +1067,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
1049
1067
|
return getChunk(response, parentObject);
|
|
1050
1068
|
case "S":
|
|
1051
1069
|
return Symbol.for(value.slice(2));
|
|
1052
|
-
case "
|
|
1070
|
+
case "h":
|
|
1053
1071
|
return (
|
|
1054
1072
|
(value = value.slice(2)),
|
|
1055
1073
|
getOutlinedModel(
|
|
@@ -1207,7 +1225,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1207
1225
|
);
|
|
1208
1226
|
}
|
|
1209
1227
|
function startReadableStream(response, id, type) {
|
|
1210
|
-
var controller = null
|
|
1228
|
+
var controller = null,
|
|
1229
|
+
closed = !1;
|
|
1211
1230
|
type = new ReadableStream({
|
|
1212
1231
|
type: type,
|
|
1213
1232
|
start: function (c) {
|
|
@@ -1257,24 +1276,27 @@ function startReadableStream(response, id, type) {
|
|
|
1257
1276
|
}
|
|
1258
1277
|
},
|
|
1259
1278
|
close: function () {
|
|
1260
|
-
if (
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1279
|
+
if (!closed)
|
|
1280
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1281
|
+
else {
|
|
1282
|
+
var blockedChunk = previousBlockedChunk;
|
|
1283
|
+
previousBlockedChunk = null;
|
|
1284
|
+
blockedChunk.then(function () {
|
|
1285
|
+
return controller.close();
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1268
1288
|
},
|
|
1269
1289
|
error: function (error) {
|
|
1270
|
-
if (
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1290
|
+
if (!closed)
|
|
1291
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1292
|
+
controller.error(error);
|
|
1293
|
+
else {
|
|
1294
|
+
var blockedChunk = previousBlockedChunk;
|
|
1295
|
+
previousBlockedChunk = null;
|
|
1296
|
+
blockedChunk.then(function () {
|
|
1297
|
+
return controller.error(error);
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1278
1300
|
}
|
|
1279
1301
|
});
|
|
1280
1302
|
}
|
|
@@ -1332,6 +1354,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1332
1354
|
rejectListeners = chunk.reason;
|
|
1333
1355
|
chunk.status = "fulfilled";
|
|
1334
1356
|
chunk.value = { done: !1, value: value };
|
|
1357
|
+
chunk.reason = null;
|
|
1335
1358
|
null !== resolveListeners &&
|
|
1336
1359
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1337
1360
|
}
|
|
@@ -1348,30 +1371,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1348
1371
|
nextWriteIndex++;
|
|
1349
1372
|
},
|
|
1350
1373
|
close: function (value) {
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1374
|
+
if (!closed)
|
|
1375
|
+
for (
|
|
1376
|
+
closed = !0,
|
|
1377
|
+
nextWriteIndex === buffer.length
|
|
1378
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1379
|
+
response,
|
|
1380
|
+
value,
|
|
1381
|
+
!0
|
|
1382
|
+
))
|
|
1383
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1384
|
+
nextWriteIndex++;
|
|
1385
|
+
nextWriteIndex < buffer.length;
|
|
1386
|
+
|
|
1387
|
+
)
|
|
1388
|
+
resolveIteratorResultChunk(
|
|
1389
|
+
buffer[nextWriteIndex++],
|
|
1390
|
+
'"$undefined"',
|
|
1356
1391
|
!0
|
|
1357
|
-
)
|
|
1358
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1359
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1360
|
-
resolveIteratorResultChunk(
|
|
1361
|
-
buffer[nextWriteIndex++],
|
|
1362
|
-
'"$undefined"',
|
|
1363
|
-
!0
|
|
1364
|
-
);
|
|
1392
|
+
);
|
|
1365
1393
|
},
|
|
1366
1394
|
error: function (error) {
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1395
|
+
if (!closed)
|
|
1396
|
+
for (
|
|
1397
|
+
closed = !0,
|
|
1398
|
+
nextWriteIndex === buffer.length &&
|
|
1399
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1400
|
+
nextWriteIndex < buffer.length;
|
|
1372
1401
|
|
|
1373
|
-
|
|
1374
|
-
|
|
1402
|
+
)
|
|
1403
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1375
1404
|
}
|
|
1376
1405
|
}
|
|
1377
1406
|
);
|