Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #171: exposes the auth, username and password properties of registries #172

Conversation

lesteenman
Copy link
Contributor

@lesteenman lesteenman commented Jun 30, 2024

This exposes a couple of extra authentication related properties of npm registry configuration.

I opted not to throw any exceptions if multiple options were found, but instead rely on the behaviour of NPM itself, and to transparently pass the parameters on.

The only field with special changes needed is the _password field, which npm expects to have been set as a base64 encoded string in the .npmrc file. I've transparently exposed the password field to the plugin's users to simplify usage, but encoded it in the plugin.
I haven't found official documentation about that, but was inspired by this line in the official npm github repository: https://github.com/npm/cli/blob/3b8b11161ee2f88817dcc19b4770040d5bc73261/workspaces/arborist/README.md?plain=1#L42

@lesteenman
Copy link
Contributor Author

Seems I only ran the tests, not the full check suite. Will fix that later today, hopefully.

@mpetuska
Copy link
Owner

mpetuska commented Jul 1, 2024

could you run ./gradlew detektALL --auto-correct to format changes, the rest looks great - thanks!

@mpetuska mpetuska enabled auto-merge (rebase) July 1, 2024 17:48
auto-merge was automatically disabled July 1, 2024 18:47

Head branch was pushed to by a user without write access

@lesteenman
Copy link
Contributor Author

Done!

@mpetuska mpetuska enabled auto-merge (rebase) July 1, 2024 20:14
@mpetuska mpetuska linked an issue Jul 1, 2024 that may be closed by this pull request
@mpetuska mpetuska merged commit bcaa5a0 into mpetuska:master Jul 1, 2024
2 checks passed
@mpetuska
Copy link
Owner

mpetuska commented Jul 1, 2024

Thanks for the PR!

@lesteenman
Copy link
Contributor Author

No problem! When do you think this will be released?

@lesteenman lesteenman deleted the expose-additional-authentication-options-of-registries branch July 2, 2024 14:09
@mpetuska
Copy link
Owner

mpetuska commented Jul 4, 2024

hoping for friday

@Tyrannoseanus
Copy link

Hi @mpetuska !

Would you mind releasing a new version of the plugin with these changes? I'd really like to use username and password but the latest release is v3.4.3 without these changes.

Thank you! (And thanks @lesteenman for implementing them 😄)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose auth property for registry
3 participants