react-server-dom-webpack 19.2.0-canary-5d87cd22-20250704 → 19.2.0-canary-befc1246-20250708

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.
@@ -789,7 +789,9 @@ function serializeThenable(request, task, thenable) {
789
789
  if (12 === request.status)
790
790
  return (
791
791
  request.abortableTasks.delete(newTask),
792
- abortTask(newTask, request, request.fatalError),
792
+ (task = request.fatalError),
793
+ abortTask(newTask),
794
+ finishAbortedTask(newTask, request, task),
793
795
  newTask.id
794
796
  );
795
797
  "string" !== typeof thenable.status &&
@@ -1296,7 +1298,7 @@ function outlineModel(request, value) {
1296
1298
  function serializeTypedArray(request, tag, typedArray) {
1297
1299
  request.pendingChunks++;
1298
1300
  var bufferId = request.nextChunkId++;
1299
- emitTypedArrayChunk(request, bufferId, tag, typedArray);
1301
+ emitTypedArrayChunk(request, bufferId, tag, typedArray, !1);
1300
1302
  return serializeByValueID(bufferId);
1301
1303
  }
1302
1304
  function serializeBlob(request, blob) {
@@ -1543,7 +1545,7 @@ function renderModelDestructive(
1543
1545
  return (
1544
1546
  request.pendingChunks++,
1545
1547
  (task = request.nextChunkId++),
1546
- emitTextChunk(request, task, value),
1548
+ emitTextChunk(request, task, value, !1),
1547
1549
  serializeByValueID(task)
1548
1550
  );
1549
1551
  request = "$" === value[0] ? "$" + value : value;
@@ -1679,61 +1681,61 @@ function emitModelChunk(request, id, json) {
1679
1681
  id = stringToChunk(id);
1680
1682
  request.completedRegularChunks.push(id);
1681
1683
  }
1682
- function emitTypedArrayChunk(request, id, tag, typedArray) {
1683
- request.pendingChunks++;
1684
- var buffer = new Uint8Array(
1684
+ function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
1685
+ debug ? request.pendingDebugChunks++ : request.pendingChunks++;
1686
+ debug = new Uint8Array(
1685
1687
  typedArray.buffer,
1686
1688
  typedArray.byteOffset,
1687
1689
  typedArray.byteLength
1688
1690
  );
1689
- typedArray = 2048 < typedArray.byteLength ? buffer.slice() : buffer;
1690
- buffer = typedArray.byteLength;
1691
- id = id.toString(16) + ":" + tag + buffer.toString(16) + ",";
1691
+ typedArray = 2048 < typedArray.byteLength ? debug.slice() : debug;
1692
+ debug = typedArray.byteLength;
1693
+ id = id.toString(16) + ":" + tag + debug.toString(16) + ",";
1692
1694
  id = stringToChunk(id);
1693
1695
  request.completedRegularChunks.push(id, typedArray);
1694
1696
  }
1695
- function emitTextChunk(request, id, text) {
1697
+ function emitTextChunk(request, id, text, debug) {
1696
1698
  if (null === byteLengthOfChunk)
1697
1699
  throw Error(
1698
1700
  "Existence of byteLengthOfChunk should have already been checked. This is a bug in React."
1699
1701
  );
1700
- request.pendingChunks++;
1702
+ debug ? request.pendingDebugChunks++ : request.pendingChunks++;
1701
1703
  text = stringToChunk(text);
1702
- var binaryLength = text.byteLength;
1703
- id = id.toString(16) + ":T" + binaryLength.toString(16) + ",";
1704
+ debug = text.byteLength;
1705
+ id = id.toString(16) + ":T" + debug.toString(16) + ",";
1704
1706
  id = stringToChunk(id);
1705
1707
  request.completedRegularChunks.push(id, text);
1706
1708
  }
1707
1709
  function emitChunk(request, task, value) {
1708
1710
  var id = task.id;
1709
1711
  "string" === typeof value && null !== byteLengthOfChunk
1710
- ? emitTextChunk(request, id, value)
1712
+ ? emitTextChunk(request, id, value, !1)
1711
1713
  : value instanceof ArrayBuffer
1712
- ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value))
1714
+ ? emitTypedArrayChunk(request, id, "A", new Uint8Array(value), !1)
1713
1715
  : value instanceof Int8Array
1714
- ? emitTypedArrayChunk(request, id, "O", value)
1716
+ ? emitTypedArrayChunk(request, id, "O", value, !1)
1715
1717
  : value instanceof Uint8Array
1716
- ? emitTypedArrayChunk(request, id, "o", value)
1718
+ ? emitTypedArrayChunk(request, id, "o", value, !1)
1717
1719
  : value instanceof Uint8ClampedArray
1718
- ? emitTypedArrayChunk(request, id, "U", value)
1720
+ ? emitTypedArrayChunk(request, id, "U", value, !1)
1719
1721
  : value instanceof Int16Array
1720
- ? emitTypedArrayChunk(request, id, "S", value)
1722
+ ? emitTypedArrayChunk(request, id, "S", value, !1)
1721
1723
  : value instanceof Uint16Array
1722
- ? emitTypedArrayChunk(request, id, "s", value)
1724
+ ? emitTypedArrayChunk(request, id, "s", value, !1)
1723
1725
  : value instanceof Int32Array
1724
- ? emitTypedArrayChunk(request, id, "L", value)
1726
+ ? emitTypedArrayChunk(request, id, "L", value, !1)
1725
1727
  : value instanceof Uint32Array
1726
- ? emitTypedArrayChunk(request, id, "l", value)
1728
+ ? emitTypedArrayChunk(request, id, "l", value, !1)
1727
1729
  : value instanceof Float32Array
1728
- ? emitTypedArrayChunk(request, id, "G", value)
1730
+ ? emitTypedArrayChunk(request, id, "G", value, !1)
1729
1731
  : value instanceof Float64Array
1730
- ? emitTypedArrayChunk(request, id, "g", value)
1732
+ ? emitTypedArrayChunk(request, id, "g", value, !1)
1731
1733
  : value instanceof BigInt64Array
1732
- ? emitTypedArrayChunk(request, id, "M", value)
1734
+ ? emitTypedArrayChunk(request, id, "M", value, !1)
1733
1735
  : value instanceof BigUint64Array
1734
- ? emitTypedArrayChunk(request, id, "m", value)
1736
+ ? emitTypedArrayChunk(request, id, "m", value, !1)
1735
1737
  : value instanceof DataView
1736
- ? emitTypedArrayChunk(request, id, "V", value)
1738
+ ? emitTypedArrayChunk(request, id, "V", value, !1)
1737
1739
  : ((value = stringify(value, task.toJSON)),
1738
1740
  emitModelChunk(request, task.id, value));
1739
1741
  }
@@ -1772,11 +1774,13 @@ function retryTask(request, task) {
1772
1774
  request.abortableTasks.delete(task);
1773
1775
  callOnAllReadyIfReady(request);
1774
1776
  } catch (thrownValue) {
1775
- if (12 === request.status)
1776
- request.abortableTasks.delete(task),
1777
- (task.status = 0),
1778
- abortTask(task, request, request.fatalError);
1779
- else {
1777
+ if (12 === request.status) {
1778
+ request.abortableTasks.delete(task);
1779
+ task.status = 0;
1780
+ var errorId = request.fatalError;
1781
+ abortTask(task);
1782
+ finishAbortedTask(task, request, errorId);
1783
+ } else {
1780
1784
  var x =
1781
1785
  thrownValue === SuspenseException
1782
1786
  ? getSuspendedThenable()
@@ -1825,10 +1829,12 @@ function performWork(request) {
1825
1829
  (currentRequest = prevRequest);
1826
1830
  }
1827
1831
  }
1828
- function abortTask(task, request, errorId) {
1829
- 5 !== task.status &&
1830
- ((task.status = 3),
1831
- (errorId = serializeByValueID(errorId)),
1832
+ function abortTask(task) {
1833
+ 0 === task.status && (task.status = 3);
1834
+ }
1835
+ function finishAbortedTask(task, request, errorId) {
1836
+ 3 === task.status &&
1837
+ ((errorId = serializeByValueID(errorId)),
1832
1838
  (task = encodeReferenceChunk(request, task.id, errorId)),
1833
1839
  request.completedErrorChunks.push(task));
1834
1840
  }
@@ -1918,39 +1924,56 @@ function startFlowing(request, destination) {
1918
1924
  }
1919
1925
  }
1920
1926
  }
1921
- function abort(request, reason) {
1927
+ function finishAbort(request, abortedTasks, errorId) {
1922
1928
  try {
1923
- 11 >= request.status &&
1924
- ((request.status = 12),
1925
- request.cacheController.abort(reason),
1926
- callOnAllReadyIfReady(request));
1927
- var abortableTasks = request.abortableTasks;
1928
- if (0 < abortableTasks.size) {
1929
- var error =
1930
- void 0 === reason
1931
- ? Error("The render was aborted by the server without a reason.")
1932
- : "object" === typeof reason &&
1933
- null !== reason &&
1934
- "function" === typeof reason.then
1935
- ? Error("The render was aborted by the server with a promise.")
1936
- : reason,
1937
- digest = logRecoverableError(request, error, null),
1938
- errorId = request.nextChunkId++;
1939
- request.fatalError = errorId;
1940
- request.pendingChunks++;
1941
- emitErrorChunk(request, errorId, digest, error, !1);
1942
- abortableTasks.forEach(function (task) {
1943
- return abortTask(task, request, errorId);
1944
- });
1945
- abortableTasks.clear();
1946
- callOnAllReadyIfReady(request);
1947
- }
1929
+ abortedTasks.forEach(function (task) {
1930
+ return finishAbortedTask(task, request, errorId);
1931
+ });
1932
+ var onAllReady = request.onAllReady;
1933
+ onAllReady();
1948
1934
  null !== request.destination &&
1949
1935
  flushCompletedChunks(request, request.destination);
1950
- } catch (error$24) {
1951
- logRecoverableError(request, error$24, null), fatalError(request, error$24);
1936
+ } catch (error) {
1937
+ logRecoverableError(request, error, null), fatalError(request, error);
1952
1938
  }
1953
1939
  }
1940
+ function abort(request, reason) {
1941
+ if (!(11 < request.status))
1942
+ try {
1943
+ request.status = 12;
1944
+ request.cacheController.abort(reason);
1945
+ var abortableTasks = request.abortableTasks;
1946
+ if (0 < abortableTasks.size) {
1947
+ var error =
1948
+ void 0 === reason
1949
+ ? Error("The render was aborted by the server without a reason.")
1950
+ : "object" === typeof reason &&
1951
+ null !== reason &&
1952
+ "function" === typeof reason.then
1953
+ ? Error("The render was aborted by the server with a promise.")
1954
+ : reason,
1955
+ digest = logRecoverableError(request, error, null),
1956
+ errorId = request.nextChunkId++;
1957
+ request.fatalError = errorId;
1958
+ request.pendingChunks++;
1959
+ emitErrorChunk(request, errorId, digest, error, !1);
1960
+ abortableTasks.forEach(function (task) {
1961
+ return abortTask(task, request, errorId);
1962
+ });
1963
+ setTimeout(function () {
1964
+ return finishAbort(request, abortableTasks, errorId);
1965
+ }, 0);
1966
+ } else {
1967
+ var onAllReady = request.onAllReady;
1968
+ onAllReady();
1969
+ null !== request.destination &&
1970
+ flushCompletedChunks(request, request.destination);
1971
+ }
1972
+ } catch (error$24) {
1973
+ logRecoverableError(request, error$24, null),
1974
+ fatalError(request, error$24);
1975
+ }
1976
+ }
1954
1977
  function resolveServerReference(bundlerConfig, id) {
1955
1978
  var name = "",
1956
1979
  resolvedModuleData = bundlerConfig[id];
@@ -680,9 +680,9 @@
680
680
  suffixIdx = url.lastIndexOf("?");
681
681
  -1 < envIdx &&
682
682
  -1 < suffixIdx &&
683
- (url = url.slice(envIdx + 1, suffixIdx));
683
+ (url = decodeURI(url.slice(envIdx + 1, suffixIdx)));
684
684
  }
685
- request(url, functionName) &&
685
+ request(url, functionName, callsite[2], callsite[3]) &&
686
686
  ((callsite = callsite.slice(0)),
687
687
  (callsite[1] = url),
688
688
  filteredStack.push(callsite));
@@ -705,7 +705,7 @@
705
705
  request,
706
706
  parseStackTrace(Error("react-stack-top-frame"), 1)
707
707
  );
708
- request.pendingChunks++;
708
+ request.pendingDebugChunks++;
709
709
  var owner = resolveOwner(),
710
710
  args = Array.from(arguments);
711
711
  a: {
@@ -736,9 +736,13 @@
736
736
  null != owner && outlineComponentInfo(request, owner);
737
737
  format = [methodName, stack, owner, env];
738
738
  format.push.apply(format, args);
739
- args = serializeDebugModel(request, 500, format);
739
+ args = serializeDebugModel(
740
+ request,
741
+ (null === request.deferredDebugObjects ? 500 : 10) + stack.length,
742
+ format
743
+ );
740
744
  "[" !== args[0] &&
741
- (args = serializeDebugModel(request, 500, [
745
+ (args = serializeDebugModel(request, 10 + stack.length, [
742
746
  methodName,
743
747
  stack,
744
748
  owner,
@@ -867,6 +871,7 @@
867
871
  void 0 === onPostpone ? defaultPostponeHandler : onPostpone;
868
872
  this.onAllReady = onAllReady;
869
873
  this.onFatalError = onFatalError;
874
+ this.pendingDebugChunks = 0;
870
875
  this.completedDebugChunks = [];
871
876
  this.environmentName =
872
877
  void 0 === environmentName
@@ -952,7 +957,7 @@
952
957
  return store ? store : null;
953
958
  }
954
959
  function serializeDebugThenable(request, counter, thenable) {
955
- request.pendingChunks++;
960
+ request.pendingDebugChunks++;
956
961
  var id = request.nextChunkId++,
957
962
  ref = "$@" + id.toString(16);
958
963
  request.writtenDebugObjects.set(thenable, ref);
@@ -1025,7 +1030,9 @@
1025
1030
  if (request.status === ABORTING)
1026
1031
  return (
1027
1032
  request.abortableTasks.delete(newTask),
1028
- abortTask(newTask, request, request.fatalError),
1033
+ (task = request.fatalError),
1034
+ abortTask(newTask),
1035
+ finishAbortedTask(newTask, request, task),
1029
1036
  newTask.id
1030
1037
  );
1031
1038
  "string" !== typeof thenable.status &&
@@ -1351,7 +1358,7 @@
1351
1358
  var componentDebugID = task.id;
1352
1359
  componentDebugInfo = Component.displayName || Component.name || "";
1353
1360
  var componentEnv = (0, request.environmentName)();
1354
- request.pendingChunks++;
1361
+ request.pendingDebugChunks++;
1355
1362
  componentDebugInfo = {
1356
1363
  name: componentDebugInfo,
1357
1364
  env: componentEnv,
@@ -1751,7 +1758,7 @@
1751
1758
  function serializeDeferredObject(request, value) {
1752
1759
  var deferredDebugObjects = request.deferredDebugObjects;
1753
1760
  return null !== deferredDebugObjects
1754
- ? (request.pendingChunks++,
1761
+ ? (request.pendingDebugChunks++,
1755
1762
  (request = request.nextChunkId++),
1756
1763
  deferredDebugObjects.existing.set(value, request),
1757
1764
  deferredDebugObjects.retained.set(request, value),
@@ -1830,7 +1837,7 @@
1830
1837
  request.bundlerConfig,
1831
1838
  clientReference
1832
1839
  );
1833
- request.pendingChunks++;
1840
+ request.pendingDebugChunks++;
1834
1841
  var importId = request.nextChunkId++;
1835
1842
  emitImportChunk(request, importId, clientReferenceMetadata, !0);
1836
1843
  return parent[0] === REACT_ELEMENT_TYPE && "1" === parentPropertyName
@@ -1838,7 +1845,7 @@
1838
1845
  : serializeByValueID(importId);
1839
1846
  } catch (x) {
1840
1847
  return (
1841
- request.pendingChunks++,
1848
+ request.pendingDebugChunks++,
1842
1849
  (parent = request.nextChunkId++),
1843
1850
  (parentPropertyName = logRecoverableError(request, x, null)),
1844
1851
  emitErrorChunk(request, parent, parentPropertyName, x, !0),
@@ -1917,7 +1924,7 @@
1917
1924
  return serializeByValueID(bufferId);
1918
1925
  }
1919
1926
  function serializeDebugTypedArray(request, tag, typedArray) {
1920
- request.pendingChunks++;
1927
+ request.pendingDebugChunks++;
1921
1928
  var bufferId = request.nextChunkId++;
1922
1929
  emitTypedArrayChunk(request, bufferId, tag, typedArray, !0);
1923
1930
  return serializeByValueID(bufferId);
@@ -1943,8 +1950,9 @@
1943
1950
  reader.cancel(reason).then(noop, noop);
1944
1951
  }
1945
1952
  var model = [blob.type],
1946
- reader = blob.stream().getReader(),
1947
- id = request.nextChunkId++;
1953
+ reader = blob.stream().getReader();
1954
+ request.pendingDebugChunks++;
1955
+ var id = request.nextChunkId++;
1948
1956
  reader.read().then(progress).catch(error);
1949
1957
  return "$B" + id.toString(16);
1950
1958
  }
@@ -2517,7 +2525,7 @@
2517
2525
  }
2518
2526
  }
2519
2527
  function emitTypedArrayChunk(request, id, tag, typedArray, debug) {
2520
- request.pendingChunks++;
2528
+ debug ? request.pendingDebugChunks++ : request.pendingChunks++;
2521
2529
  typedArray = new Uint8Array(
2522
2530
  typedArray.buffer,
2523
2531
  typedArray.byteOffset,
@@ -2534,7 +2542,7 @@
2534
2542
  throw Error(
2535
2543
  "Existence of byteLengthOfChunk should have already been checked. This is a bug in React."
2536
2544
  );
2537
- request.pendingChunks++;
2545
+ debug ? request.pendingDebugChunks++ : request.pendingChunks++;
2538
2546
  var binaryLength = byteLengthOfChunk(text);
2539
2547
  id = id.toString(16) + ":T" + binaryLength.toString(16) + ",";
2540
2548
  debug
@@ -2771,7 +2779,7 @@
2771
2779
  if (0 >= counter.objectLimit)
2772
2780
  return serializeDeferredObject(request, value);
2773
2781
  counter.objectLimit--;
2774
- request.pendingChunks++;
2782
+ request.pendingDebugChunks++;
2775
2783
  counter = request.nextChunkId++;
2776
2784
  emitTextChunk(request, counter, value, !0);
2777
2785
  return serializeByValueID(counter);
@@ -2799,7 +2807,7 @@
2799
2807
  ref = counter.get(value);
2800
2808
  if (void 0 !== ref) return ref;
2801
2809
  key = "$E(" + (Function.prototype.toString.call(value) + ")");
2802
- request.pendingChunks++;
2810
+ request.pendingDebugChunks++;
2803
2811
  ref = request.nextChunkId++;
2804
2812
  key = encodeReferenceChunk(request, ref, key);
2805
2813
  request.completedDebugChunks.push(key);
@@ -2891,7 +2899,7 @@
2891
2899
  }
2892
2900
  function outlineDebugModel(request, counter, model) {
2893
2901
  var id = request.nextChunkId++;
2894
- request.pendingChunks++;
2902
+ request.pendingDebugChunks++;
2895
2903
  emitOutlinedDebugModelChunk(request, id, counter, model);
2896
2904
  return id;
2897
2905
  }
@@ -2902,7 +2910,7 @@
2902
2910
  if ("number" !== typeof info.time)
2903
2911
  if ("string" === typeof info.name)
2904
2912
  outlineComponentInfo(request$jscomp$1, info),
2905
- request$jscomp$1.pendingChunks++,
2913
+ request$jscomp$1.pendingDebugChunks++,
2906
2914
  emitDebugChunk(request$jscomp$1, task, info);
2907
2915
  else if (info.awaited) {
2908
2916
  var ioInfo = info.awaited;
@@ -2910,7 +2918,7 @@
2910
2918
  var request = request$jscomp$1,
2911
2919
  ioInfo$jscomp$0 = ioInfo;
2912
2920
  if (!request.writtenObjects.has(ioInfo$jscomp$0)) {
2913
- request.pendingChunks++;
2921
+ request.pendingDebugChunks++;
2914
2922
  var id = request.nextChunkId++,
2915
2923
  owner = ioInfo$jscomp$0.owner;
2916
2924
  null != owner && outlineComponentInfo(request, owner);
@@ -2960,11 +2968,11 @@
2960
2968
  null != info.env && (ioInfo.env = info.env);
2961
2969
  null != info.owner && (ioInfo.owner = info.owner);
2962
2970
  null != request && (ioInfo.stack = request);
2963
- request$jscomp$1.pendingChunks++;
2971
+ request$jscomp$1.pendingDebugChunks++;
2964
2972
  emitDebugChunk(request$jscomp$1, task, ioInfo);
2965
2973
  }
2966
2974
  } else
2967
- request$jscomp$1.pendingChunks++,
2975
+ request$jscomp$1.pendingDebugChunks++,
2968
2976
  emitDebugChunk(request$jscomp$1, task, info);
2969
2977
  }
2970
2978
  }
@@ -3054,7 +3062,7 @@
3054
3062
  task.implicitSlot = !1;
3055
3063
  var currentEnv = (0, request.environmentName)();
3056
3064
  currentEnv !== task.environmentName &&
3057
- (request.pendingChunks++,
3065
+ (request.pendingDebugChunks++,
3058
3066
  emitDebugChunk(request, task.id, { env: currentEnv }));
3059
3067
  if ("object" === typeof resolvedModel && null !== resolvedModel)
3060
3068
  request.writtenObjects.set(
@@ -3071,11 +3079,13 @@
3071
3079
  request.abortableTasks.delete(task);
3072
3080
  callOnAllReadyIfReady(request);
3073
3081
  } catch (thrownValue) {
3074
- if (request.status === ABORTING)
3075
- request.abortableTasks.delete(task),
3076
- (task.status = 0),
3077
- abortTask(task, request, request.fatalError);
3078
- else {
3082
+ if (request.status === ABORTING) {
3083
+ request.abortableTasks.delete(task);
3084
+ task.status = 0;
3085
+ var errorId = request.fatalError;
3086
+ abortTask(task);
3087
+ finishAbortedTask(task, request, errorId);
3088
+ } else {
3079
3089
  var x =
3080
3090
  thrownValue === SuspenseException
3081
3091
  ? getSuspendedThenable()
@@ -3128,9 +3138,11 @@
3128
3138
  (currentRequest = prevRequest);
3129
3139
  }
3130
3140
  }
3131
- function abortTask(task, request, errorId) {
3132
- if (5 !== task.status) {
3133
- task.status = 3;
3141
+ function abortTask(task) {
3142
+ 0 === task.status && (task.status = 3);
3143
+ }
3144
+ function finishAbortedTask(task, request, errorId) {
3145
+ if (3 === task.status) {
3134
3146
  var model = task.model;
3135
3147
  "object" === typeof model &&
3136
3148
  null !== model &&
@@ -3171,7 +3183,7 @@
3171
3183
  var debugChunks = request.completedDebugChunks;
3172
3184
  for (i = 0; i < debugChunks.length; i++)
3173
3185
  if (
3174
- (request.pendingChunks--,
3186
+ (request.pendingDebugChunks--,
3175
3187
  !writeChunkAndReturn(destination, debugChunks[i]))
3176
3188
  ) {
3177
3189
  request.destination = null;
@@ -3212,6 +3224,7 @@
3212
3224
  }
3213
3225
  "function" === typeof destination.flush && destination.flush();
3214
3226
  0 === request.pendingChunks &&
3227
+ 0 === request.pendingDebugChunks &&
3215
3228
  (request.status < ABORTING &&
3216
3229
  request.cacheController.abort(
3217
3230
  Error(
@@ -3258,44 +3271,60 @@
3258
3271
  }
3259
3272
  }
3260
3273
  }
3261
- function abort(request, reason) {
3274
+ function finishAbort(request, abortedTasks, errorId) {
3262
3275
  try {
3263
- 11 >= request.status &&
3264
- ((request.status = ABORTING),
3265
- request.cacheController.abort(reason),
3266
- callOnAllReadyIfReady(request));
3267
- var abortableTasks = request.abortableTasks;
3268
- if (0 < abortableTasks.size) {
3269
- var error =
3270
- void 0 === reason
3271
- ? Error(
3272
- "The render was aborted by the server without a reason."
3273
- )
3274
- : "object" === typeof reason &&
3275
- null !== reason &&
3276
- "function" === typeof reason.then
3277
- ? Error(
3278
- "The render was aborted by the server with a promise."
3279
- )
3280
- : reason,
3281
- digest = logRecoverableError(request, error, null),
3282
- _errorId2 = request.nextChunkId++;
3283
- request.fatalError = _errorId2;
3284
- request.pendingChunks++;
3285
- emitErrorChunk(request, _errorId2, digest, error, !1);
3286
- abortableTasks.forEach(function (task) {
3287
- return abortTask(task, request, _errorId2);
3288
- });
3289
- abortableTasks.clear();
3290
- callOnAllReadyIfReady(request);
3291
- }
3276
+ abortedTasks.forEach(function (task) {
3277
+ return finishAbortedTask(task, request, errorId);
3278
+ });
3279
+ var onAllReady = request.onAllReady;
3280
+ onAllReady();
3292
3281
  null !== request.destination &&
3293
3282
  flushCompletedChunks(request, request.destination);
3294
- } catch (error$2) {
3295
- logRecoverableError(request, error$2, null),
3296
- fatalError(request, error$2);
3283
+ } catch (error) {
3284
+ logRecoverableError(request, error, null), fatalError(request, error);
3297
3285
  }
3298
3286
  }
3287
+ function abort(request, reason) {
3288
+ if (!(11 < request.status))
3289
+ try {
3290
+ request.status = ABORTING;
3291
+ request.cacheController.abort(reason);
3292
+ var abortableTasks = request.abortableTasks;
3293
+ if (0 < abortableTasks.size) {
3294
+ var error =
3295
+ void 0 === reason
3296
+ ? Error(
3297
+ "The render was aborted by the server without a reason."
3298
+ )
3299
+ : "object" === typeof reason &&
3300
+ null !== reason &&
3301
+ "function" === typeof reason.then
3302
+ ? Error(
3303
+ "The render was aborted by the server with a promise."
3304
+ )
3305
+ : reason,
3306
+ digest = logRecoverableError(request, error, null),
3307
+ _errorId2 = request.nextChunkId++;
3308
+ request.fatalError = _errorId2;
3309
+ request.pendingChunks++;
3310
+ emitErrorChunk(request, _errorId2, digest, error, !1);
3311
+ abortableTasks.forEach(function (task) {
3312
+ return abortTask(task, request, _errorId2);
3313
+ });
3314
+ setImmediate(function () {
3315
+ return finishAbort(request, abortableTasks, _errorId2);
3316
+ });
3317
+ } else {
3318
+ var onAllReady = request.onAllReady;
3319
+ onAllReady();
3320
+ null !== request.destination &&
3321
+ flushCompletedChunks(request, request.destination);
3322
+ }
3323
+ } catch (error$2) {
3324
+ logRecoverableError(request, error$2, null),
3325
+ fatalError(request, error$2);
3326
+ }
3327
+ }
3299
3328
  function fromHex(str) {
3300
3329
  return parseInt(str, 16);
3301
3330
  }
@@ -3313,7 +3342,7 @@
3313
3342
  var id = message[command],
3314
3343
  retainedValue = deferredDebugObjects.retained.get(id);
3315
3344
  void 0 !== retainedValue &&
3316
- (request.pendingChunks--,
3345
+ (request.pendingDebugChunks--,
3317
3346
  deferredDebugObjects.retained.delete(id),
3318
3347
  deferredDebugObjects.existing.delete(retainedValue),
3319
3348
  enqueueFlush(request));
@@ -3324,7 +3353,9 @@
3324
3353
  (id = message[command]),
3325
3354
  (retainedValue = deferredDebugObjects.retained.get(id)),
3326
3355
  void 0 !== retainedValue &&
3327
- (emitOutlinedDebugModelChunk(
3356
+ (deferredDebugObjects.retained.delete(id),
3357
+ deferredDebugObjects.existing.delete(retainedValue),
3358
+ emitOutlinedDebugModelChunk(
3328
3359
  request,
3329
3360
  id,
3330
3361
  { objectLimit: 10 },
@@ -3345,7 +3376,7 @@
3345
3376
  "resolveDebugMessage/closeDebugChannel should not be called for a Request that wasn't kept alive. This is a bug in React."
3346
3377
  );
3347
3378
  deferredDebugObjects.retained.forEach(function (value, id) {
3348
- request.pendingChunks--;
3379
+ request.pendingDebugChunks--;
3349
3380
  deferredDebugObjects.retained.delete(id);
3350
3381
  deferredDebugObjects.existing.delete(value);
3351
3382
  });
@@ -4821,12 +4852,12 @@
4821
4852
  "React doesn't accept base64 encoded file uploads because we don't expect form data passed from a browser to ever encode data that way. If that's the wrong assumption, we can easily fix it."
4822
4853
  );
4823
4854
  pendingFiles++;
4824
- var JSCompiler_object_inline_chunks_207 = [];
4855
+ var JSCompiler_object_inline_chunks_214 = [];
4825
4856
  value.on("data", function (chunk) {
4826
- JSCompiler_object_inline_chunks_207.push(chunk);
4857
+ JSCompiler_object_inline_chunks_214.push(chunk);
4827
4858
  });
4828
4859
  value.on("end", function () {
4829
- var blob = new Blob(JSCompiler_object_inline_chunks_207, {
4860
+ var blob = new Blob(JSCompiler_object_inline_chunks_214, {
4830
4861
  type: mimeType
4831
4862
  });
4832
4863
  response._formData.append(name, blob, filename);