plugins don't have access to cliArgs in updateServer
See original GitHub issuePlugins should reasonably have access to cli args passed in via the plugin cli arg interface.
Currently they have access via the this.cliArgs
property on a plugin instance.
But plugins can also implement static async updateServer
, a method which should also reasonably have access to the plugin’s CLI args. Obviously, this.cliArgs
is not a thing here.
Options:
- make
updateServer
an instance method - figure out how to pass the cli args into
updateServer
so they’re accessible
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to install jenkins plugins from command line?
For anyone having issues running the command and getting this error: ERROR: anonymous is missing the Overall/Read permission you'll need to provide the...
Read more >Installing, Updating, and Managing WordPress Plugins With ...
How to manage plugins using WP-CLI, including installation and activation, updating your plugins, verifying checksums, and commands for bash ...
Read more >Administration via command line - MoodleDocs
Core admin CLI tools are located in the admin/cli/* folder. Other plugins may provide CLI functionality via scripts in their own cli folder....
Read more >Plugin management | Grafana documentation
Plugin catalog. The Plugin catalog allows you to browse and manage plugins from within Grafana. Only Grafana server administrators and organization ...
Read more >How to install and manage Azure CLI extensions
With extensions, you gain access to experimental and pre-release commands along with the ability to write your own CLI interfaces.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We might also consider whether there’s a way to make
cliArgs
available in the plugin constructor, since that is also a place where we might reasonably expect to do things with them.From Slack, I wrote:
so the
updateServer
thing forPlugin
s. currently it appearsPlugin
s are instantiated lazily–not until they are needed to handle a command. I don’t think this can be the case any longer. does that sound right?this seems like kind of a not-necessarily-wanted consequence of moving
updateServer
to an instance method. so maybe that’s not what we want to do. maybe we just want to supplycliArgs
tostatic updateServer
the
updateServer
static method would then have a signature liketype UpdateServerCallback = (expressApp: Express, httpServer: AppiumServer, cliArgs: object) => Promise<void>
;where
object
is something likeArgs