Skip to content

Commit

Permalink
Unwrap registerServerReference function
Browse files Browse the repository at this point in the history
In the same vein as #69190, where we already unwrapped
`createServerReference`, we now also unwrap `registerServerReference`,
which is required for React to select the right call stack frame when
generating source locations for server actions facebook/react#30741.

Whereas unwrapping of `createServerReference` was required for server
actions that are imported into client components, unwrapping
`registerServerReference` is needed for server actions that are passed
from server components to client components.

This does not fully enable the source mapping just yet. For this to work
end-to-end, the next step is to generate proper spans in the SWC
transform, which will be done in the next PR.
  • Loading branch information
unstubbable committed Oct 2, 2024
1 parent d411440 commit 081c6e6
Show file tree
Hide file tree
Showing 45 changed files with 87 additions and 91 deletions.
12 changes: 6 additions & 6 deletions crates/next-custom-transforms/src/transforms/server_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1626,7 +1626,6 @@ impl<C: Comments> VisitMut for ServerActions<C> {
if (self.has_action || self.has_cache) && self.config.is_react_server_layer {
// Inlined actions are only allowed on the server layer.
// import { registerServerReference } from 'private-next-rsc-server-reference'
// registerServerReference("action_id")
new.push(ModuleItem::ModuleDecl(ModuleDecl::Import(ImportDecl {
span: DUMMY_SP,
specifiers: vec![ImportSpecifier::Named(ImportNamedSpecifier {
Expand Down Expand Up @@ -1825,21 +1824,22 @@ fn annotate_ident_as_server_reference(
bound: Vec<Option<ExprOrSpread>>,
action_id: String,
) -> Expr {
// Add the proxy wrapper call `registerServerReference($$id, $$bound, myAction,
// maybe_orig_action)`.

// registerServerReference(reference, id, null)
let proxy_expr = Expr::Call(CallExpr {
span: DUMMY_SP,
callee: quote_ident!("registerServerReference").as_callee(),
args: vec![
// $$id
ExprOrSpread {
spread: None,
expr: Box::new(Expr::Ident(ident)),
},
ExprOrSpread {
spread: None,
expr: Box::new(action_id.clone().into()),
},
ExprOrSpread {
spread: None,
expr: Box::new(Expr::Ident(ident)),
expr: Box::new(Expr::Lit(Lit::Null(Null { span: DUMMY_SP }))),
},
],
..Default::default()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* __next_internal_client_entry_do_not_use__ default auto */ /* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ export default function App() {
var fn = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
var fn = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
return <div>App</div>;
}
export async function $$RSC_SERVER_ACTION_0() {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
foo
]);
registerServerReference("ab21efdafbe611287bc25c0462b1e0510d13e48b", foo);
registerServerReference(foo, "ab21efdafbe611287bc25c0462b1e0510d13e48b", null);
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
bar
]);
registerServerReference("ac840dcaf5e8197cb02b7f3a43c119b7a770b272", bar);
registerServerReference(bar, "ac840dcaf5e8197cb02b7f3a43c119b7a770b272", null);
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
x
]);
registerServerReference("b78c261f135a7a852508c2920bd7228020ff4bd7", x);
registerServerReference(x, "b78c261f135a7a852508c2920bd7228020ff4bd7", null);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export default registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
export default registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
export async function $$RSC_SERVER_ACTION_0() {}
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([]);
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
const foo = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
const foo = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
export async function $$RSC_SERVER_ACTION_0() {}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
const foo = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
const foo = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
export async function $$RSC_SERVER_ACTION_0() {
'use strict';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import deleteFromDb from 'db';
export function Item({ id1, id2 }) {
var deleteItem = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
var deleteItem = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
id1,
id2
]));
Expand All @@ -18,7 +18,7 @@ export default function Home() {
name: 'John',
test: 'test'
};
const action = registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
const action = registerServerReference($$RSC_SERVER_ACTION_1, "90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
info.name,
info.test
]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
foo
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", foo);
registerServerReference(foo, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
$$RSC_SERVER_ACTION_0
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", $$RSC_SERVER_ACTION_0);
registerServerReference($$RSC_SERVER_ACTION_0, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
foo
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", foo);
registerServerReference(foo, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ ensureServerEntryExports([
foo,
bar
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", foo);
registerServerReference("ac840dcaf5e8197cb02b7f3a43c119b7a770b272", bar);
registerServerReference(foo, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
registerServerReference(bar, "ac840dcaf5e8197cb02b7f3a43c119b7a770b272", null);
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
foo
]);
registerServerReference("ab21efdafbe611287bc25c0462b1e0510d13e48b", foo);
registerServerReference(foo, "ab21efdafbe611287bc25c0462b1e0510d13e48b", null);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"90b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1","c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export default $$RSC_SERVER_ACTION_0 = registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1);
export default $$RSC_SERVER_ACTION_0 = registerServerReference($$RSC_SERVER_ACTION_1, "90b5db271335765a4b0eab01f044b381b5ebd5cd", null);
var $$RSC_SERVER_ACTION_0;
export async function $$RSC_SERVER_ACTION_1(a, b) {
console.log(a, b);
Expand All @@ -9,4 +9,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
$$RSC_SERVER_ACTION_0
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", $$RSC_SERVER_ACTION_0);
registerServerReference($$RSC_SERVER_ACTION_0, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import deleteFromDb from 'db';
const v1 = 'v1';
export function Item({ id1, id2 }) {
const v2 = id2;
const deleteItem = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
const deleteItem = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
id1,
v2
]));
Expand All @@ -17,7 +17,7 @@ export async function $$RSC_SERVER_ACTION_0($$ACTION_CLOSURE_BOUND) {
await deleteFromDb($$ACTION_ARG_1);
}
const f = (x)=>{
var g = registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
var g = registerServerReference($$RSC_SERVER_ACTION_1, "90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
x
]));
};
Expand All @@ -26,7 +26,7 @@ export async function $$RSC_SERVER_ACTION_1($$ACTION_CLOSURE_BOUND, y, ...z) {
return $$ACTION_ARG_0 + y + z[0];
}
const g = (x)=>{
f = registerServerReference("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$RSC_SERVER_ACTION_2).bind(null, encryptActionBoundArgs("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", [
f = registerServerReference($$RSC_SERVER_ACTION_2, "1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null).bind(null, encryptActionBoundArgs("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", [
x
]));
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","ab21efdafbe611287bc25c0462b1e0510d13e48b":"foo","ac840dcaf5e8197cb02b7f3a43c119b7a770b272":"bar"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export const foo = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
export const foo = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
export async function $$RSC_SERVER_ACTION_0() {}
const bar = async ()=>{};
export { bar };
Expand All @@ -9,5 +9,5 @@ ensureServerEntryExports([
foo,
bar
]);
registerServerReference("ab21efdafbe611287bc25c0462b1e0510d13e48b", foo);
registerServerReference("ac840dcaf5e8197cb02b7f3a43c119b7a770b272", bar);
registerServerReference(foo, "ab21efdafbe611287bc25c0462b1e0510d13e48b", null);
registerServerReference(bar, "ac840dcaf5e8197cb02b7f3a43c119b7a770b272", null);
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ const v1 = 'v1';
export function Item({ id1, id2 }) {
const v2 = id2;
return <>
<Button action={registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
<Button action={registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
id1,
v2
]))}>
Delete
</Button>
<Button action={registerServerReference("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$RSC_SERVER_ACTION_2).bind(null, encryptActionBoundArgs("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", [
<Button action={registerServerReference($$RSC_SERVER_ACTION_2, "1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null).bind(null, encryptActionBoundArgs("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", [
id1,
v2
]))}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export function Item({ value }) {
return <>
<Button action={registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
<Button action={registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
value
]))}>
Multiple
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","90b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
var myAction = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0);
var myAction = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null);
export async function $$RSC_SERVER_ACTION_0(a, b, c) {
console.log('a');
}
export default function Page() {
return <Button action={myAction}>Delete</Button>;
}
export const action = withValidate(registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1));
export const action = withValidate(registerServerReference($$RSC_SERVER_ACTION_1, "90b5db271335765a4b0eab01f044b381b5ebd5cd", null));
export async function $$RSC_SERVER_ACTION_1() {}
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
foo
]);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", foo);
registerServerReference(foo, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { validator, another } from 'auth';
const x = 1;
export default function Page() {
const y = 1;
return <Foo action={validator(registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
return <Foo action={validator(registerServerReference($$RSC_SERVER_ACTION_1, "90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
y
])))}/>;
}
export async function $$RSC_SERVER_ACTION_1($$ACTION_CLOSURE_BOUND, z) {
var [$$ACTION_ARG_0] = await decryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$ACTION_CLOSURE_BOUND);
return x + $$ACTION_ARG_0 + z;
}
validator(registerServerReference("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$RSC_SERVER_ACTION_2));
validator(registerServerReference($$RSC_SERVER_ACTION_2, "1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null));
export async function $$RSC_SERVER_ACTION_2() {}
another(validator(registerServerReference("9ed0cc47abc4e1c64320cf42b74ae60b58c40f00", $$RSC_SERVER_ACTION_3)));
another(validator(registerServerReference($$RSC_SERVER_ACTION_3, "9ed0cc47abc4e1c64320cf42b74ae60b58c40f00", null)));
export async function $$RSC_SERVER_ACTION_3() {}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* __next_internal_action_entry_do_not_use__ {"1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91":"$$RSC_SERVER_ACTION_2","6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","c18c215a6b7cdc64bf709f3a714ffdef1bf9651d":"default","f14702b5a021dd117f7ec7a3c838f397c2046d3b":"action"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
import { validator } from 'auth';
export const action = validator(registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0));
export const action = validator(registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null));
export async function $$RSC_SERVER_ACTION_0() {}
export default $$RSC_SERVER_ACTION_1 = validator(registerServerReference("1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", $$RSC_SERVER_ACTION_2));
export default $$RSC_SERVER_ACTION_1 = validator(registerServerReference($$RSC_SERVER_ACTION_2, "1c36b06e398c97abe5d5d7ae8c672bfddf4e1b91", null));
var $$RSC_SERVER_ACTION_1;
export async function $$RSC_SERVER_ACTION_2() {}
import { ensureServerEntryExports } from "private-next-rsc-action-validate";
ensureServerEntryExports([
action,
$$RSC_SERVER_ACTION_1
]);
registerServerReference("f14702b5a021dd117f7ec7a3c838f397c2046d3b", action);
registerServerReference("c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", $$RSC_SERVER_ACTION_1);
registerServerReference(action, "f14702b5a021dd117f7ec7a3c838f397c2046d3b", null);
registerServerReference($$RSC_SERVER_ACTION_1, "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d", null);
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0","90b5db271335765a4b0eab01f044b381b5ebd5cd":"$$RSC_SERVER_ACTION_1"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export default function Page({ foo, x, y }) {
var action = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
var action = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
x
]));
action.bind(null, foo[0], foo[1], foo.x, foo[y]);
const action2 = registerServerReference("90b5db271335765a4b0eab01f044b381b5ebd5cd", $$RSC_SERVER_ACTION_1).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
const action2 = registerServerReference($$RSC_SERVER_ACTION_1,"90b5db271335765a4b0eab01f044b381b5ebd5cd", null).bind(null, encryptActionBoundArgs("90b5db271335765a4b0eab01f044b381b5ebd5cd", [
x
]));
action2.bind(null, foo[0], foo[1], foo.x, foo[y]);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* __next_internal_action_entry_do_not_use__ {"6a88810ecce4a4e8b59d53b8327d7e98bbf251d7":"$$RSC_SERVER_ACTION_0"} */ import { registerServerReference } from "private-next-rsc-server-reference";
import { encryptActionBoundArgs, decryptActionBoundArgs } from "private-next-rsc-action-encryption";
export default function Page({ foo, x, y }) {
var action = registerServerReference("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", $$RSC_SERVER_ACTION_0).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
var action = registerServerReference($$RSC_SERVER_ACTION_0, "6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", null).bind(null, encryptActionBoundArgs("6a88810ecce4a4e8b59d53b8327d7e98bbf251d7", [
foo
]));
}
Expand Down
Loading

0 comments on commit 081c6e6

Please sign in to comment.