feat: add support for plugins#14556
Conversation
…rConfig a special case of it
…se of git/github we don't actually know where npm will install it unless we know the package name
…s command handlers
|
The PR is complicated and hard to read and understand without a spec and any documentation. Thus, I would not be able to review it properly |
@mykola-mokhnach i understand. I will work on updating the appium 2.0 plugin spec to reflect the new reality. In the meantime, does the extensive commenting on the base plugin help? https://github.com/appium/appium-base-plugin/blob/master/lib/plugin.js |
|
@mykola-mokhnach I updated the Appium 2.0 draft spec (plugins section) so you can read my intentions here in prose. |
|
OK @mykola-mokhnach I cleaned up a few things per your request, did some refactoring, and finished implementing the spec as described in that gist. What do you think? |
|
it looks like tests are not very happy |
This depends on the basedriver code which has not been published, so tests will fail until that PR is merged, published, and this one updated. |
|
ok, basedriver PR has been merged and brought in here, so let's see how CI does. |
…y extension config
This PR adds the following:
appium pluginCLI which has the same shape and behavior as the driver CLI (so lots of refactoring to share code)As of now, every installed plugin is always active. A next step is to make it so that you have to opt into installed plugins, via server args or caps.
This depends on some BaseDriver changes (appium/appium-base-driver#422)
The plugin used for testing is the new @appium/fake-plugin, which is built on a base class (@appium/base-plugin) that everyone can use to build their own plugins.