react-server-dom-webpack 19.2.0-canary-96c61b7f-20250709 → 19.2.0-canary-2f0e7e57-20250715

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.
@@ -1554,6 +1554,13 @@
1554
1554
  map,
1555
1555
  path
1556
1556
  ) {
1557
+ if (
1558
+ void 0 === response._debugChannel &&
1559
+ "pending" === referencedChunk.status &&
1560
+ parentObject[0] === REACT_ELEMENT_TYPE &&
1561
+ ("4" === key || "5" === key)
1562
+ )
1563
+ return null;
1557
1564
  if (initializingHandler) {
1558
1565
  var handler = initializingHandler;
1559
1566
  handler.deps++;
@@ -2067,8 +2074,6 @@
2067
2074
  this._chunks = chunks;
2068
2075
  this._stringDecoder = new util.TextDecoder();
2069
2076
  this._fromJSON = null;
2070
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
2071
- this._buffer = [];
2072
2077
  this._closed = !1;
2073
2078
  this._closedReason = null;
2074
2079
  this._tempRefs = temporaryReferences;
@@ -2096,6 +2101,15 @@
2096
2101
  : debugChannelRegistry.register(this, debugChannel));
2097
2102
  this._fromJSON = createFromJSONCallback(this);
2098
2103
  }
2104
+ function createStreamState() {
2105
+ return {
2106
+ _rowState: 0,
2107
+ _rowID: 0,
2108
+ _rowTag: 0,
2109
+ _rowLength: 0,
2110
+ _buffer: []
2111
+ };
2112
+ }
2099
2113
  function resolveDebugHalt(response, id) {
2100
2114
  var chunks = response._chunks,
2101
2115
  chunk = chunks.get(id);
@@ -2876,16 +2890,16 @@
2876
2890
  : resolveModel(response, id, row);
2877
2891
  }
2878
2892
  }
2879
- function processBinaryChunk(weakResponse, chunk) {
2893
+ function processBinaryChunk(weakResponse, streamState, chunk) {
2880
2894
  if (void 0 !== weakResponse.weak.deref()) {
2881
- weakResponse = unwrapWeakResponse(weakResponse);
2895
+ var response = unwrapWeakResponse(weakResponse),
2896
+ i = 0,
2897
+ rowState = streamState._rowState;
2898
+ weakResponse = streamState._rowID;
2882
2899
  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,
2900
+ var rowTag = streamState._rowTag,
2901
+ rowLength = streamState._rowLength,
2902
+ buffer = streamState._buffer,
2889
2903
  chunkLength = chunk.length;
2890
2904
  i < chunkLength;
2891
2905
 
@@ -2896,8 +2910,8 @@
2896
2910
  lastIdx = chunk[i++];
2897
2911
  58 === lastIdx
2898
2912
  ? (rowState = 1)
2899
- : (rowID =
2900
- (rowID << 4) |
2913
+ : (weakResponse =
2914
+ (weakResponse << 4) |
2901
2915
  (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2902
2916
  continue;
2903
2917
  case 1:
@@ -2943,15 +2957,15 @@
2943
2957
  if (-1 < lastIdx)
2944
2958
  (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
2945
2959
  processFullBinaryRow(
2960
+ response,
2946
2961
  weakResponse,
2947
- rowID,
2948
2962
  rowTag,
2949
2963
  buffer,
2950
2964
  rowLength
2951
2965
  ),
2952
2966
  (i = lastIdx),
2953
2967
  3 === rowState && i++,
2954
- (rowLength = rowID = rowTag = rowState = 0),
2968
+ (rowLength = weakResponse = rowTag = rowState = 0),
2955
2969
  (buffer.length = 0);
2956
2970
  else {
2957
2971
  chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
@@ -2960,10 +2974,10 @@
2960
2974
  break;
2961
2975
  }
2962
2976
  }
2963
- weakResponse._rowState = rowState;
2964
- weakResponse._rowID = rowID;
2965
- weakResponse._rowTag = rowTag;
2966
- weakResponse._rowLength = rowLength;
2977
+ streamState._rowState = rowState;
2978
+ streamState._rowID = weakResponse;
2979
+ streamState._rowTag = rowTag;
2980
+ streamState._rowLength = rowLength;
2967
2981
  }
2968
2982
  }
2969
2983
  function createFromJSONCallback(response) {
@@ -3077,14 +3091,15 @@
3077
3091
  if (_ref.done) close(response);
3078
3092
  else
3079
3093
  return (
3080
- processBinaryChunk(response, value),
3094
+ processBinaryChunk(response, streamState, value),
3081
3095
  reader.read().then(progress).catch(error)
3082
3096
  );
3083
3097
  }
3084
3098
  function error(e) {
3085
3099
  reportGlobalError(response, e);
3086
3100
  }
3087
- var reader = stream.getReader();
3101
+ var streamState = createStreamState(),
3102
+ reader = stream.getReader();
3088
3103
  reader.read().then(progress).catch(error);
3089
3104
  }
3090
3105
  function noServerCall() {
@@ -3287,29 +3302,32 @@
3287
3302
  options
3288
3303
  ) {
3289
3304
  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;
3305
+ serverConsumerManifest.moduleMap,
3306
+ serverConsumerManifest.serverModuleMap,
3307
+ serverConsumerManifest.moduleLoading,
3308
+ noServerCall,
3309
+ options ? options.encodeFormAction : void 0,
3310
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
3311
+ void 0,
3312
+ options && options.findSourceMapURL
3313
+ ? options.findSourceMapURL
3314
+ : void 0,
3315
+ options ? !0 === options.replayConsoleLogs : !1,
3316
+ options && options.environmentName ? options.environmentName : void 0,
3317
+ void 0
3318
+ )._weakResponse,
3319
+ streamState = createStreamState();
3302
3320
  stream.on("data", function (chunk) {
3303
3321
  if ("string" === typeof chunk) {
3304
3322
  if (void 0 !== response$jscomp$0.weak.deref()) {
3305
3323
  for (
3306
3324
  var response = unwrapWeakResponse(response$jscomp$0),
3307
3325
  i = 0,
3308
- rowState = response._rowState,
3309
- rowID = response._rowID,
3310
- rowTag = response._rowTag,
3311
- rowLength = response._rowLength,
3312
- buffer = response._buffer,
3326
+ rowState = streamState._rowState,
3327
+ rowID = streamState._rowID,
3328
+ rowTag = streamState._rowTag,
3329
+ rowLength = streamState._rowLength,
3330
+ buffer = streamState._buffer,
3313
3331
  chunkLength = chunk.length;
3314
3332
  i < chunkLength;
3315
3333
 
@@ -3385,12 +3403,12 @@
3385
3403
  "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
3404
  );
3387
3405
  }
3388
- response._rowState = rowState;
3389
- response._rowID = rowID;
3390
- response._rowTag = rowTag;
3391
- response._rowLength = rowLength;
3406
+ streamState._rowState = rowState;
3407
+ streamState._rowID = rowID;
3408
+ streamState._rowTag = rowTag;
3409
+ streamState._rowLength = rowLength;
3392
3410
  }
3393
- } else processBinaryChunk(response$jscomp$0, chunk);
3411
+ } else processBinaryChunk(response$jscomp$0, streamState, chunk);
3394
3412
  });
3395
3413
  stream.on("error", function (error) {
3396
3414
  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);
@@ -1516,6 +1516,13 @@
1516
1516
  map,
1517
1517
  path
1518
1518
  ) {
1519
+ if (
1520
+ void 0 === response._debugChannel &&
1521
+ "pending" === referencedChunk.status &&
1522
+ parentObject[0] === REACT_ELEMENT_TYPE &&
1523
+ ("4" === key || "5" === key)
1524
+ )
1525
+ return null;
1519
1526
  if (initializingHandler) {
1520
1527
  var handler = initializingHandler;
1521
1528
  handler.deps++;
@@ -2029,8 +2036,6 @@
2029
2036
  this._chunks = chunks;
2030
2037
  this._stringDecoder = new util.TextDecoder();
2031
2038
  this._fromJSON = null;
2032
- this._rowLength = this._rowTag = this._rowID = this._rowState = 0;
2033
- this._buffer = [];
2034
2039
  this._closed = !1;
2035
2040
  this._closedReason = null;
2036
2041
  this._tempRefs = temporaryReferences;
@@ -2058,6 +2063,15 @@
2058
2063
  : debugChannelRegistry.register(this, debugChannel));
2059
2064
  this._fromJSON = createFromJSONCallback(this);
2060
2065
  }
2066
+ function createStreamState() {
2067
+ return {
2068
+ _rowState: 0,
2069
+ _rowID: 0,
2070
+ _rowTag: 0,
2071
+ _rowLength: 0,
2072
+ _buffer: []
2073
+ };
2074
+ }
2061
2075
  function resolveDebugHalt(response, id) {
2062
2076
  var chunks = response._chunks,
2063
2077
  chunk = chunks.get(id);
@@ -2838,16 +2852,16 @@
2838
2852
  : resolveModel(response, id, row);
2839
2853
  }
2840
2854
  }
2841
- function processBinaryChunk(weakResponse, chunk) {
2855
+ function processBinaryChunk(weakResponse, streamState, chunk) {
2842
2856
  if (void 0 !== weakResponse.weak.deref()) {
2843
- weakResponse = unwrapWeakResponse(weakResponse);
2857
+ var response = unwrapWeakResponse(weakResponse),
2858
+ i = 0,
2859
+ rowState = streamState._rowState;
2860
+ weakResponse = streamState._rowID;
2844
2861
  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,
2862
+ var rowTag = streamState._rowTag,
2863
+ rowLength = streamState._rowLength,
2864
+ buffer = streamState._buffer,
2851
2865
  chunkLength = chunk.length;
2852
2866
  i < chunkLength;
2853
2867
 
@@ -2858,8 +2872,8 @@
2858
2872
  lastIdx = chunk[i++];
2859
2873
  58 === lastIdx
2860
2874
  ? (rowState = 1)
2861
- : (rowID =
2862
- (rowID << 4) |
2875
+ : (weakResponse =
2876
+ (weakResponse << 4) |
2863
2877
  (96 < lastIdx ? lastIdx - 87 : lastIdx - 48));
2864
2878
  continue;
2865
2879
  case 1:
@@ -2905,15 +2919,15 @@
2905
2919
  if (-1 < lastIdx)
2906
2920
  (rowLength = new Uint8Array(chunk.buffer, offset, lastIdx - i)),
2907
2921
  processFullBinaryRow(
2922
+ response,
2908
2923
  weakResponse,
2909
- rowID,
2910
2924
  rowTag,
2911
2925
  buffer,
2912
2926
  rowLength
2913
2927
  ),
2914
2928
  (i = lastIdx),
2915
2929
  3 === rowState && i++,
2916
- (rowLength = rowID = rowTag = rowState = 0),
2930
+ (rowLength = weakResponse = rowTag = rowState = 0),
2917
2931
  (buffer.length = 0);
2918
2932
  else {
2919
2933
  chunk = new Uint8Array(chunk.buffer, offset, chunk.byteLength - i);
@@ -2922,10 +2936,10 @@
2922
2936
  break;
2923
2937
  }
2924
2938
  }
2925
- weakResponse._rowState = rowState;
2926
- weakResponse._rowID = rowID;
2927
- weakResponse._rowTag = rowTag;
2928
- weakResponse._rowLength = rowLength;
2939
+ streamState._rowState = rowState;
2940
+ streamState._rowID = weakResponse;
2941
+ streamState._rowTag = rowTag;
2942
+ streamState._rowLength = rowLength;
2929
2943
  }
2930
2944
  }
2931
2945
  function createFromJSONCallback(response) {
@@ -3039,14 +3053,15 @@
3039
3053
  if (_ref.done) close(response);
3040
3054
  else
3041
3055
  return (
3042
- processBinaryChunk(response, value),
3056
+ processBinaryChunk(response, streamState, value),
3043
3057
  reader.read().then(progress).catch(error)
3044
3058
  );
3045
3059
  }
3046
3060
  function error(e) {
3047
3061
  reportGlobalError(response, e);
3048
3062
  }
3049
- var reader = stream.getReader();
3063
+ var streamState = createStreamState(),
3064
+ reader = stream.getReader();
3050
3065
  reader.read().then(progress).catch(error);
3051
3066
  }
3052
3067
  function noServerCall() {
@@ -3249,29 +3264,32 @@
3249
3264
  options
3250
3265
  ) {
3251
3266
  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;
3267
+ serverConsumerManifest.moduleMap,
3268
+ serverConsumerManifest.serverModuleMap,
3269
+ serverConsumerManifest.moduleLoading,
3270
+ noServerCall,
3271
+ options ? options.encodeFormAction : void 0,
3272
+ options && "string" === typeof options.nonce ? options.nonce : void 0,
3273
+ void 0,
3274
+ options && options.findSourceMapURL
3275
+ ? options.findSourceMapURL
3276
+ : void 0,
3277
+ options ? !0 === options.replayConsoleLogs : !1,
3278
+ options && options.environmentName ? options.environmentName : void 0,
3279
+ void 0
3280
+ )._weakResponse,
3281
+ streamState = createStreamState();
3264
3282
  stream.on("data", function (chunk) {
3265
3283
  if ("string" === typeof chunk) {
3266
3284
  if (void 0 !== response$jscomp$0.weak.deref()) {
3267
3285
  for (
3268
3286
  var response = unwrapWeakResponse(response$jscomp$0),
3269
3287
  i = 0,
3270
- rowState = response._rowState,
3271
- rowID = response._rowID,
3272
- rowTag = response._rowTag,
3273
- rowLength = response._rowLength,
3274
- buffer = response._buffer,
3288
+ rowState = streamState._rowState,
3289
+ rowID = streamState._rowID,
3290
+ rowTag = streamState._rowTag,
3291
+ rowLength = streamState._rowLength,
3292
+ buffer = streamState._buffer,
3275
3293
  chunkLength = chunk.length;
3276
3294
  i < chunkLength;
3277
3295
 
@@ -3347,12 +3365,12 @@
3347
3365
  "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
3366
  );
3349
3367
  }
3350
- response._rowState = rowState;
3351
- response._rowID = rowID;
3352
- response._rowTag = rowTag;
3353
- response._rowLength = rowLength;
3368
+ streamState._rowState = rowState;
3369
+ streamState._rowID = rowID;
3370
+ streamState._rowTag = rowTag;
3371
+ streamState._rowLength = rowLength;
3354
3372
  }
3355
- } else processBinaryChunk(response$jscomp$0, chunk);
3373
+ } else processBinaryChunk(response$jscomp$0, streamState, chunk);
3356
3374
  });
3357
3375
  stream.on("error", function (error) {
3358
3376
  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);