PitchHut
Log in / Sign up
ado-npm-auth-lite
26 views
Effortless npm authentication for Azure DevOps, across all platforms.
Pitch

ado-npm-auth-lite simplifies user authentication for Azure DevOps npm feeds, ensuring non-Windows users can seamlessly access packages. With an easy setup that generates the necessary .npmrc file, you can integrate it into your workflow effortlessly. Say goodbye to authentication errors and enhance your development experience with just one command.

Description

The ado-npm-auth-lite project simplifies the process of setting up local authentication for Azure DevOps npm feeds. It empowers developers to seamlessly interact with private npm packages while optionally utilizing the Azure CLI for Personal Access Token (PAT) acquisition. This tool is particularly beneficial for non-Windows users, enhancing their onboarding experience to be as smooth as that of Windows users.

Features

  • Easy Authentication: Quickly set up user authentication for Azure DevOps npm feeds with minimal configuration required.
  • Azure CLI Compatibility: Optionally acquire a PAT using the Azure CLI, making the authentication process even easier.
  • User-Friendly Errors: Whether it's an E401 error due to an expired or missing token, the package provides clear instructions on how to resolve these issues.

Usage Example

To create the necessary user .npmrc file with azdo-npm-auth, run:

npx cross-env npm_config_registry=https://registry.npmjs.org npx azdo-npm-auth

If you're on a non-Bash environment or prefer not to use cross-env, you can simplify the command to:

npm_config_registry=https://registry.npmjs.org npx azdo-npm-auth

Integration with your Project

Integrating azdo-npm-auth into your package.json helps automate your npm installation processes. Consider adding an auth script:

"scripts": {
  "auth": "npm_config_registry=https://registry.npmjs.org npx --yes azdo-npm-auth"
},

You can run npm run auth when you encounter authentication issues, ensuring a smooth workflow.

Advantages

Azure DevOps offers a means for publishing npm packages privately, and ado-npm-auth-lite automates the tedious processes traditionally required for non-Windows users. The aim is to streamline access to Azure Artifacts npm feeds by simplifying user authentication, thus saving valuable development time.

Harness the power of ado-npm-auth-lite to navigate Azure DevOps npm feeds effortlessly.