react-server-dom-webpack 19.0.0-rc-9c6806964f-20240703 → 19.0.0-rc-f38c22b244-20240704
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 +88 -81
- package/cjs/react-server-dom-webpack-client.browser.production.js +36 -34
- package/cjs/react-server-dom-webpack-client.edge.development.js +88 -81
- package/cjs/react-server-dom-webpack-client.edge.production.js +36 -34
- package/cjs/react-server-dom-webpack-client.node.development.js +226 -126
- package/cjs/react-server-dom-webpack-client.node.production.js +176 -79
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +226 -126
- package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +176 -79
- package/cjs/react-server-dom-webpack-server.browser.development.js +273 -299
- package/cjs/react-server-dom-webpack-server.browser.production.js +20 -19
- package/cjs/react-server-dom-webpack-server.edge.development.js +283 -301
- package/cjs/react-server-dom-webpack-server.edge.production.js +20 -19
- package/cjs/react-server-dom-webpack-server.node.development.js +285 -303
- package/cjs/react-server-dom-webpack-server.node.production.js +23 -23
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +285 -303
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +23 -23
- package/package.json +3 -3
@@ -1319,7 +1319,7 @@ function resolveTypedArray(
|
|
1319
1319
|
);
|
1320
1320
|
resolveBuffer(response, id, constructor);
|
1321
1321
|
}
|
1322
|
-
function
|
1322
|
+
function processFullBinaryRow(response, id, tag, buffer, chunk) {
|
1323
1323
|
switch (tag) {
|
1324
1324
|
case 65:
|
1325
1325
|
resolveBuffer(response, id, mergeBuffer(buffer, chunk).buffer);
|
@@ -1371,44 +1371,46 @@ function processFullRow(response, id, tag, buffer, chunk) {
|
|
1371
1371
|
i++
|
1372
1372
|
)
|
1373
1373
|
row += stringDecoder.decode(buffer[i], decoderOptions);
|
1374
|
-
row += stringDecoder.decode(chunk);
|
1374
|
+
buffer = row += stringDecoder.decode(chunk);
|
1375
1375
|
switch (tag) {
|
1376
1376
|
case 73:
|
1377
|
-
resolveModule(response, id,
|
1377
|
+
resolveModule(response, id, buffer);
|
1378
1378
|
break;
|
1379
1379
|
case 72:
|
1380
|
-
id =
|
1381
|
-
|
1382
|
-
response = JSON.parse(
|
1383
|
-
|
1380
|
+
id = buffer[0];
|
1381
|
+
buffer = buffer.slice(1);
|
1382
|
+
response = JSON.parse(buffer, response._fromJSON);
|
1383
|
+
buffer = ReactDOMSharedInternals.d;
|
1384
1384
|
switch (id) {
|
1385
1385
|
case "D":
|
1386
|
-
|
1386
|
+
buffer.D(response);
|
1387
1387
|
break;
|
1388
1388
|
case "C":
|
1389
1389
|
"string" === typeof response
|
1390
|
-
?
|
1391
|
-
:
|
1390
|
+
? buffer.C(response)
|
1391
|
+
: buffer.C(response[0], response[1]);
|
1392
1392
|
break;
|
1393
1393
|
case "L":
|
1394
1394
|
id = response[0];
|
1395
1395
|
tag = response[1];
|
1396
|
-
3 === response.length
|
1396
|
+
3 === response.length
|
1397
|
+
? buffer.L(id, tag, response[2])
|
1398
|
+
: buffer.L(id, tag);
|
1397
1399
|
break;
|
1398
1400
|
case "m":
|
1399
1401
|
"string" === typeof response
|
1400
|
-
?
|
1401
|
-
:
|
1402
|
+
? buffer.m(response)
|
1403
|
+
: buffer.m(response[0], response[1]);
|
1402
1404
|
break;
|
1403
1405
|
case "X":
|
1404
1406
|
"string" === typeof response
|
1405
|
-
?
|
1406
|
-
:
|
1407
|
+
? buffer.X(response)
|
1408
|
+
: buffer.X(response[0], response[1]);
|
1407
1409
|
break;
|
1408
1410
|
case "S":
|
1409
1411
|
"string" === typeof response
|
1410
|
-
?
|
1411
|
-
:
|
1412
|
+
? buffer.S(response)
|
1413
|
+
: buffer.S(
|
1412
1414
|
response[0],
|
1413
1415
|
0 === response[1] ? void 0 : response[1],
|
1414
1416
|
3 === response.length ? response[2] : void 0
|
@@ -1416,27 +1418,27 @@ function processFullRow(response, id, tag, buffer, chunk) {
|
|
1416
1418
|
break;
|
1417
1419
|
case "M":
|
1418
1420
|
"string" === typeof response
|
1419
|
-
?
|
1420
|
-
:
|
1421
|
+
? buffer.M(response)
|
1422
|
+
: buffer.M(response[0], response[1]);
|
1421
1423
|
}
|
1422
1424
|
break;
|
1423
1425
|
case 69:
|
1424
|
-
tag = JSON.parse(
|
1425
|
-
|
1426
|
+
tag = JSON.parse(buffer).digest;
|
1427
|
+
buffer = Error(
|
1426
1428
|
"An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error."
|
1427
1429
|
);
|
1428
|
-
|
1429
|
-
|
1430
|
+
buffer.stack = "Error: " + buffer.message;
|
1431
|
+
buffer.digest = tag;
|
1430
1432
|
tag = response._chunks;
|
1431
|
-
(
|
1432
|
-
? triggerErrorOnChunk(
|
1433
|
-
: tag.set(id, new Chunk("rejected", null,
|
1433
|
+
(chunk = tag.get(id))
|
1434
|
+
? triggerErrorOnChunk(chunk, buffer)
|
1435
|
+
: tag.set(id, new Chunk("rejected", null, buffer, response));
|
1434
1436
|
break;
|
1435
1437
|
case 84:
|
1436
1438
|
tag = response._chunks;
|
1437
|
-
(
|
1438
|
-
?
|
1439
|
-
: tag.set(id, new Chunk("fulfilled",
|
1439
|
+
(chunk = tag.get(id)) && "pending" !== chunk.status
|
1440
|
+
? chunk.reason.enqueueValue(buffer)
|
1441
|
+
: tag.set(id, new Chunk("fulfilled", buffer, null, response));
|
1440
1442
|
break;
|
1441
1443
|
case 68:
|
1442
1444
|
case 87:
|
@@ -1458,13 +1460,13 @@ function processFullRow(response, id, tag, buffer, chunk) {
|
|
1458
1460
|
case 67:
|
1459
1461
|
(response = response._chunks.get(id)) &&
|
1460
1462
|
"fulfilled" === response.status &&
|
1461
|
-
response.reason.close("" ===
|
1463
|
+
response.reason.close("" === buffer ? '"$undefined"' : buffer);
|
1462
1464
|
break;
|
1463
1465
|
default:
|
1464
1466
|
(tag = response._chunks),
|
1465
|
-
(
|
1466
|
-
? resolveModelChunk(
|
1467
|
-
: tag.set(id, new Chunk("resolved_model",
|
1467
|
+
(chunk = tag.get(id))
|
1468
|
+
? resolveModelChunk(chunk, buffer)
|
1469
|
+
: tag.set(id, new Chunk("resolved_model", buffer, null, response));
|
1468
1470
|
}
|
1469
1471
|
}
|
1470
1472
|
function createFromJSONCallback(response) {
|
@@ -1584,7 +1586,7 @@ function startReadingFromStream(response, stream) {
|
|
1584
1586
|
var offset = value.byteOffset + i;
|
1585
1587
|
if (-1 < lastIdx)
|
1586
1588
|
(rowLength = new Uint8Array(value.buffer, offset, lastIdx - i)),
|
1587
|
-
|
1589
|
+
processFullBinaryRow(response, _ref, rowTag, buffer, rowLength),
|
1588
1590
|
(i = lastIdx),
|
1589
1591
|
3 === rowState && i++,
|
1590
1592
|
(rowLength = _ref = rowTag = rowState = 0),
|
@@ -1433,7 +1433,8 @@
|
|
1433
1433
|
encodeFormAction,
|
1434
1434
|
nonce,
|
1435
1435
|
temporaryReferences,
|
1436
|
-
findSourceMapURL
|
1436
|
+
findSourceMapURL,
|
1437
|
+
replayConsole
|
1437
1438
|
) {
|
1438
1439
|
var chunks = new Map();
|
1439
1440
|
this._bundlerConfig = bundlerConfig;
|
@@ -1448,6 +1449,7 @@
|
|
1448
1449
|
this._buffer = [];
|
1449
1450
|
this._tempRefs = temporaryReferences;
|
1450
1451
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1452
|
+
this._replayConsole = replayConsole;
|
1451
1453
|
this._fromJSON = createFromJSONCallback(this);
|
1452
1454
|
}
|
1453
1455
|
function resolveBuffer(response, id, buffer) {
|
@@ -1711,7 +1713,7 @@
|
|
1711
1713
|
);
|
1712
1714
|
resolveBuffer(response, id, constructor);
|
1713
1715
|
}
|
1714
|
-
function
|
1716
|
+
function processFullBinaryRow(response, id, tag, buffer, chunk) {
|
1715
1717
|
switch (tag) {
|
1716
1718
|
case 65:
|
1717
1719
|
resolveBuffer(response, id, mergeBuffer(buffer, chunk).buffer);
|
@@ -1764,6 +1766,9 @@
|
|
1764
1766
|
)
|
1765
1767
|
row += stringDecoder.decode(buffer[i], decoderOptions);
|
1766
1768
|
row += stringDecoder.decode(chunk);
|
1769
|
+
processFullStringRow(response, id, tag, row);
|
1770
|
+
}
|
1771
|
+
function processFullStringRow(response, id, tag, row) {
|
1767
1772
|
switch (tag) {
|
1768
1773
|
case 73:
|
1769
1774
|
resolveModule(response, id, row);
|
@@ -1816,24 +1821,24 @@
|
|
1816
1821
|
break;
|
1817
1822
|
case 69:
|
1818
1823
|
tag = JSON.parse(row);
|
1819
|
-
|
1820
|
-
|
1824
|
+
var digest = tag.digest,
|
1825
|
+
env = tag.env;
|
1821
1826
|
row = Error(
|
1822
1827
|
tag.message ||
|
1823
1828
|
"An error occurred in the Server Components render but no message was provided"
|
1824
1829
|
);
|
1825
1830
|
row.stack = tag.stack;
|
1826
|
-
row.digest =
|
1827
|
-
row.environmentName =
|
1831
|
+
row.digest = digest;
|
1832
|
+
row.environmentName = env;
|
1828
1833
|
tag = response._chunks;
|
1829
|
-
(
|
1830
|
-
? triggerErrorOnChunk(
|
1834
|
+
(digest = tag.get(id))
|
1835
|
+
? triggerErrorOnChunk(digest, row)
|
1831
1836
|
: tag.set(id, new Chunk("rejected", null, row, response));
|
1832
1837
|
break;
|
1833
1838
|
case 84:
|
1834
1839
|
tag = response._chunks;
|
1835
|
-
(
|
1836
|
-
?
|
1840
|
+
(digest = tag.get(id)) && "pending" !== digest.status
|
1841
|
+
? digest.reason.enqueueValue(row)
|
1837
1842
|
: tag.set(id, new Chunk("fulfilled", row, null, response));
|
1838
1843
|
break;
|
1839
1844
|
case 68:
|
@@ -1842,46 +1847,47 @@
|
|
1842
1847
|
(response._debugInfo || (response._debugInfo = [])).push(row);
|
1843
1848
|
break;
|
1844
1849
|
case 87:
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1850
|
+
if (response._replayConsole)
|
1851
|
+
b: {
|
1852
|
+
(row = JSON.parse(row, response._fromJSON)),
|
1853
|
+
(response = row[0]),
|
1854
|
+
(id = row[3]),
|
1855
|
+
(tag = row.slice(4)),
|
1856
|
+
(row = 0);
|
1857
|
+
switch (response) {
|
1858
|
+
case "dir":
|
1859
|
+
case "dirxml":
|
1860
|
+
case "groupEnd":
|
1861
|
+
case "table":
|
1862
|
+
console[response].apply(console, tag);
|
1863
|
+
break b;
|
1864
|
+
case "assert":
|
1865
|
+
row = 1;
|
1866
|
+
}
|
1867
|
+
tag = tag.slice(0);
|
1868
|
+
"string" === typeof tag[row]
|
1869
|
+
? tag.splice(
|
1870
|
+
row,
|
1871
|
+
1,
|
1872
|
+
"\u001b[0m\u001b[7m%c%s\u001b[0m%c " + tag[row],
|
1873
|
+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
1874
|
+
" " + id + " ",
|
1875
|
+
""
|
1876
|
+
)
|
1877
|
+
: tag.splice(
|
1878
|
+
row,
|
1879
|
+
0,
|
1880
|
+
"\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
|
1881
|
+
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
1882
|
+
" " + id + " ",
|
1883
|
+
""
|
1884
|
+
);
|
1885
|
+
"error" === response
|
1886
|
+
? error$jscomp$0.apply(console, tag)
|
1887
|
+
: "warn" === response
|
1888
|
+
? warn.apply(console, tag)
|
1889
|
+
: console[response].apply(console, tag);
|
1860
1890
|
}
|
1861
|
-
tag = tag.slice(0);
|
1862
|
-
"string" === typeof tag[row]
|
1863
|
-
? tag.splice(
|
1864
|
-
row,
|
1865
|
-
1,
|
1866
|
-
"\u001b[0m\u001b[7m%c%s\u001b[0m%c " + tag[row],
|
1867
|
-
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
1868
|
-
" " + id + " ",
|
1869
|
-
""
|
1870
|
-
)
|
1871
|
-
: tag.splice(
|
1872
|
-
row,
|
1873
|
-
0,
|
1874
|
-
"\u001b[0m\u001b[7m%c%s\u001b[0m%c ",
|
1875
|
-
"background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px",
|
1876
|
-
" " + id + " ",
|
1877
|
-
""
|
1878
|
-
);
|
1879
|
-
"error" === response
|
1880
|
-
? error$jscomp$0.apply(console, tag)
|
1881
|
-
: "warn" === response
|
1882
|
-
? warn.apply(console, tag)
|
1883
|
-
: console[response].apply(console, tag);
|
1884
|
-
}
|
1885
1891
|
break;
|
1886
1892
|
case 82:
|
1887
1893
|
startReadableStream(response, id, void 0);
|
@@ -1902,8 +1908,8 @@
|
|
1902
1908
|
break;
|
1903
1909
|
default:
|
1904
1910
|
(tag = response._chunks),
|
1905
|
-
(
|
1906
|
-
? resolveModelChunk(
|
1911
|
+
(digest = tag.get(id))
|
1912
|
+
? resolveModelChunk(digest, row)
|
1907
1913
|
: tag.set(id, new Chunk("resolved_model", row, null, response));
|
1908
1914
|
}
|
1909
1915
|
}
|
@@ -2044,87 +2050,181 @@
|
|
2044
2050
|
options ? options.encodeFormAction : void 0,
|
2045
2051
|
options && "string" === typeof options.nonce ? options.nonce : void 0,
|
2046
2052
|
void 0,
|
2047
|
-
options && options.findSourceMapURL ? options.findSourceMapURL : void 0
|
2053
|
+
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
2054
|
+
options ? !0 === options.replayConsoleLogs : !1
|
2048
2055
|
);
|
2049
2056
|
stream.on("data", function (chunk) {
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
2057
|
+
if ("string" === typeof chunk) {
|
2058
|
+
for (
|
2059
|
+
var i = 0,
|
2060
|
+
rowState = response._rowState,
|
2061
|
+
rowID = response._rowID,
|
2062
|
+
rowTag = response._rowTag,
|
2063
|
+
rowLength = response._rowLength,
|
2064
|
+
buffer = response._buffer,
|
2065
|
+
chunkLength = chunk.length;
|
2066
|
+
i < chunkLength;
|
2059
2067
|
|
2060
|
-
|
2061
|
-
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
|
2071
|
-
|
2072
|
-
|
2073
|
-
|
2074
|
-
|
2075
|
-
|
2076
|
-
|
2077
|
-
|
2078
|
-
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
|
2085
|
-
|
2086
|
-
|
2087
|
-
|
2088
|
-
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
|
2104
|
-
|
2105
|
-
|
2106
|
-
|
2107
|
-
|
2068
|
+
) {
|
2069
|
+
var lastIdx = -1;
|
2070
|
+
switch (rowState) {
|
2071
|
+
case 0:
|
2072
|
+
lastIdx = chunk.charCodeAt(i++);
|
2073
|
+
58 === lastIdx
|
2074
|
+
? (rowState = 1)
|
2075
|
+
: (rowID =
|
2076
|
+
(rowID << 4) |
|
2077
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
2078
|
+
continue;
|
2079
|
+
case 1:
|
2080
|
+
rowState = chunk.charCodeAt(i);
|
2081
|
+
84 === rowState ||
|
2082
|
+
65 === rowState ||
|
2083
|
+
79 === rowState ||
|
2084
|
+
111 === rowState ||
|
2085
|
+
85 === rowState ||
|
2086
|
+
83 === rowState ||
|
2087
|
+
115 === rowState ||
|
2088
|
+
76 === rowState ||
|
2089
|
+
108 === rowState ||
|
2090
|
+
71 === rowState ||
|
2091
|
+
103 === rowState ||
|
2092
|
+
77 === rowState ||
|
2093
|
+
109 === rowState ||
|
2094
|
+
86 === rowState
|
2095
|
+
? ((rowTag = rowState), (rowState = 2), i++)
|
2096
|
+
: (64 < rowState && 91 > rowState) ||
|
2097
|
+
114 === rowState ||
|
2098
|
+
120 === rowState
|
2099
|
+
? ((rowTag = rowState), (rowState = 3), i++)
|
2100
|
+
: ((rowTag = 0), (rowState = 3));
|
2101
|
+
continue;
|
2102
|
+
case 2:
|
2103
|
+
lastIdx = chunk.charCodeAt(i++);
|
2104
|
+
44 === lastIdx
|
2105
|
+
? (rowState = 4)
|
2106
|
+
: (rowLength =
|
2107
|
+
(rowLength << 4) |
|
2108
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
2109
|
+
continue;
|
2110
|
+
case 3:
|
2111
|
+
lastIdx = chunk.indexOf("\n", i);
|
2112
|
+
break;
|
2113
|
+
case 4:
|
2114
|
+
if (84 !== rowTag)
|
2115
|
+
throw Error(
|
2116
|
+
"Binary RSC chunks cannot be encoded as strings. This is a bug in the wiring of the React streams."
|
2117
|
+
);
|
2118
|
+
if (rowLength < chunk.length || chunk.length > 3 * rowLength)
|
2119
|
+
throw Error(
|
2120
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
2121
|
+
);
|
2122
|
+
lastIdx = chunk.length;
|
2123
|
+
}
|
2124
|
+
if (-1 < lastIdx) {
|
2125
|
+
if (0 < buffer.length)
|
2126
|
+
throw Error(
|
2127
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
2128
|
+
);
|
2129
|
+
i = chunk.slice(i, lastIdx);
|
2130
|
+
processFullStringRow(response, rowID, rowTag, i);
|
2131
|
+
i = lastIdx;
|
2132
|
+
3 === rowState && i++;
|
2133
|
+
rowLength = rowID = rowTag = rowState = 0;
|
2134
|
+
buffer.length = 0;
|
2135
|
+
} else if (chunk.length !== i)
|
2136
|
+
throw Error(
|
2137
|
+
"String chunks need to be passed in their original shape. Not split into smaller string chunks. This is a bug in the wiring of the React streams."
|
2138
|
+
);
|
2108
2139
|
}
|
2109
|
-
|
2110
|
-
|
2111
|
-
|
2112
|
-
|
2113
|
-
|
2114
|
-
|
2115
|
-
|
2116
|
-
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2120
|
-
|
2121
|
-
|
2140
|
+
response._rowState = rowState;
|
2141
|
+
response._rowID = rowID;
|
2142
|
+
response._rowTag = rowTag;
|
2143
|
+
response._rowLength = rowLength;
|
2144
|
+
} else {
|
2145
|
+
rowLength = 0;
|
2146
|
+
chunkLength = response._rowState;
|
2147
|
+
rowID = response._rowID;
|
2148
|
+
i = response._rowTag;
|
2149
|
+
rowState = response._rowLength;
|
2150
|
+
buffer = response._buffer;
|
2151
|
+
for (rowTag = chunk.length; rowLength < rowTag; ) {
|
2152
|
+
lastIdx = -1;
|
2153
|
+
switch (chunkLength) {
|
2154
|
+
case 0:
|
2155
|
+
lastIdx = chunk[rowLength++];
|
2156
|
+
58 === lastIdx
|
2157
|
+
? (chunkLength = 1)
|
2158
|
+
: (rowID =
|
2159
|
+
(rowID << 4) |
|
2160
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
2161
|
+
continue;
|
2162
|
+
case 1:
|
2163
|
+
chunkLength = chunk[rowLength];
|
2164
|
+
84 === chunkLength ||
|
2165
|
+
65 === chunkLength ||
|
2166
|
+
79 === chunkLength ||
|
2167
|
+
111 === chunkLength ||
|
2168
|
+
85 === chunkLength ||
|
2169
|
+
83 === chunkLength ||
|
2170
|
+
115 === chunkLength ||
|
2171
|
+
76 === chunkLength ||
|
2172
|
+
108 === chunkLength ||
|
2173
|
+
71 === chunkLength ||
|
2174
|
+
103 === chunkLength ||
|
2175
|
+
77 === chunkLength ||
|
2176
|
+
109 === chunkLength ||
|
2177
|
+
86 === chunkLength
|
2178
|
+
? ((i = chunkLength), (chunkLength = 2), rowLength++)
|
2179
|
+
: (64 < chunkLength && 91 > chunkLength) ||
|
2180
|
+
114 === chunkLength ||
|
2181
|
+
120 === chunkLength
|
2182
|
+
? ((i = chunkLength), (chunkLength = 3), rowLength++)
|
2183
|
+
: ((i = 0), (chunkLength = 3));
|
2184
|
+
continue;
|
2185
|
+
case 2:
|
2186
|
+
lastIdx = chunk[rowLength++];
|
2187
|
+
44 === lastIdx
|
2188
|
+
? (chunkLength = 4)
|
2189
|
+
: (rowState =
|
2190
|
+
(rowState << 4) |
|
2191
|
+
(96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
|
2192
|
+
continue;
|
2193
|
+
case 3:
|
2194
|
+
lastIdx = chunk.indexOf(10, rowLength);
|
2195
|
+
break;
|
2196
|
+
case 4:
|
2197
|
+
(lastIdx = rowLength + rowState),
|
2198
|
+
lastIdx > chunk.length && (lastIdx = -1);
|
2199
|
+
}
|
2200
|
+
var offset = chunk.byteOffset + rowLength;
|
2201
|
+
if (-1 < lastIdx)
|
2202
|
+
(rowState = new Uint8Array(
|
2203
|
+
chunk.buffer,
|
2204
|
+
offset,
|
2205
|
+
lastIdx - rowLength
|
2206
|
+
)),
|
2207
|
+
processFullBinaryRow(response, rowID, i, buffer, rowState),
|
2208
|
+
(rowLength = lastIdx),
|
2209
|
+
3 === chunkLength && rowLength++,
|
2210
|
+
(rowState = rowID = i = chunkLength = 0),
|
2211
|
+
(buffer.length = 0);
|
2212
|
+
else {
|
2213
|
+
chunk = new Uint8Array(
|
2214
|
+
chunk.buffer,
|
2215
|
+
offset,
|
2216
|
+
chunk.byteLength - rowLength
|
2217
|
+
);
|
2218
|
+
buffer.push(chunk);
|
2219
|
+
rowState -= chunk.byteLength;
|
2220
|
+
break;
|
2221
|
+
}
|
2122
2222
|
}
|
2223
|
+
response._rowState = chunkLength;
|
2224
|
+
response._rowID = rowID;
|
2225
|
+
response._rowTag = i;
|
2226
|
+
response._rowLength = rowState;
|
2123
2227
|
}
|
2124
|
-
response._rowState = rowState;
|
2125
|
-
response._rowID = rowID;
|
2126
|
-
response._rowTag = rowTag;
|
2127
|
-
response._rowLength = rowLength;
|
2128
2228
|
});
|
2129
2229
|
stream.on("error", function (error) {
|
2130
2230
|
reportGlobalError(response, error);
|