Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-aznpmrcs

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-aznpmrcs

CLI to help with setting up feeds and authentication for Azure DevOps

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Simple-aznpmrcs

Why I created this

Every 30/60/90 days the PAT was expired that was used for installing NPM dependencies.
Which meant I needed to login, create a new PAT, covert it to base64, update NPMRC and then I was able to proceed.

If you only have one Azure DevOps organization then it is not handy but doable.
I use multiple and therefor needed to login to each of the different Organizations and do the update circus.
And ofcourse, that was always when you can cannot really use it >.<

So in comes this module!
It can create NPMRC' based on the given aZOrganization, azProject and feedname
A PAT is generate automatically and you can update it with ease.

As this is automated, there is no need to have very long lived PAT's. You can use shortlived because well its easy to regenerate.

So how does it work

It uses the Azure CLI to connect.
You need to make sure that you have this installed, and are logged in (az login)

After that you are good to go :-)

How to use it

You can either install it globally npm install -g simple-aznpmrcs or use npx npx simple-aznpmrcs to execute the commands.

Create

For creating a NPMRC a few parameters are required:

  • azOrganization (first part of url)
  • azProject (second part of url)
  • feedName (as available in Artifacts)
  • Optional: name (directory name is used if not provided)

Note: azOrganization & azProject are optional if repository url is provided in your package.json

Example Azure DevOps url: https://dev.azure.com/henkvandenbrink/kitchensink
azOrganization = henkvandenbrink
azProject = kitchensink
feedName = As created.

Example:

npx simple-aznpmrcs create henkvandenbrink kitchensink npm-feed

Use

When you have create one or more npmrcs you can easily switch:

npx simple-aznpmrcs example-npmrc

Update

For updating you only need to provide the name of the NPMRC that was created earlier.

npx simple-aznpmrcs update example-npmrc

Thanks

This module uses npmrc npm module to create and switch the npmrc.

FAQs

Package last updated on 04 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc