1.0.4 • Published 2 years ago

@prftesp/setup-azure-npmrc v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Introduction

A CLI tool for updating a user .npmrc for use with Azure Artifact Feeds.

Getting Started

It is good to get some background on how to Set up your client's npmrc. By using an .npmrc we can point it at a Azure Artifact Feed and provide configuration to allow package access. This is useful from a local development and when used within a CI environment.

To get started we should start with the following:

  1. Create a PAT and scope it to Packaging (Read & write). Do not base64 encode the token.
  2. Grab the Azure Artifact Feed's npm registry URL by navigating to the desired feed and selecting Connect to Feed followed by npm and copying the value after registry=.

Usage

Available options:

  • registry - required Azure Artifact Feed npm registry URL
  • password - required Personal Access Token (not base64 encoded)
  • email - Email address (not used)
  • scope - Project scope for registry (optional)

After installing via npm we can provide the registry URL for the --registry option and PAT for the --password. The --email is an optional field and can be omitted. An optional --scope can be provided to scope the registry and always-auth fields to a specific package grouping.

Without scope

node ./node_modules/@prftesp/setup-azure-npmrc/setup-azure-npmrc.js --registry https://pkgs.dev.azure.com/<yourOrganization>/_packaging/<yourFeed>/npm/registry/ --password <yourPAT> --email <optional>

With scope

node ./node_modules/@prftesp/setup-azure-npmrc/setup-azure-npmrc.js --registry https://pkgs.dev.azure.com/<yourOrganization>/_packaging/<yourFeed>/npm/registry/ --password <yourPAT> --email <optional> --scope @my-packages

DEBUG

If DEBUG environment variable is provided additional logging information will be provided on execution.

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago