@red-hat-developer-hub/backstage-plugin-scorecard 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @red-hat-developer-hub/backstage-plugin-scorecard
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 5d447f1: **BREAKING**: The `supportsEntity` function has been replaced with `getCatalogFilter` for `MetricProvider`. The new function returns a catalog filter instead of taking an entity parameter and returning a boolean. This allows the plugin to query the catalog for entities that support the metric provider.
|
|
8
|
+
|
|
9
|
+
These changes are **required** to your `MyMetricProvider`:
|
|
10
|
+
|
|
11
|
+
```diff
|
|
12
|
+
export class MyMetricProvider implements MetricProvider {
|
|
13
|
+
|
|
14
|
+
- supportsEntity(entity: Entity): boolean {
|
|
15
|
+
- return entity.metadata.annotations?.['my/annotation'] !== undefined;
|
|
16
|
+
- }
|
|
17
|
+
+ getCatalogFilter(): Record<string, string | symbol | (string | symbol)[]> {
|
|
18
|
+
+ return {
|
|
19
|
+
+ 'metadata.annotations.my/annotation': CATALOG_FILTER_EXISTS,
|
|
20
|
+
+ };
|
|
21
|
+
+ }
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Implemented database support. Implemented scheduler to fetch metrics by provider and to cleanup outdated metrics from database.
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- @red-hat-developer-hub/backstage-plugin-scorecard-common@2.0.0
|
|
29
|
+
|
|
3
30
|
## 1.0.0
|
|
4
31
|
|
|
5
32
|
### Major Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@red-hat-developer-hub/backstage-plugin-scorecard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@backstage/theme": "^0.6.8",
|
|
64
64
|
"@mui/icons-material": "5.18.0",
|
|
65
65
|
"@mui/material": "5.18.0",
|
|
66
|
-
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^
|
|
66
|
+
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "^2.0.0",
|
|
67
67
|
"react-use": "^17.2.4"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|