react-server-dom-webpack 18.3.0-next-8b9ac8175-20230131 → 18.3.0-next-2ef24145e-20230202
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.development.js +66 -70
- package/cjs/react-server-dom-webpack-client.production.min.js +16 -16
- package/cjs/react-server-dom-webpack-node-register.js +4 -15
- package/cjs/react-server-dom-webpack-server.browser.development.js +138 -43
- package/cjs/react-server-dom-webpack-server.browser.production.min.js +45 -43
- package/cjs/react-server-dom-webpack-server.node.development.js +138 -43
- package/cjs/react-server-dom-webpack-server.node.production.min.js +47 -45
- package/package.json +3 -3
- package/umd/react-server-dom-webpack-client.development.js +66 -70
- package/umd/react-server-dom-webpack-client.production.min.js +13 -13
- package/umd/react-server-dom-webpack-server.browser.development.js +138 -43
- package/umd/react-server-dom-webpack-server.browser.production.min.js +36 -34
@@ -7,52 +7,54 @@
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
'use strict';var
|
11
|
-
function r(a){return q.encode(a)}function
|
12
|
-
|
13
|
-
|
14
|
-
"
|
15
|
-
|
16
|
-
"
|
17
|
-
|
18
|
-
new
|
19
|
-
|
20
|
-
|
10
|
+
'use strict';var aa=require("react");var e="function"===typeof AsyncLocalStorage,ba=e?new AsyncLocalStorage:null,m=null,n=0;function p(a,b){if(0!==b.length)if(512<b.length)0<n&&(a.enqueue(new Uint8Array(m.buffer,0,n)),m=new Uint8Array(512),n=0),a.enqueue(b);else{var c=m.length-n;c<b.length&&(0===c?a.enqueue(m):(m.set(b.subarray(0,c),n),a.enqueue(m),b=b.subarray(c)),m=new Uint8Array(512),n=0);m.set(b,n);n+=b.length}return!0}var q=new TextEncoder;
|
11
|
+
function r(a){return q.encode(a)}function ca(a,b){"function"===typeof a.error?a.error(b):a.close()}var t=JSON.stringify;function u(a,b,c){a=t(c);b=b.toString(16)+":"+a+"\n";return q.encode(b)}
|
12
|
+
var v=Symbol.for("react.client.reference"),w=Symbol.for("react.element"),ia=Symbol.for("react.fragment"),ja=Symbol.for("react.provider"),ka=Symbol.for("react.server_context"),la=Symbol.for("react.forward_ref"),ma=Symbol.for("react.suspense"),na=Symbol.for("react.suspense_list"),oa=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),pa=Symbol.for("react.default_value"),qa=Symbol.for("react.memo_cache_sentinel");
|
13
|
+
function z(a,b,c,d,f,g,h){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=g;this.removeEmptyString=h}"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){new z(a,0,!1,a,null,!1,!1)});
|
14
|
+
[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){new z(a[0],1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){new z(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){new z(a,2,!1,a,null,!1,!1)});
|
15
|
+
"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){new z(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){new z(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){new z(a,4,!1,a,null,!1,!1)});
|
16
|
+
["cols","rows","size","span"].forEach(function(a){new z(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){new z(a,5,!1,a.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function B(a){return a[1].toUpperCase()}
|
17
|
+
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(A,
|
18
|
+
B);new z(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(A,B);new z(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(A,B);new z(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){new z(a,1,!1,a.toLowerCase(),null,!1,!1)});
|
19
|
+
new z("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){new z(a,1,!1,a.toLowerCase(),null,!0,!0)});
|
20
|
+
var C={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,
|
21
|
+
fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ra=["Webkit","ms","Moz","O"];Object.keys(C).forEach(function(a){ra.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);C[b]=C[a]})});var sa=Array.isArray;r('"></template>');r("<script>");r("\x3c/script>");r('<script src="');r('<script type="module" src="');r('" integrity="');r('" async="">\x3c/script>');r("\x3c!-- --\x3e");r(' style="');r(":");r(";");
|
21
22
|
r(" ");r('="');r('"');r('=""');r(">");r("/>");r(' selected=""');r("\n");r("<!DOCTYPE html>");r("</");r(">");r('<template id="');r('"></template>');r("\x3c!--$--\x3e");r('\x3c!--$?--\x3e<template id="');r('"></template>');r("\x3c!--$!--\x3e");r("\x3c!--/$--\x3e");r("<template");r('"');r(' data-dgst="');r(' data-msg="');r(' data-stck="');r("></template>");r('<div hidden id="');r('">');r("</div>");r('<svg aria-hidden="true" style="display:none" id="');r('">');r("</svg>");r('<math aria-hidden="true" style="display:none" id="');
|
22
23
|
r('">');r("</math>");r('<table hidden id="');r('">');r("</table>");r('<table hidden><tbody id="');r('">');r("</tbody></table>");r('<table hidden><tr id="');r('">');r("</tr></table>");r('<table hidden><colgroup id="');r('">');r("</colgroup></table>");r('$RS=function(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)};;$RS("');r('$RS("');r('","');r('")\x3c/script>');r('<template data-rsi="" data-sid="');
|
23
24
|
r('" data-pid="');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RC("');
|
24
25
|
r('$RC("');r('$RC=function(b,c,e){c=document.getElementById(c);c.parentNode.removeChild(c);var a=document.getElementById(b);if(a){b=a.previousSibling;if(e)b.data="$!",a.setAttribute("data-dgst",e);else{e=b.parentNode;a=b.nextSibling;var f=0;do{if(a&&8===a.nodeType){var d=a.data;if("/$"===d)if(0===f)break;else f--;else"$"!==d&&"$?"!==d&&"$!"!==d||f++}d=a.nextSibling;e.removeChild(a);a=d}while(a);for(;c.firstChild;)e.insertBefore(c.firstChild,a);b.data="$"}b._reactRetry&&b._reactRetry()}};;$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
25
26
|
r('$RM=new Map;\n$RR=function(p,q,v){function r(l){this.s=l}for(var t=$RC,u=$RM,m=new Map,n=document,g,e,f=n.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;e=f[d++];)m.set(e.dataset.precedence,g=e);e=0;f=[];for(var c,h,b,a;c=v[e++];){var k=0;h=c[k++];if(b=u.get(h))"l"!==b.s&&f.push(b);else{a=n.createElement("link");a.href=h;a.rel="stylesheet";for(a.dataset.precedence=d=c[k++];b=c[k++];)a.setAttribute(b,c[k++]);b=a._p=new Promise(function(l,w){a.onload=l;a.onerror=w});b.then(r.bind(b,\n"l"),r.bind(b,"e"));u.set(h,b);f.push(b);c=m.get(d)||g;c===g&&(g=a);m.set(d,a);c?c.parentNode.insertBefore(a,c.nextSibling):(d=n.head,d.insertBefore(a,d.firstChild))}}Promise.all(f).then(t.bind(null,p,q,""),t.bind(null,p,q,"Resource failed to load"))};;$RR("');
|
26
27
|
r('$RR("');r('","');r('",');r('"');r(")\x3c/script>");r('<template data-rci="" data-bid="');r('<template data-rri="" data-bid="');r('" data-sid="');r('" data-sty="');r('$RX=function(b,c,d,e){var a=document.getElementById(b);a&&(b=a.previousSibling,b.data="$!",a=a.dataset,c&&(a.dgst=c),d&&(a.msg=d),e&&(a.stck=e),b._reactRetry&&b._reactRetry())};;$RX("');r('$RX("');r('"');r(",");r(")\x3c/script>");r('<template data-rxi="" data-bid="');r('" data-dgst="');r('" data-msg="');r('" data-stck="');r('<style data-precedence="');
|
27
|
-
r('"></style>');r("[");r(",[");r(",");r("]");var
|
28
|
-
function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?
|
29
|
-
function wa(a,b){var
|
30
|
-
function ya(){}function za(a,b,
|
31
|
-
function Aa(){if(null===
|
32
|
-
var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:
|
33
|
-
function
|
34
|
-
function
|
35
|
-
var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(
|
36
|
-
function La(a,b,d,
|
37
|
-
|
38
|
-
function
|
39
|
-
function
|
40
|
-
|
41
|
-
|
42
|
-
b=
|
43
|
-
|
44
|
-
function
|
45
|
-
|
46
|
-
|
47
|
-
c
|
48
|
-
|
49
|
-
|
50
|
-
c
|
51
|
-
function
|
52
|
-
function
|
53
|
-
var
|
54
|
-
|
55
|
-
|
56
|
-
function
|
57
|
-
|
58
|
-
a)
|
28
|
+
r('"></style>');r("[");r(",[");r(",");r("]");var D=null;function G(a,b){if(a!==b){a.context._currentValue=a.parentValue;a=a.parent;var c=b.parent;if(null===a){if(null!==c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");}else{if(null===c)throw Error("The stacks must reach the root at the same time. This is a bug in React.");G(a,c);b.context._currentValue=b.value}}}function ta(a){a.context._currentValue=a.parentValue;a=a.parent;null!==a&&ta(a)}
|
29
|
+
function ua(a){var b=a.parent;null!==b&&ua(b);a.context._currentValue=a.value}function va(a,b){a.context._currentValue=a.parentValue;a=a.parent;if(null===a)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===b.depth?G(a,b):va(a,b)}
|
30
|
+
function wa(a,b){var c=b.parent;if(null===c)throw Error("The depth must equal at least at zero before reaching the root. This is a bug in React.");a.depth===c.depth?G(a,c):wa(a,c);b.context._currentValue=b.value}function H(a){var b=D;b!==a&&(null===b?ua(a):null===a?ta(b):b.depth===a.depth?G(b,a):b.depth>a.depth?va(b,a):wa(b,a),D=a)}function xa(a,b){var c=a._currentValue;a._currentValue=b;var d=D;return D=a={parent:d,depth:null===d?0:d.depth+1,context:a,parentValue:c,value:b}}var I=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`");
|
31
|
+
function ya(){}function za(a,b,c){c=a[c];void 0===c?a.push(b):c!==b&&(b.then(ya,ya),b=c);switch(b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;default:if("string"!==typeof b.status)switch(a=b,a.status="pending",a.then(function(a){if("pending"===b.status){var c=b;c.status="fulfilled";c.value=a}},function(a){if("pending"===b.status){var c=b;c.status="rejected";c.reason=a}}),b.status){case "fulfilled":return b.value;case "rejected":throw b.reason;}J=b;throw I;}}var J=null;
|
32
|
+
function Aa(){if(null===J)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var a=J;J=null;return a}var K=null,L=0,M=null;function Ba(){var a=M;M=null;return a}function Ca(a){return a._currentValue}
|
33
|
+
var Ha={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:N,useTransition:N,readContext:Ca,useContext:Ca,useReducer:N,useRef:N,useState:N,useInsertionEffect:N,useLayoutEffect:N,useImperativeHandle:N,useEffect:N,useId:Da,useMutableSource:N,useSyncExternalStore:N,useCacheRefresh:function(){return Ea},useMemoCache:function(a){for(var b=Array(a),c=0;c<a;c++)b[c]=qa;return b},use:Fa};
|
34
|
+
function N(){throw Error("This Hook is not supported in Server Components.");}function Ea(){throw Error("Refreshing the cache is not supported in Server Components.");}function Da(){if(null===K)throw Error("useId can only be used while React is rendering");var a=K.identifierCount++;return":"+K.identifierPrefix+"S"+a.toString(32)+":"}
|
35
|
+
function Fa(a){if(null!==a&&"object"===typeof a||"function"===typeof a){if("function"===typeof a.then){var b=L;L+=1;null===M&&(M=[]);return za(M,a,b)}if(a.$$typeof===ka)return a._currentValue}throw Error("An unsupported type was passed to use(): "+String(a));}function O(){return(new AbortController).signal}function Ia(){if(P)return P;if(e){var a=ba.getStore();if(a)return a}return new Map}
|
36
|
+
var Ja={getCacheSignal:function(){var a=Ia(),b=a.get(O);void 0===b&&(b=O(),a.set(O,b));return b},getCacheForType:function(a){var b=Ia(),c=b.get(a);void 0===c&&(c=a(),b.set(a,c));return c}},P=null,Q=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,R=Q.ContextRegistry,S=Q.ReactCurrentDispatcher,T=Q.ReactCurrentCache;function Ka(a){console.error(a)}
|
37
|
+
function La(a,b,c,d,f){if(null!==T.current&&T.current!==Ja)throw Error("Currently React only supports one RSC renderer at a time.");T.current=Ja;var g=new Set,h=[],k={status:0,fatalError:null,destination:null,bundlerConfig:b,cache:new Map,nextChunkId:0,pendingChunks:0,abortableTasks:g,pingedTasks:h,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,writtenProviders:new Map,identifierPrefix:f||"",identifierCount:1,onError:void 0===
|
38
|
+
c?Ka:c,toJSON:function(a,b){return Ma(k,this,a,b)}};k.pendingChunks++;b=Na(d);a=U(k,a,b,g);h.push(a);return k}var Oa={};
|
39
|
+
function Pa(a,b){a.pendingChunks++;var c=U(a,null,D,a.abortableTasks);switch(b.status){case "fulfilled":return c.model=b.value,Qa(a,c),c.id;case "rejected":var d=V(a,b.reason);W(a,c.id,d);return c.id;default:"string"!==typeof b.status&&(b.status="pending",b.then(function(a){"pending"===b.status&&(b.status="fulfilled",b.value=a)},function(a){"pending"===b.status&&(b.status="rejected",b.reason=a)}))}b.then(function(b){c.model=b;Qa(a,c)},function(b){b=V(a,b);W(a,c.id,b)});return c.id}
|
40
|
+
function Ra(a){if("fulfilled"===a.status)return a.value;if("rejected"===a.status)throw a.reason;throw a;}function Sa(a){switch(a.status){case "fulfilled":case "rejected":break;default:"string"!==typeof a.status&&(a.status="pending",a.then(function(b){"pending"===a.status&&(a.status="fulfilled",a.value=b)},function(b){"pending"===a.status&&(a.status="rejected",a.reason=b)}))}return{$$typeof:y,_payload:a,_init:Ra}}
|
41
|
+
function X(a,b,c,d,f,g){if(null!==d&&void 0!==d)throw Error("Refs cannot be used in Server Components, nor passed to Client Components.");if("function"===typeof b){if(b.$$typeof===v)return[w,b,c,f];L=0;M=g;f=b(f);return"object"===typeof f&&null!==f&&"function"===typeof f.then?"fulfilled"===f.status?f.value:Sa(f):f}if("string"===typeof b)return[w,b,c,f];if("symbol"===typeof b)return b===ia?f.children:[w,b,c,f];if(null!=b&&"object"===typeof b){if(b.$$typeof===v)return[w,b,c,f];switch(b.$$typeof){case y:var h=
|
42
|
+
b._init;b=h(b._payload);return X(a,b,c,d,f,g);case la:return a=b.render,L=0,M=g,a(f,void 0);case oa:return X(a,b.type,c,d,f,g);case ja:return xa(b._context,f.value),[w,b,c,{value:f.value,children:f.children,__pop:Oa}]}}throw Error("Unsupported Server Component type: "+Ta(b));}function Qa(a,b){var c=a.pingedTasks;c.push(b);1===c.length&&Ua(a)}function U(a,b,c,d){var f={id:a.nextChunkId++,status:0,model:b,context:c,ping:function(){return Qa(a,f)},thenableState:null};d.add(f);return f}
|
43
|
+
function Va(a,b,c,d){var f=d.filepath+"#"+d.name+(d.async?"#async":""),g=a.writtenModules,h=g.get(f);if(void 0!==h)return b[0]===w&&"1"===c?"$L"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig.clientManifest[d.filepath][d.name];var l=d.async?{id:k.id,chunks:k.chunks,name:k.name,async:!0}:k;a.pendingChunks++;var x=a.nextChunkId++,da=t(l),ea=x.toString(16)+":I"+da+"\n";var fa=q.encode(ea);a.completedModuleChunks.push(fa);g.set(f,x);return b[0]===w&&"1"===c?"$L"+x.toString(16):"$"+x.toString(16)}catch(ha){return a.pendingChunks++,
|
44
|
+
b=a.nextChunkId++,c=V(a,ha),W(a,b,c),"$"+b.toString(16)}}function Wa(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,c){return c})}function Ta(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(sa(a))return"[...]";a=Wa(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}}
|
45
|
+
function Y(a){if("string"===typeof a)return a;switch(a){case ma:return"Suspense";case na:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case la:return Y(a.render);case oa:return Y(a.type);case y:var b=a._payload;a=a._init;try{return Y(a(b))}catch(c){}}return""}
|
46
|
+
function Z(a,b){var c=Wa(a);if("Object"!==c&&"Array"!==c)return c;c=-1;var d=0;if(sa(a)){var f="[";for(var g=0;g<a.length;g++){0<g&&(f+=", ");var h=a[g];h="object"===typeof h&&null!==h?Z(h):Ta(h);""+g===b?(c=f.length,d=h.length,f+=h):f=10>h.length&&40>f.length+h.length?f+h:f+"..."}f+="]"}else if(a.$$typeof===w)f="<"+Y(a.type)+"/>";else{f="{";g=Object.keys(a);for(h=0;h<g.length;h++){0<h&&(f+=", ");var k=g[h],l=JSON.stringify(k);f+=('"'+k+'"'===l?k:l)+": ";l=a[k];l="object"===typeof l&&null!==l?Z(l):
|
47
|
+
Ta(l);k===b?(c=f.length,d=l.length,f+=l):f=10>l.length&&40>f.length+l.length?f+l:f+"..."}f+="}"}return void 0===b?f:-1<c&&0<d?(a=" ".repeat(c)+"^".repeat(d),"\n "+f+"\n "+a):"\n "+f}
|
48
|
+
function Ma(a,b,c,d){switch(d){case w:return"$"}for(;"object"===typeof d&&null!==d&&(d.$$typeof===w||d.$$typeof===y);)try{switch(d.$$typeof){case w:var f=d;d=X(a,f.type,f.key,f.ref,f.props,null);break;case y:var g=d._init;d=g(d._payload)}}catch(h){c=h===I?Aa():h;if("object"===typeof c&&null!==c&&"function"===typeof c.then)return a.pendingChunks++,a=U(a,d,D,a.abortableTasks),d=a.ping,c.then(d,d),a.thenableState=Ba(),"$L"+a.id.toString(16);a.pendingChunks++;d=a.nextChunkId++;c=V(a,c);W(a,d,c);return"$L"+
|
49
|
+
d.toString(16)}if(null===d)return null;if("object"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if("function"===typeof d.then)return"$@"+Pa(a,d).toString(16);if(d.$$typeof===ja)return d=d._context._globalName,b=a.writtenProviders,c=b.get(c),void 0===c&&(a.pendingChunks++,c=a.nextChunkId++,b.set(d,c),d=u(a,c,"$P"+d),a.completedJSONChunks.push(d)),"$"+c.toString(16);if(d===Oa){a=D;if(null===a)throw Error("Tried to pop a Context at the root of the app. This is a bug in React.");d=a.parentValue;a.context._currentValue=
|
50
|
+
d===pa?a.context._defaultValue:d;D=a.parent;return}return d}if("string"===typeof d)return a="$"===d[0]?"$"+d:d,a;if("boolean"===typeof d||"number"===typeof d||"undefined"===typeof d)return d;if("function"===typeof d){if(d.$$typeof===v)return Va(a,b,c,d);if(/^on[A-Z]/.test(c))throw Error("Event handlers cannot be passed to Client Component props."+Z(b,c)+"\nIf you need interactivity, consider converting part of this to a Client Component.");throw Error("Functions cannot be passed directly to Client Components because they're not serializable."+
|
51
|
+
Z(b,c));}if("symbol"===typeof d){f=a.writtenSymbols;g=f.get(d);if(void 0!==g)return"$"+g.toString(16);g=d.description;if(Symbol.for(g)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Client Components. The symbol Symbol.for("+(d.description+") cannot be found among global symbols.")+Z(b,c));a.pendingChunks++;c=a.nextChunkId++;b=u(a,c,"$S"+g);a.completedModuleChunks.push(b);f.set(d,c);return"$"+c.toString(16)}if("bigint"===typeof d)throw Error("BigInt ("+d+") is not yet supported in Client Component props."+
|
52
|
+
Z(b,c));throw Error("Type "+typeof d+" is not supported in Client Component props."+Z(b,c));}function V(a,b){a=a.onError;b=a(b);if(null!=b&&"string"!==typeof b)throw Error('onError returned something with a type other than "string". onError should return a string and may return null or undefined but must not return anything else. It received something of type "'+typeof b+'" instead');return b||""}function Xa(a,b){null!==a.destination?(a.status=2,ca(a.destination,b)):(a.status=1,a.fatalError=b)}
|
53
|
+
function W(a,b,c){c={digest:c};b=b.toString(16)+":E"+t(c)+"\n";b=q.encode(b);a.completedErrorChunks.push(b)}
|
54
|
+
function Ua(a){var b=S.current,c=P;S.current=Ha;P=a.cache;K=a;try{var d=a.pingedTasks;a.pingedTasks=[];for(var f=0;f<d.length;f++){var g=d[f];var h=a;if(0===g.status){H(g.context);try{var k=g.model;if("object"===typeof k&&null!==k&&k.$$typeof===w){var l=k,x=g.thenableState;g.model=k;k=X(h,l.type,l.key,l.ref,l.props,x);for(g.thenableState=null;"object"===typeof k&&null!==k&&k.$$typeof===w;)l=k,g.model=k,k=X(h,l.type,l.key,l.ref,l.props,null)}var da=g.id,ea=t(k,h.toJSON),fa=da.toString(16)+":"+ea+"\n";
|
55
|
+
var ha=q.encode(fa);h.completedJSONChunks.push(ha);h.abortableTasks.delete(g);g.status=1}catch(E){var F=E===I?Aa():E;if("object"===typeof F&&null!==F&&"function"===typeof F.then){var Ga=g.ping;F.then(Ga,Ga);g.thenableState=Ba()}else{h.abortableTasks.delete(g);g.status=4;var $a=V(h,F);W(h,g.id,$a)}}}}null!==a.destination&&Ya(a,a.destination)}catch(E){V(a,E),Xa(a,E)}finally{S.current=b,P=c,K=null}}
|
56
|
+
function Ya(a,b){m=new Uint8Array(512);n=0;try{for(var c=a.completedModuleChunks,d=0;d<c.length;d++)if(a.pendingChunks--,!p(b,c[d])){a.destination=null;d++;break}c.splice(0,d);var f=a.completedJSONChunks;for(d=0;d<f.length;d++)if(a.pendingChunks--,!p(b,f[d])){a.destination=null;d++;break}f.splice(0,d);var g=a.completedErrorChunks;for(d=0;d<g.length;d++)if(a.pendingChunks--,!p(b,g[d])){a.destination=null;d++;break}g.splice(0,d)}finally{m&&0<n&&(b.enqueue(new Uint8Array(m.buffer,0,n)),m=null,n=0)}0===
|
57
|
+
a.pendingChunks&&b.close()}function Za(a,b){try{var c=a.abortableTasks;if(0<c.size){var d=V(a,void 0===b?Error("The render was aborted by the server without a reason."):b);a.pendingChunks++;var f=a.nextChunkId++;W(a,f,d);c.forEach(function(b){b.status=3;var c="$"+f.toString(16);b=u(a,b.id,c);a.completedErrorChunks.push(b)});c.clear()}null!==a.destination&&Ya(a,a.destination)}catch(g){V(a,g),Xa(a,g)}}
|
58
|
+
function Na(a){if(a){var b=D;H(null);for(var c=0;c<a.length;c++){var d=a[c],f=d[0];d=d[1];R[f]||(R[f]=aa.createServerContext(f,pa));xa(R[f],d)}a=D;H(b);return a}return null}
|
59
|
+
exports.renderToReadableStream=function(a,b,c){var d=La(a,b,c?c.onError:void 0,c?c.context:void 0,c?c.identifierPrefix:void 0);if(c&&c.signal){var f=c.signal;if(f.aborted)Za(d,f.reason);else{var g=function(){Za(d,f.reason);f.removeEventListener("abort",g)};f.addEventListener("abort",g)}}return new ReadableStream({type:"bytes",start:function(){e?ba.run(d.cache,Ua,d):Ua(d)},pull:function(a){if(1===d.status)d.status=2,ca(a,d.fatalError);else if(2!==d.status&&null===d.destination){d.destination=a;try{Ya(d,
|
60
|
+
a)}catch(k){V(d,k),Xa(d,k)}}},cancel:function(){}},{highWaterMark:0})};
|
@@ -235,7 +235,7 @@ function closeWithError(destination, error) {
|
|
235
235
|
var stringify = JSON.stringify;
|
236
236
|
|
237
237
|
function serializeRowHeader(tag, id) {
|
238
|
-
return
|
238
|
+
return id.toString(16) + ':' + tag;
|
239
239
|
}
|
240
240
|
|
241
241
|
function processErrorChunkProd(request, id, digest) {
|
@@ -262,26 +262,17 @@ function processErrorChunkDev(request, id, digest, message, stack) {
|
|
262
262
|
}
|
263
263
|
function processModelChunk(request, id, model) {
|
264
264
|
var json = stringify(model, request.toJSON);
|
265
|
-
var row =
|
265
|
+
var row = id.toString(16) + ':' + json + '\n';
|
266
266
|
return stringToChunk(row);
|
267
267
|
}
|
268
268
|
function processReferenceChunk(request, id, reference) {
|
269
269
|
var json = stringify(reference);
|
270
|
-
var row =
|
270
|
+
var row = id.toString(16) + ':' + json + '\n';
|
271
271
|
return stringToChunk(row);
|
272
272
|
}
|
273
273
|
function processModuleChunk(request, id, moduleMetaData) {
|
274
274
|
var json = stringify(moduleMetaData);
|
275
|
-
var row = serializeRowHeader('
|
276
|
-
return stringToChunk(row);
|
277
|
-
}
|
278
|
-
function processProviderChunk(request, id, contextName) {
|
279
|
-
var row = serializeRowHeader('P', id) + contextName + '\n';
|
280
|
-
return stringToChunk(row);
|
281
|
-
}
|
282
|
-
function processSymbolChunk(request, id, name) {
|
283
|
-
var json = stringify(name);
|
284
|
-
var row = serializeRowHeader('S', id) + json + '\n';
|
275
|
+
var row = serializeRowHeader('I', id) + json + '\n';
|
285
276
|
return stringToChunk(row);
|
286
277
|
}
|
287
278
|
|
@@ -294,7 +285,7 @@ function isClientReference(reference) {
|
|
294
285
|
return reference.$$typeof === CLIENT_REFERENCE_TAG;
|
295
286
|
}
|
296
287
|
function resolveModuleMetaData(config, clientReference) {
|
297
|
-
var resolvedModuleData = config[clientReference.filepath][clientReference.name];
|
288
|
+
var resolvedModuleData = config.clientManifest[clientReference.filepath][clientReference.name];
|
298
289
|
|
299
290
|
if (clientReference.async) {
|
300
291
|
return {
|
@@ -1297,6 +1288,81 @@ var POP = {}; // Used for DEV messages to keep track of which parent rendered so
|
|
1297
1288
|
var jsxPropsParents = new WeakMap();
|
1298
1289
|
var jsxChildrenParents = new WeakMap();
|
1299
1290
|
|
1291
|
+
function serializeThenable(request, thenable) {
|
1292
|
+
request.pendingChunks++;
|
1293
|
+
var newTask = createTask(request, null, getActiveContext(), request.abortableTasks);
|
1294
|
+
|
1295
|
+
switch (thenable.status) {
|
1296
|
+
case 'fulfilled':
|
1297
|
+
{
|
1298
|
+
// We have the resolved value, we can go ahead and schedule it for serialization.
|
1299
|
+
newTask.model = thenable.value;
|
1300
|
+
pingTask(request, newTask);
|
1301
|
+
return newTask.id;
|
1302
|
+
}
|
1303
|
+
|
1304
|
+
case 'rejected':
|
1305
|
+
{
|
1306
|
+
var x = thenable.reason;
|
1307
|
+
var digest = logRecoverableError(request, x);
|
1308
|
+
|
1309
|
+
{
|
1310
|
+
var _getErrorMessageAndSt = getErrorMessageAndStackDev(x),
|
1311
|
+
message = _getErrorMessageAndSt.message,
|
1312
|
+
stack = _getErrorMessageAndSt.stack;
|
1313
|
+
|
1314
|
+
emitErrorChunkDev(request, newTask.id, digest, message, stack);
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
return newTask.id;
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
default:
|
1321
|
+
{
|
1322
|
+
if (typeof thenable.status === 'string') {
|
1323
|
+
// Only instrument the thenable if the status if not defined. If
|
1324
|
+
// it's defined, but an unknown value, assume it's been instrumented by
|
1325
|
+
// some custom userspace implementation. We treat it as "pending".
|
1326
|
+
break;
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
var pendingThenable = thenable;
|
1330
|
+
pendingThenable.status = 'pending';
|
1331
|
+
pendingThenable.then(function (fulfilledValue) {
|
1332
|
+
if (thenable.status === 'pending') {
|
1333
|
+
var fulfilledThenable = thenable;
|
1334
|
+
fulfilledThenable.status = 'fulfilled';
|
1335
|
+
fulfilledThenable.value = fulfilledValue;
|
1336
|
+
}
|
1337
|
+
}, function (error) {
|
1338
|
+
if (thenable.status === 'pending') {
|
1339
|
+
var rejectedThenable = thenable;
|
1340
|
+
rejectedThenable.status = 'rejected';
|
1341
|
+
rejectedThenable.reason = error;
|
1342
|
+
}
|
1343
|
+
});
|
1344
|
+
break;
|
1345
|
+
}
|
1346
|
+
}
|
1347
|
+
|
1348
|
+
thenable.then(function (value) {
|
1349
|
+
newTask.model = value;
|
1350
|
+
pingTask(request, newTask);
|
1351
|
+
}, function (reason) {
|
1352
|
+
// TODO: Is it safe to directly emit these without being inside a retry?
|
1353
|
+
var digest = logRecoverableError(request, reason);
|
1354
|
+
|
1355
|
+
{
|
1356
|
+
var _getErrorMessageAndSt2 = getErrorMessageAndStackDev(reason),
|
1357
|
+
_message = _getErrorMessageAndSt2.message,
|
1358
|
+
_stack = _getErrorMessageAndSt2.stack;
|
1359
|
+
|
1360
|
+
emitErrorChunkDev(request, newTask.id, digest, _message, _stack);
|
1361
|
+
}
|
1362
|
+
});
|
1363
|
+
return newTask.id;
|
1364
|
+
}
|
1365
|
+
|
1300
1366
|
function readThenable(thenable) {
|
1301
1367
|
if (thenable.status === 'fulfilled') {
|
1302
1368
|
return thenable.value;
|
@@ -1353,7 +1419,7 @@ function createLazyWrapperAroundWakeable(wakeable) {
|
|
1353
1419
|
return lazyType;
|
1354
1420
|
}
|
1355
1421
|
|
1356
|
-
function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
1422
|
+
function attemptResolveElement(request, type, key, ref, props, prevThenableState) {
|
1357
1423
|
if (ref !== null && ref !== undefined) {
|
1358
1424
|
// When the ref moves to the regular props object this will implicitly
|
1359
1425
|
// throw for functions. We could probably relax it to a DEV warning for other
|
@@ -1380,6 +1446,16 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1380
1446
|
var result = type(props);
|
1381
1447
|
|
1382
1448
|
if (typeof result === 'object' && result !== null && typeof result.then === 'function') {
|
1449
|
+
// When the return value is in children position we can resolve it immediately,
|
1450
|
+
// to its value without a wrapper if it's synchronously available.
|
1451
|
+
var thenable = result;
|
1452
|
+
|
1453
|
+
if (thenable.status === 'fulfilled') {
|
1454
|
+
return thenable.value;
|
1455
|
+
} // TODO: Once we accept Promises as children on the client, we can just return
|
1456
|
+
// the thenable here.
|
1457
|
+
|
1458
|
+
|
1383
1459
|
return createLazyWrapperAroundWakeable(result);
|
1384
1460
|
}
|
1385
1461
|
|
@@ -1411,7 +1487,7 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1411
1487
|
var payload = type._payload;
|
1412
1488
|
var init = type._init;
|
1413
1489
|
var wrappedType = init(payload);
|
1414
|
-
return attemptResolveElement(wrappedType, key, ref, props, prevThenableState);
|
1490
|
+
return attemptResolveElement(request, wrappedType, key, ref, props, prevThenableState);
|
1415
1491
|
}
|
1416
1492
|
|
1417
1493
|
case REACT_FORWARD_REF_TYPE:
|
@@ -1423,7 +1499,7 @@ function attemptResolveElement(type, key, ref, props, prevThenableState) {
|
|
1423
1499
|
|
1424
1500
|
case REACT_MEMO_TYPE:
|
1425
1501
|
{
|
1426
|
-
return attemptResolveElement(type.type, key, ref, props, prevThenableState);
|
1502
|
+
return attemptResolveElement(request, type.type, key, ref, props, prevThenableState);
|
1427
1503
|
}
|
1428
1504
|
|
1429
1505
|
case REACT_PROVIDER_TYPE:
|
@@ -1488,8 +1564,20 @@ function serializeByValueID(id) {
|
|
1488
1564
|
return '$' + id.toString(16);
|
1489
1565
|
}
|
1490
1566
|
|
1491
|
-
function
|
1492
|
-
return '
|
1567
|
+
function serializeLazyID(id) {
|
1568
|
+
return '$L' + id.toString(16);
|
1569
|
+
}
|
1570
|
+
|
1571
|
+
function serializePromiseID(id) {
|
1572
|
+
return '$@' + id.toString(16);
|
1573
|
+
}
|
1574
|
+
|
1575
|
+
function serializeSymbolReference(name) {
|
1576
|
+
return '$S' + name;
|
1577
|
+
}
|
1578
|
+
|
1579
|
+
function serializeProviderReference(name) {
|
1580
|
+
return '$P' + name;
|
1493
1581
|
}
|
1494
1582
|
|
1495
1583
|
function serializeClientReference(request, parent, key, moduleReference) {
|
@@ -1504,7 +1592,7 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1504
1592
|
// knows how to deal with lazy values. This lets us suspend
|
1505
1593
|
// on this component rather than its parent until the code has
|
1506
1594
|
// loaded.
|
1507
|
-
return
|
1595
|
+
return serializeLazyID(existingId);
|
1508
1596
|
}
|
1509
1597
|
|
1510
1598
|
return serializeByValueID(existingId);
|
@@ -1523,7 +1611,7 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1523
1611
|
// knows how to deal with lazy values. This lets us suspend
|
1524
1612
|
// on this component rather than its parent until the code has
|
1525
1613
|
// loaded.
|
1526
|
-
return
|
1614
|
+
return serializeLazyID(moduleId);
|
1527
1615
|
}
|
1528
1616
|
|
1529
1617
|
return serializeByValueID(moduleId);
|
@@ -1533,9 +1621,9 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1533
1621
|
var digest = logRecoverableError(request, x);
|
1534
1622
|
|
1535
1623
|
{
|
1536
|
-
var
|
1537
|
-
message =
|
1538
|
-
stack =
|
1624
|
+
var _getErrorMessageAndSt3 = getErrorMessageAndStackDev(x),
|
1625
|
+
message = _getErrorMessageAndSt3.message,
|
1626
|
+
stack = _getErrorMessageAndSt3.stack;
|
1539
1627
|
|
1540
1628
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
1541
1629
|
}
|
@@ -1545,7 +1633,7 @@ function serializeClientReference(request, parent, key, moduleReference) {
|
|
1545
1633
|
}
|
1546
1634
|
|
1547
1635
|
function escapeStringValue(value) {
|
1548
|
-
if (value[0] === '$'
|
1636
|
+
if (value[0] === '$') {
|
1549
1637
|
// We need to escape $ or @ prefixed strings since we use those to encode
|
1550
1638
|
// references to IDs and as special symbol values.
|
1551
1639
|
return '$' + value;
|
@@ -1917,7 +2005,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1917
2005
|
// TODO: Concatenate keys of parents onto children.
|
1918
2006
|
var element = value; // Attempt to render the Server Component.
|
1919
2007
|
|
1920
|
-
value = attemptResolveElement(element.type, element.key, element.ref, element.props, null);
|
2008
|
+
value = attemptResolveElement(request, element.type, element.key, element.ref, element.props, null);
|
1921
2009
|
break;
|
1922
2010
|
}
|
1923
2011
|
|
@@ -1944,7 +2032,7 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1944
2032
|
var ping = newTask.ping;
|
1945
2033
|
x.then(ping, ping);
|
1946
2034
|
newTask.thenableState = getThenableStateAfterSuspending();
|
1947
|
-
return
|
2035
|
+
return serializeLazyID(newTask.id);
|
1948
2036
|
} else {
|
1949
2037
|
// Something errored. We'll still send everything we have up until this point.
|
1950
2038
|
// We'll replace this element with a lazy reference that throws on the client
|
@@ -1954,14 +2042,14 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1954
2042
|
var digest = logRecoverableError(request, x);
|
1955
2043
|
|
1956
2044
|
{
|
1957
|
-
var
|
1958
|
-
message =
|
1959
|
-
stack =
|
2045
|
+
var _getErrorMessageAndSt4 = getErrorMessageAndStackDev(x),
|
2046
|
+
message = _getErrorMessageAndSt4.message,
|
2047
|
+
stack = _getErrorMessageAndSt4.stack;
|
1960
2048
|
|
1961
2049
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
1962
2050
|
}
|
1963
2051
|
|
1964
|
-
return
|
2052
|
+
return serializeLazyID(errorId);
|
1965
2053
|
}
|
1966
2054
|
}
|
1967
2055
|
}
|
@@ -1973,6 +2061,11 @@ function resolveModelToJSON(request, parent, key, value) {
|
|
1973
2061
|
if (typeof value === 'object') {
|
1974
2062
|
if (isClientReference(value)) {
|
1975
2063
|
return serializeClientReference(request, parent, key, value);
|
2064
|
+
} else if (typeof value.then === 'function') {
|
2065
|
+
// We assume that any object with a .then property is a "Thenable" type,
|
2066
|
+
// or a Promise type. Either of which can be represented by a Promise.
|
2067
|
+
var promiseId = serializeThenable(request, value);
|
2068
|
+
return serializePromiseID(promiseId);
|
1976
2069
|
} else if (value.$$typeof === REACT_PROVIDER_TYPE) {
|
1977
2070
|
var providerKey = value._context._globalName;
|
1978
2071
|
var writtenProviders = request.writtenProviders;
|
@@ -2132,12 +2225,14 @@ function emitModuleChunk(request, id, moduleMetaData) {
|
|
2132
2225
|
}
|
2133
2226
|
|
2134
2227
|
function emitSymbolChunk(request, id, name) {
|
2135
|
-
var
|
2228
|
+
var symbolReference = serializeSymbolReference(name);
|
2229
|
+
var processedChunk = processReferenceChunk(request, id, symbolReference);
|
2136
2230
|
request.completedModuleChunks.push(processedChunk);
|
2137
2231
|
}
|
2138
2232
|
|
2139
2233
|
function emitProviderChunk(request, id, contextName) {
|
2140
|
-
var
|
2234
|
+
var contextReference = serializeProviderReference(contextName);
|
2235
|
+
var processedChunk = processReferenceChunk(request, id, contextReference);
|
2141
2236
|
request.completedJSONChunks.push(processedChunk);
|
2142
2237
|
}
|
2143
2238
|
|
@@ -2162,7 +2257,7 @@ function retryTask(request, task) {
|
|
2162
2257
|
// also suspends.
|
2163
2258
|
|
2164
2259
|
task.model = value;
|
2165
|
-
value = attemptResolveElement(element.type, element.key, element.ref, element.props, prevThenableState); // Successfully finished this component. We're going to keep rendering
|
2260
|
+
value = attemptResolveElement(request, element.type, element.key, element.ref, element.props, prevThenableState); // Successfully finished this component. We're going to keep rendering
|
2166
2261
|
// using the same task, but we reset its thenable state before continuing.
|
2167
2262
|
|
2168
2263
|
task.thenableState = null; // Keep rendering and reuse the same task. This inner loop is separate
|
@@ -2173,7 +2268,7 @@ function retryTask(request, task) {
|
|
2173
2268
|
// TODO: Concatenate keys of parents onto children.
|
2174
2269
|
var nextElement = value;
|
2175
2270
|
task.model = value;
|
2176
|
-
value = attemptResolveElement(nextElement.type, nextElement.key, nextElement.ref, nextElement.props, null);
|
2271
|
+
value = attemptResolveElement(request, nextElement.type, nextElement.key, nextElement.ref, nextElement.props, null);
|
2177
2272
|
}
|
2178
2273
|
}
|
2179
2274
|
|
@@ -2201,9 +2296,9 @@ function retryTask(request, task) {
|
|
2201
2296
|
var digest = logRecoverableError(request, x);
|
2202
2297
|
|
2203
2298
|
{
|
2204
|
-
var
|
2205
|
-
message =
|
2206
|
-
stack =
|
2299
|
+
var _getErrorMessageAndSt5 = getErrorMessageAndStackDev(x),
|
2300
|
+
message = _getErrorMessageAndSt5.message,
|
2301
|
+
stack = _getErrorMessageAndSt5.stack;
|
2207
2302
|
|
2208
2303
|
emitErrorChunkDev(request, task.id, digest, message, stack);
|
2209
2304
|
}
|
@@ -2367,9 +2462,9 @@ function abort(request, reason) {
|
|
2367
2462
|
var errorId = request.nextChunkId++;
|
2368
2463
|
|
2369
2464
|
if (true) {
|
2370
|
-
var
|
2371
|
-
message =
|
2372
|
-
stack =
|
2465
|
+
var _getErrorMessageAndSt6 = getErrorMessageAndStackDev(error),
|
2466
|
+
message = _getErrorMessageAndSt6.message,
|
2467
|
+
stack = _getErrorMessageAndSt6.stack;
|
2373
2468
|
|
2374
2469
|
emitErrorChunkDev(request, errorId, digest, message, stack);
|
2375
2470
|
} else {
|
@@ -2418,8 +2513,8 @@ function createDrainHandler(destination, request) {
|
|
2418
2513
|
};
|
2419
2514
|
}
|
2420
2515
|
|
2421
|
-
function renderToPipeableStream(model,
|
2422
|
-
var request = createRequest(model,
|
2516
|
+
function renderToPipeableStream(model, webpackMaps, options) {
|
2517
|
+
var request = createRequest(model, webpackMaps, options ? options.onError : undefined, options ? options.context : undefined, options ? options.identifierPrefix : undefined);
|
2423
2518
|
var hasStartedFlowing = false;
|
2424
2519
|
startWork(request);
|
2425
2520
|
return {
|