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

Package manager login command - Npm, Yarn, Pip, Pipenv, Poetry,Go, Nuget, Dotnet #1285

Merged
merged 48 commits into from
Nov 18, 2024

Conversation

sverdlov93
Copy link
Contributor

@sverdlov93 sverdlov93 commented Oct 25, 2024

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

PR Description

Title

Add PackageManagerLoginCommand for Configuring Package Managers in JFrog CLI

Description

This PR introduces the PackageManagerLoginCommand, a unified command for configuring package managers to use JFrog Artifactory. It enables registry setup and authentication across various project types, automatically handling tool-specific settings based on the selected project.

Supported Package Managers

  • npm: Configures registry and authentication in the .npmrc file.
  • Yarn: Sets up registry and authentication in the .yarnrc or .yarnrc.yml file.
  • Pip: Configures PyPI repository URL in the pip.conf file.
  • Pipenv: Sets the global index URL in the pip.conf file.
  • Poetry: Manages repository and authentication in the pyproject.toml file.
  • Go: Configures the GOPROXY (persistent) environment variable to use Artifactory.
  • NuGet: Adds repositories and authentication in the NuGet.config file.
  • dotnet: Configures repositories and authentication in the NuGet.config file.

Supported Auth Types

  • Token-based, Basic (username/password), and Anonymous.

Testing

  • Unit tests validate configuration updates for each package manager.

Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
@sverdlov93 sverdlov93 changed the title Npm/Yarn login command Build tool login command - Npm, Yarn, Pip, Pipenv, Poetry Nov 4, 2024
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
Signed-off-by: Michael Sverdlov <[email protected]>
@sverdlov93 sverdlov93 changed the title Package manager login command - Npm, Yarn, Pip, Pipenv, Poetry Package manager login command - Npm, Yarn, Pip, Pipenv, Poetry, Nuget, Dotnet Nov 12, 2024
@sverdlov93 sverdlov93 changed the title Package manager login command - Npm, Yarn, Pip, Pipenv, Poetry, Nuget, Dotnet Package manager login command - Npm, Yarn, Pip, Pipenv, Poetry,Go, Nuget, Dotnet Nov 13, 2024
Copy link
Member

@omerzi omerzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we could move the npm and yarn config set/get functionality out of utils and place it under a more focused javascript package (similar to how the python package handles pip, poetry, etc). This could also be a good opportunity to merge any overlapping code between the two for better reusability and maintainability. What do you think?

@sverdlov93 sverdlov93 merged commit b6efb65 into jfrog:dev Nov 18, 2024
6 of 7 checks passed
@eyalbe4 eyalbe4 added the new feature Automatically generated release notes label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants