File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,11 @@ export const register = async (
114114 } )
115115 } )
116116
117+ const workingDir = args . _ && args . _ . length > 0 ? path . resolve ( args . _ [ args . _ . length - 1 ] ) : undefined
118+ const papi = new PluginAPI ( logger , process . env . CS_PLUGIN , process . env . CS_PLUGIN_PATH , workingDir )
119+ await papi . loadPlugins ( )
120+ papi . mount ( app , wsApp )
121+
117122 app . use ( bodyParser . json ( ) )
118123 app . use ( bodyParser . urlencoded ( { extended : true } ) )
119124
@@ -136,10 +141,6 @@ export const register = async (
136141 app . use ( "/static" , _static . router )
137142 app . use ( "/update" , update . router )
138143
139- const workingDir = args . _ && args . _ . length > 0 ? path . resolve ( args . _ [ args . _ . length - 1 ] ) : undefined
140- const papi = new PluginAPI ( logger , process . env . CS_PLUGIN , process . env . CS_PLUGIN_PATH , workingDir )
141- await papi . loadPlugins ( )
142- papi . mount ( app , wsApp )
143144 app . use ( "/api/applications" , apps . router ( papi ) )
144145 wrapper . onDispose ( ( ) => papi . dispose ( ) )
145146
You can’t perform that action at this time.
0 commit comments