@@ -379,6 +379,7 @@ export async function handleAction({
379
379
requestStore,
380
380
serverActions,
381
381
ctx,
382
+ temporaryReferences,
382
383
} : {
383
384
req : BaseNextRequest
384
385
res : BaseNextResponse
@@ -389,6 +390,7 @@ export async function handleAction({
389
390
requestStore : RequestStore
390
391
serverActions ?: ServerActionsConfig
391
392
ctx : AppRenderContext
393
+ temporaryReferences : unknown
392
394
} ) : Promise <
393
395
| undefined
394
396
| {
@@ -578,7 +580,9 @@ export async function handleAction({
578
580
// TODO-APP: Add streaming support
579
581
const formData = await req . request . formData ( )
580
582
if ( isFetchAction ) {
581
- bound = await decodeReply ( formData , serverModuleMap )
583
+ bound = await decodeReply ( formData , serverModuleMap , {
584
+ temporaryReferences : temporaryReferences ,
585
+ } )
582
586
} else {
583
587
const action = await decodeAction ( formData , serverModuleMap )
584
588
if ( typeof action === 'function' ) {
@@ -617,9 +621,13 @@ export async function handleAction({
617
621
618
622
if ( isURLEncodedAction ) {
619
623
const formData = formDataFromSearchQueryString ( actionData )
620
- bound = await decodeReply ( formData , serverModuleMap )
624
+ bound = await decodeReply ( formData , serverModuleMap , {
625
+ temporaryReferences : temporaryReferences ,
626
+ } )
621
627
} else {
622
- bound = await decodeReply ( actionData , serverModuleMap )
628
+ bound = await decodeReply ( actionData , serverModuleMap , {
629
+ temporaryReferences : temporaryReferences ,
630
+ } )
623
631
}
624
632
}
625
633
} else if (
@@ -681,7 +689,9 @@ export async function handleAction({
681
689
682
690
body . pipe ( busboy )
683
691
684
- bound = await decodeReplyFromBusboy ( busboy , serverModuleMap )
692
+ bound = await decodeReplyFromBusboy ( busboy , serverModuleMap , {
693
+ temporaryReferences : temporaryReferences ,
694
+ } )
685
695
} else {
686
696
// React doesn't yet publish a busboy version of decodeAction
687
697
// so we polyfill the parsing of FormData.
@@ -737,9 +747,13 @@ export async function handleAction({
737
747
738
748
if ( isURLEncodedAction ) {
739
749
const formData = formDataFromSearchQueryString ( actionData )
740
- bound = await decodeReply ( formData , serverModuleMap )
750
+ bound = await decodeReply ( formData , serverModuleMap , {
751
+ temporaryReferences : temporaryReferences ,
752
+ } )
741
753
} else {
742
- bound = await decodeReply ( actionData , serverModuleMap )
754
+ bound = await decodeReply ( actionData , serverModuleMap , {
755
+ temporaryReferences : temporaryReferences ,
756
+ } )
743
757
}
744
758
}
745
759
} else {
0 commit comments