* update packages
* add plugin to strip autolinks in code blocks
* fix all the documentation for MDXv3
* remove check-docusaurus-versions
in docusaurus 3 this is now a hard error, not just a warning
* port upstream change to Curl component
fixes performing the 'execute' action when pressing enter
* you missed one
* remove examples from deprecatedService()
I'm not going to replace this with openApi
We have zero examples of deprecated services that declare examples
* remove examples from redirector()
* update test
* remove compatibility code for converting examples to openApi
* remove all the code for handling examples
* remove a few bits of redundant code
* improve docs for openApi property
* last one, I promise
* 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
* fix some params incorrectly marked as optional
all of these are really required
* make '@' part of the param (not route) for scoped packages
* minor HTML tweaks to sonar help
---------
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* set followRedirect: false by default in tests
* update tests implicitly relying on redirects
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
* Convert remaining tests to use expectRedirect() helper
* convert last few redirect tests to use svg not json
Co-authored-by: repo-ranger[bot] <39074581+repo-ranger[bot]@users.noreply.github.com>
This is the preferred way we’re handling server URLs: in the query string.
While we still have a mix of these, I’ve argued this way is better for these reasons:
1. It allows us to make the URLs a bit more standardized across services.
2. It makes the routes unambiguous.
3. It requires less code.
While it introduces a URL-encoding requirement on the parameter, I think these tradeoffs are worth it.
This is a reworking of #3410 based on some feedback @calebcartwright left on that PR.
The goals of injecting the secrets are threefold:
1. Simplify testing
2. Be consistent with all of the other config (which is injected)
3. Encapsulate the sensitive auth-related code in one place so it can be studied and tested thoroughly
- Rather than add more code to BaseService to handle authorization logic, it delegates that to an AuthHelper class.
- When the server starts, it fetches the credentials from `config` and injects them into `BaseService.register()` which passes them to `invoke()`.
- In `invoke()` the service's auth configuration is checked (`static get auth()`, much like `static get route()`).
- If the auth config is present, an AuthHelper instance is created and attached to the new instance.
- Then within the service, the password, basic auth config, or bearer authentication can be accessed via e.g. `this.authHelper.basicAuth` and passed to `this._requestJson()` and friends.
- Everything is being done very explicitly, so it should be very clear where and how the configured secrets are being used.
- Testing different configurations of services can now be done by injecting the config into `invoke()` in `.spec` files instead of mocking global state in the service tests as was done before. See the new Jira spec files for a good example of this.
Ref #3393
I find having these in a consistent order makes the services much faster to read.
This is the order I’ve generally been using:
1. Category
2. Route
3. Examples
4. Rendering
5. Other helpers (`fetch()`, `transform()`)
6. `handle()`
* refactor(sonar)
* refactor(sonarqube): creating separate services for SQ badges
* refactor(sonar): more sonar refactorings
* refactor(sonar): fixed duplicate service names from c/p
* refactor(sonar): finished violations service impl
* refactor(sonar): finished unit tests for violations service
* feat(sonar): violation badge updates
* refactor(sonar): finished doc. api density service
* feat(sonar): added quality gate service
* chore: sonar doc tweaks
* refactor(sonar): added redirector service
* refactor(sonar): added examples
* refactor(sonar): minor example updates
* refactor(sonar): added final tests
* chore(sonar): removed unneeded test spec file for base class
* refactor(sonar): updates based on PR feedback
* refactor(sonar): change query param to sonarVersion
* refactor(sonar): fixing query param issue
* refactor(sonar): fix test color for generic metric
* chore: fix lint/prettier issue
* chore(sonar): update query param name in examples
* refactor(sonar): make schema metric key required
* reactor(sonar): fix tests
* refactor(sonar): added more example listings
* refactor(sonar): minor style updates
* refactor(sonar): update examples
* refactor(Sonar): minor example tweaks