Ability to override pre/postfix for auth, ability to change what gets replaced
hybridherbst opened this issue · comments
Feature Request
Currently, the 2nd and 3rd lines in the Registry Info will be replaced by a hardcoded set of strings. It would be nice if this was configurable (e.g. via config.yaml in Verdaccio), for two reasons:
- we're using a different package manager (Unity Package Manager) and want to adjust the text there
- currently the text becomes very long when a package is selected (so all commands look the same).
Is your feature request related to a problem? Please describe.
See above
Describe the solution you'd like
- Ability to use Verdaccio's config.yaml to specify a string, e.g. "myprefix {{auth}} mypostfix"
- Ability to specify if the always-auth command is also replaced
- Ability to specify in the config under which conditions this is replaced (e.g. we only want that "Unity Package Manager" tab actually)
Additional context
I think the idea makes sense.
Verdaccio by default shows tabs for yarn and pnpm. Those commands are currently also not adjusted by the plugin.
Making this configurable sounds a little complicated to me. Especially the conditional stuff.
I wonder why Verdaccio shows 3 copy buttons instead of one. I could imagine replacing this with a single copy button and a single multiline text. Then this text could be configured for each package manager and decisions like whether to replace the always-auth command would be implicit since you would just configure whatever you want to see.
What are your thoughts and do you have a suggestion for how this could look like in yaml?
@hybridherbst any thoughts?
Still playing around in our fork, haven't come to a great solution yet, and some trouble understanding Verdaccio config and how to bubble it through an app it seems 😅
But basically, what I was trying is to
a) specify in the Verdaccio theme which tabs are rendered
b) specify in this plugin how and where the auth code is pasted, e.g. different regex
I'll update this with more info once I have a result I like - please feel free to turn this issue into a discussion in the meantime :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.