# aws-ecr-semver

> Query an AWS ECR registry labels with a semver pattern and return the best match.

Latest version **1.0.3** (published 2017-03-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install aws-ecr-semver
pnpm add aws-ecr-semver
yarn add aws-ecr-semver
bun add aws-ecr-semver
```

Provides the command `aws-ecr-semver`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-03-10 |
| First published | 2017-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Stephenson |
| Maintainers | jfstephe |
| Keywords | aws, ecr, docker, semver |

## Links

- npm: https://www.npmjs.com/package/aws-ecr-semver
- Repository: https://github.com/jfstephe/aws-ecr-semver
- Homepage: https://github.com/jfstephe/aws-ecr-semver#readme
- Issues: https://github.com/jfstephe/aws-ecr-semver/issues
- npm.io page: https://npm.io/package/aws-ecr-semver

## Dependencies (2)

- [args](https://npm.io/package/args.md) ^2.3.0
- [semver](https://npm.io/package/semver.md) ^5.3.0

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-03-10
- 1.0.2 — 2017-03-10
- 1.0.1 — 2017-03-10
- 1.0.0 — 2017-03-10

## README

# aws-ecr-semver
If you are using AWS ECR to store your docker images and those images have labels in the [semver](http://semver.org/) format then you can use this tool to query AWS (assuming you are already authenticated) retrieve the list of valid semver labels and the one that satisfies a semver pattern.

Consider installing this globally for ease of use.

`
npm install -g aws-ecr-semver
`

## Usage

```
  Usage: index.js [options] [command]

    Commands:

    help  Display help

  Options:

    -h, --help     Output usage information
    -r, --repo     The name of the repository in the registry to query for labels.
    -s, --semver   The semver comparator to use to pick the correct label
    -v, --version  Output the version number
```

## Output

The command outputs to stdout json formated data for the semver valid labels and the maximum label satisfying the semver pattern provided.

## Example
This example fails to match on the provided semver pattern and shows the single existing valid semver label present in the 'my-repo' registry.

```bash
aws-ecr-semver -r="my-repo" -s=^2.*
{"maxSatisfyingLabel":"","validLabels":["1.2.3"]}
```

## Tests

Run them with the command:

`
npm test
`

## TODO
* Mock out the AWS components to enable more tests to be written.
  These interactions have been tested manually so far.

## Contributing
Please feel free to submit PRs, but if you do please try to add a test for your new feature.)

---
_Source: https://npm.io/package/aws-ecr-semver · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
