@@ -42,41 +42,45 @@ const App = () => {
4242 // Map remote action IDs to host-local proxy action IDs so client-side
4343 // callbacks can always post a host-resolvable action id. This keeps
4444 // remote action execution in-process on the host via proxy imports.
45- const remoteActionIdToHostProxyActionId = Object . fromEntries (
45+ const remoteActionIdToHostProxyActionEntries = [
46+ [
47+ getServerActionId ( incrementRemoteCount ) ,
48+ getServerActionId ( proxyIncrementRemoteCount ) ,
49+ ] ,
50+ [
51+ getServerActionId ( remoteActionEcho ) ,
52+ getServerActionId ( proxyRemoteActionEcho ) ,
53+ ] ,
54+ [
55+ getServerActionId ( nestedRemoteAction ) ,
56+ getServerActionId ( proxyNestedRemoteAction ) ,
57+ ] ,
58+ [
59+ getServerActionId ( defaultRemoteAction ) ,
60+ getServerActionId ( proxyDefaultRemoteAction ) ,
61+ ] ,
4662 [
47- [
48- getServerActionId ( incrementRemoteCount ) ,
49- getServerActionId ( proxyIncrementRemoteCount ) ,
50- ] ,
51- [
52- getServerActionId ( remoteActionEcho ) ,
53- getServerActionId ( proxyRemoteActionEcho ) ,
54- ] ,
55- [
56- getServerActionId ( nestedRemoteAction ) ,
57- getServerActionId ( proxyNestedRemoteAction ) ,
58- ] ,
59- [
60- getServerActionId ( defaultRemoteAction ) ,
61- getServerActionId ( proxyDefaultRemoteAction ) ,
62- ] ,
63- [
64- getServerActionId ( remoteActionBundle . bundledIncrementRemoteCount ) ,
65- getServerActionId ( proxyBundledIncrementRemoteCount ) ,
66- ] ,
67- [
68- getServerActionId ( remoteActionBundle . bundledRemoteActionEcho ) ,
69- getServerActionId ( proxyBundledRemoteActionEcho ) ,
70- ] ,
71- [
72- getServerActionId ( remoteActionBundle . bundledNestedRemoteAction ) ,
73- getServerActionId ( proxyBundledNestedRemoteAction ) ,
74- ] ,
75- [
76- getServerActionId ( remoteActionBundle . bundledDefaultRemoteAction ) ,
77- getServerActionId ( proxyBundledDefaultRemoteAction ) ,
78- ] ,
79- ] . filter ( ( pair ) : pair is [ string , string ] => Boolean ( pair [ 0 ] && pair [ 1 ] ) ) ,
63+ getServerActionId ( remoteActionBundle . bundledIncrementRemoteCount ) ,
64+ getServerActionId ( proxyBundledIncrementRemoteCount ) ,
65+ ] ,
66+ [
67+ getServerActionId ( remoteActionBundle . bundledRemoteActionEcho ) ,
68+ getServerActionId ( proxyBundledRemoteActionEcho ) ,
69+ ] ,
70+ [
71+ getServerActionId ( remoteActionBundle . bundledNestedRemoteAction ) ,
72+ getServerActionId ( proxyBundledNestedRemoteAction ) ,
73+ ] ,
74+ [
75+ getServerActionId ( remoteActionBundle . bundledDefaultRemoteAction ) ,
76+ getServerActionId ( proxyBundledDefaultRemoteAction ) ,
77+ ] ,
78+ ] . filter ( ( pair ) : pair is [ string , string ] => Boolean ( pair [ 0 ] && pair [ 1 ] ) ) ;
79+ const remoteActionIdToHostProxyActionId = Object . fromEntries (
80+ remoteActionIdToHostProxyActionEntries ,
81+ ) ;
82+ const remoteActionIdMapKey = JSON . stringify (
83+ remoteActionIdToHostProxyActionEntries ,
8084 ) ;
8185
8286 const remoteServerOnlyInfo = getServerOnlyInfo ( ) ;
@@ -126,6 +130,7 @@ const App = () => {
126130 < form action = { proxyBundledDefaultRemoteAction } />
127131 </ div >
128132 < HostRemoteActionRunner
133+ remoteActionIdMapKey = { remoteActionIdMapKey }
129134 remoteActionIdToHostProxyActionId = { remoteActionIdToHostProxyActionId }
130135 />
131136 </ div >
0 commit comments