react-server-dom-webpack 19.0.0-rc-76002254-20240724 → 19.0.0-rc-14a4699f-20240725
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 +31 -9
- package/cjs/react-server-dom-webpack-client.edge.development.js +35 -9
- package/cjs/react-server-dom-webpack-client.node.development.js +35 -9
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +35 -9
- package/cjs/react-server-dom-webpack-server.browser.development.js +45 -27
- package/cjs/react-server-dom-webpack-server.browser.production.js +5 -7
- package/cjs/react-server-dom-webpack-server.edge.development.js +46 -27
- package/cjs/react-server-dom-webpack-server.edge.production.js +5 -7
- package/cjs/react-server-dom-webpack-server.node.development.js +45 -26
- package/cjs/react-server-dom-webpack-server.node.production.js +8 -10
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +45 -26
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +8 -10
- package/package.json +3 -3
@@ -1258,7 +1258,8 @@
|
|
1258
1258
|
nonce,
|
1259
1259
|
temporaryReferences,
|
1260
1260
|
findSourceMapURL,
|
1261
|
-
replayConsole
|
1261
|
+
replayConsole,
|
1262
|
+
environmentName
|
1262
1263
|
) {
|
1263
1264
|
var chunks = new Map();
|
1264
1265
|
this._bundlerConfig = bundlerConfig;
|
@@ -1274,6 +1275,8 @@
|
|
1274
1275
|
this._tempRefs = temporaryReferences;
|
1275
1276
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1276
1277
|
this._replayConsole = replayConsole;
|
1278
|
+
this._rootEnvironmentName =
|
1279
|
+
void 0 === environmentName ? "Server" : environmentName;
|
1277
1280
|
this._fromJSON = createFromJSONCallback(this);
|
1278
1281
|
}
|
1279
1282
|
function resolveBuffer(response, id, buffer) {
|
@@ -1497,7 +1500,14 @@
|
|
1497
1500
|
}
|
1498
1501
|
);
|
1499
1502
|
}
|
1500
|
-
function createFakeFunction(
|
1503
|
+
function createFakeFunction(
|
1504
|
+
name,
|
1505
|
+
filename,
|
1506
|
+
sourceMap,
|
1507
|
+
line,
|
1508
|
+
col,
|
1509
|
+
environmentName
|
1510
|
+
) {
|
1501
1511
|
name || (name = "<anonymous>");
|
1502
1512
|
var encodedName = JSON.stringify(name);
|
1503
1513
|
1 >= line
|
@@ -1520,6 +1530,8 @@
|
|
1520
1530
|
sourceMap
|
1521
1531
|
? ((col +=
|
1522
1532
|
"\n//# sourceURL=rsc://React/" +
|
1533
|
+
encodeURIComponent(environmentName) +
|
1534
|
+
"/" +
|
1523
1535
|
filename +
|
1524
1536
|
"?" +
|
1525
1537
|
fakeFunctionIdx++),
|
@@ -1542,7 +1554,8 @@
|
|
1542
1554
|
(null != debugInfo.stack &&
|
1543
1555
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
1544
1556
|
response,
|
1545
|
-
debugInfo.stack
|
1557
|
+
debugInfo.stack,
|
1558
|
+
null == debugInfo.env ? "" : debugInfo.env
|
1546
1559
|
)),
|
1547
1560
|
null != debugInfo.owner &&
|
1548
1561
|
initializeFakeStack(response, debugInfo.owner));
|
@@ -1874,7 +1887,8 @@
|
|
1874
1887
|
? options.temporaryReferences
|
1875
1888
|
: void 0,
|
1876
1889
|
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
1877
|
-
options ? !1 !== options.replayConsoleLogs : !0
|
1890
|
+
options ? !1 !== options.replayConsoleLogs : !0,
|
1891
|
+
options && options.environmentName ? options.environmentName : void 0
|
1878
1892
|
);
|
1879
1893
|
}
|
1880
1894
|
function startReadingFromStream(response, stream) {
|
@@ -2039,20 +2053,28 @@
|
|
2039
2053
|
fakeFunctionCache = new Map(),
|
2040
2054
|
fakeFunctionIdx = 0;
|
2041
2055
|
ReactDOM = {
|
2042
|
-
"react-stack-bottom-frame": function (response, stack) {
|
2056
|
+
"react-stack-bottom-frame": function (response, stack, environmentName) {
|
2043
2057
|
for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
|
2044
2058
|
var frame = stack[i],
|
2045
|
-
frameKey = frame.join("-"),
|
2059
|
+
frameKey = frame.join("-") + "-" + environmentName,
|
2046
2060
|
fn = fakeFunctionCache.get(frameKey);
|
2047
2061
|
if (void 0 === fn) {
|
2048
2062
|
fn = frame[0];
|
2049
2063
|
var filename = frame[1],
|
2050
2064
|
line = frame[2];
|
2051
2065
|
frame = frame[3];
|
2052
|
-
var
|
2053
|
-
|
2066
|
+
var findSourceMapURL = response._debugFindSourceMapURL;
|
2067
|
+
findSourceMapURL = findSourceMapURL
|
2068
|
+
? findSourceMapURL(filename, environmentName)
|
2054
2069
|
: null;
|
2055
|
-
fn = createFakeFunction(
|
2070
|
+
fn = createFakeFunction(
|
2071
|
+
fn,
|
2072
|
+
filename,
|
2073
|
+
findSourceMapURL,
|
2074
|
+
line,
|
2075
|
+
frame,
|
2076
|
+
environmentName
|
2077
|
+
);
|
2056
2078
|
fakeFunctionCache.set(frameKey, fn);
|
2057
2079
|
}
|
2058
2080
|
callStack = fn.bind(null, callStack);
|
@@ -1429,7 +1429,8 @@
|
|
1429
1429
|
nonce,
|
1430
1430
|
temporaryReferences,
|
1431
1431
|
findSourceMapURL,
|
1432
|
-
replayConsole
|
1432
|
+
replayConsole,
|
1433
|
+
environmentName
|
1433
1434
|
) {
|
1434
1435
|
var chunks = new Map();
|
1435
1436
|
this._bundlerConfig = bundlerConfig;
|
@@ -1445,6 +1446,8 @@
|
|
1445
1446
|
this._tempRefs = temporaryReferences;
|
1446
1447
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1447
1448
|
this._replayConsole = replayConsole;
|
1449
|
+
this._rootEnvironmentName =
|
1450
|
+
void 0 === environmentName ? "Server" : environmentName;
|
1448
1451
|
this._fromJSON = createFromJSONCallback(this);
|
1449
1452
|
}
|
1450
1453
|
function resolveBuffer(response, id, buffer) {
|
@@ -1673,7 +1676,14 @@
|
|
1673
1676
|
}
|
1674
1677
|
);
|
1675
1678
|
}
|
1676
|
-
function createFakeFunction(
|
1679
|
+
function createFakeFunction(
|
1680
|
+
name,
|
1681
|
+
filename,
|
1682
|
+
sourceMap,
|
1683
|
+
line,
|
1684
|
+
col,
|
1685
|
+
environmentName
|
1686
|
+
) {
|
1677
1687
|
name || (name = "<anonymous>");
|
1678
1688
|
var encodedName = JSON.stringify(name);
|
1679
1689
|
1 >= line
|
@@ -1696,6 +1706,8 @@
|
|
1696
1706
|
sourceMap
|
1697
1707
|
? ((col +=
|
1698
1708
|
"\n//# sourceURL=rsc://React/" +
|
1709
|
+
encodeURIComponent(environmentName) +
|
1710
|
+
"/" +
|
1699
1711
|
filename +
|
1700
1712
|
"?" +
|
1701
1713
|
fakeFunctionIdx++),
|
@@ -1718,7 +1730,8 @@
|
|
1718
1730
|
(null != debugInfo.stack &&
|
1719
1731
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
1720
1732
|
response,
|
1721
|
-
debugInfo.stack
|
1733
|
+
debugInfo.stack,
|
1734
|
+
null == debugInfo.env ? "" : debugInfo.env
|
1722
1735
|
)),
|
1723
1736
|
null != debugInfo.owner &&
|
1724
1737
|
initializeFakeStack(response, debugInfo.owner));
|
@@ -2055,7 +2068,8 @@
|
|
2055
2068
|
? options.temporaryReferences
|
2056
2069
|
: void 0,
|
2057
2070
|
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
2058
|
-
options ? !0 === options.replayConsoleLogs : !1
|
2071
|
+
options ? !0 === options.replayConsoleLogs : !1,
|
2072
|
+
options && options.environmentName ? options.environmentName : void 0
|
2059
2073
|
);
|
2060
2074
|
}
|
2061
2075
|
function startReadingFromStream(response, stream) {
|
@@ -2215,20 +2229,32 @@
|
|
2215
2229
|
fakeFunctionCache = new Map(),
|
2216
2230
|
fakeFunctionIdx = 0,
|
2217
2231
|
createFakeJSXCallStack = {
|
2218
|
-
"react-stack-bottom-frame": function (
|
2232
|
+
"react-stack-bottom-frame": function (
|
2233
|
+
response,
|
2234
|
+
stack,
|
2235
|
+
environmentName
|
2236
|
+
) {
|
2219
2237
|
for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
|
2220
2238
|
var frame = stack[i],
|
2221
|
-
frameKey = frame.join("-"),
|
2239
|
+
frameKey = frame.join("-") + "-" + environmentName,
|
2222
2240
|
fn = fakeFunctionCache.get(frameKey);
|
2223
2241
|
if (void 0 === fn) {
|
2224
2242
|
fn = frame[0];
|
2225
2243
|
var filename = frame[1],
|
2226
2244
|
line = frame[2];
|
2227
2245
|
frame = frame[3];
|
2228
|
-
var
|
2229
|
-
|
2246
|
+
var findSourceMapURL = response._debugFindSourceMapURL;
|
2247
|
+
findSourceMapURL = findSourceMapURL
|
2248
|
+
? findSourceMapURL(filename, environmentName)
|
2230
2249
|
: null;
|
2231
|
-
fn = createFakeFunction(
|
2250
|
+
fn = createFakeFunction(
|
2251
|
+
fn,
|
2252
|
+
filename,
|
2253
|
+
findSourceMapURL,
|
2254
|
+
line,
|
2255
|
+
frame,
|
2256
|
+
environmentName
|
2257
|
+
);
|
2232
2258
|
fakeFunctionCache.set(frameKey, fn);
|
2233
2259
|
}
|
2234
2260
|
callStack = fn.bind(null, callStack);
|
@@ -1429,7 +1429,8 @@
|
|
1429
1429
|
nonce,
|
1430
1430
|
temporaryReferences,
|
1431
1431
|
findSourceMapURL,
|
1432
|
-
replayConsole
|
1432
|
+
replayConsole,
|
1433
|
+
environmentName
|
1433
1434
|
) {
|
1434
1435
|
var chunks = new Map();
|
1435
1436
|
this._bundlerConfig = bundlerConfig;
|
@@ -1445,6 +1446,8 @@
|
|
1445
1446
|
this._tempRefs = temporaryReferences;
|
1446
1447
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1447
1448
|
this._replayConsole = replayConsole;
|
1449
|
+
this._rootEnvironmentName =
|
1450
|
+
void 0 === environmentName ? "Server" : environmentName;
|
1448
1451
|
this._fromJSON = createFromJSONCallback(this);
|
1449
1452
|
}
|
1450
1453
|
function resolveBuffer(response, id, buffer) {
|
@@ -1673,7 +1676,14 @@
|
|
1673
1676
|
}
|
1674
1677
|
);
|
1675
1678
|
}
|
1676
|
-
function createFakeFunction(
|
1679
|
+
function createFakeFunction(
|
1680
|
+
name,
|
1681
|
+
filename,
|
1682
|
+
sourceMap,
|
1683
|
+
line,
|
1684
|
+
col,
|
1685
|
+
environmentName
|
1686
|
+
) {
|
1677
1687
|
name || (name = "<anonymous>");
|
1678
1688
|
var encodedName = JSON.stringify(name);
|
1679
1689
|
1 >= line
|
@@ -1696,6 +1706,8 @@
|
|
1696
1706
|
sourceMap
|
1697
1707
|
? ((col +=
|
1698
1708
|
"\n//# sourceURL=rsc://React/" +
|
1709
|
+
encodeURIComponent(environmentName) +
|
1710
|
+
"/" +
|
1699
1711
|
filename +
|
1700
1712
|
"?" +
|
1701
1713
|
fakeFunctionIdx++),
|
@@ -1718,7 +1730,8 @@
|
|
1718
1730
|
(null != debugInfo.stack &&
|
1719
1731
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
1720
1732
|
response,
|
1721
|
-
debugInfo.stack
|
1733
|
+
debugInfo.stack,
|
1734
|
+
null == debugInfo.env ? "" : debugInfo.env
|
1722
1735
|
)),
|
1723
1736
|
null != debugInfo.owner &&
|
1724
1737
|
initializeFakeStack(response, debugInfo.owner));
|
@@ -2107,20 +2120,32 @@
|
|
2107
2120
|
fakeFunctionCache = new Map(),
|
2108
2121
|
fakeFunctionIdx = 0,
|
2109
2122
|
createFakeJSXCallStack = {
|
2110
|
-
"react-stack-bottom-frame": function (
|
2123
|
+
"react-stack-bottom-frame": function (
|
2124
|
+
response,
|
2125
|
+
stack,
|
2126
|
+
environmentName
|
2127
|
+
) {
|
2111
2128
|
for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
|
2112
2129
|
var frame = stack[i],
|
2113
|
-
frameKey = frame.join("-"),
|
2130
|
+
frameKey = frame.join("-") + "-" + environmentName,
|
2114
2131
|
fn = fakeFunctionCache.get(frameKey);
|
2115
2132
|
if (void 0 === fn) {
|
2116
2133
|
fn = frame[0];
|
2117
2134
|
var filename = frame[1],
|
2118
2135
|
line = frame[2];
|
2119
2136
|
frame = frame[3];
|
2120
|
-
var
|
2121
|
-
|
2137
|
+
var findSourceMapURL = response._debugFindSourceMapURL;
|
2138
|
+
findSourceMapURL = findSourceMapURL
|
2139
|
+
? findSourceMapURL(filename, environmentName)
|
2122
2140
|
: null;
|
2123
|
-
fn = createFakeFunction(
|
2141
|
+
fn = createFakeFunction(
|
2142
|
+
fn,
|
2143
|
+
filename,
|
2144
|
+
findSourceMapURL,
|
2145
|
+
line,
|
2146
|
+
frame,
|
2147
|
+
environmentName
|
2148
|
+
);
|
2124
2149
|
fakeFunctionCache.set(frameKey, fn);
|
2125
2150
|
}
|
2126
2151
|
callStack = fn.bind(null, callStack);
|
@@ -2140,7 +2165,8 @@
|
|
2140
2165
|
options && "string" === typeof options.nonce ? options.nonce : void 0,
|
2141
2166
|
void 0,
|
2142
2167
|
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
2143
|
-
options ? !0 === options.replayConsoleLogs : !1
|
2168
|
+
options ? !0 === options.replayConsoleLogs : !1,
|
2169
|
+
options && options.environmentName ? options.environmentName : void 0
|
2144
2170
|
);
|
2145
2171
|
stream.on("data", function (chunk) {
|
2146
2172
|
if ("string" === typeof chunk) {
|
@@ -1404,7 +1404,8 @@
|
|
1404
1404
|
nonce,
|
1405
1405
|
temporaryReferences,
|
1406
1406
|
findSourceMapURL,
|
1407
|
-
replayConsole
|
1407
|
+
replayConsole,
|
1408
|
+
environmentName
|
1408
1409
|
) {
|
1409
1410
|
var chunks = new Map();
|
1410
1411
|
this._bundlerConfig = bundlerConfig;
|
@@ -1420,6 +1421,8 @@
|
|
1420
1421
|
this._tempRefs = temporaryReferences;
|
1421
1422
|
this._debugFindSourceMapURL = findSourceMapURL;
|
1422
1423
|
this._replayConsole = replayConsole;
|
1424
|
+
this._rootEnvironmentName =
|
1425
|
+
void 0 === environmentName ? "Server" : environmentName;
|
1423
1426
|
this._fromJSON = createFromJSONCallback(this);
|
1424
1427
|
}
|
1425
1428
|
function resolveBuffer(response, id, buffer) {
|
@@ -1648,7 +1651,14 @@
|
|
1648
1651
|
}
|
1649
1652
|
);
|
1650
1653
|
}
|
1651
|
-
function createFakeFunction(
|
1654
|
+
function createFakeFunction(
|
1655
|
+
name,
|
1656
|
+
filename,
|
1657
|
+
sourceMap,
|
1658
|
+
line,
|
1659
|
+
col,
|
1660
|
+
environmentName
|
1661
|
+
) {
|
1652
1662
|
name || (name = "<anonymous>");
|
1653
1663
|
var encodedName = JSON.stringify(name);
|
1654
1664
|
1 >= line
|
@@ -1671,6 +1681,8 @@
|
|
1671
1681
|
sourceMap
|
1672
1682
|
? ((col +=
|
1673
1683
|
"\n//# sourceURL=rsc://React/" +
|
1684
|
+
encodeURIComponent(environmentName) +
|
1685
|
+
"/" +
|
1674
1686
|
filename +
|
1675
1687
|
"?" +
|
1676
1688
|
fakeFunctionIdx++),
|
@@ -1693,7 +1705,8 @@
|
|
1693
1705
|
(null != debugInfo.stack &&
|
1694
1706
|
(debugInfo.debugStack = createFakeJSXCallStackInDEV(
|
1695
1707
|
response,
|
1696
|
-
debugInfo.stack
|
1708
|
+
debugInfo.stack,
|
1709
|
+
null == debugInfo.env ? "" : debugInfo.env
|
1697
1710
|
)),
|
1698
1711
|
null != debugInfo.owner &&
|
1699
1712
|
initializeFakeStack(response, debugInfo.owner));
|
@@ -2082,20 +2095,32 @@
|
|
2082
2095
|
fakeFunctionCache = new Map(),
|
2083
2096
|
fakeFunctionIdx = 0,
|
2084
2097
|
createFakeJSXCallStack = {
|
2085
|
-
"react-stack-bottom-frame": function (
|
2098
|
+
"react-stack-bottom-frame": function (
|
2099
|
+
response,
|
2100
|
+
stack,
|
2101
|
+
environmentName
|
2102
|
+
) {
|
2086
2103
|
for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
|
2087
2104
|
var frame = stack[i],
|
2088
|
-
frameKey = frame.join("-"),
|
2105
|
+
frameKey = frame.join("-") + "-" + environmentName,
|
2089
2106
|
fn = fakeFunctionCache.get(frameKey);
|
2090
2107
|
if (void 0 === fn) {
|
2091
2108
|
fn = frame[0];
|
2092
2109
|
var filename = frame[1],
|
2093
2110
|
line = frame[2];
|
2094
2111
|
frame = frame[3];
|
2095
|
-
var
|
2096
|
-
|
2112
|
+
var findSourceMapURL = response._debugFindSourceMapURL;
|
2113
|
+
findSourceMapURL = findSourceMapURL
|
2114
|
+
? findSourceMapURL(filename, environmentName)
|
2097
2115
|
: null;
|
2098
|
-
fn = createFakeFunction(
|
2116
|
+
fn = createFakeFunction(
|
2117
|
+
fn,
|
2118
|
+
filename,
|
2119
|
+
findSourceMapURL,
|
2120
|
+
line,
|
2121
|
+
frame,
|
2122
|
+
environmentName
|
2123
|
+
);
|
2099
2124
|
fakeFunctionCache.set(frameKey, fn);
|
2100
2125
|
}
|
2101
2126
|
callStack = fn.bind(null, callStack);
|
@@ -2115,7 +2140,8 @@
|
|
2115
2140
|
options && "string" === typeof options.nonce ? options.nonce : void 0,
|
2116
2141
|
void 0,
|
2117
2142
|
options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
|
2118
|
-
options ? !0 === options.replayConsoleLogs : !1
|
2143
|
+
options ? !0 === options.replayConsoleLogs : !1,
|
2144
|
+
options && options.environmentName ? options.environmentName : void 0
|
2119
2145
|
);
|
2120
2146
|
stream.on("data", function (chunk) {
|
2121
2147
|
if ("string" === typeof chunk) {
|
@@ -472,8 +472,12 @@
|
|
472
472
|
"\n " + objKind + "\n " + objectOrArray)
|
473
473
|
: "\n " + objKind;
|
474
474
|
}
|
475
|
-
function
|
476
|
-
return
|
475
|
+
function defaultFilterStackFrame(filename) {
|
476
|
+
return (
|
477
|
+
"" !== filename &&
|
478
|
+
!filename.startsWith("node:") &&
|
479
|
+
!filename.includes("node_modules")
|
480
|
+
);
|
477
481
|
}
|
478
482
|
function getCurrentStackInDEV() {
|
479
483
|
return "";
|
@@ -488,8 +492,9 @@
|
|
488
492
|
onError,
|
489
493
|
identifierPrefix,
|
490
494
|
onPostpone,
|
495
|
+
temporaryReferences,
|
491
496
|
environmentName,
|
492
|
-
|
497
|
+
filterStackFrame
|
493
498
|
) {
|
494
499
|
if (
|
495
500
|
null !== ReactSharedInternalsServer.A &&
|
@@ -538,6 +543,10 @@
|
|
538
543
|
return environmentName;
|
539
544
|
}
|
540
545
|
: environmentName;
|
546
|
+
this.filterStackFrame =
|
547
|
+
void 0 === filterStackFrame
|
548
|
+
? defaultFilterStackFrame
|
549
|
+
: filterStackFrame;
|
541
550
|
this.didWarnForKey = null;
|
542
551
|
model = createTask(this, model, null, !1, abortSet, null);
|
543
552
|
pingedTasks.push(model);
|
@@ -765,7 +774,7 @@
|
|
765
774
|
lazyType._debugInfo = wakeable._debugInfo || [];
|
766
775
|
return lazyType;
|
767
776
|
}
|
768
|
-
function callWithDebugContextInDEV(task, callback, arg) {
|
777
|
+
function callWithDebugContextInDEV(request, task, callback, arg) {
|
769
778
|
currentOwner = { env: task.environmentName, owner: task.debugOwner };
|
770
779
|
try {
|
771
780
|
return callback(arg);
|
@@ -826,7 +835,7 @@
|
|
826
835
|
Object.prototype.toString.call(Component) &&
|
827
836
|
"[object Generator]" ===
|
828
837
|
Object.prototype.toString.call(iterableChild)) ||
|
829
|
-
callWithDebugContextInDEV(task, function () {
|
838
|
+
callWithDebugContextInDEV(request, task, function () {
|
830
839
|
console.error(
|
831
840
|
"Returning an Iterator from a Server Component is not supported since it cannot be looped over more than once. "
|
832
841
|
);
|
@@ -849,7 +858,7 @@
|
|
849
858
|
Object.prototype.toString.call(Component) &&
|
850
859
|
"[object AsyncGenerator]" ===
|
851
860
|
Object.prototype.toString.call(_iterableChild)) ||
|
852
|
-
callWithDebugContextInDEV(task, function () {
|
861
|
+
callWithDebugContextInDEV(request, task, function () {
|
853
862
|
console.error(
|
854
863
|
"Returning an AsyncIterator from a Server Component is not supported since it cannot be looped over more than once. "
|
855
864
|
);
|
@@ -865,10 +874,10 @@
|
|
865
874
|
? (task.keyPath =
|
866
875
|
null === prevThenableState ? key : prevThenableState + "," + key)
|
867
876
|
: null === prevThenableState && (task.implicitSlot = !0);
|
868
|
-
|
877
|
+
key = renderModelDestructive(request, task, emptyRoot, "", props);
|
869
878
|
task.keyPath = prevThenableState;
|
870
879
|
task.implicitSlot = componentDebugID;
|
871
|
-
return
|
880
|
+
return key;
|
872
881
|
}
|
873
882
|
function renderFragment(request, task, children) {
|
874
883
|
for (var i = 0; i < children.length; i++) {
|
@@ -1027,7 +1036,7 @@
|
|
1027
1036
|
"object" !== typeof originalValue ||
|
1028
1037
|
originalValue === value ||
|
1029
1038
|
originalValue instanceof Date ||
|
1030
|
-
callWithDebugContextInDEV(task, function () {
|
1039
|
+
callWithDebugContextInDEV(request, task, function () {
|
1031
1040
|
"Object" !== objectName(originalValue)
|
1032
1041
|
? "string" === typeof jsxChildrenParents.get(parent)
|
1033
1042
|
? console.error(
|
@@ -1452,10 +1461,11 @@
|
|
1452
1461
|
elementReference = value[ASYNC_ITERATOR];
|
1453
1462
|
if ("function" === typeof elementReference)
|
1454
1463
|
return renderAsyncFragment(request, task, value, elementReference);
|
1455
|
-
|
1464
|
+
elementReference = getPrototypeOf(value);
|
1456
1465
|
if (
|
1457
|
-
|
1458
|
-
(null ===
|
1466
|
+
elementReference !== ObjectPrototype &&
|
1467
|
+
(null === elementReference ||
|
1468
|
+
null !== getPrototypeOf(elementReference))
|
1459
1469
|
)
|
1460
1470
|
throw Error(
|
1461
1471
|
"Only plain objects, and a few built-ins, can be passed to Client Components from Server Components. Classes or null prototypes are not supported." +
|
@@ -1473,7 +1483,7 @@
|
|
1473
1483
|
)
|
1474
1484
|
return { name: value.name, env: value.env, owner: value.owner };
|
1475
1485
|
if ("Object" !== objectName(value))
|
1476
|
-
callWithDebugContextInDEV(task, function () {
|
1486
|
+
callWithDebugContextInDEV(request, task, function () {
|
1477
1487
|
console.error(
|
1478
1488
|
"Only plain objects can be passed to Client Components from Server Components. %s objects are not supported.%s",
|
1479
1489
|
objectName(value),
|
@@ -1481,7 +1491,7 @@
|
|
1481
1491
|
);
|
1482
1492
|
});
|
1483
1493
|
else if (!isSimpleObject(value))
|
1484
|
-
callWithDebugContextInDEV(task, function () {
|
1494
|
+
callWithDebugContextInDEV(request, task, function () {
|
1485
1495
|
console.error(
|
1486
1496
|
"Only plain objects can be passed to Client Components from Server Components. Classes or other objects with methods are not supported.%s",
|
1487
1497
|
describeObjectForErrorMessage(parent, parentPropertyName)
|
@@ -1490,7 +1500,7 @@
|
|
1490
1500
|
else if (Object.getOwnPropertySymbols) {
|
1491
1501
|
var symbols = Object.getOwnPropertySymbols(value);
|
1492
1502
|
0 < symbols.length &&
|
1493
|
-
callWithDebugContextInDEV(task, function () {
|
1503
|
+
callWithDebugContextInDEV(request, task, function () {
|
1494
1504
|
console.error(
|
1495
1505
|
"Only plain objects can be passed to Client Components from Server Components. Objects with symbol properties like %s are not supported.%s",
|
1496
1506
|
symbols[0].description,
|
@@ -1591,7 +1601,7 @@
|
|
1591
1601
|
var onError = request.onError;
|
1592
1602
|
var errorDigest =
|
1593
1603
|
null !== task
|
1594
|
-
? callWithDebugContextInDEV(task, onError, error)
|
1604
|
+
? callWithDebugContextInDEV(request, task, onError, error)
|
1595
1605
|
: onError(error);
|
1596
1606
|
} finally {
|
1597
1607
|
currentRequest = prevRequest;
|
@@ -1615,6 +1625,7 @@
|
|
1615
1625
|
try {
|
1616
1626
|
if (error instanceof Error) {
|
1617
1627
|
var message = String(error.message);
|
1628
|
+
var filterStackFrame = request.filterStackFrame;
|
1618
1629
|
a: {
|
1619
1630
|
var previousPrepare = Error.prepareStackTrace;
|
1620
1631
|
Error.prepareStackTrace = prepareStackTrace;
|
@@ -1652,16 +1663,21 @@
|
|
1652
1663
|
]);
|
1653
1664
|
}
|
1654
1665
|
}
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1666
|
+
for (frames = 0; frames < stack.length; frames++) {
|
1667
|
+
var callsite = stack[frames],
|
1668
|
+
functionName = callsite[0],
|
1658
1669
|
url = callsite[1];
|
1659
1670
|
if (url.startsWith("rsc://React/")) {
|
1660
|
-
var
|
1661
|
-
|
1671
|
+
var envIdx = url.indexOf("/", 12),
|
1672
|
+
suffixIdx = url.lastIndexOf("?");
|
1673
|
+
-1 < envIdx &&
|
1674
|
+
-1 < suffixIdx &&
|
1675
|
+
(url = callsite[1] = url.slice(envIdx + 1, suffixIdx));
|
1662
1676
|
}
|
1677
|
+
filterStackFrame(url, functionName) ||
|
1678
|
+
(stack.splice(frames, 1), frames--);
|
1663
1679
|
}
|
1664
|
-
var stack$jscomp$
|
1680
|
+
var stack$jscomp$0 = stack;
|
1665
1681
|
var errorEnv = error.environmentName;
|
1666
1682
|
"string" === typeof errorEnv && (env = errorEnv);
|
1667
1683
|
} else
|
@@ -1669,14 +1685,16 @@
|
|
1669
1685
|
"object" === typeof error && null !== error
|
1670
1686
|
? describeObjectForErrorMessage(error)
|
1671
1687
|
: String(error)),
|
1672
|
-
(stack$jscomp$
|
1688
|
+
(stack$jscomp$0 = []);
|
1673
1689
|
} catch (x) {
|
1674
|
-
message =
|
1690
|
+
(message =
|
1691
|
+
"An error occurred but serializing the error message failed."),
|
1692
|
+
(stack$jscomp$0 = []);
|
1675
1693
|
}
|
1676
1694
|
digest = {
|
1677
1695
|
digest: digest,
|
1678
1696
|
message: message,
|
1679
|
-
stack: stack$jscomp$
|
1697
|
+
stack: stack$jscomp$0,
|
1680
1698
|
env: env
|
1681
1699
|
};
|
1682
1700
|
id = id.toString(16) + ":E" + stringify(digest) + "\n";
|
@@ -3302,7 +3320,6 @@
|
|
3302
3320
|
jsxPropsParents = new WeakMap(),
|
3303
3321
|
jsxChildrenParents = new WeakMap(),
|
3304
3322
|
CLIENT_REFERENCE_TAG = Symbol.for("react.client.reference"),
|
3305
|
-
externalRegExp = /\/node_modules\/|^node:|^$/,
|
3306
3323
|
ObjectPrototype = Object.prototype,
|
3307
3324
|
stringify = JSON.stringify,
|
3308
3325
|
AbortSigil = {},
|
@@ -3440,8 +3457,9 @@
|
|
3440
3457
|
options ? options.onError : void 0,
|
3441
3458
|
options ? options.identifierPrefix : void 0,
|
3442
3459
|
options ? options.onPostpone : void 0,
|
3460
|
+
options ? options.temporaryReferences : void 0,
|
3443
3461
|
options ? options.environmentName : void 0,
|
3444
|
-
options ? options.
|
3462
|
+
options ? options.filterStackFrame : void 0
|
3445
3463
|
);
|
3446
3464
|
if (options && options.signal) {
|
3447
3465
|
var signal = options.signal;
|
@@ -713,7 +713,6 @@ function RequestInstance(
|
|
713
713
|
onError,
|
714
714
|
identifierPrefix,
|
715
715
|
onPostpone,
|
716
|
-
environmentName,
|
717
716
|
temporaryReferences
|
718
717
|
) {
|
719
718
|
if (
|
@@ -722,9 +721,9 @@ function RequestInstance(
|
|
722
721
|
)
|
723
722
|
throw Error("Currently React only supports one RSC renderer at a time.");
|
724
723
|
ReactSharedInternalsServer.A = DefaultAsyncDispatcher;
|
725
|
-
var abortSet = new Set()
|
726
|
-
|
727
|
-
|
724
|
+
var abortSet = new Set(),
|
725
|
+
pingedTasks = [],
|
726
|
+
hints = new Set();
|
728
727
|
this.status = 0;
|
729
728
|
this.flushScheduled = !1;
|
730
729
|
this.destination = this.fatalError = null;
|
@@ -734,7 +733,7 @@ function RequestInstance(
|
|
734
733
|
this.hints = hints;
|
735
734
|
this.abortListeners = new Set();
|
736
735
|
this.abortableTasks = abortSet;
|
737
|
-
this.pingedTasks =
|
736
|
+
this.pingedTasks = pingedTasks;
|
738
737
|
this.completedImportChunks = [];
|
739
738
|
this.completedHintChunks = [];
|
740
739
|
this.completedRegularChunks = [];
|
@@ -750,7 +749,7 @@ function RequestInstance(
|
|
750
749
|
this.onError = void 0 === onError ? defaultErrorHandler : onError;
|
751
750
|
this.onPostpone = void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
|
752
751
|
model = createTask(this, model, null, !1, abortSet);
|
753
|
-
|
752
|
+
pingedTasks.push(model);
|
754
753
|
}
|
755
754
|
var currentRequest = null;
|
756
755
|
function serializeThenable(request, task, thenable) {
|
@@ -2655,7 +2654,6 @@ exports.renderToReadableStream = function (model, webpackMap, options) {
|
|
2655
2654
|
options ? options.onError : void 0,
|
2656
2655
|
options ? options.identifierPrefix : void 0,
|
2657
2656
|
options ? options.onPostpone : void 0,
|
2658
|
-
options ? options.environmentName : void 0,
|
2659
2657
|
options ? options.temporaryReferences : void 0
|
2660
2658
|
);
|
2661
2659
|
if (options && options.signal) {
|