# d2l-npm-login
Authenticates to D2L's private npm registry

## Prerequisites

You must have [BMX](https://bmx.d2l.dev/) and the [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) installed, as well as `PackageReader` access to the `Dev-CodeArtifact` account in [ACE](https://ace.brightspace.com/)


## Install and Use
```
npx d2l-npm-login [options]
```

### Options
```
  -p, --profile <name>            AWS profile (default: "code-artifact")
  -e, --expiry-minutes <minutes>  The time after which the token will expire (default: 540)
  -o, --offset-seconds <seconds>  A value greater than your install time will prevent token expiry mid-install (default: 30)
  -h, --help                      display help for command
```

## Troubleshooting

Make sure you have the latest version:
```
npx d2l-npm-login@latest
```

### `npx`
While not officially supported, you may be able to use older versions of `npm` that do not ship with `npx` by installing it manually:
```
npm i -g npx
```

