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
|
@@ -315,13 +315,23 @@ function processReply(
|
|
|
315
315
|
pendingParts--;
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
|
+
parentReference = writtenObjects.get(value);
|
|
318
319
|
if ("function" === typeof value.then) {
|
|
320
|
+
if (void 0 !== parentReference)
|
|
321
|
+
if (modelRoot === value) modelRoot = null;
|
|
322
|
+
else return parentReference;
|
|
319
323
|
null === formData && (formData = new FormData());
|
|
320
324
|
pendingParts++;
|
|
321
325
|
var promiseId = nextPartId++;
|
|
326
|
+
key = "$@" + promiseId.toString(16);
|
|
327
|
+
writtenObjects.set(value, key);
|
|
322
328
|
value.then(function (partValue) {
|
|
323
329
|
try {
|
|
324
|
-
var
|
|
330
|
+
var previousReference = writtenObjects.get(partValue);
|
|
331
|
+
var partJSON$28 =
|
|
332
|
+
void 0 !== previousReference
|
|
333
|
+
? JSON.stringify(previousReference)
|
|
334
|
+
: serializeModel(partValue, promiseId);
|
|
325
335
|
partValue = formData;
|
|
326
336
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
327
337
|
pendingParts--;
|
|
@@ -330,9 +340,8 @@ function processReply(
|
|
|
330
340
|
reject(reason);
|
|
331
341
|
}
|
|
332
342
|
}, reject);
|
|
333
|
-
return
|
|
343
|
+
return key;
|
|
334
344
|
}
|
|
335
|
-
parentReference = writtenObjects.get(value);
|
|
336
345
|
if (void 0 !== parentReference)
|
|
337
346
|
if (modelRoot === value) modelRoot = null;
|
|
338
347
|
else return parentReference;
|
|
@@ -456,7 +465,7 @@ function processReply(
|
|
|
456
465
|
null === formData && (formData = new FormData()),
|
|
457
466
|
(parentReference = nextPartId++),
|
|
458
467
|
formData.set(formFieldPrefix + parentReference, key),
|
|
459
|
-
"$
|
|
468
|
+
"$h" + parentReference.toString(16)
|
|
460
469
|
);
|
|
461
470
|
if (
|
|
462
471
|
void 0 !== temporaryReferences &&
|
|
@@ -811,6 +820,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
811
820
|
rejectListeners = chunk.reason;
|
|
812
821
|
chunk.status = "resolved_module";
|
|
813
822
|
chunk.value = value;
|
|
823
|
+
chunk.reason = null;
|
|
814
824
|
null !== resolveListeners &&
|
|
815
825
|
(initializeModuleChunk(chunk),
|
|
816
826
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -841,6 +851,7 @@ function initializeModelChunk(chunk) {
|
|
|
841
851
|
}
|
|
842
852
|
chunk.status = "fulfilled";
|
|
843
853
|
chunk.value = value;
|
|
854
|
+
chunk.reason = null;
|
|
844
855
|
} catch (error) {
|
|
845
856
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
846
857
|
} finally {
|
|
@@ -852,6 +863,7 @@ function initializeModuleChunk(chunk) {
|
|
|
852
863
|
var value = requireModule(chunk.value);
|
|
853
864
|
chunk.status = "fulfilled";
|
|
854
865
|
chunk.value = value;
|
|
866
|
+
chunk.reason = null;
|
|
855
867
|
} catch (error) {
|
|
856
868
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
857
869
|
}
|
|
@@ -860,7 +872,11 @@ function reportGlobalError(response, error) {
|
|
|
860
872
|
response._closed = !0;
|
|
861
873
|
response._closedReason = error;
|
|
862
874
|
response._chunks.forEach(function (chunk) {
|
|
863
|
-
"pending" === chunk.status
|
|
875
|
+
"pending" === chunk.status
|
|
876
|
+
? triggerErrorOnChunk(chunk, error)
|
|
877
|
+
: "fulfilled" === chunk.status &&
|
|
878
|
+
null !== chunk.reason &&
|
|
879
|
+
chunk.reason.error(error);
|
|
864
880
|
});
|
|
865
881
|
}
|
|
866
882
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -918,6 +934,7 @@ function waitForReference(
|
|
|
918
934
|
((value = i.value),
|
|
919
935
|
(i.status = "fulfilled"),
|
|
920
936
|
(i.value = handler.value),
|
|
937
|
+
(i.reason = null),
|
|
921
938
|
null !== value && wakeChunk(value, handler.value)));
|
|
922
939
|
}
|
|
923
940
|
function reject(error) {
|
|
@@ -1015,6 +1032,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
1015
1032
|
((boundArgs = resolvedValue.value),
|
|
1016
1033
|
(resolvedValue.status = "fulfilled"),
|
|
1017
1034
|
(resolvedValue.value = handler.value),
|
|
1035
|
+
(resolvedValue.reason = null),
|
|
1018
1036
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1019
1037
|
},
|
|
1020
1038
|
function (error) {
|
|
@@ -1130,7 +1148,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
1130
1148
|
return getChunk(response, parentObject);
|
|
1131
1149
|
case "S":
|
|
1132
1150
|
return Symbol.for(value.slice(2));
|
|
1133
|
-
case "
|
|
1151
|
+
case "h":
|
|
1134
1152
|
return (
|
|
1135
1153
|
(value = value.slice(2)),
|
|
1136
1154
|
getOutlinedModel(
|
|
@@ -1284,7 +1302,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1284
1302
|
);
|
|
1285
1303
|
}
|
|
1286
1304
|
function startReadableStream(response, id, type) {
|
|
1287
|
-
var controller = null
|
|
1305
|
+
var controller = null,
|
|
1306
|
+
closed = !1;
|
|
1288
1307
|
type = new ReadableStream({
|
|
1289
1308
|
type: type,
|
|
1290
1309
|
start: function (c) {
|
|
@@ -1334,24 +1353,27 @@ function startReadableStream(response, id, type) {
|
|
|
1334
1353
|
}
|
|
1335
1354
|
},
|
|
1336
1355
|
close: function () {
|
|
1337
|
-
if (
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1356
|
+
if (!closed)
|
|
1357
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1358
|
+
else {
|
|
1359
|
+
var blockedChunk = previousBlockedChunk;
|
|
1360
|
+
previousBlockedChunk = null;
|
|
1361
|
+
blockedChunk.then(function () {
|
|
1362
|
+
return controller.close();
|
|
1363
|
+
});
|
|
1364
|
+
}
|
|
1345
1365
|
},
|
|
1346
1366
|
error: function (error) {
|
|
1347
|
-
if (
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1367
|
+
if (!closed)
|
|
1368
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1369
|
+
controller.error(error);
|
|
1370
|
+
else {
|
|
1371
|
+
var blockedChunk = previousBlockedChunk;
|
|
1372
|
+
previousBlockedChunk = null;
|
|
1373
|
+
blockedChunk.then(function () {
|
|
1374
|
+
return controller.error(error);
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1355
1377
|
}
|
|
1356
1378
|
});
|
|
1357
1379
|
}
|
|
@@ -1409,6 +1431,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1409
1431
|
rejectListeners = chunk.reason;
|
|
1410
1432
|
chunk.status = "fulfilled";
|
|
1411
1433
|
chunk.value = { done: !1, value: value };
|
|
1434
|
+
chunk.reason = null;
|
|
1412
1435
|
null !== resolveListeners &&
|
|
1413
1436
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1414
1437
|
}
|
|
@@ -1425,30 +1448,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1425
1448
|
nextWriteIndex++;
|
|
1426
1449
|
},
|
|
1427
1450
|
close: function (value) {
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1451
|
+
if (!closed)
|
|
1452
|
+
for (
|
|
1453
|
+
closed = !0,
|
|
1454
|
+
nextWriteIndex === buffer.length
|
|
1455
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1456
|
+
response,
|
|
1457
|
+
value,
|
|
1458
|
+
!0
|
|
1459
|
+
))
|
|
1460
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1461
|
+
nextWriteIndex++;
|
|
1462
|
+
nextWriteIndex < buffer.length;
|
|
1463
|
+
|
|
1464
|
+
)
|
|
1465
|
+
resolveIteratorResultChunk(
|
|
1466
|
+
buffer[nextWriteIndex++],
|
|
1467
|
+
'"$undefined"',
|
|
1433
1468
|
!0
|
|
1434
|
-
)
|
|
1435
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1436
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1437
|
-
resolveIteratorResultChunk(
|
|
1438
|
-
buffer[nextWriteIndex++],
|
|
1439
|
-
'"$undefined"',
|
|
1440
|
-
!0
|
|
1441
|
-
);
|
|
1469
|
+
);
|
|
1442
1470
|
},
|
|
1443
1471
|
error: function (error) {
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1472
|
+
if (!closed)
|
|
1473
|
+
for (
|
|
1474
|
+
closed = !0,
|
|
1475
|
+
nextWriteIndex === buffer.length &&
|
|
1476
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1477
|
+
nextWriteIndex < buffer.length;
|
|
1449
1478
|
|
|
1450
|
-
|
|
1451
|
-
|
|
1479
|
+
)
|
|
1480
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1452
1481
|
}
|
|
1453
1482
|
}
|
|
1454
1483
|
);
|
|
@@ -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
|
);
|
|
@@ -316,13 +316,23 @@ function processReply(
|
|
|
316
316
|
pendingParts--;
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
|
+
parentReference = writtenObjects.get(value);
|
|
319
320
|
if ("function" === typeof value.then) {
|
|
321
|
+
if (void 0 !== parentReference)
|
|
322
|
+
if (modelRoot === value) modelRoot = null;
|
|
323
|
+
else return parentReference;
|
|
320
324
|
null === formData && (formData = new FormData());
|
|
321
325
|
pendingParts++;
|
|
322
326
|
var promiseId = nextPartId++;
|
|
327
|
+
key = "$@" + promiseId.toString(16);
|
|
328
|
+
writtenObjects.set(value, key);
|
|
323
329
|
value.then(function (partValue) {
|
|
324
330
|
try {
|
|
325
|
-
var
|
|
331
|
+
var previousReference = writtenObjects.get(partValue);
|
|
332
|
+
var partJSON$28 =
|
|
333
|
+
void 0 !== previousReference
|
|
334
|
+
? JSON.stringify(previousReference)
|
|
335
|
+
: serializeModel(partValue, promiseId);
|
|
326
336
|
partValue = formData;
|
|
327
337
|
partValue.append(formFieldPrefix + promiseId, partJSON$28);
|
|
328
338
|
pendingParts--;
|
|
@@ -331,9 +341,8 @@ function processReply(
|
|
|
331
341
|
reject(reason);
|
|
332
342
|
}
|
|
333
343
|
}, reject);
|
|
334
|
-
return
|
|
344
|
+
return key;
|
|
335
345
|
}
|
|
336
|
-
parentReference = writtenObjects.get(value);
|
|
337
346
|
if (void 0 !== parentReference)
|
|
338
347
|
if (modelRoot === value) modelRoot = null;
|
|
339
348
|
else return parentReference;
|
|
@@ -457,7 +466,7 @@ function processReply(
|
|
|
457
466
|
null === formData && (formData = new FormData()),
|
|
458
467
|
(parentReference = nextPartId++),
|
|
459
468
|
formData.set(formFieldPrefix + parentReference, key),
|
|
460
|
-
"$
|
|
469
|
+
"$h" + parentReference.toString(16)
|
|
461
470
|
);
|
|
462
471
|
if (
|
|
463
472
|
void 0 !== temporaryReferences &&
|
|
@@ -812,6 +821,7 @@ function resolveModuleChunk(chunk, value) {
|
|
|
812
821
|
rejectListeners = chunk.reason;
|
|
813
822
|
chunk.status = "resolved_module";
|
|
814
823
|
chunk.value = value;
|
|
824
|
+
chunk.reason = null;
|
|
815
825
|
null !== resolveListeners &&
|
|
816
826
|
(initializeModuleChunk(chunk),
|
|
817
827
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners));
|
|
@@ -842,6 +852,7 @@ function initializeModelChunk(chunk) {
|
|
|
842
852
|
}
|
|
843
853
|
chunk.status = "fulfilled";
|
|
844
854
|
chunk.value = value;
|
|
855
|
+
chunk.reason = null;
|
|
845
856
|
} catch (error) {
|
|
846
857
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
847
858
|
} finally {
|
|
@@ -853,6 +864,7 @@ function initializeModuleChunk(chunk) {
|
|
|
853
864
|
var value = requireModule(chunk.value);
|
|
854
865
|
chunk.status = "fulfilled";
|
|
855
866
|
chunk.value = value;
|
|
867
|
+
chunk.reason = null;
|
|
856
868
|
} catch (error) {
|
|
857
869
|
(chunk.status = "rejected"), (chunk.reason = error);
|
|
858
870
|
}
|
|
@@ -861,7 +873,11 @@ function reportGlobalError(response, error) {
|
|
|
861
873
|
response._closed = !0;
|
|
862
874
|
response._closedReason = error;
|
|
863
875
|
response._chunks.forEach(function (chunk) {
|
|
864
|
-
"pending" === chunk.status
|
|
876
|
+
"pending" === chunk.status
|
|
877
|
+
? triggerErrorOnChunk(chunk, error)
|
|
878
|
+
: "fulfilled" === chunk.status &&
|
|
879
|
+
null !== chunk.reason &&
|
|
880
|
+
chunk.reason.error(error);
|
|
865
881
|
});
|
|
866
882
|
}
|
|
867
883
|
function createLazyChunkWrapper(chunk) {
|
|
@@ -919,6 +935,7 @@ function waitForReference(
|
|
|
919
935
|
((value = i.value),
|
|
920
936
|
(i.status = "fulfilled"),
|
|
921
937
|
(i.value = handler.value),
|
|
938
|
+
(i.reason = null),
|
|
922
939
|
null !== value && wakeChunk(value, handler.value)));
|
|
923
940
|
}
|
|
924
941
|
function reject(error) {
|
|
@@ -1016,6 +1033,7 @@ function loadServerReference(response, metaData, parentObject, key) {
|
|
|
1016
1033
|
((boundArgs = resolvedValue.value),
|
|
1017
1034
|
(resolvedValue.status = "fulfilled"),
|
|
1018
1035
|
(resolvedValue.value = handler.value),
|
|
1036
|
+
(resolvedValue.reason = null),
|
|
1019
1037
|
null !== boundArgs && wakeChunk(boundArgs, handler.value)));
|
|
1020
1038
|
},
|
|
1021
1039
|
function (error) {
|
|
@@ -1131,7 +1149,7 @@ function parseModelString(response, parentObject, key, value) {
|
|
|
1131
1149
|
return getChunk(response, parentObject);
|
|
1132
1150
|
case "S":
|
|
1133
1151
|
return Symbol.for(value.slice(2));
|
|
1134
|
-
case "
|
|
1152
|
+
case "h":
|
|
1135
1153
|
return (
|
|
1136
1154
|
(value = value.slice(2)),
|
|
1137
1155
|
getOutlinedModel(
|
|
@@ -1285,7 +1303,8 @@ function resolveStream(response, id, stream, controller) {
|
|
|
1285
1303
|
);
|
|
1286
1304
|
}
|
|
1287
1305
|
function startReadableStream(response, id, type) {
|
|
1288
|
-
var controller = null
|
|
1306
|
+
var controller = null,
|
|
1307
|
+
closed = !1;
|
|
1289
1308
|
type = new ReadableStream({
|
|
1290
1309
|
type: type,
|
|
1291
1310
|
start: function (c) {
|
|
@@ -1335,24 +1354,27 @@ function startReadableStream(response, id, type) {
|
|
|
1335
1354
|
}
|
|
1336
1355
|
},
|
|
1337
1356
|
close: function () {
|
|
1338
|
-
if (
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1357
|
+
if (!closed)
|
|
1358
|
+
if (((closed = !0), null === previousBlockedChunk)) controller.close();
|
|
1359
|
+
else {
|
|
1360
|
+
var blockedChunk = previousBlockedChunk;
|
|
1361
|
+
previousBlockedChunk = null;
|
|
1362
|
+
blockedChunk.then(function () {
|
|
1363
|
+
return controller.close();
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1346
1366
|
},
|
|
1347
1367
|
error: function (error) {
|
|
1348
|
-
if (
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1368
|
+
if (!closed)
|
|
1369
|
+
if (((closed = !0), null === previousBlockedChunk))
|
|
1370
|
+
controller.error(error);
|
|
1371
|
+
else {
|
|
1372
|
+
var blockedChunk = previousBlockedChunk;
|
|
1373
|
+
previousBlockedChunk = null;
|
|
1374
|
+
blockedChunk.then(function () {
|
|
1375
|
+
return controller.error(error);
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1356
1378
|
}
|
|
1357
1379
|
});
|
|
1358
1380
|
}
|
|
@@ -1410,6 +1432,7 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1410
1432
|
rejectListeners = chunk.reason;
|
|
1411
1433
|
chunk.status = "fulfilled";
|
|
1412
1434
|
chunk.value = { done: !1, value: value };
|
|
1435
|
+
chunk.reason = null;
|
|
1413
1436
|
null !== resolveListeners &&
|
|
1414
1437
|
wakeChunkIfInitialized(chunk, resolveListeners, rejectListeners);
|
|
1415
1438
|
}
|
|
@@ -1426,30 +1449,36 @@ function startAsyncIterable(response, id, iterator) {
|
|
|
1426
1449
|
nextWriteIndex++;
|
|
1427
1450
|
},
|
|
1428
1451
|
close: function (value) {
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1452
|
+
if (!closed)
|
|
1453
|
+
for (
|
|
1454
|
+
closed = !0,
|
|
1455
|
+
nextWriteIndex === buffer.length
|
|
1456
|
+
? (buffer[nextWriteIndex] = createResolvedIteratorResultChunk(
|
|
1457
|
+
response,
|
|
1458
|
+
value,
|
|
1459
|
+
!0
|
|
1460
|
+
))
|
|
1461
|
+
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0),
|
|
1462
|
+
nextWriteIndex++;
|
|
1463
|
+
nextWriteIndex < buffer.length;
|
|
1464
|
+
|
|
1465
|
+
)
|
|
1466
|
+
resolveIteratorResultChunk(
|
|
1467
|
+
buffer[nextWriteIndex++],
|
|
1468
|
+
'"$undefined"',
|
|
1434
1469
|
!0
|
|
1435
|
-
)
|
|
1436
|
-
: resolveIteratorResultChunk(buffer[nextWriteIndex], value, !0);
|
|
1437
|
-
for (nextWriteIndex++; nextWriteIndex < buffer.length; )
|
|
1438
|
-
resolveIteratorResultChunk(
|
|
1439
|
-
buffer[nextWriteIndex++],
|
|
1440
|
-
'"$undefined"',
|
|
1441
|
-
!0
|
|
1442
|
-
);
|
|
1470
|
+
);
|
|
1443
1471
|
},
|
|
1444
1472
|
error: function (error) {
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1473
|
+
if (!closed)
|
|
1474
|
+
for (
|
|
1475
|
+
closed = !0,
|
|
1476
|
+
nextWriteIndex === buffer.length &&
|
|
1477
|
+
(buffer[nextWriteIndex] = createPendingChunk(response));
|
|
1478
|
+
nextWriteIndex < buffer.length;
|
|
1450
1479
|
|
|
1451
|
-
|
|
1452
|
-
|
|
1480
|
+
)
|
|
1481
|
+
triggerErrorOnChunk(buffer[nextWriteIndex++], error);
|
|
1453
1482
|
}
|
|
1454
1483
|
}
|
|
1455
1484
|
);
|