0.10.0 • Published 2 years ago

@srikanthanusuri/npm-ci-login v0.10.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

npm-ci-login

Inspired from npm-ci-login

Allows you to log in to NPM without STDIN, STDOUT. Use in places like CI build systems.

Uses REST calls to authenticate to the target registry.

Installation

npm install --location=global @srikanthanusuri/npm-ci-login

Use --location=global flag to use npm-ci-login via the CLI

Usage

CLI

npm-cli-login expects the following environment variables to be set before you can use it to authenticate:

  • NPM_USERNAME: NPM username
  • NPM_PASSWORD: NPM password
  • NPM_REGISTRY: (optional) Private NPM registry to log in to (Default: https://registry.npmjs.org)

Once the required ones are set, you can just run the following to log in:

npm-ci-login

You can also export variables and run it all in one line:

NPM_USERNAME=testUser NPM_PASSWORD=testPass npm-ci-login
Module usage

Usage

const npmCiLogin = require('@srikanthanusuri/npm-ci-login');
npmCiLogin('username', 'password', 'https://your-registry-url'); // Registry defaults to https://registry.npmjs.org when unspecified
0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago