react-server-dom-webpack 19.0.0-rc-512b09b2-20240718 → 19.0.0-rc-f6cce072-20240723

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.
@@ -84,8 +84,8 @@
84
84
  return requireAsyncModule(metadata[0]);
85
85
  })
86
86
  : 0 < promises.length
87
- ? Promise.all(promises)
88
- : null;
87
+ ? Promise.all(promises)
88
+ : null;
89
89
  }
90
90
  function prepareDestinationWithChunks(
91
91
  moduleLoading,
@@ -175,8 +175,8 @@
175
175
  return value.$$typeof === CLIENT_REFERENCE_TAG
176
176
  ? "client"
177
177
  : (value = value.displayName || value.name)
178
- ? "function " + value
179
- : "function";
178
+ ? "function " + value
179
+ : "function";
180
180
  default:
181
181
  return String(value);
182
182
  }
@@ -219,8 +219,8 @@
219
219
  "string" === typeof value
220
220
  ? value
221
221
  : "object" === typeof value && null !== value
222
- ? "{" + describeObjectForErrorMessage(value) + "}"
223
- : "{" + describeValueForErrorMessage(value) + "}";
222
+ ? "{" + describeObjectForErrorMessage(value) + "}"
223
+ : "{" + describeValueForErrorMessage(value) + "}";
224
224
  "" + i === expandedName
225
225
  ? ((start = objKind.length),
226
226
  (length = value.length),
@@ -306,9 +306,9 @@
306
306
  return void 0 === expandedName
307
307
  ? objKind
308
308
  : -1 < start && 0 < length
309
- ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
310
- "\n " + objKind + "\n " + objectOrArray)
311
- : "\n " + objKind;
309
+ ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
310
+ "\n " + objKind + "\n " + objectOrArray)
311
+ : "\n " + objKind;
312
312
  }
313
313
  function serializeNumber(number) {
314
314
  return Number.isFinite(number)
@@ -316,10 +316,10 @@
316
316
  ? "$-0"
317
317
  : number
318
318
  : Infinity === number
319
- ? "$Infinity"
320
- : -Infinity === number
321
- ? "$-Infinity"
322
- : "$NaN";
319
+ ? "$Infinity"
320
+ : -Infinity === number
321
+ ? "$-Infinity"
322
+ : "$NaN";
323
323
  }
324
324
  function processReply(
325
325
  root,
@@ -631,24 +631,24 @@
631
631
  describeObjectForErrorMessage(this, key)
632
632
  )
633
633
  : "Object" !== objectName(value)
634
- ? console.error(
635
- "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
636
- objectName(value),
637
- describeObjectForErrorMessage(this, key)
638
- )
639
- : isSimpleObject(value)
640
- ? Object.getOwnPropertySymbols &&
641
- ((parentReference = Object.getOwnPropertySymbols(value)),
642
- 0 < parentReference.length &&
643
- console.error(
644
- "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s",
645
- parentReference[0].description,
634
+ ? console.error(
635
+ "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
636
+ objectName(value),
646
637
  describeObjectForErrorMessage(this, key)
647
- ))
648
- : console.error(
649
- "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s",
650
- describeObjectForErrorMessage(this, key)
651
- );
638
+ )
639
+ : isSimpleObject(value)
640
+ ? Object.getOwnPropertySymbols &&
641
+ ((parentReference = Object.getOwnPropertySymbols(value)),
642
+ 0 < parentReference.length &&
643
+ console.error(
644
+ "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s",
645
+ parentReference[0].description,
646
+ describeObjectForErrorMessage(this, key)
647
+ ))
648
+ : console.error(
649
+ "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s",
650
+ describeObjectForErrorMessage(this, key)
651
+ );
652
652
  return value;
653
653
  }
654
654
  if ("string" === typeof value) {
@@ -1083,10 +1083,10 @@
1083
1083
  "*" === metadata[2]
1084
1084
  ? moduleExports
1085
1085
  : "" === metadata[2]
1086
- ? moduleExports.__esModule
1087
- ? moduleExports.default
1088
- : moduleExports
1089
- : moduleExports[metadata[2]];
1086
+ ? moduleExports.__esModule
1087
+ ? moduleExports.default
1088
+ : moduleExports
1089
+ : moduleExports[metadata[2]];
1090
1090
  chunk.status = "fulfilled";
1091
1091
  chunk.value = value;
1092
1092
  } catch (error) {
@@ -1660,6 +1660,56 @@
1660
1660
  }
1661
1661
  );
1662
1662
  }
1663
+ function createFakeFunction(name, filename, sourceMap, line, col) {
1664
+ name || (name = "(anonymous)");
1665
+ var encodedName = JSON.stringify(name);
1666
+ 1 >= line
1667
+ ? ((line = encodedName.length + 7),
1668
+ (col =
1669
+ "({" +
1670
+ encodedName +
1671
+ ":_=>" +
1672
+ " ".repeat(col < line ? 0 : col - line) +
1673
+ "_()})\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */"))
1674
+ : (col =
1675
+ "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" +
1676
+ "\n".repeat(line - 2) +
1677
+ "({" +
1678
+ encodedName +
1679
+ ":_=>\n" +
1680
+ " ".repeat(1 > col ? 0 : col - 1) +
1681
+ "_()})");
1682
+ filename.startsWith("/") && (filename = "file://" + filename);
1683
+ sourceMap
1684
+ ? ((col +=
1685
+ "\n//# sourceURL=rsc://React/" +
1686
+ filename +
1687
+ "?" +
1688
+ fakeFunctionIdx++),
1689
+ (col += "\n//# sourceMappingURL=" + sourceMap))
1690
+ : filename && (col += "\n//# sourceURL=" + filename);
1691
+ try {
1692
+ var fn = (0, eval)(col)[name];
1693
+ } catch (x) {
1694
+ fn = function (_) {
1695
+ return _();
1696
+ };
1697
+ }
1698
+ return fn;
1699
+ }
1700
+ function fakeJSXCallSite() {
1701
+ return Error("react-stack-top-frame");
1702
+ }
1703
+ function initializeFakeStack(response, debugInfo) {
1704
+ void 0 === debugInfo.debugStack &&
1705
+ (null != debugInfo.stack &&
1706
+ (debugInfo.debugStack = createFakeJSXCallStackInDEV(
1707
+ response,
1708
+ debugInfo.stack
1709
+ )),
1710
+ null != debugInfo.owner &&
1711
+ initializeFakeStack(response, debugInfo.owner));
1712
+ }
1663
1713
  function mergeBuffer(buffer, lastChunk) {
1664
1714
  for (
1665
1715
  var l = buffer.length, byteLength = lastChunk.length, i = 0;
@@ -1802,29 +1852,53 @@
1802
1852
  }
1803
1853
  break;
1804
1854
  case 69:
1805
- tag = JSON.parse(row);
1806
- var digest = tag.digest,
1807
- env = tag.env;
1855
+ var errorInfo = JSON.parse(row);
1856
+ tag = errorInfo.digest;
1857
+ var env = errorInfo.env;
1808
1858
  row = Error(
1809
- tag.message ||
1859
+ errorInfo.message ||
1810
1860
  "An error occurred in the Server Components render but no message was provided"
1811
1861
  );
1812
- row.stack = tag.stack;
1813
- row.digest = digest;
1862
+ errorInfo = errorInfo.stack;
1863
+ var v8StyleStack = row.name + ": " + row.message;
1864
+ if (errorInfo)
1865
+ for (var i = 0; i < errorInfo.length; i++) {
1866
+ var frame = errorInfo[i],
1867
+ name = frame[0],
1868
+ filename = frame[1],
1869
+ line = frame[2];
1870
+ frame = frame[3];
1871
+ v8StyleStack = name
1872
+ ? v8StyleStack +
1873
+ ("\n at " +
1874
+ name +
1875
+ " (" +
1876
+ filename +
1877
+ ":" +
1878
+ line +
1879
+ ":" +
1880
+ frame +
1881
+ ")")
1882
+ : v8StyleStack +
1883
+ ("\n at " + filename + ":" + line + ":" + frame);
1884
+ }
1885
+ row.stack = v8StyleStack;
1886
+ row.digest = tag;
1814
1887
  row.environmentName = env;
1815
1888
  tag = response._chunks;
1816
- (digest = tag.get(id))
1817
- ? triggerErrorOnChunk(digest, row)
1889
+ (env = tag.get(id))
1890
+ ? triggerErrorOnChunk(env, row)
1818
1891
  : tag.set(id, new Chunk("rejected", null, row, response));
1819
1892
  break;
1820
1893
  case 84:
1821
1894
  tag = response._chunks;
1822
- (digest = tag.get(id)) && "pending" !== digest.status
1823
- ? digest.reason.enqueueValue(row)
1895
+ (env = tag.get(id)) && "pending" !== env.status
1896
+ ? env.reason.enqueueValue(row)
1824
1897
  : tag.set(id, new Chunk("fulfilled", row, null, response));
1825
1898
  break;
1826
1899
  case 68:
1827
1900
  row = JSON.parse(row, response._fromJSON);
1901
+ initializeFakeStack(response, row);
1828
1902
  response = getChunk(response, id);
1829
1903
  (response._debugInfo || (response._debugInfo = [])).push(row);
1830
1904
  break;
@@ -1886,8 +1960,8 @@
1886
1960
  break;
1887
1961
  default:
1888
1962
  (tag = response._chunks),
1889
- (digest = tag.get(id))
1890
- ? resolveModelChunk(digest, row)
1963
+ (env = tag.get(id))
1964
+ ? resolveModelChunk(env, row)
1891
1965
  : tag.set(id, new Chunk("resolved_model", row, null, response));
1892
1966
  }
1893
1967
  }
@@ -2016,7 +2090,34 @@
2016
2090
  reject && reject(this.reason);
2017
2091
  }
2018
2092
  };
2019
- var initializingHandler = null;
2093
+ var initializingHandler = null,
2094
+ fakeFunctionCache = new Map(),
2095
+ fakeFunctionIdx = 0,
2096
+ createFakeJSXCallStack = {
2097
+ "react-stack-bottom-frame": function (response, stack) {
2098
+ for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
2099
+ var frame = stack[i],
2100
+ frameKey = frame.join("-"),
2101
+ fn = fakeFunctionCache.get(frameKey);
2102
+ if (void 0 === fn) {
2103
+ fn = frame[0];
2104
+ var filename = frame[1],
2105
+ line = frame[2];
2106
+ frame = frame[3];
2107
+ var sourceMap = response._debugFindSourceMapURL
2108
+ ? response._debugFindSourceMapURL(filename)
2109
+ : null;
2110
+ fn = createFakeFunction(fn, filename, sourceMap, line, frame);
2111
+ fakeFunctionCache.set(frameKey, fn);
2112
+ }
2113
+ callStack = fn.bind(null, callStack);
2114
+ }
2115
+ return callStack();
2116
+ }
2117
+ },
2118
+ createFakeJSXCallStackInDEV = createFakeJSXCallStack[
2119
+ "react-stack-bottom-frame"
2120
+ ].bind(createFakeJSXCallStack);
2020
2121
  exports.createFromNodeStream = function (stream, ssrManifest, options) {
2021
2122
  var response = new ResponseInstance(
2022
2123
  ssrManifest.moduleMap,
@@ -2069,10 +2170,10 @@
2069
2170
  86 === rowState
2070
2171
  ? ((rowTag = rowState), (rowState = 2), i++)
2071
2172
  : (64 < rowState && 91 > rowState) ||
2072
- 114 === rowState ||
2073
- 120 === rowState
2074
- ? ((rowTag = rowState), (rowState = 3), i++)
2075
- : ((rowTag = 0), (rowState = 3));
2173
+ 114 === rowState ||
2174
+ 120 === rowState
2175
+ ? ((rowTag = rowState), (rowState = 3), i++)
2176
+ : ((rowTag = 0), (rowState = 3));
2076
2177
  continue;
2077
2178
  case 2:
2078
2179
  lastIdx = chunk.charCodeAt(i++);
@@ -2152,10 +2253,10 @@
2152
2253
  86 === chunkLength
2153
2254
  ? ((i = chunkLength), (chunkLength = 2), rowLength++)
2154
2255
  : (64 < chunkLength && 91 > chunkLength) ||
2155
- 114 === chunkLength ||
2156
- 120 === chunkLength
2157
- ? ((i = chunkLength), (chunkLength = 3), rowLength++)
2158
- : ((i = 0), (chunkLength = 3));
2256
+ 114 === chunkLength ||
2257
+ 120 === chunkLength
2258
+ ? ((i = chunkLength), (chunkLength = 3), rowLength++)
2259
+ : ((i = 0), (chunkLength = 3));
2159
2260
  continue;
2160
2261
  case 2:
2161
2262
  lastIdx = chunk[rowLength++];
@@ -71,8 +71,8 @@ function preloadModule(metadata) {
71
71
  return requireAsyncModule(metadata[0]);
72
72
  })
73
73
  : 0 < promises.length
74
- ? Promise.all(promises)
75
- : null;
74
+ ? Promise.all(promises)
75
+ : null;
76
76
  }
77
77
  function prepareDestinationWithChunks(moduleLoading, chunks, nonce$jscomp$0) {
78
78
  if (null !== moduleLoading)
@@ -118,10 +118,10 @@ function serializeNumber(number) {
118
118
  ? "$-0"
119
119
  : number
120
120
  : Infinity === number
121
- ? "$Infinity"
122
- : -Infinity === number
123
- ? "$-Infinity"
124
- : "$NaN";
121
+ ? "$Infinity"
122
+ : -Infinity === number
123
+ ? "$-Infinity"
124
+ : "$NaN";
125
125
  }
126
126
  function processReply(
127
127
  root,
@@ -791,10 +791,10 @@ function initializeModuleChunk(chunk) {
791
791
  "*" === metadata[2]
792
792
  ? moduleExports
793
793
  : "" === metadata[2]
794
- ? moduleExports.__esModule
795
- ? moduleExports.default
796
- : moduleExports
797
- : moduleExports[metadata[2]];
794
+ ? moduleExports.__esModule
795
+ ? moduleExports.default
796
+ : moduleExports
797
+ : moduleExports[metadata[2]];
798
798
  chunk.status = "fulfilled";
799
799
  chunk.value = JSCompiler_inline_result;
800
800
  } catch (error) {
@@ -1561,10 +1561,10 @@ exports.createFromNodeStream = function (stream, ssrManifest, options) {
1561
1561
  86 === rowState
1562
1562
  ? ((rowTag = rowState), (rowState = 2), i++)
1563
1563
  : (64 < rowState && 91 > rowState) ||
1564
- 114 === rowState ||
1565
- 120 === rowState
1566
- ? ((rowTag = rowState), (rowState = 3), i++)
1567
- : ((rowTag = 0), (rowState = 3));
1564
+ 114 === rowState ||
1565
+ 120 === rowState
1566
+ ? ((rowTag = rowState), (rowState = 3), i++)
1567
+ : ((rowTag = 0), (rowState = 3));
1568
1568
  continue;
1569
1569
  case 2:
1570
1570
  lastIdx = chunk.charCodeAt(i++);
@@ -1643,10 +1643,10 @@ exports.createFromNodeStream = function (stream, ssrManifest, options) {
1643
1643
  86 === chunkLength
1644
1644
  ? ((i = chunkLength), (chunkLength = 2), rowLength++)
1645
1645
  : (64 < chunkLength && 91 > chunkLength) ||
1646
- 114 === chunkLength ||
1647
- 120 === chunkLength
1648
- ? ((i = chunkLength), (chunkLength = 3), rowLength++)
1649
- : ((i = 0), (chunkLength = 3));
1646
+ 114 === chunkLength ||
1647
+ 120 === chunkLength
1648
+ ? ((i = chunkLength), (chunkLength = 3), rowLength++)
1649
+ : ((i = 0), (chunkLength = 3));
1650
1650
  continue;
1651
1651
  case 2:
1652
1652
  lastIdx = chunk[rowLength++];
@@ -154,8 +154,8 @@
154
154
  return value.$$typeof === CLIENT_REFERENCE_TAG
155
155
  ? "client"
156
156
  : (value = value.displayName || value.name)
157
- ? "function " + value
158
- : "function";
157
+ ? "function " + value
158
+ : "function";
159
159
  default:
160
160
  return String(value);
161
161
  }
@@ -198,8 +198,8 @@
198
198
  "string" === typeof value
199
199
  ? value
200
200
  : "object" === typeof value && null !== value
201
- ? "{" + describeObjectForErrorMessage(value) + "}"
202
- : "{" + describeValueForErrorMessage(value) + "}";
201
+ ? "{" + describeObjectForErrorMessage(value) + "}"
202
+ : "{" + describeValueForErrorMessage(value) + "}";
203
203
  "" + i === expandedName
204
204
  ? ((start = objKind.length),
205
205
  (length = value.length),
@@ -285,9 +285,9 @@
285
285
  return void 0 === expandedName
286
286
  ? objKind
287
287
  : -1 < start && 0 < length
288
- ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
289
- "\n " + objKind + "\n " + objectOrArray)
290
- : "\n " + objKind;
288
+ ? ((objectOrArray = " ".repeat(start) + "^".repeat(length)),
289
+ "\n " + objKind + "\n " + objectOrArray)
290
+ : "\n " + objKind;
291
291
  }
292
292
  function serializeNumber(number) {
293
293
  return Number.isFinite(number)
@@ -295,10 +295,10 @@
295
295
  ? "$-0"
296
296
  : number
297
297
  : Infinity === number
298
- ? "$Infinity"
299
- : -Infinity === number
300
- ? "$-Infinity"
301
- : "$NaN";
298
+ ? "$Infinity"
299
+ : -Infinity === number
300
+ ? "$-Infinity"
301
+ : "$NaN";
302
302
  }
303
303
  function processReply(
304
304
  root,
@@ -610,24 +610,24 @@
610
610
  describeObjectForErrorMessage(this, key)
611
611
  )
612
612
  : "Object" !== objectName(value)
613
- ? console.error(
614
- "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
615
- objectName(value),
616
- describeObjectForErrorMessage(this, key)
617
- )
618
- : isSimpleObject(value)
619
- ? Object.getOwnPropertySymbols &&
620
- ((parentReference = Object.getOwnPropertySymbols(value)),
621
- 0 < parentReference.length &&
622
- console.error(
623
- "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s",
624
- parentReference[0].description,
613
+ ? console.error(
614
+ "Only plain objects can be passed to Server Functions from the Client. %s objects are not supported.%s",
615
+ objectName(value),
625
616
  describeObjectForErrorMessage(this, key)
626
- ))
627
- : console.error(
628
- "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s",
629
- describeObjectForErrorMessage(this, key)
630
- );
617
+ )
618
+ : isSimpleObject(value)
619
+ ? Object.getOwnPropertySymbols &&
620
+ ((parentReference = Object.getOwnPropertySymbols(value)),
621
+ 0 < parentReference.length &&
622
+ console.error(
623
+ "Only plain objects can be passed to Server Functions from the Client. Objects with symbol properties like %s are not supported.%s",
624
+ parentReference[0].description,
625
+ describeObjectForErrorMessage(this, key)
626
+ ))
627
+ : console.error(
628
+ "Only plain objects can be passed to Server Functions from the Client. Classes or other objects with methods are not supported.%s",
629
+ describeObjectForErrorMessage(this, key)
630
+ );
631
631
  return value;
632
632
  }
633
633
  if ("string" === typeof value) {
@@ -1060,8 +1060,8 @@
1060
1060
  "*" === metadata.name
1061
1061
  ? moduleExports
1062
1062
  : "" === metadata.name
1063
- ? moduleExports.default
1064
- : moduleExports[metadata.name];
1063
+ ? moduleExports.default
1064
+ : moduleExports[metadata.name];
1065
1065
  chunk.status = "fulfilled";
1066
1066
  chunk.value = value;
1067
1067
  } catch (error) {
@@ -1635,6 +1635,56 @@
1635
1635
  }
1636
1636
  );
1637
1637
  }
1638
+ function createFakeFunction(name, filename, sourceMap, line, col) {
1639
+ name || (name = "(anonymous)");
1640
+ var encodedName = JSON.stringify(name);
1641
+ 1 >= line
1642
+ ? ((line = encodedName.length + 7),
1643
+ (col =
1644
+ "({" +
1645
+ encodedName +
1646
+ ":_=>" +
1647
+ " ".repeat(col < line ? 0 : col - line) +
1648
+ "_()})\n/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */"))
1649
+ : (col =
1650
+ "/* This module was rendered by a Server Component. Turn on Source Maps to see the server source. */" +
1651
+ "\n".repeat(line - 2) +
1652
+ "({" +
1653
+ encodedName +
1654
+ ":_=>\n" +
1655
+ " ".repeat(1 > col ? 0 : col - 1) +
1656
+ "_()})");
1657
+ filename.startsWith("/") && (filename = "file://" + filename);
1658
+ sourceMap
1659
+ ? ((col +=
1660
+ "\n//# sourceURL=rsc://React/" +
1661
+ filename +
1662
+ "?" +
1663
+ fakeFunctionIdx++),
1664
+ (col += "\n//# sourceMappingURL=" + sourceMap))
1665
+ : filename && (col += "\n//# sourceURL=" + filename);
1666
+ try {
1667
+ var fn = (0, eval)(col)[name];
1668
+ } catch (x) {
1669
+ fn = function (_) {
1670
+ return _();
1671
+ };
1672
+ }
1673
+ return fn;
1674
+ }
1675
+ function fakeJSXCallSite() {
1676
+ return Error("react-stack-top-frame");
1677
+ }
1678
+ function initializeFakeStack(response, debugInfo) {
1679
+ void 0 === debugInfo.debugStack &&
1680
+ (null != debugInfo.stack &&
1681
+ (debugInfo.debugStack = createFakeJSXCallStackInDEV(
1682
+ response,
1683
+ debugInfo.stack
1684
+ )),
1685
+ null != debugInfo.owner &&
1686
+ initializeFakeStack(response, debugInfo.owner));
1687
+ }
1638
1688
  function mergeBuffer(buffer, lastChunk) {
1639
1689
  for (
1640
1690
  var l = buffer.length, byteLength = lastChunk.length, i = 0;
@@ -1777,29 +1827,53 @@
1777
1827
  }
1778
1828
  break;
1779
1829
  case 69:
1780
- tag = JSON.parse(row);
1781
- var digest = tag.digest,
1782
- env = tag.env;
1830
+ var errorInfo = JSON.parse(row);
1831
+ tag = errorInfo.digest;
1832
+ var env = errorInfo.env;
1783
1833
  row = Error(
1784
- tag.message ||
1834
+ errorInfo.message ||
1785
1835
  "An error occurred in the Server Components render but no message was provided"
1786
1836
  );
1787
- row.stack = tag.stack;
1788
- row.digest = digest;
1837
+ errorInfo = errorInfo.stack;
1838
+ var v8StyleStack = row.name + ": " + row.message;
1839
+ if (errorInfo)
1840
+ for (var i = 0; i < errorInfo.length; i++) {
1841
+ var frame = errorInfo[i],
1842
+ name = frame[0],
1843
+ filename = frame[1],
1844
+ line = frame[2];
1845
+ frame = frame[3];
1846
+ v8StyleStack = name
1847
+ ? v8StyleStack +
1848
+ ("\n at " +
1849
+ name +
1850
+ " (" +
1851
+ filename +
1852
+ ":" +
1853
+ line +
1854
+ ":" +
1855
+ frame +
1856
+ ")")
1857
+ : v8StyleStack +
1858
+ ("\n at " + filename + ":" + line + ":" + frame);
1859
+ }
1860
+ row.stack = v8StyleStack;
1861
+ row.digest = tag;
1789
1862
  row.environmentName = env;
1790
1863
  tag = response._chunks;
1791
- (digest = tag.get(id))
1792
- ? triggerErrorOnChunk(digest, row)
1864
+ (env = tag.get(id))
1865
+ ? triggerErrorOnChunk(env, row)
1793
1866
  : tag.set(id, new Chunk("rejected", null, row, response));
1794
1867
  break;
1795
1868
  case 84:
1796
1869
  tag = response._chunks;
1797
- (digest = tag.get(id)) && "pending" !== digest.status
1798
- ? digest.reason.enqueueValue(row)
1870
+ (env = tag.get(id)) && "pending" !== env.status
1871
+ ? env.reason.enqueueValue(row)
1799
1872
  : tag.set(id, new Chunk("fulfilled", row, null, response));
1800
1873
  break;
1801
1874
  case 68:
1802
1875
  row = JSON.parse(row, response._fromJSON);
1876
+ initializeFakeStack(response, row);
1803
1877
  response = getChunk(response, id);
1804
1878
  (response._debugInfo || (response._debugInfo = [])).push(row);
1805
1879
  break;
@@ -1861,8 +1935,8 @@
1861
1935
  break;
1862
1936
  default:
1863
1937
  (tag = response._chunks),
1864
- (digest = tag.get(id))
1865
- ? resolveModelChunk(digest, row)
1938
+ (env = tag.get(id))
1939
+ ? resolveModelChunk(env, row)
1866
1940
  : tag.set(id, new Chunk("resolved_model", row, null, response));
1867
1941
  }
1868
1942
  }
@@ -1991,7 +2065,34 @@
1991
2065
  reject && reject(this.reason);
1992
2066
  }
1993
2067
  };
1994
- var initializingHandler = null;
2068
+ var initializingHandler = null,
2069
+ fakeFunctionCache = new Map(),
2070
+ fakeFunctionIdx = 0,
2071
+ createFakeJSXCallStack = {
2072
+ "react-stack-bottom-frame": function (response, stack) {
2073
+ for (var callStack = fakeJSXCallSite, i = 0; i < stack.length; i++) {
2074
+ var frame = stack[i],
2075
+ frameKey = frame.join("-"),
2076
+ fn = fakeFunctionCache.get(frameKey);
2077
+ if (void 0 === fn) {
2078
+ fn = frame[0];
2079
+ var filename = frame[1],
2080
+ line = frame[2];
2081
+ frame = frame[3];
2082
+ var sourceMap = response._debugFindSourceMapURL
2083
+ ? response._debugFindSourceMapURL(filename)
2084
+ : null;
2085
+ fn = createFakeFunction(fn, filename, sourceMap, line, frame);
2086
+ fakeFunctionCache.set(frameKey, fn);
2087
+ }
2088
+ callStack = fn.bind(null, callStack);
2089
+ }
2090
+ return callStack();
2091
+ }
2092
+ },
2093
+ createFakeJSXCallStackInDEV = createFakeJSXCallStack[
2094
+ "react-stack-bottom-frame"
2095
+ ].bind(createFakeJSXCallStack);
1995
2096
  exports.createFromNodeStream = function (stream, ssrManifest, options) {
1996
2097
  var response = new ResponseInstance(
1997
2098
  ssrManifest.moduleMap,
@@ -2044,10 +2145,10 @@
2044
2145
  86 === rowState
2045
2146
  ? ((rowTag = rowState), (rowState = 2), i++)
2046
2147
  : (64 < rowState && 91 > rowState) ||
2047
- 114 === rowState ||
2048
- 120 === rowState
2049
- ? ((rowTag = rowState), (rowState = 3), i++)
2050
- : ((rowTag = 0), (rowState = 3));
2148
+ 114 === rowState ||
2149
+ 120 === rowState
2150
+ ? ((rowTag = rowState), (rowState = 3), i++)
2151
+ : ((rowTag = 0), (rowState = 3));
2051
2152
  continue;
2052
2153
  case 2:
2053
2154
  lastIdx = chunk.charCodeAt(i++);
@@ -2127,10 +2228,10 @@
2127
2228
  86 === chunkLength
2128
2229
  ? ((i = chunkLength), (chunkLength = 2), rowLength++)
2129
2230
  : (64 < chunkLength && 91 > chunkLength) ||
2130
- 114 === chunkLength ||
2131
- 120 === chunkLength
2132
- ? ((i = chunkLength), (chunkLength = 3), rowLength++)
2133
- : ((i = 0), (chunkLength = 3));
2231
+ 114 === chunkLength ||
2232
+ 120 === chunkLength
2233
+ ? ((i = chunkLength), (chunkLength = 3), rowLength++)
2234
+ : ((i = 0), (chunkLength = 3));
2134
2235
  continue;
2135
2236
  case 2:
2136
2237
  lastIdx = chunk[rowLength++];