@@ -13,8 +13,7 @@ use spin_factor_variables::VariablesFactor;
1313use spin_factor_wasi:: { SocketAddrUse , WasiFactor } ;
1414use spin_factors:: {
1515 anyhow:: { self , Context } ,
16- ConfigureAppContext , Error , Factor , FactorInstanceBuilder , InstanceBuilders , PrepareContext ,
17- RuntimeFactors ,
16+ ConfigureAppContext , Error , Factor , FactorInstanceBuilder , PrepareContext , RuntimeFactors ,
1817} ;
1918
2019pub use config:: {
@@ -82,17 +81,16 @@ impl Factor for OutboundNetworkingFactor {
8281
8382 fn prepare < T : RuntimeFactors > (
8483 & self ,
85- ctx : PrepareContext < Self > ,
86- builders : & mut InstanceBuilders < T > ,
84+ mut ctx : PrepareContext < T , Self > ,
8785 ) -> anyhow:: Result < Self :: InstanceBuilder > {
8886 let hosts = ctx
8987 . app_state ( )
9088 . component_allowed_hosts
9189 . get ( ctx. app_component ( ) . id ( ) )
9290 . cloned ( )
9391 . context ( "missing component allowed hosts" ) ?;
94- let resolver = builders
95- . get_mut :: < VariablesFactor > ( ) ?
92+ let resolver = ctx
93+ . instance_builder :: < VariablesFactor > ( ) ?
9694 . expression_resolver ( )
9795 . clone ( ) ;
9896 let allowed_hosts_future = async move {
@@ -103,7 +101,7 @@ impl Factor for OutboundNetworkingFactor {
103101 . boxed ( )
104102 . shared ( ) ;
105103
106- match builders . get_mut :: < WasiFactor > ( ) {
104+ match ctx . instance_builder :: < WasiFactor > ( ) {
107105 Ok ( wasi_builder) => {
108106 // Update Wasi socket allowed ports
109107 let allowed_hosts = OutboundAllowedHosts {
0 commit comments