react-server-dom-webpack
Advanced tools
Comparing version 0.0.0-experimental-73e900b0e to 0.0.0-experimental-825c3021f
@@ -57,4 +57,4 @@ /** @license React vundefined | ||
} | ||
function writeChunk(destination, buffer) { | ||
destination.enqueue(buffer); | ||
function writeChunk(destination, chunk) { | ||
destination.enqueue(chunk); | ||
return destination.desiredSize > 0; | ||
@@ -66,3 +66,3 @@ } | ||
var textEncoder = new TextEncoder(); | ||
function convertStringToBuffer(content) { | ||
function stringToChunk(content) { | ||
return textEncoder.encode(content); | ||
@@ -84,3 +84,3 @@ } | ||
var row = serializeRowHeader('E', id) + stringify(errorInfo) + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -90,3 +90,3 @@ function processModelChunk(request, id, model) { | ||
var row = serializeRowHeader('J', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -96,3 +96,3 @@ function processModuleChunk(request, id, moduleMetaData) { | ||
var row = serializeRowHeader('M', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -102,3 +102,3 @@ function processSymbolChunk(request, id, name) { | ||
var row = serializeRowHeader('S', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -105,0 +105,0 @@ |
@@ -75,4 +75,4 @@ /** @license React vundefined | ||
} | ||
function writeChunk(destination, buffer) { | ||
var nodeBuffer = buffer; // close enough | ||
function writeChunk(destination, chunk) { | ||
var nodeBuffer = chunk; // close enough | ||
@@ -90,4 +90,4 @@ return destination.write(nodeBuffer); | ||
} | ||
function convertStringToBuffer(content) { | ||
return Buffer.from(content, 'utf8'); | ||
function stringToChunk(content) { | ||
return content; | ||
} | ||
@@ -108,3 +108,3 @@ | ||
var row = serializeRowHeader('E', id) + stringify(errorInfo) + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -114,3 +114,3 @@ function processModelChunk(request, id, model) { | ||
var row = serializeRowHeader('J', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -120,3 +120,3 @@ function processModuleChunk(request, id, moduleMetaData) { | ||
var row = serializeRowHeader('M', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -126,3 +126,3 @@ function processSymbolChunk(request, id, name) { | ||
var row = serializeRowHeader('S', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -129,0 +129,0 @@ |
@@ -11,15 +11,14 @@ /** @license React vundefined | ||
if("function"===typeof Symbol&&Symbol.for){var y=Symbol.for;r=y("react.element");t=y("react.fragment");u=y("react.forward_ref");w=y("react.memo");x=y("react.lazy")}var z=Array.isArray,A=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher; | ||
function E(a,c,d){var b=[],e={destination:c,bundlerConfig:d,cache:new Map,nextChunkId:0,pendingChunks:0,pingedSegments:b,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,flowing:!1,toJSON:function(a,b){return F(e,this,a,b)}};e.pendingChunks++;a=G(e,a);b.push(a);return e} | ||
function H(a,c,d,b){if(null!==d&&void 0!==d)throw Error(m(379));if("function"===typeof a)return a(b);if("string"===typeof a)return[r,a,c,b];if("symbol"===typeof a)return a===t?b.children:[r,a,c,b];if(null!=a&&"object"===typeof a){if(a.$$typeof===q)return[r,a,c,b];switch(a.$$typeof){case u:return a=a.render,a(b,void 0);case w:return H(a.type,c,d,b)}}throw Error(m(351,I(a)));}function J(a,c){var d=a.pingedSegments;d.push(c);1===d.length&&setImmediate(function(){return K(a)})} | ||
function G(a,c){var d={id:a.nextChunkId++,model:c,ping:function(){return J(a,d)}};return d}function L(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function M(a){var c=JSON.stringify(a);return'"'+a+'"'===c?a:c}function I(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(z(a))return"[...]";a=L(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} | ||
function N(a,c){if(z(a)){for(var d="[",b=0;b<a.length;b++){0<b&&(d+=", ");if(6<b){d+="...";break}var e=a[b];d=""+b===c&&"object"===typeof e&&null!==e?d+N(e):d+I(e)}return d+"]"}d="{";b=Object.keys(a);for(e=0;e<b.length;e++){0<e&&(d+=", ");if(6<e){d+="...";break}var f=b[e];d+=M(f)+": ";var h=a[f];d=f===c&&"object"===typeof h&&null!==h?d+N(h):d+I(h)}return d+"}"} | ||
function F(a,c,d,b){switch(b){case r:return"$";case x:throw Error(m(352));}for(;"object"===typeof b&&null!==b&&b.$$typeof===r;){var e=b;try{b=H(e.type,e.key,e.ref,e.props)}catch(p){if("object"===typeof p&&null!==p&&"function"===typeof p.then)return a.pendingChunks++,a=G(a,b),c=a.ping,p.then(c,c),"@"+a.id.toString(16);a.pendingChunks++;c=a.nextChunkId++;O(a,c,p);return"@"+c.toString(16)}}if(null===b)return null;if("object"===typeof b){if(b.$$typeof===q){e=b.filepath+"#"+b.name;var f=a.writtenModules, | ||
h=f.get(e);if(void 0!==h)return c[0]===r&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[b.filepath][b.name];a.pendingChunks++;var g=a.nextChunkId++,B=n(k),C="M"+g.toString(16)+":"+B+"\n";var D=Buffer.from(C,"utf8");a.completedModuleChunks.push(D);f.set(e,g);return c[0]===r&&"1"===d?"@"+g.toString(16):"$"+g.toString(16)}catch(p){return a.pendingChunks++,c=a.nextChunkId++,O(a,c,p),"$"+c.toString(16)}}return b}if("string"===typeof b)return a="$"===b[0]||"@"===b[0]?"$"+b:b,a; | ||
if("boolean"===typeof b||"number"===typeof b||"undefined"===typeof b)return b;if("function"===typeof b){if(/^on[A-Z]/.test(d))throw Error(m(374,M(d),N(c)));throw Error(m(375,M(d),b.displayName||b.name||"function",N(c)));}if("symbol"===typeof b){k=a.writtenSymbols;g=k.get(b);if(void 0!==g)return"$"+g.toString(16);g=b.description;if(Symbol.for(g)!==b)throw Error(m(376,b.description,M(d),N(c)));a.pendingChunks++;c=a.nextChunkId++;d=n(g);d="S"+c.toString(16)+":"+d+"\n";d=Buffer.from(d,"utf8");a.completedModuleChunks.push(d); | ||
k.set(b,c);return"$"+c.toString(16)}if("bigint"===typeof b)throw Error(m(377,b,M(d),N(c)));throw Error(m(378,typeof b,M(d),N(c)));}function O(a,c,d){var b="";try{if(d instanceof Error){var e=""+d.message;b=""+d.stack}else e="Error: "+d}catch(f){e="An error occurred but serializing the error message failed."}d={message:e,stack:b};c="E"+c.toString(16)+":"+n(d)+"\n";c=Buffer.from(c,"utf8");a.completedErrorChunks.push(c)} | ||
function K(a){var c=A.current,d=P;A.current=Q;P=a.cache;var b=a.pingedSegments;a.pingedSegments=[];for(var e=0;e<b.length;e++){var f=b[e];var h=a;try{for(var k=f.model;"object"===typeof k&&null!==k&&k.$$typeof===r;){var g=k;f.model=k;k=H(g.type,g.key,g.ref,g.props)}var B=f.id,C=n(k,h.toJSON),D="J"+B.toString(16)+":"+C+"\n";var p=Buffer.from(D,"utf8");h.completedJSONChunks.push(p)}catch(v){"object"===typeof v&&null!==v&&"function"===typeof v.then?(f=f.ping,v.then(f,f)):O(h,f.id,v)}}a.flowing&&R(a); | ||
A.current=c;P=d}var S=!1; | ||
function R(a){if(!S){S=!0;var c=a.destination;"function"===typeof c.cork&&c.cork();try{for(var d=a.completedModuleChunks,b=0;b<d.length;b++)if(a.pendingChunks--,!c.write(d[b])){a.flowing=!1;b++;break}d.splice(0,b);var e=a.completedJSONChunks;for(b=0;b<e.length;b++)if(a.pendingChunks--,!c.write(e[b])){a.flowing=!1;b++;break}e.splice(0,b);var f=a.completedErrorChunks;for(b=0;b<f.length;b++)if(a.pendingChunks--,!c.write(f[b])){a.flowing=!1;b++;break}f.splice(0,b)}finally{S=!1,"function"===typeof c.uncork&& | ||
c.uncork()}"function"===typeof c.flush&&"function"!==typeof c.flushHeaders&&c.flush();0===a.pendingChunks&&c.end()}}function T(a){a.flowing=!0;setImmediate(function(){return K(a)})}function U(){throw Error(m(373));}function V(){if(!P)throw Error(m(384));} | ||
var P=null,Q={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:U,useTransition:U,getCacheForType:function(a){if(!P)throw Error(m(380));var c=P.get(a);void 0===c&&(c=a(),P.set(a,c));return c},readContext:U,useContext:U,useReducer:U,useRef:U,useState:U,useLayoutEffect:U,useImperativeHandle:U,useEffect:U,useOpaqueIdentifier:U,useMutableSource:U,useCacheRefresh:function(){return V}};function W(a,c){return function(){c.flowing=!0;R(c)}} | ||
exports.pipeToNodeWritable=function(a,c,d){a=E(a,c,d);c.on("drain",W(c,a));T(a)}; | ||
function D(a,c,d){var b=[],e={destination:c,bundlerConfig:d,cache:new Map,nextChunkId:0,pendingChunks:0,pingedSegments:b,completedModuleChunks:[],completedJSONChunks:[],completedErrorChunks:[],writtenSymbols:new Map,writtenModules:new Map,flowing:!1,toJSON:function(a,b){return E(e,this,a,b)}};e.pendingChunks++;a=F(e,a);b.push(a);return e} | ||
function G(a,c,d,b){if(null!==d&&void 0!==d)throw Error(m(379));if("function"===typeof a)return a(b);if("string"===typeof a)return[r,a,c,b];if("symbol"===typeof a)return a===t?b.children:[r,a,c,b];if(null!=a&&"object"===typeof a){if(a.$$typeof===q)return[r,a,c,b];switch(a.$$typeof){case u:return a=a.render,a(b,void 0);case w:return G(a.type,c,d,b)}}throw Error(m(351,H(a)));}function I(a,c){var d=a.pingedSegments;d.push(c);1===d.length&&setImmediate(function(){return J(a)})} | ||
function F(a,c){var d={id:a.nextChunkId++,model:c,ping:function(){return I(a,d)}};return d}function K(a){return Object.prototype.toString.call(a).replace(/^\[object (.*)\]$/,function(a,d){return d})}function L(a){var c=JSON.stringify(a);return'"'+a+'"'===c?a:c}function H(a){switch(typeof a){case "string":return JSON.stringify(10>=a.length?a:a.substr(0,10)+"...");case "object":if(z(a))return"[...]";a=K(a);return"Object"===a?"{...}":a;case "function":return"function";default:return String(a)}} | ||
function M(a,c){if(z(a)){for(var d="[",b=0;b<a.length;b++){0<b&&(d+=", ");if(6<b){d+="...";break}var e=a[b];d=""+b===c&&"object"===typeof e&&null!==e?d+M(e):d+H(e)}return d+"]"}d="{";b=Object.keys(a);for(e=0;e<b.length;e++){0<e&&(d+=", ");if(6<e){d+="...";break}var f=b[e];d+=L(f)+": ";var h=a[f];d=f===c&&"object"===typeof h&&null!==h?d+M(h):d+H(h)}return d+"}"} | ||
function E(a,c,d,b){switch(b){case r:return"$";case x:throw Error(m(352));}for(;"object"===typeof b&&null!==b&&b.$$typeof===r;){var e=b;try{b=G(e.type,e.key,e.ref,e.props)}catch(p){if("object"===typeof p&&null!==p&&"function"===typeof p.then)return a.pendingChunks++,a=F(a,b),c=a.ping,p.then(c,c),"@"+a.id.toString(16);a.pendingChunks++;c=a.nextChunkId++;N(a,c,p);return"@"+c.toString(16)}}if(null===b)return null;if("object"===typeof b){if(b.$$typeof===q){e=b.filepath+"#"+b.name;var f=a.writtenModules, | ||
h=f.get(e);if(void 0!==h)return c[0]===r&&"1"===d?"@"+h.toString(16):"$"+h.toString(16);try{var k=a.bundlerConfig[b.filepath][b.name];a.pendingChunks++;var g=a.nextChunkId++,B=n(k);var C="M"+g.toString(16)+":"+B+"\n";a.completedModuleChunks.push(C);f.set(e,g);return c[0]===r&&"1"===d?"@"+g.toString(16):"$"+g.toString(16)}catch(p){return a.pendingChunks++,c=a.nextChunkId++,N(a,c,p),"$"+c.toString(16)}}return b}if("string"===typeof b)return a="$"===b[0]||"@"===b[0]?"$"+b:b,a;if("boolean"===typeof b|| | ||
"number"===typeof b||"undefined"===typeof b)return b;if("function"===typeof b){if(/^on[A-Z]/.test(d))throw Error(m(374,L(d),M(c)));throw Error(m(375,L(d),b.displayName||b.name||"function",M(c)));}if("symbol"===typeof b){k=a.writtenSymbols;g=k.get(b);if(void 0!==g)return"$"+g.toString(16);g=b.description;if(Symbol.for(g)!==b)throw Error(m(376,b.description,L(d),M(c)));a.pendingChunks++;c=a.nextChunkId++;d=n(g);d="S"+c.toString(16)+":"+d+"\n";a.completedModuleChunks.push(d);k.set(b,c);return"$"+c.toString(16)}if("bigint"=== | ||
typeof b)throw Error(m(377,b,L(d),M(c)));throw Error(m(378,typeof b,L(d),M(c)));}function N(a,c,d){var b="";try{if(d instanceof Error){var e=""+d.message;b=""+d.stack}else e="Error: "+d}catch(f){e="An error occurred but serializing the error message failed."}d={message:e,stack:b};c="E"+c.toString(16)+":"+n(d)+"\n";a.completedErrorChunks.push(c)} | ||
function J(a){var c=A.current,d=O;A.current=P;O=a.cache;var b=a.pingedSegments;a.pingedSegments=[];for(var e=0;e<b.length;e++){var f=b[e];var h=a;try{for(var k=f.model;"object"===typeof k&&null!==k&&k.$$typeof===r;){var g=k;f.model=k;k=G(g.type,g.key,g.ref,g.props)}var B=f.id,C=n(k,h.toJSON);var p="J"+B.toString(16)+":"+C+"\n";h.completedJSONChunks.push(p)}catch(v){"object"===typeof v&&null!==v&&"function"===typeof v.then?(f=f.ping,v.then(f,f)):N(h,f.id,v)}}a.flowing&&Q(a);A.current=c;O=d}var R=!1; | ||
function Q(a){if(!R){R=!0;var c=a.destination;"function"===typeof c.cork&&c.cork();try{for(var d=a.completedModuleChunks,b=0;b<d.length;b++)if(a.pendingChunks--,!c.write(d[b])){a.flowing=!1;b++;break}d.splice(0,b);var e=a.completedJSONChunks;for(b=0;b<e.length;b++)if(a.pendingChunks--,!c.write(e[b])){a.flowing=!1;b++;break}e.splice(0,b);var f=a.completedErrorChunks;for(b=0;b<f.length;b++)if(a.pendingChunks--,!c.write(f[b])){a.flowing=!1;b++;break}f.splice(0,b)}finally{R=!1,"function"===typeof c.uncork&& | ||
c.uncork()}"function"===typeof c.flush&&"function"!==typeof c.flushHeaders&&c.flush();0===a.pendingChunks&&c.end()}}function S(a){a.flowing=!0;setImmediate(function(){return J(a)})}function T(){throw Error(m(373));}function U(){if(!O)throw Error(m(384));} | ||
var O=null,P={useMemo:function(a){return a()},useCallback:function(a){return a},useDebugValue:function(){},useDeferredValue:T,useTransition:T,getCacheForType:function(a){if(!O)throw Error(m(380));var c=O.get(a);void 0===c&&(c=a(),O.set(a,c));return c},readContext:T,useContext:T,useReducer:T,useRef:T,useState:T,useLayoutEffect:T,useImperativeHandle:T,useEffect:T,useOpaqueIdentifier:T,useMutableSource:T,useCacheRefresh:function(){return U}};function V(a,c){return function(){c.flowing=!0;Q(c)}} | ||
exports.pipeToNodeWritable=function(a,c,d){a=D(a,c,d);c.on("drain",V(c,a));S(a)}; |
{ | ||
"name": "react-server-dom-webpack", | ||
"description": "React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.", | ||
"version": "0.0.0-experimental-73e900b0e", | ||
"version": "0.0.0-experimental-825c3021f", | ||
"keywords": [ | ||
@@ -51,4 +51,4 @@ "react" | ||
"peerDependencies": { | ||
"react": "0.0.0-experimental-73e900b0e", | ||
"react-dom": "0.0.0-experimental-73e900b0e", | ||
"react": "0.0.0-experimental-825c3021f", | ||
"react-dom": "0.0.0-experimental-825c3021f", | ||
"webpack": "^4.43.0" | ||
@@ -55,0 +55,0 @@ }, |
@@ -54,4 +54,4 @@ /** @license React vundefined | ||
} | ||
function writeChunk(destination, buffer) { | ||
destination.enqueue(buffer); | ||
function writeChunk(destination, chunk) { | ||
destination.enqueue(chunk); | ||
return destination.desiredSize > 0; | ||
@@ -63,3 +63,3 @@ } | ||
var textEncoder = new TextEncoder(); | ||
function convertStringToBuffer(content) { | ||
function stringToChunk(content) { | ||
return textEncoder.encode(content); | ||
@@ -81,3 +81,3 @@ } | ||
var row = serializeRowHeader('E', id) + stringify(errorInfo) + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -87,3 +87,3 @@ function processModelChunk(request, id, model) { | ||
var row = serializeRowHeader('J', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -93,3 +93,3 @@ function processModuleChunk(request, id, moduleMetaData) { | ||
var row = serializeRowHeader('M', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -99,3 +99,3 @@ function processSymbolChunk(request, id, name) { | ||
var row = serializeRowHeader('S', id) + json + '\n'; | ||
return convertStringToBuffer(row); | ||
return stringToChunk(row); | ||
} | ||
@@ -102,0 +102,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
166510
3948