react-server-dom-webpack 19.2.0-canary-96c61b7f-20250709 → 19.2.0-canary-97cdd5d3-20250710

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.
@@ -2067,8 +2067,6 @@
2067
2067
  this._chunks = chunks;
2068
2068
  this._stringDecoder = new util.TextDecoder();
2069
2069
  this._fromJSON = null;
2070
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
2071
- this._buffer = [];
2072
2070
  this._closed = !1;
2073
2071
  this._closedReason = null;
2074
2072
  this._tempRefs = temporaryReferences;
@@ -2096,6 +2094,15 @@
2096
2094
  : debugChannelRegistry.register(this, debugChannel));
2097
2095
  this._fromJSON = createFromJSONCallback(this);
2098
2096
  }
2097
+ function createStreamState() {
2098
+ return {
2099
+ _rowState: 0,
2100
+ _rowID: 0,
2101
+ _rowTag: 0,
2102
+ _rowLength: 0,
2103
+ _buffer: []
2104
+ };
2105
+ }
2099
2106
  function resolveDebugHalt(response, id) {
2100
2107
  var chunks = response._chunks,
2101
2108
  chunk = chunks.get(id);
@@ -2876,16 +2883,16 @@
2876
2883
  : resolveModel(response, id, row);
2877
2884
  }
2878
2885
  }
2879
- function processBinaryChunk(weakResponse, chunk) {
2886
+ function processBinaryChunk(weakResponse, streamState, chunk) {
2880
2887
  if (void 0 !== weakResponse.weak.deref()) {
2881
- weakResponse = unwrapWeakResponse(weakResponse);
2888
+ var response = unwrapWeakResponse(weakResponse),
2889
+ i = 0,
2890
+ rowState = streamState._rowState;
2891
+ weakResponse = streamState._rowID;
2882
2892
  for (
2883
- var i = 0,
2884
- rowState = weakResponse._rowState,
2885
- rowID = weakResponse._rowID,
2886
- rowTag = weakResponse._rowTag,
2887
- rowLength = weakResponse._rowLength,
2888
- buffer = weakResponse._buffer,
2893
+ var rowTag = streamState._rowTag,
2894
+ rowLength = streamState._rowLength,
2895
+ buffer = streamState._buffer,
2889
2896
  chunkLength = chunk.length;
2890
2897
  i < chunkLength;
2891
2898
 
@@ -2896,8 +2903,8 @@
2896
2903
  lastIdx = chunk[i++];
2897
2904
  58 === lastIdx
2898
2905
  ? (rowState = 1)
2899
- : (rowID =
2900
- (rowID << 4) |
2906
+ : (weakResponse =
2907
+ (weakResponse << 4) |
2901
2908
  (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2902
2909
  continue;
2903
2910
  case 1:
@@ -2943,15 +2950,15 @@
2943
2950
  if (-1 < lastIdx)
2944
2951
  (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
2945
2952
  processFullBinaryRow(
2953
+ response,
2946
2954
  weakResponse,
2947
- rowID,
2948
2955
  rowTag,
2949
2956
  buffer,
2950
2957
  rowLength
2951
2958
  ),
2952
2959
  (i = lastIdx),
2953
2960
  3 === rowState && i++,
2954
- (rowLength = rowID = rowTag = rowState = 0),
2961
+ (rowLength = weakResponse = rowTag = rowState = 0),
2955
2962
  (buffer.length = 0);
2956
2963
  else {
2957
2964
  chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
@@ -2960,10 +2967,10 @@
2960
2967
  break;
2961
2968
  }
2962
2969
  }
2963
- weakResponse._rowState = rowState;
2964
- weakResponse._rowID = rowID;
2965
- weakResponse._rowTag = rowTag;
2966
- weakResponse._rowLength = rowLength;
2970
+ streamState._rowState = rowState;
2971
+ streamState._rowID = weakResponse;
2972
+ streamState._rowTag = rowTag;
2973
+ streamState._rowLength = rowLength;
2967
2974
  }
2968
2975
  }
2969
2976
  function createFromJSONCallback(response) {
@@ -3077,14 +3084,15 @@
3077
3084
  if (_ref.done) close(response);
3078
3085
  else
3079
3086
  return (
3080
- processBinaryChunk(response, value),
3087
+ processBinaryChunk(response, streamState, value),
3081
3088
  reader.read().then(progress).catch(error)
3082
3089
  );
3083
3090
  }
3084
3091
  function error(e) {
3085
3092
  reportGlobalError(response, e);
3086
3093
  }
3087
- var reader = stream.getReader();
3094
+ var streamState = createStreamState(),
3095
+ reader = stream.getReader();
3088
3096
  reader.read().then(progress).catch(error);
3089
3097
  }
3090
3098
  function noServerCall() {
@@ -3287,29 +3295,32 @@
3287
3295
  options
3288
3296
  ) {
3289
3297
  var response$jscomp$0 = new ResponseInstance(
3290
- serverConsumerManifest.moduleMap,
3291
- serverConsumerManifest.serverModuleMap,
3292
- serverConsumerManifest.moduleLoading,
3293
- noServerCall,
3294
- options ? options.encodeFormAction : void 0,
3295
- options && "string" === typeof options.nonce ? options.nonce : void 0,
3296
- void 0,
3297
- options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
3298
- options ? !0 === options.replayConsoleLogs : !1,
3299
- options && options.environmentName ? options.environmentName : void 0,
3300
- void 0
3301
- )._weakResponse;
3298
+ serverConsumerManifest.moduleMap,
3299
+ serverConsumerManifest.serverModuleMap,
3300
+ serverConsumerManifest.moduleLoading,
3301
+ noServerCall,
3302
+ options ? options.encodeFormAction : void 0,
3303
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
3304
+ void 0,
3305
+ options && options.findSourceMapURL
3306
+ ? options.findSourceMapURL
3307
+ : void 0,
3308
+ options ? !0 === options.replayConsoleLogs : !1,
3309
+ options && options.environmentName ? options.environmentName : void 0,
3310
+ void 0
3311
+ )._weakResponse,
3312
+ streamState = createStreamState();
3302
3313
  stream.on("data", function (chunk) {
3303
3314
  if ("string" === typeof chunk) {
3304
3315
  if (void 0 !== response$jscomp$0.weak.deref()) {
3305
3316
  for (
3306
3317
  var response = unwrapWeakResponse(response$jscomp$0),
3307
3318
  i = 0,
3308
- rowState = response._rowState,
3309
- rowID = response._rowID,
3310
- rowTag = response._rowTag,
3311
- rowLength = response._rowLength,
3312
- buffer = response._buffer,
3319
+ rowState = streamState._rowState,
3320
+ rowID = streamState._rowID,
3321
+ rowTag = streamState._rowTag,
3322
+ rowLength = streamState._rowLength,
3323
+ buffer = streamState._buffer,
3313
3324
  chunkLength = chunk.length;
3314
3325
  i < chunkLength;
3315
3326
 
@@ -3385,12 +3396,12 @@
3385
3396
  "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."
3386
3397
  );
3387
3398
  }
3388
- response._rowState = rowState;
3389
- response._rowID = rowID;
3390
- response._rowTag = rowTag;
3391
- response._rowLength = rowLength;
3399
+ streamState._rowState = rowState;
3400
+ streamState._rowID = rowID;
3401
+ streamState._rowTag = rowTag;
3402
+ streamState._rowLength = rowLength;
3392
3403
  }
3393
- } else processBinaryChunk(response$jscomp$0, chunk);
3404
+ } else processBinaryChunk(response$jscomp$0, streamState, chunk);
3394
3405
  });
3395
3406
  stream.on("error", function (error) {
3396
3407
  reportGlobalError(response$jscomp$0, error);
@@ -1376,13 +1376,14 @@ function ResponseInstance(
1376
1376
  this._chunks = chunks;
1377
1377
  this._stringDecoder = new util.TextDecoder();
1378
1378
  this._fromJSON = null;
1379
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
1380
- this._buffer = [];
1381
1379
  this._closed = !1;
1382
1380
  this._closedReason = null;
1383
1381
  this._tempRefs = temporaryReferences;
1384
1382
  this._fromJSON = createFromJSONCallback(this);
1385
1383
  }
1384
+ function createStreamState() {
1385
+ return { _rowState: 0, _rowID: 0, _rowTag: 0, _rowLength: 0, _buffer: [] };
1386
+ }
1386
1387
  function resolveBuffer(response, id, buffer) {
1387
1388
  response = response._chunks;
1388
1389
  var chunk = response.get(id);
@@ -1801,14 +1802,14 @@ function processFullStringRow(response, id, tag, row) {
1801
1802
  : tag.set(id, new ReactPromise("resolved_model", row, response));
1802
1803
  }
1803
1804
  }
1804
- function processBinaryChunk(weakResponse, chunk) {
1805
+ function processBinaryChunk(weakResponse, streamState, chunk) {
1805
1806
  for (
1806
1807
  var i = 0,
1807
- rowState = weakResponse._rowState,
1808
- rowID = weakResponse._rowID,
1809
- rowTag = weakResponse._rowTag,
1810
- rowLength = weakResponse._rowLength,
1811
- buffer = weakResponse._buffer,
1808
+ rowState = streamState._rowState,
1809
+ rowID = streamState._rowID,
1810
+ rowTag = streamState._rowTag,
1811
+ rowLength = streamState._rowLength,
1812
+ buffer = streamState._buffer,
1812
1813
  chunkLength = chunk.length;
1813
1814
  i < chunkLength;
1814
1815
 
@@ -1868,16 +1869,16 @@ function processBinaryChunk(weakResponse, chunk) {
1868
1869
  (rowLength = rowID = rowTag = rowState = 0),
1869
1870
  (buffer.length = 0);
1870
1871
  else {
1871
- chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
1872
- buffer.push(chunk);
1873
- rowLength -= chunk.byteLength;
1872
+ weakResponse = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
1873
+ buffer.push(weakResponse);
1874
+ rowLength -= weakResponse.byteLength;
1874
1875
  break;
1875
1876
  }
1876
1877
  }
1877
- weakResponse._rowState = rowState;
1878
- weakResponse._rowID = rowID;
1879
- weakResponse._rowTag = rowTag;
1880
- weakResponse._rowLength = rowLength;
1878
+ streamState._rowState = rowState;
1879
+ streamState._rowID = rowID;
1880
+ streamState._rowTag = rowTag;
1881
+ streamState._rowLength = rowLength;
1881
1882
  }
1882
1883
  function createFromJSONCallback(response) {
1883
1884
  return function (key, value) {
@@ -1941,14 +1942,15 @@ function startReadingFromStream(response, stream) {
1941
1942
  if (_ref.done) close(response);
1942
1943
  else
1943
1944
  return (
1944
- processBinaryChunk(response, value),
1945
+ processBinaryChunk(response, streamState, value),
1945
1946
  reader.read().then(progress).catch(error)
1946
1947
  );
1947
1948
  }
1948
1949
  function error(e) {
1949
1950
  reportGlobalError(response, e);
1950
1951
  }
1951
- var reader = stream.getReader();
1952
+ var streamState = createStreamState(),
1953
+ reader = stream.getReader();
1952
1954
  reader.read().then(progress).catch(error);
1953
1955
  }
1954
1956
  function noServerCall() {
@@ -1974,23 +1976,24 @@ exports.createFromNodeStream = function (
1974
1976
  options
1975
1977
  ) {
1976
1978
  var response = new ResponseInstance(
1977
- serverConsumerManifest.moduleMap,
1978
- serverConsumerManifest.serverModuleMap,
1979
- serverConsumerManifest.moduleLoading,
1980
- noServerCall,
1981
- options ? options.encodeFormAction : void 0,
1982
- options && "string" === typeof options.nonce ? options.nonce : void 0,
1983
- void 0
1984
- );
1979
+ serverConsumerManifest.moduleMap,
1980
+ serverConsumerManifest.serverModuleMap,
1981
+ serverConsumerManifest.moduleLoading,
1982
+ noServerCall,
1983
+ options ? options.encodeFormAction : void 0,
1984
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
1985
+ void 0
1986
+ ),
1987
+ streamState = createStreamState();
1985
1988
  stream.on("data", function (chunk) {
1986
1989
  if ("string" === typeof chunk) {
1987
1990
  for (
1988
1991
  var i = 0,
1989
- rowState = response._rowState,
1990
- rowID = response._rowID,
1991
- rowTag = response._rowTag,
1992
- rowLength = response._rowLength,
1993
- buffer = response._buffer,
1992
+ rowState = streamState._rowState,
1993
+ rowID = streamState._rowID,
1994
+ rowTag = streamState._rowTag,
1995
+ rowLength = streamState._rowLength,
1996
+ buffer = streamState._buffer,
1994
1997
  chunkLength = chunk.length;
1995
1998
  i < chunkLength;
1996
1999
 
@@ -2065,11 +2068,11 @@ exports.createFromNodeStream = function (
2065
2068
  "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."
2066
2069
  );
2067
2070
  }
2068
- response._rowState = rowState;
2069
- response._rowID = rowID;
2070
- response._rowTag = rowTag;
2071
- response._rowLength = rowLength;
2072
- } else processBinaryChunk(response, chunk);
2071
+ streamState._rowState = rowState;
2072
+ streamState._rowID = rowID;
2073
+ streamState._rowTag = rowTag;
2074
+ streamState._rowLength = rowLength;
2075
+ } else processBinaryChunk(response, streamState, chunk);
2073
2076
  });
2074
2077
  stream.on("error", function (error) {
2075
2078
  reportGlobalError(response, error);
@@ -2029,8 +2029,6 @@
2029
2029
  this._chunks = chunks;
2030
2030
  this._stringDecoder = new util.TextDecoder();
2031
2031
  this._fromJSON = null;
2032
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
2033
- this._buffer = [];
2034
2032
  this._closed = !1;
2035
2033
  this._closedReason = null;
2036
2034
  this._tempRefs = temporaryReferences;
@@ -2058,6 +2056,15 @@
2058
2056
  : debugChannelRegistry.register(this, debugChannel));
2059
2057
  this._fromJSON = createFromJSONCallback(this);
2060
2058
  }
2059
+ function createStreamState() {
2060
+ return {
2061
+ _rowState: 0,
2062
+ _rowID: 0,
2063
+ _rowTag: 0,
2064
+ _rowLength: 0,
2065
+ _buffer: []
2066
+ };
2067
+ }
2061
2068
  function resolveDebugHalt(response, id) {
2062
2069
  var chunks = response._chunks,
2063
2070
  chunk = chunks.get(id);
@@ -2838,16 +2845,16 @@
2838
2845
  : resolveModel(response, id, row);
2839
2846
  }
2840
2847
  }
2841
- function processBinaryChunk(weakResponse, chunk) {
2848
+ function processBinaryChunk(weakResponse, streamState, chunk) {
2842
2849
  if (void 0 !== weakResponse.weak.deref()) {
2843
- weakResponse = unwrapWeakResponse(weakResponse);
2850
+ var response = unwrapWeakResponse(weakResponse),
2851
+ i = 0,
2852
+ rowState = streamState._rowState;
2853
+ weakResponse = streamState._rowID;
2844
2854
  for (
2845
- var i = 0,
2846
- rowState = weakResponse._rowState,
2847
- rowID = weakResponse._rowID,
2848
- rowTag = weakResponse._rowTag,
2849
- rowLength = weakResponse._rowLength,
2850
- buffer = weakResponse._buffer,
2855
+ var rowTag = streamState._rowTag,
2856
+ rowLength = streamState._rowLength,
2857
+ buffer = streamState._buffer,
2851
2858
  chunkLength = chunk.length;
2852
2859
  i < chunkLength;
2853
2860
 
@@ -2858,8 +2865,8 @@
2858
2865
  lastIdx = chunk[i++];
2859
2866
  58 === lastIdx
2860
2867
  ? (rowState = 1)
2861
- : (rowID =
2862
- (rowID << 4) |
2868
+ : (weakResponse =
2869
+ (weakResponse << 4) |
2863
2870
  (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2864
2871
  continue;
2865
2872
  case 1:
@@ -2905,15 +2912,15 @@
2905
2912
  if (-1 < lastIdx)
2906
2913
  (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
2907
2914
  processFullBinaryRow(
2915
+ response,
2908
2916
  weakResponse,
2909
- rowID,
2910
2917
  rowTag,
2911
2918
  buffer,
2912
2919
  rowLength
2913
2920
  ),
2914
2921
  (i = lastIdx),
2915
2922
  3 === rowState && i++,
2916
- (rowLength = rowID = rowTag = rowState = 0),
2923
+ (rowLength = weakResponse = rowTag = rowState = 0),
2917
2924
  (buffer.length = 0);
2918
2925
  else {
2919
2926
  chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
@@ -2922,10 +2929,10 @@
2922
2929
  break;
2923
2930
  }
2924
2931
  }
2925
- weakResponse._rowState = rowState;
2926
- weakResponse._rowID = rowID;
2927
- weakResponse._rowTag = rowTag;
2928
- weakResponse._rowLength = rowLength;
2932
+ streamState._rowState = rowState;
2933
+ streamState._rowID = weakResponse;
2934
+ streamState._rowTag = rowTag;
2935
+ streamState._rowLength = rowLength;
2929
2936
  }
2930
2937
  }
2931
2938
  function createFromJSONCallback(response) {
@@ -3039,14 +3046,15 @@
3039
3046
  if (_ref.done) close(response);
3040
3047
  else
3041
3048
  return (
3042
- processBinaryChunk(response, value),
3049
+ processBinaryChunk(response, streamState, value),
3043
3050
  reader.read().then(progress).catch(error)
3044
3051
  );
3045
3052
  }
3046
3053
  function error(e) {
3047
3054
  reportGlobalError(response, e);
3048
3055
  }
3049
- var reader = stream.getReader();
3056
+ var streamState = createStreamState(),
3057
+ reader = stream.getReader();
3050
3058
  reader.read().then(progress).catch(error);
3051
3059
  }
3052
3060
  function noServerCall() {
@@ -3249,29 +3257,32 @@
3249
3257
  options
3250
3258
  ) {
3251
3259
  var response$jscomp$0 = new ResponseInstance(
3252
- serverConsumerManifest.moduleMap,
3253
- serverConsumerManifest.serverModuleMap,
3254
- serverConsumerManifest.moduleLoading,
3255
- noServerCall,
3256
- options ? options.encodeFormAction : void 0,
3257
- options && "string" === typeof options.nonce ? options.nonce : void 0,
3258
- void 0,
3259
- options && options.findSourceMapURL ? options.findSourceMapURL : void 0,
3260
- options ? !0 === options.replayConsoleLogs : !1,
3261
- options && options.environmentName ? options.environmentName : void 0,
3262
- void 0
3263
- )._weakResponse;
3260
+ serverConsumerManifest.moduleMap,
3261
+ serverConsumerManifest.serverModuleMap,
3262
+ serverConsumerManifest.moduleLoading,
3263
+ noServerCall,
3264
+ options ? options.encodeFormAction : void 0,
3265
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
3266
+ void 0,
3267
+ options && options.findSourceMapURL
3268
+ ? options.findSourceMapURL
3269
+ : void 0,
3270
+ options ? !0 === options.replayConsoleLogs : !1,
3271
+ options && options.environmentName ? options.environmentName : void 0,
3272
+ void 0
3273
+ )._weakResponse,
3274
+ streamState = createStreamState();
3264
3275
  stream.on("data", function (chunk) {
3265
3276
  if ("string" === typeof chunk) {
3266
3277
  if (void 0 !== response$jscomp$0.weak.deref()) {
3267
3278
  for (
3268
3279
  var response = unwrapWeakResponse(response$jscomp$0),
3269
3280
  i = 0,
3270
- rowState = response._rowState,
3271
- rowID = response._rowID,
3272
- rowTag = response._rowTag,
3273
- rowLength = response._rowLength,
3274
- buffer = response._buffer,
3281
+ rowState = streamState._rowState,
3282
+ rowID = streamState._rowID,
3283
+ rowTag = streamState._rowTag,
3284
+ rowLength = streamState._rowLength,
3285
+ buffer = streamState._buffer,
3275
3286
  chunkLength = chunk.length;
3276
3287
  i < chunkLength;
3277
3288
 
@@ -3347,12 +3358,12 @@
3347
3358
  "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."
3348
3359
  );
3349
3360
  }
3350
- response._rowState = rowState;
3351
- response._rowID = rowID;
3352
- response._rowTag = rowTag;
3353
- response._rowLength = rowLength;
3361
+ streamState._rowState = rowState;
3362
+ streamState._rowID = rowID;
3363
+ streamState._rowTag = rowTag;
3364
+ streamState._rowLength = rowLength;
3354
3365
  }
3355
- } else processBinaryChunk(response$jscomp$0, chunk);
3366
+ } else processBinaryChunk(response$jscomp$0, streamState, chunk);
3356
3367
  });
3357
3368
  stream.on("error", function (error) {
3358
3369
  reportGlobalError(response$jscomp$0, error);
@@ -1341,13 +1341,14 @@ function ResponseInstance(
1341
1341
  this._chunks = chunks;
1342
1342
  this._stringDecoder = new util.TextDecoder();
1343
1343
  this._fromJSON = null;
1344
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
1345
- this._buffer = [];
1346
1344
  this._closed = !1;
1347
1345
  this._closedReason = null;
1348
1346
  this._tempRefs = temporaryReferences;
1349
1347
  this._fromJSON = createFromJSONCallback(this);
1350
1348
  }
1349
+ function createStreamState() {
1350
+ return { _rowState: 0, _rowID: 0, _rowTag: 0, _rowLength: 0, _buffer: [] };
1351
+ }
1351
1352
  function resolveBuffer(response, id, buffer) {
1352
1353
  response = response._chunks;
1353
1354
  var chunk = response.get(id);
@@ -1766,14 +1767,14 @@ function processFullStringRow(response, id, tag, row) {
1766
1767
  : tag.set(id, new ReactPromise("resolved_model", row, response));
1767
1768
  }
1768
1769
  }
1769
- function processBinaryChunk(weakResponse, chunk) {
1770
+ function processBinaryChunk(weakResponse, streamState, chunk) {
1770
1771
  for (
1771
1772
  var i = 0,
1772
- rowState = weakResponse._rowState,
1773
- rowID = weakResponse._rowID,
1774
- rowTag = weakResponse._rowTag,
1775
- rowLength = weakResponse._rowLength,
1776
- buffer = weakResponse._buffer,
1773
+ rowState = streamState._rowState,
1774
+ rowID = streamState._rowID,
1775
+ rowTag = streamState._rowTag,
1776
+ rowLength = streamState._rowLength,
1777
+ buffer = streamState._buffer,
1777
1778
  chunkLength = chunk.length;
1778
1779
  i < chunkLength;
1779
1780
 
@@ -1833,16 +1834,16 @@ function processBinaryChunk(weakResponse, chunk) {
1833
1834
  (rowLength = rowID = rowTag = rowState = 0),
1834
1835
  (buffer.length = 0);
1835
1836
  else {
1836
- chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
1837
- buffer.push(chunk);
1838
- rowLength -= chunk.byteLength;
1837
+ weakResponse = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
1838
+ buffer.push(weakResponse);
1839
+ rowLength -= weakResponse.byteLength;
1839
1840
  break;
1840
1841
  }
1841
1842
  }
1842
- weakResponse._rowState = rowState;
1843
- weakResponse._rowID = rowID;
1844
- weakResponse._rowTag = rowTag;
1845
- weakResponse._rowLength = rowLength;
1843
+ streamState._rowState = rowState;
1844
+ streamState._rowID = rowID;
1845
+ streamState._rowTag = rowTag;
1846
+ streamState._rowLength = rowLength;
1846
1847
  }
1847
1848
  function createFromJSONCallback(response) {
1848
1849
  return function (key, value) {
@@ -1906,14 +1907,15 @@ function startReadingFromStream(response, stream) {
1906
1907
  if (_ref.done) close(response);
1907
1908
  else
1908
1909
  return (
1909
- processBinaryChunk(response, value),
1910
+ processBinaryChunk(response, streamState, value),
1910
1911
  reader.read().then(progress).catch(error)
1911
1912
  );
1912
1913
  }
1913
1914
  function error(e) {
1914
1915
  reportGlobalError(response, e);
1915
1916
  }
1916
- var reader = stream.getReader();
1917
+ var streamState = createStreamState(),
1918
+ reader = stream.getReader();
1917
1919
  reader.read().then(progress).catch(error);
1918
1920
  }
1919
1921
  function noServerCall() {
@@ -1939,23 +1941,24 @@ exports.createFromNodeStream = function (
1939
1941
  options
1940
1942
  ) {
1941
1943
  var response = new ResponseInstance(
1942
- serverConsumerManifest.moduleMap,
1943
- serverConsumerManifest.serverModuleMap,
1944
- serverConsumerManifest.moduleLoading,
1945
- noServerCall,
1946
- options ? options.encodeFormAction : void 0,
1947
- options && "string" === typeof options.nonce ? options.nonce : void 0,
1948
- void 0
1949
- );
1944
+ serverConsumerManifest.moduleMap,
1945
+ serverConsumerManifest.serverModuleMap,
1946
+ serverConsumerManifest.moduleLoading,
1947
+ noServerCall,
1948
+ options ? options.encodeFormAction : void 0,
1949
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
1950
+ void 0
1951
+ ),
1952
+ streamState = createStreamState();
1950
1953
  stream.on("data", function (chunk) {
1951
1954
  if ("string" === typeof chunk) {
1952
1955
  for (
1953
1956
  var i = 0,
1954
- rowState = response._rowState,
1955
- rowID = response._rowID,
1956
- rowTag = response._rowTag,
1957
- rowLength = response._rowLength,
1958
- buffer = response._buffer,
1957
+ rowState = streamState._rowState,
1958
+ rowID = streamState._rowID,
1959
+ rowTag = streamState._rowTag,
1960
+ rowLength = streamState._rowLength,
1961
+ buffer = streamState._buffer,
1959
1962
  chunkLength = chunk.length;
1960
1963
  i < chunkLength;
1961
1964
 
@@ -2030,11 +2033,11 @@ exports.createFromNodeStream = function (
2030
2033
  "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."
2031
2034
  );
2032
2035
  }
2033
- response._rowState = rowState;
2034
- response._rowID = rowID;
2035
- response._rowTag = rowTag;
2036
- response._rowLength = rowLength;
2037
- } else processBinaryChunk(response, chunk);
2036
+ streamState._rowState = rowState;
2037
+ streamState._rowID = rowID;
2038
+ streamState._rowTag = rowTag;
2039
+ streamState._rowLength = rowLength;
2040
+ } else processBinaryChunk(response, streamState, chunk);
2038
2041
  });
2039
2042
  stream.on("error", function (error) {
2040
2043
  reportGlobalError(response, error);