fix(appium): load plugins before main server to allow plugin monkeypatching
MODIFY
packages/appium/lib/main.js
packages/appium/lib/main.js
@@ -200,14 +200,13 @@ async function main (args = null) {
appiumDriver.driverConfig = driverConfig;
const pluginConfig = new PluginConfig(args.appiumHome);
await preflightChecks({parser, args, driverConfig, pluginConfig, throwInsteadOfExit});
- await logStartupInfo(parser, args);
- let routeConfiguringFunction = makeRouter(appiumDriver);
-
- const driverClasses = getActiveDrivers(args, driverConfig);
const pluginClasses = getActivePlugins(args, pluginConfig);
// set the active plugins on the umbrella driver so it can use them for commands
appiumDriver.pluginClasses = pluginClasses;
+ await logStartupInfo(parser, args);
+ let routeConfiguringFunction = makeRouter(appiumDriver);
+ const driverClasses = getActiveDrivers(args, driverConfig);
const serverUpdaters = getServerUpdaters(driverClasses, pluginClasses);
const extraMethodMap = getExtraMethodMap(driverClasses, pluginClasses);

fix(appium): load plugins before main server to allow plugin monkeypatching (#15441)