Support `FactRetrieverRegistry` and `PersistenceContext` at the `techInsightsPlugin`
using extension points.
Additionally, move `FactRetrieverRegistry` and `PersistenceContext`
to `@backstage/plugin-tech-insights-node`.
Original exports are marked as deprecated and re-export the moved types.
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
A new backend plugin for the tech-insights backend
was added and exported as `default`
as well as extension points to be used by modules.
The plugin can be used like
```ts title="packages/backend/src/index.ts"
backend.add(import('@backstage/plugin-tech-insights-backend'));
```
Fact retrievers will be added
(built-in or through the extension point),
but only registered if the user adds a configuration for it
(cadence, etc.).
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
Modify facts database table to have a more restricted timestamp precision for cases where the postgres server isn't configured to contain such value. This fixes the issue where in some cases `maxItems` lifecycle condition didn't work as expected.
resolves#11595
Signed-off-by: Jussi Hallila <jussi@hallila.com>
Possible values:
* { itl: 5 } // Deletes all facts for the retriever/entity pair, apart from the last five
* { ttl: 1209600000 } // (2 weeks) Deletes all facts older than 2 weeks for the retriever/entity pair
* { ttl: { weeks: 2 } } // Deletes all facts older than 2 weeks for the retriever/entity pair
Signed-off-by: Jussi Hallila <jussi@hallila.com>
* Change entity filter to be an actual entity filter instead of a list of kinds or types
* Modify/simplify types a little bit
* Split common type libs to one for node and one isomorphic
* Remove unnecessary items from FactChecker interface to simplify execution loop.
Needs still matching README.md changes.
Signed-off-by: Jussi Hallila <jussi@hallila.com>