Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export {default as rendererVersion} from 'shared/ReactVersion';
export const rendererPackageName = 'react-server-dom-parcel';

export * from 'react-client/src/ReactFlightClientStreamConfigWeb';
export * from 'react-client/src/ReactClientConsoleConfigServer';
export * from 'react-server-dom-parcel/src/client/ReactFlightClientConfigBundlerParcel';
export * from 'react-server-dom-parcel/src/client/ReactFlightClientConfigTargetParcelServer';
export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
export const usedWithSSR = true;
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export {default as rendererVersion} from 'shared/ReactVersion';
export const rendererPackageName = 'react-server-dom-turbopack';

export * from 'react-client/src/ReactFlightClientStreamConfigWeb';
export * from 'react-client/src/ReactClientConsoleConfigServer';
export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigBundlerTurbopack';
export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigBundlerTurbopackServer';
export * from 'react-server-dom-turbopack/src/client/ReactFlightClientConfigTargetTurbopackServer';
export * from 'react-dom-bindings/src/shared/ReactFlightClientConfigDOM';
export const usedWithSSR = true;
2 changes: 1 addition & 1 deletion packages/react-server-dom-parcel/client.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientBrowser';
export * from './src/client/react-flight-dom-client.browser';
2 changes: 1 addition & 1 deletion packages/react-server-dom-parcel/client.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientEdge';
export * from './src/client/react-flight-dom-client.edge';
2 changes: 1 addition & 1 deletion packages/react-server-dom-parcel/client.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientNode';
export * from './src/client/react-flight-dom-client.node';
25 changes: 23 additions & 2 deletions packages/react-server-dom-parcel/npm/client.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
'use strict';

var n, w;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-parcel-client.node.production.js');
n = require('./cjs/react-server-dom-parcel-client.node.production.js');
w = require('./cjs/react-server-dom-parcel-client.node-webstreams.production.js');
} else {
module.exports = require('./cjs/react-server-dom-parcel-client.node.development.js');
n = require('./cjs/react-server-dom-parcel-client.node.development.js');
w = require('./cjs/react-server-dom-parcel-client.node-webstreams.development.js');
}

exports.registerServerReference = function (r, i, e) {
return w.registerServerReference(n.registerServerReference(r, i, e), i, e);
};
exports.createServerReference = function (i, c, e, d, f) {
return w.registerServerReference(
n.createServerReference(i, c, e, d, f),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only id and exportName are expected here, I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same answer

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one's a bit different than the others though, because the second arg is actually exportName, and not callServer. Doesn't matter at runtime right now, but it's at least confusing.

i,
e
);
};

exports.createFromNodeStream = n.createFromNodeStream;
exports.createFromFetch = w.createFromFetch;
exports.createFromReadableStream = w.createFromReadableStream;

exports.createTemporaryReferenceSet = w.createTemporaryReferenceSet;
exports.encodeReply = w.encodeReply;
12 changes: 10 additions & 2 deletions packages/react-server-dom-parcel/npm/server.node.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';

var s;
var s, w;
if (process.env.NODE_ENV === 'production') {
s = require('./cjs/react-server-dom-parcel-server.node.production.js');
w = require('./cjs/react-server-dom-parcel-server.node-webstreams.production.js');
} else {
s = require('./cjs/react-server-dom-parcel-server.node.development.js');
w = require('./cjs/react-server-dom-parcel-server.node-webstreams.development.js');
}

exports.renderToPipeableStream = s.renderToPipeableStream;
Expand All @@ -15,5 +17,11 @@ exports.decodeFormState = s.decodeFormState;
exports.createClientReference = s.createClientReference;
exports.registerServerReference = s.registerServerReference;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;
exports.registerServerActions = s.registerServerActions;
exports.registerServerActions = function (m) {
w.registerServerActions(m);
s.registerServerActions(m);
};
exports.loadServerAction = s.loadServerAction;

exports.renderToReadableStream = w.renderToReadableStream;
exports.decodeReplyFromAsyncIterable = w.decodeReplyFromAsyncIterable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientBrowser';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientEdge';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientEdge';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientNode';
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export {
renderToReadableStream,
prerender as unstable_prerender,
decodeReply,
decodeReplyFromAsyncIterable,
decodeAction,
decodeFormState,
createClientReference,
registerServerReference,
createTemporaryReferenceSet,
registerServerActions,
loadServerAction,
} from './ReactFlightDOMServerEdge';
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/client.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientBrowser';
export * from './src/client/react-flight-dom-client.browser';
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/client.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientEdge';
export * from './src/client/react-flight-dom-client.edge';
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/client.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientNode';
export * from './src/client/react-flight-dom-client.node';
25 changes: 23 additions & 2 deletions packages/react-server-dom-turbopack/npm/client.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
'use strict';

var n, w;
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.js');
n = require('./cjs/react-server-dom-turbopack-client.node.production.js');
w = require('./cjs/react-server-dom-turbopack-client.node-webstreams.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.development.js');
n = require('./cjs/react-server-dom-turbopack-client.node.development.js');
w = require('./cjs/react-server-dom-turbopack-client.node-webstreams.development.js');
}

exports.registerServerReference = function (r, i, e) {
return w.registerServerReference(n.registerServerReference(r, i, e), i, e);
};
exports.createServerReference = function (i, c, e, d, f) {
return w.registerServerReference(
n.createServerReference(i, c, e, d, f),
i,
e
);
};

exports.createFromNodeStream = n.createFromNodeStream;
exports.createFromFetch = w.createFromFetch;
exports.createFromReadableStream = w.createFromReadableStream;

exports.createTemporaryReferenceSet = w.createTemporaryReferenceSet;
exports.encodeReply = w.encodeReply;
7 changes: 6 additions & 1 deletion packages/react-server-dom-turbopack/npm/server.node.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';

var s;
var s, w;
if (process.env.NODE_ENV === 'production') {
s = require('./cjs/react-server-dom-turbopack-server.node.production.js');
w = require('./cjs/react-server-dom-turbopack-server.node-webstreams.production.js');
} else {
s = require('./cjs/react-server-dom-turbopack-server.node.development.js');
w = require('./cjs/react-server-dom-turbopack-server.node-webstreams.development.js');
}

exports.renderToPipeableStream = s.renderToPipeableStream;
Expand All @@ -16,3 +18,6 @@ exports.registerServerReference = s.registerServerReference;
exports.registerClientReference = s.registerClientReference;
exports.createClientModuleProxy = s.createClientModuleProxy;
exports.createTemporaryReferenceSet = s.createTemporaryReferenceSet;

exports.renderToReadableStream = w.renderToReadableStream;
exports.decodeReplyFromAsyncIterable = w.decodeReplyFromAsyncIterable;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientBrowser';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientEdge';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientEdge';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export * from './ReactFlightDOMClientNode';
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

export {
renderToReadableStream,
prerender as unstable_prerender,
decodeReply,
decodeReplyFromAsyncIterable,
decodeAction,
decodeFormState,
registerServerReference,
registerClientReference,
createClientModuleProxy,
createTemporaryReferenceSet,
} from './ReactFlightDOMServerEdge';
2 changes: 1 addition & 1 deletion packages/react-server-dom-webpack/client.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientBrowser';
export * from './src/client/react-flight-dom-client.browser';
2 changes: 1 addition & 1 deletion packages/react-server-dom-webpack/client.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientEdge';
export * from './src/client/react-flight-dom-client.edge';
2 changes: 1 addition & 1 deletion packages/react-server-dom-webpack/client.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientNode';
export * from './src/client/react-flight-dom-client.node';
2 changes: 1 addition & 1 deletion packages/react-server-dom-webpack/client.node.unbundled.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
* @flow
*/

export * from './src/client/ReactFlightDOMClientNode';
export * from './src/client/react-flight-dom-client.node.unbundled';
Loading
Loading