question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

plugins don't have access to cliArgs in updateServer

See original GitHub issue

Plugins 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:

  1. make updateServer an instance method
  2. figure out how to pass the cli args into updateServer so they’re accessible

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jlippscommented, Aug 3, 2022

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.

0reactions
boneskullcommented, Aug 5, 2022

From Slack, I wrote:

so the updateServer thing for Plugins. currently it appears Plugins 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 supply cliArgs to static updateServer

the updateServer static method would then have a signature like type UpdateServerCallback = (expressApp: Express, httpServer: AppiumServer, cliArgs: object) => Promise<void>;

where object is something like Args

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found