* allow user to set dockerhub credentials
* add withJwtAuth function to AuthHelper
* use withJwtAuth in DockerHub badges
* add unit tests for JWT auth
* use auth when calling docker cloud
* refactor and assert fetch helpers call withJwtAuth
* store token for a max duration (defaults to 1 hour)
* tangent: update test example
* allow serviceData to override cacheSeconds with a longer value
* prevent [endpoint] json cacheSeconds property exceeding service default
* allow ShieldsRuntimeError to specify a cacheSeconds property
By default error responses use the cacheLength of
the service class throwing the error.
This allows error to tell the handling layer the maxAge
that should be set on the error badge response.
* add customExceptions param
This
1. allows us to specify custom properties to pass to the exception
constructor if we throw any of the standard got errors
e.g: `ETIMEDOUT`, `ECONNRESET`, etc
2. uses a custom `cacheSeconds` property (if set on the exception)
to set the response maxAge
* customExceptions --> systemErrors
* errorMessages --> httpErrors
* [Docker] Support architecture query param in docker version badge
* [Docker] Add new unit test with architecture query param
* Run prettier
* [Docker] Add arch param in customizer example
* [Docker] version badge: Update test cases for arch param
* [Docker] Add arch param valid values
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* fix: TypeError in DockerVersion badge
* A reference to the issue in test
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
Co-authored-by: Paul Melnikow <github@paulmelnikow.com>
* Add [Docker] image size badge
* Add [Docker] version/tag badge
* [Docker] allow version badge to retrieve results from multiple pages
* [Docker] allow size badge to retrieve results from multiple pages
* [Docker] clean up size and version badges before squash
* [Docker] Size badge change API call to explicit tag
* [Docker] Conditionally include tag route param for badges
* [Docker] Implement feedback for size and version badges
* [Docker] Implement feedback round 2 for size and version badges
* [Docker] Optimise API lookups and remove date sorting on tag badge
* [Docker] Implement feedback round 3 for version badge
* [Docker] Implement feedback round 4 for version badge
* [Docker] Adjust unit and service tests for version badge
* [Docker] Move unit test data into fixtures
* [Docker] Fix Docker version badge route prefix
* [Docker] Add date and semver lookup for size badge
* [Docker] Implement feedback round 5 for version badge
* [Docker] Implement feedback round 6
* [Docker] Tweak error messaging for consistent wording
* [Docker] Adjust badge titles
* [Docker] Guard and treat images with missing digest
* [Docker] Guard and treat images with missing digest