react-server-dom-webpack 19.0.0-rc-20b6f4c0e8-20240607 → 19.0.0-rc-34d0c5e357-20240607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/react-server-dom-webpack-client.browser.development.js +30 -61
- package/cjs/react-server-dom-webpack-client.edge.development.js +30 -61
- package/cjs/react-server-dom-webpack-client.node.development.js +31 -62
- package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +31 -62
- package/cjs/react-server-dom-webpack-server.browser.development.js +47 -241
- package/cjs/react-server-dom-webpack-server.browser.production.js +78 -161
- package/cjs/react-server-dom-webpack-server.edge.development.js +46 -227
- package/cjs/react-server-dom-webpack-server.edge.production.js +79 -143
- package/cjs/react-server-dom-webpack-server.node.development.js +47 -219
- package/cjs/react-server-dom-webpack-server.node.production.js +85 -138
- package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +47 -219
- package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +85 -138
- package/package.json +3 -3
@@ -414,48 +414,32 @@ function error(format) {
|
|
414
414
|
args[_key2 - 1] = arguments[_key2];
|
415
415
|
}
|
416
416
|
|
417
|
-
printWarning('error', format, args
|
417
|
+
printWarning('error', format, args);
|
418
418
|
}
|
419
419
|
}
|
420
|
-
}
|
420
|
+
}
|
421
421
|
|
422
|
-
function printWarning(level, format, args
|
422
|
+
function printWarning(level, format, args) {
|
423
423
|
// When changing this logic, you might want to also
|
424
424
|
// update consoleWithStackDev.www.js as well.
|
425
425
|
{
|
426
|
-
var
|
426
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
427
427
|
|
428
|
-
if (
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
428
|
+
if (stack !== '') {
|
429
|
+
format += '%s';
|
430
|
+
args = args.concat([stack]);
|
431
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
433
432
|
|
434
|
-
if (stack !== '') {
|
435
|
-
format += '%s';
|
436
|
-
args = args.concat([stack]);
|
437
|
-
}
|
438
|
-
}
|
439
433
|
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
// TODO: Remove this prefix and stop toStringing in the wrapper and
|
446
|
-
// instead do it at each callsite as needed.
|
447
|
-
// Careful: RN currently depends on this prefix
|
448
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
449
|
-
args = args.map(function (item) {
|
450
|
-
return String(item);
|
451
|
-
});
|
452
|
-
args.unshift('Warning: ' + format);
|
453
|
-
} // We intentionally don't use spread (or .apply) directly because it
|
434
|
+
var argsWithFormat = args.map(function (item) {
|
435
|
+
return String(item);
|
436
|
+
}); // Careful: RN currently depends on this prefix
|
437
|
+
|
438
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
454
439
|
// breaks IE9: https://github.com/facebook/react/issues/13610
|
455
440
|
// eslint-disable-next-line react-internal/no-production-logging
|
456
441
|
|
457
|
-
|
458
|
-
Function.prototype.apply.call(console[level], console, args);
|
442
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
459
443
|
}
|
460
444
|
}
|
461
445
|
|
@@ -1975,9 +1959,8 @@ function nullRefGetter() {
|
|
1975
1959
|
}
|
1976
1960
|
}
|
1977
1961
|
|
1978
|
-
function createElement(
|
1979
|
-
stack
|
1980
|
-
validated) // DEV-only
|
1962
|
+
function createElement(type, key, props, owner, // DEV-only
|
1963
|
+
stack) // DEV-only
|
1981
1964
|
{
|
1982
1965
|
var element;
|
1983
1966
|
|
@@ -2005,7 +1988,7 @@ validated) // DEV-only
|
|
2005
1988
|
configurable: false,
|
2006
1989
|
enumerable: false,
|
2007
1990
|
writable: true,
|
2008
|
-
value:
|
1991
|
+
value: true // This element has already been validated on the server.
|
2009
1992
|
|
2010
1993
|
}); // debugInfo contains Server Component debug information.
|
2011
1994
|
|
@@ -2415,7 +2398,7 @@ function parseModelTuple(response, value) {
|
|
2415
2398
|
if (tuple[0] === REACT_ELEMENT_TYPE) {
|
2416
2399
|
// TODO: Consider having React just directly accept these arrays as elements.
|
2417
2400
|
// Or even change the ReactElement type to be an array.
|
2418
|
-
return createElement(
|
2401
|
+
return createElement(tuple[1], tuple[2], tuple[3], tuple[4] );
|
2419
2402
|
}
|
2420
2403
|
|
2421
2404
|
return value;
|
@@ -2425,7 +2408,7 @@ function missingCall() {
|
|
2425
2408
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
2426
2409
|
}
|
2427
2410
|
|
2428
|
-
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences
|
2411
|
+
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences) {
|
2429
2412
|
var chunks = new Map();
|
2430
2413
|
var response = {
|
2431
2414
|
_bundlerConfig: bundlerConfig,
|
@@ -2442,12 +2425,7 @@ function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormActi
|
|
2442
2425
|
_rowLength: 0,
|
2443
2426
|
_buffer: [],
|
2444
2427
|
_tempRefs: temporaryReferences
|
2445
|
-
};
|
2446
|
-
|
2447
|
-
{
|
2448
|
-
response._debugFindSourceMapURL = findSourceMapURL;
|
2449
|
-
} // Don't inline this call because it causes closure to outline the call above.
|
2450
|
-
|
2428
|
+
}; // Don't inline this call because it causes closure to outline the call above.
|
2451
2429
|
|
2452
2430
|
response._fromJSON = createFromJSONCallback(response);
|
2453
2431
|
return response;
|
@@ -2784,16 +2762,9 @@ function stopStream(response, id, row) {
|
|
2784
2762
|
|
2785
2763
|
function resolveErrorDev(response, id, digest, message, stack) {
|
2786
2764
|
|
2787
|
-
var error;
|
2788
|
-
|
2789
|
-
{
|
2790
|
-
// Executing Error within a native stack isn't really limited to owner stacks
|
2791
|
-
// but we gate it behind the same flag for now while iterating.
|
2792
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
2793
|
-
error = Error(message || 'An error occurred in the Server Components render but no message was provided');
|
2794
|
-
error.stack = stack;
|
2795
|
-
}
|
2796
2765
|
|
2766
|
+
var error = new Error(message || 'An error occurred in the Server Components render but no message was provided');
|
2767
|
+
error.stack = stack;
|
2797
2768
|
error.digest = digest;
|
2798
2769
|
var errorWithDigest = error;
|
2799
2770
|
var chunks = response._chunks;
|
@@ -2809,9 +2780,10 @@ function resolveErrorDev(response, id, digest, message, stack) {
|
|
2809
2780
|
function resolveHint(response, code, model) {
|
2810
2781
|
var hintModel = parseModel(response, model);
|
2811
2782
|
dispatchHint(code, hintModel);
|
2812
|
-
}
|
2783
|
+
}
|
2813
2784
|
|
2814
2785
|
function resolveDebugInfo(response, id, debugInfo) {
|
2786
|
+
|
2815
2787
|
var chunk = getChunk(response, id);
|
2816
2788
|
var chunkDebugInfo = chunk._debugInfo || (chunk._debugInfo = []);
|
2817
2789
|
chunkDebugInfo.push(debugInfo);
|
@@ -2820,16 +2792,13 @@ function resolveDebugInfo(response, id, debugInfo) {
|
|
2820
2792
|
function resolveConsoleEntry(response, value) {
|
2821
2793
|
|
2822
2794
|
var payload = parseModel(response, value);
|
2823
|
-
var methodName = payload[0];
|
2795
|
+
var methodName = payload[0]; // TODO: Restore the fake stack before logging.
|
2796
|
+
// const stackTrace = payload[1];
|
2797
|
+
// const owner = payload[2];
|
2798
|
+
|
2824
2799
|
var env = payload[3];
|
2825
2800
|
var args = payload.slice(4);
|
2826
|
-
|
2827
|
-
{
|
2828
|
-
// Printing with stack isn't really limited to owner stacks but
|
2829
|
-
// we gate it behind the same flag for now while iterating.
|
2830
|
-
printToConsole(methodName, args, env);
|
2831
|
-
return;
|
2832
|
-
}
|
2801
|
+
printToConsole(methodName, args, env);
|
2833
2802
|
}
|
2834
2803
|
|
2835
2804
|
function mergeBuffer(buffer, lastChunk) {
|
@@ -3286,7 +3255,7 @@ function close(response) {
|
|
3286
3255
|
function createResponseFromOptions(options) {
|
3287
3256
|
return createResponse(null, null, options && options.callServer ? options.callServer : undefined, undefined, // encodeFormAction
|
3288
3257
|
undefined, // nonce
|
3289
|
-
options && options.temporaryReferences ? options.temporaryReferences : undefined
|
3258
|
+
options && options.temporaryReferences ? options.temporaryReferences : undefined);
|
3290
3259
|
}
|
3291
3260
|
|
3292
3261
|
function startReadingFromStream(response, stream) {
|
@@ -433,48 +433,32 @@ function error(format) {
|
|
433
433
|
args[_key2 - 1] = arguments[_key2];
|
434
434
|
}
|
435
435
|
|
436
|
-
printWarning('error', format, args
|
436
|
+
printWarning('error', format, args);
|
437
437
|
}
|
438
438
|
}
|
439
|
-
}
|
439
|
+
}
|
440
440
|
|
441
|
-
function printWarning(level, format, args
|
441
|
+
function printWarning(level, format, args) {
|
442
442
|
// When changing this logic, you might want to also
|
443
443
|
// update consoleWithStackDev.www.js as well.
|
444
444
|
{
|
445
|
-
var
|
445
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
446
446
|
|
447
|
-
if (
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
447
|
+
if (stack !== '') {
|
448
|
+
format += '%s';
|
449
|
+
args = args.concat([stack]);
|
450
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
452
451
|
|
453
|
-
if (stack !== '') {
|
454
|
-
format += '%s';
|
455
|
-
args = args.concat([stack]);
|
456
|
-
}
|
457
|
-
}
|
458
452
|
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
// TODO: Remove this prefix and stop toStringing in the wrapper and
|
465
|
-
// instead do it at each callsite as needed.
|
466
|
-
// Careful: RN currently depends on this prefix
|
467
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
468
|
-
args = args.map(function (item) {
|
469
|
-
return String(item);
|
470
|
-
});
|
471
|
-
args.unshift('Warning: ' + format);
|
472
|
-
} // We intentionally don't use spread (or .apply) directly because it
|
453
|
+
var argsWithFormat = args.map(function (item) {
|
454
|
+
return String(item);
|
455
|
+
}); // Careful: RN currently depends on this prefix
|
456
|
+
|
457
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
473
458
|
// breaks IE9: https://github.com/facebook/react/issues/13610
|
474
459
|
// eslint-disable-next-line react-internal/no-production-logging
|
475
460
|
|
476
|
-
|
477
|
-
Function.prototype.apply.call(console[level], console, args);
|
461
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
478
462
|
}
|
479
463
|
}
|
480
464
|
|
@@ -2228,9 +2212,8 @@ function nullRefGetter() {
|
|
2228
2212
|
}
|
2229
2213
|
}
|
2230
2214
|
|
2231
|
-
function createElement(
|
2232
|
-
stack
|
2233
|
-
validated) // DEV-only
|
2215
|
+
function createElement(type, key, props, owner, // DEV-only
|
2216
|
+
stack) // DEV-only
|
2234
2217
|
{
|
2235
2218
|
var element;
|
2236
2219
|
|
@@ -2258,7 +2241,7 @@ validated) // DEV-only
|
|
2258
2241
|
configurable: false,
|
2259
2242
|
enumerable: false,
|
2260
2243
|
writable: true,
|
2261
|
-
value:
|
2244
|
+
value: true // This element has already been validated on the server.
|
2262
2245
|
|
2263
2246
|
}); // debugInfo contains Server Component debug information.
|
2264
2247
|
|
@@ -2668,7 +2651,7 @@ function parseModelTuple(response, value) {
|
|
2668
2651
|
if (tuple[0] === REACT_ELEMENT_TYPE) {
|
2669
2652
|
// TODO: Consider having React just directly accept these arrays as elements.
|
2670
2653
|
// Or even change the ReactElement type to be an array.
|
2671
|
-
return createElement(
|
2654
|
+
return createElement(tuple[1], tuple[2], tuple[3], tuple[4] );
|
2672
2655
|
}
|
2673
2656
|
|
2674
2657
|
return value;
|
@@ -2678,7 +2661,7 @@ function missingCall() {
|
|
2678
2661
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
2679
2662
|
}
|
2680
2663
|
|
2681
|
-
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences
|
2664
|
+
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences) {
|
2682
2665
|
var chunks = new Map();
|
2683
2666
|
var response = {
|
2684
2667
|
_bundlerConfig: bundlerConfig,
|
@@ -2695,12 +2678,7 @@ function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormActi
|
|
2695
2678
|
_rowLength: 0,
|
2696
2679
|
_buffer: [],
|
2697
2680
|
_tempRefs: temporaryReferences
|
2698
|
-
};
|
2699
|
-
|
2700
|
-
{
|
2701
|
-
response._debugFindSourceMapURL = findSourceMapURL;
|
2702
|
-
} // Don't inline this call because it causes closure to outline the call above.
|
2703
|
-
|
2681
|
+
}; // Don't inline this call because it causes closure to outline the call above.
|
2704
2682
|
|
2705
2683
|
response._fromJSON = createFromJSONCallback(response);
|
2706
2684
|
return response;
|
@@ -3038,16 +3016,9 @@ function stopStream(response, id, row) {
|
|
3038
3016
|
|
3039
3017
|
function resolveErrorDev(response, id, digest, message, stack) {
|
3040
3018
|
|
3041
|
-
var error;
|
3042
|
-
|
3043
|
-
{
|
3044
|
-
// Executing Error within a native stack isn't really limited to owner stacks
|
3045
|
-
// but we gate it behind the same flag for now while iterating.
|
3046
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
3047
|
-
error = Error(message || 'An error occurred in the Server Components render but no message was provided');
|
3048
|
-
error.stack = stack;
|
3049
|
-
}
|
3050
3019
|
|
3020
|
+
var error = new Error(message || 'An error occurred in the Server Components render but no message was provided');
|
3021
|
+
error.stack = stack;
|
3051
3022
|
error.digest = digest;
|
3052
3023
|
var errorWithDigest = error;
|
3053
3024
|
var chunks = response._chunks;
|
@@ -3063,9 +3034,10 @@ function resolveErrorDev(response, id, digest, message, stack) {
|
|
3063
3034
|
function resolveHint(response, code, model) {
|
3064
3035
|
var hintModel = parseModel(response, model);
|
3065
3036
|
dispatchHint(code, hintModel);
|
3066
|
-
}
|
3037
|
+
}
|
3067
3038
|
|
3068
3039
|
function resolveDebugInfo(response, id, debugInfo) {
|
3040
|
+
|
3069
3041
|
var chunk = getChunk(response, id);
|
3070
3042
|
var chunkDebugInfo = chunk._debugInfo || (chunk._debugInfo = []);
|
3071
3043
|
chunkDebugInfo.push(debugInfo);
|
@@ -3074,16 +3046,13 @@ function resolveDebugInfo(response, id, debugInfo) {
|
|
3074
3046
|
function resolveConsoleEntry(response, value) {
|
3075
3047
|
|
3076
3048
|
var payload = parseModel(response, value);
|
3077
|
-
var methodName = payload[0];
|
3049
|
+
var methodName = payload[0]; // TODO: Restore the fake stack before logging.
|
3050
|
+
// const stackTrace = payload[1];
|
3051
|
+
// const owner = payload[2];
|
3052
|
+
|
3078
3053
|
var env = payload[3];
|
3079
3054
|
var args = payload.slice(4);
|
3080
|
-
|
3081
|
-
{
|
3082
|
-
// Printing with stack isn't really limited to owner stacks but
|
3083
|
-
// we gate it behind the same flag for now while iterating.
|
3084
|
-
printToConsole(methodName, args, env);
|
3085
|
-
return;
|
3086
|
-
}
|
3055
|
+
printToConsole(methodName, args, env);
|
3087
3056
|
}
|
3088
3057
|
|
3089
3058
|
function mergeBuffer(buffer, lastChunk) {
|
@@ -3546,7 +3515,7 @@ function createServerReference(id, callServer) {
|
|
3546
3515
|
}
|
3547
3516
|
|
3548
3517
|
function createResponseFromOptions(options) {
|
3549
|
-
return createResponse(options.ssrManifest.moduleMap, options.ssrManifest.moduleLoading, noServerCall, options.encodeFormAction, typeof options.nonce === 'string' ? options.nonce : undefined, options && options.temporaryReferences ? options.temporaryReferences : undefined
|
3518
|
+
return createResponse(options.ssrManifest.moduleMap, options.ssrManifest.moduleLoading, noServerCall, options.encodeFormAction, typeof options.nonce === 'string' ? options.nonce : undefined, options && options.temporaryReferences ? options.temporaryReferences : undefined);
|
3550
3519
|
}
|
3551
3520
|
|
3552
3521
|
function startReadingFromStream(response, stream) {
|
@@ -434,48 +434,32 @@ function error(format) {
|
|
434
434
|
args[_key2 - 1] = arguments[_key2];
|
435
435
|
}
|
436
436
|
|
437
|
-
printWarning('error', format, args
|
437
|
+
printWarning('error', format, args);
|
438
438
|
}
|
439
439
|
}
|
440
|
-
}
|
440
|
+
}
|
441
441
|
|
442
|
-
function printWarning(level, format, args
|
442
|
+
function printWarning(level, format, args) {
|
443
443
|
// When changing this logic, you might want to also
|
444
444
|
// update consoleWithStackDev.www.js as well.
|
445
445
|
{
|
446
|
-
var
|
446
|
+
var stack = ReactSharedInternals.getStackAddendum();
|
447
447
|
|
448
|
-
if (
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
var stack = ReactSharedInternals.getCurrentStack(currentStack);
|
448
|
+
if (stack !== '') {
|
449
|
+
format += '%s';
|
450
|
+
args = args.concat([stack]);
|
451
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
453
452
|
|
454
|
-
if (stack !== '') {
|
455
|
-
format += '%s';
|
456
|
-
args = args.concat([stack]);
|
457
|
-
}
|
458
|
-
}
|
459
453
|
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
// TODO: Remove this prefix and stop toStringing in the wrapper and
|
466
|
-
// instead do it at each callsite as needed.
|
467
|
-
// Careful: RN currently depends on this prefix
|
468
|
-
// eslint-disable-next-line react-internal/safe-string-coercion
|
469
|
-
args = args.map(function (item) {
|
470
|
-
return String(item);
|
471
|
-
});
|
472
|
-
args.unshift('Warning: ' + format);
|
473
|
-
} // We intentionally don't use spread (or .apply) directly because it
|
454
|
+
var argsWithFormat = args.map(function (item) {
|
455
|
+
return String(item);
|
456
|
+
}); // Careful: RN currently depends on this prefix
|
457
|
+
|
458
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
474
459
|
// breaks IE9: https://github.com/facebook/react/issues/13610
|
475
460
|
// eslint-disable-next-line react-internal/no-production-logging
|
476
461
|
|
477
|
-
|
478
|
-
Function.prototype.apply.call(console[level], console, args);
|
462
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
479
463
|
}
|
480
464
|
}
|
481
465
|
|
@@ -2226,9 +2210,8 @@ function nullRefGetter() {
|
|
2226
2210
|
}
|
2227
2211
|
}
|
2228
2212
|
|
2229
|
-
function createElement(
|
2230
|
-
stack
|
2231
|
-
validated) // DEV-only
|
2213
|
+
function createElement(type, key, props, owner, // DEV-only
|
2214
|
+
stack) // DEV-only
|
2232
2215
|
{
|
2233
2216
|
var element;
|
2234
2217
|
|
@@ -2256,7 +2239,7 @@ validated) // DEV-only
|
|
2256
2239
|
configurable: false,
|
2257
2240
|
enumerable: false,
|
2258
2241
|
writable: true,
|
2259
|
-
value:
|
2242
|
+
value: true // This element has already been validated on the server.
|
2260
2243
|
|
2261
2244
|
}); // debugInfo contains Server Component debug information.
|
2262
2245
|
|
@@ -2666,7 +2649,7 @@ function parseModelTuple(response, value) {
|
|
2666
2649
|
if (tuple[0] === REACT_ELEMENT_TYPE) {
|
2667
2650
|
// TODO: Consider having React just directly accept these arrays as elements.
|
2668
2651
|
// Or even change the ReactElement type to be an array.
|
2669
|
-
return createElement(
|
2652
|
+
return createElement(tuple[1], tuple[2], tuple[3], tuple[4] );
|
2670
2653
|
}
|
2671
2654
|
|
2672
2655
|
return value;
|
@@ -2676,7 +2659,7 @@ function missingCall() {
|
|
2676
2659
|
throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
|
2677
2660
|
}
|
2678
2661
|
|
2679
|
-
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences
|
2662
|
+
function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce, temporaryReferences) {
|
2680
2663
|
var chunks = new Map();
|
2681
2664
|
var response = {
|
2682
2665
|
_bundlerConfig: bundlerConfig,
|
@@ -2693,12 +2676,7 @@ function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormActi
|
|
2693
2676
|
_rowLength: 0,
|
2694
2677
|
_buffer: [],
|
2695
2678
|
_tempRefs: temporaryReferences
|
2696
|
-
};
|
2697
|
-
|
2698
|
-
{
|
2699
|
-
response._debugFindSourceMapURL = findSourceMapURL;
|
2700
|
-
} // Don't inline this call because it causes closure to outline the call above.
|
2701
|
-
|
2679
|
+
}; // Don't inline this call because it causes closure to outline the call above.
|
2702
2680
|
|
2703
2681
|
response._fromJSON = createFromJSONCallback(response);
|
2704
2682
|
return response;
|
@@ -3036,16 +3014,9 @@ function stopStream(response, id, row) {
|
|
3036
3014
|
|
3037
3015
|
function resolveErrorDev(response, id, digest, message, stack) {
|
3038
3016
|
|
3039
|
-
var error;
|
3040
|
-
|
3041
|
-
{
|
3042
|
-
// Executing Error within a native stack isn't really limited to owner stacks
|
3043
|
-
// but we gate it behind the same flag for now while iterating.
|
3044
|
-
// eslint-disable-next-line react-internal/prod-error-codes
|
3045
|
-
error = Error(message || 'An error occurred in the Server Components render but no message was provided');
|
3046
|
-
error.stack = stack;
|
3047
|
-
}
|
3048
3017
|
|
3018
|
+
var error = new Error(message || 'An error occurred in the Server Components render but no message was provided');
|
3019
|
+
error.stack = stack;
|
3049
3020
|
error.digest = digest;
|
3050
3021
|
var errorWithDigest = error;
|
3051
3022
|
var chunks = response._chunks;
|
@@ -3061,9 +3032,10 @@ function resolveErrorDev(response, id, digest, message, stack) {
|
|
3061
3032
|
function resolveHint(response, code, model) {
|
3062
3033
|
var hintModel = parseModel(response, model);
|
3063
3034
|
dispatchHint(code, hintModel);
|
3064
|
-
}
|
3035
|
+
}
|
3065
3036
|
|
3066
3037
|
function resolveDebugInfo(response, id, debugInfo) {
|
3038
|
+
|
3067
3039
|
var chunk = getChunk(response, id);
|
3068
3040
|
var chunkDebugInfo = chunk._debugInfo || (chunk._debugInfo = []);
|
3069
3041
|
chunkDebugInfo.push(debugInfo);
|
@@ -3072,16 +3044,13 @@ function resolveDebugInfo(response, id, debugInfo) {
|
|
3072
3044
|
function resolveConsoleEntry(response, value) {
|
3073
3045
|
|
3074
3046
|
var payload = parseModel(response, value);
|
3075
|
-
var methodName = payload[0];
|
3047
|
+
var methodName = payload[0]; // TODO: Restore the fake stack before logging.
|
3048
|
+
// const stackTrace = payload[1];
|
3049
|
+
// const owner = payload[2];
|
3050
|
+
|
3076
3051
|
var env = payload[3];
|
3077
3052
|
var args = payload.slice(4);
|
3078
|
-
|
3079
|
-
{
|
3080
|
-
// Printing with stack isn't really limited to owner stacks but
|
3081
|
-
// we gate it behind the same flag for now while iterating.
|
3082
|
-
printToConsole(methodName, args, env);
|
3083
|
-
return;
|
3084
|
-
}
|
3053
|
+
printToConsole(methodName, args, env);
|
3085
3054
|
}
|
3086
3055
|
|
3087
3056
|
function mergeBuffer(buffer, lastChunk) {
|
@@ -3544,8 +3513,8 @@ function createServerReference(id, callServer) {
|
|
3544
3513
|
}
|
3545
3514
|
|
3546
3515
|
function createFromNodeStream(stream, ssrManifest, options) {
|
3547
|
-
var response = createResponse(ssrManifest.moduleMap, ssrManifest.moduleLoading, noServerCall, options ? options.encodeFormAction : undefined, options && typeof options.nonce === 'string' ? options.nonce : undefined, undefined
|
3548
|
-
|
3516
|
+
var response = createResponse(ssrManifest.moduleMap, ssrManifest.moduleLoading, noServerCall, options ? options.encodeFormAction : undefined, options && typeof options.nonce === 'string' ? options.nonce : undefined, undefined // TODO: If encodeReply is supported, this should support temporaryReferences
|
3517
|
+
);
|
3549
3518
|
stream.on('data', function (chunk) {
|
3550
3519
|
processBinaryChunk(response, chunk);
|
3551
3520
|
});
|