* add lunr package
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add search translator type and search engine interface
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* (wip) add support for lunr search engine
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* lunr search engine support
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* clean up todo comments
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* typing and cleanups
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* move lunr type package from dev deps to deps
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* check if documents exist to index
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* test fixup
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* changeset
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* move LunrSearchEngine.ts to /engines and add tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* update error message
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add comment to index rotation
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* Update plugins/search-backend-node/src/types.ts
Signed-off-by: Fredrik Adelöw freben@gmail.com
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
* fix imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* use type assertion to specify more specific ConcreteLunrQuery type
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* fix imports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* consistent naming
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* change search engine to be parameter of constructor in indexBuilder
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* make engine required in router options and pass it through in createRouter used in standalone server
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* fix tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* delete import
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* add types to SearchQuery interface to make it possible to scope to specific index + test
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* clean up tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
* handle case when a filter is added on a field that does not exist on all documents + test
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Co-authored-by: Fredrik Adelöw <freben@gmail.com>
If the user guest is used as an example value of the owner field, we should make sure to specify it as user:guest instead as the default is group.
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
In order to use this plugin, you must set the
`backstage.io/code-coverage` annotation on your entity.
```yaml
backstage.io/code-coverage: enabled
```
There's a feature to only include files that are in SCM in the coverage
report, this is helpful to not count generated files for example. To
enable this set the `backstage.io/code-coverage` annotation to
`scm-only`.
```yaml
backstage.io/code-coverage: scm-only
```
The backend plugin provides API endpoints for submitting code-coverage
reports. Currently jacoco and cobertura are supported. These reports
are normalized to a json format that is stored in the database.
```json
// curl -X POST -H "Content-Type:text/xml" -d @cobertura.xml "localhost:7000/api/code-coverage/Component/default/entity-name?coverageType=cobertura"
{
"links": [
{
"href": "http://localhost:7000/api/code-coverage/Component/default/entity-name",
"rel": "coverage"
}
]
}
```
It also provides some additional API endpoints:
* Viewing the latest report
* Viewing a more condensed history of code coverage values
* Retrieving file contents from source-control, used by the UI
Provides a graph of code coverage change over time, as well as a file
view where you can see the highlighted lines.
Co-authored-by: nissayeva <natashaaay@gmail.com>
Signed-off-by: alde <r.dybeck@gmail.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This reverts commit 30d3886ef7cba00ac55c8db9aca7f20eda8a5d2f.
Signed-off-by: Victor Perera <v-vperera@expediagroup.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>