File tree 1 file changed +5
-4
lines changed 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 (
114
114
} )
115
115
} )
116
116
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
+
117
122
app . use ( bodyParser . json ( ) )
118
123
app . use ( bodyParser . urlencoded ( { extended : true } ) )
119
124
@@ -136,10 +141,6 @@ export const register = async (
136
141
app . use ( "/static" , _static . router )
137
142
app . use ( "/update" , update . router )
138
143
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 )
143
144
app . use ( "/api/applications" , apps . router ( papi ) )
144
145
wrapper . onDispose ( ( ) => papi . dispose ( ) )
145
146
You can’t perform that action at this time.
0 commit comments