@backstage-community/plugin-sonarqube 0.16.1 → 0.17.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
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @backstage-community/plugin-sonarqube
|
|
2
2
|
|
|
3
|
+
## 0.17.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6d6b976: Backstage version bump to v1.41.1
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [6d6b976]
|
|
12
|
+
- @backstage-community/plugin-sonarqube-react@0.9.0
|
|
13
|
+
|
|
14
|
+
## 0.16.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 1eda234: Fix maximum update depth exceeded in SonarqubeRelatedEntitiesOverview
|
|
19
|
+
|
|
3
20
|
## 0.16.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
package/dist/components/SonarQubeRelatedEntitiesOverview/SonarQubeRelatedEntitiesOverview.esm.js
CHANGED
|
@@ -12,7 +12,7 @@ const SonarQubeRelatedEntitiesOverview = (props) => {
|
|
|
12
12
|
const sonarQubeApi = useApi(sonarQubeApiRef);
|
|
13
13
|
const { entity: parentEntity } = useEntity();
|
|
14
14
|
const {
|
|
15
|
-
entities
|
|
15
|
+
entities,
|
|
16
16
|
loading: loadingEntities,
|
|
17
17
|
error: errorEntities
|
|
18
18
|
} = useRelatedEntities(parentEntity, {
|
|
@@ -21,7 +21,7 @@ const SonarQubeRelatedEntitiesOverview = (props) => {
|
|
|
21
21
|
});
|
|
22
22
|
const findingsRequest = [];
|
|
23
23
|
const entityNameToProjectKey = {};
|
|
24
|
-
for (const entity of entities) {
|
|
24
|
+
for (const entity of entities || []) {
|
|
25
25
|
const { projectKey, projectInstance } = getProjectInfo(entity);
|
|
26
26
|
if (projectKey) {
|
|
27
27
|
entityNameToProjectKey[entity.metadata.name] = projectKey;
|
|
@@ -43,7 +43,7 @@ const SonarQubeRelatedEntitiesOverview = (props) => {
|
|
|
43
43
|
if (error) {
|
|
44
44
|
return /* @__PURE__ */ jsx(ResponseErrorPanel, { error });
|
|
45
45
|
}
|
|
46
|
-
const tableContent = entities
|
|
46
|
+
const tableContent = entities?.map((entity) => {
|
|
47
47
|
const projectKey = entityNameToProjectKey[entity.metadata.name];
|
|
48
48
|
return {
|
|
49
49
|
id: projectKey || entity.metadata.name,
|
package/dist/components/SonarQubeRelatedEntitiesOverview/SonarQubeRelatedEntitiesOverview.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SonarQubeRelatedEntitiesOverview.esm.js","sources":["../../../src/components/SonarQubeRelatedEntitiesOverview/SonarQubeRelatedEntitiesOverview.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport useAsync from 'react-use/esm/useAsync';\nimport { useEntity, useRelatedEntities } from '@backstage/plugin-catalog-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress, ResponseErrorPanel } from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport {\n sonarQubeApiRef,\n getProjectInfo,\n} from '@backstage-community/plugin-sonarqube-react';\nimport { SonarQubeTable } from '../index.ts';\n\n/**\n * @public\n */\nexport type SonarOverviewProps = {\n relationType: string;\n entityKind: string;\n};\n\n/**\n * @public\n */\nexport const SonarQubeRelatedEntitiesOverview = (props: SonarOverviewProps) => {\n const sonarQubeApi = useApi(sonarQubeApiRef);\n const { entity: parentEntity } = useEntity();\n const {\n entities
|
|
1
|
+
{"version":3,"file":"SonarQubeRelatedEntitiesOverview.esm.js","sources":["../../../src/components/SonarQubeRelatedEntitiesOverview/SonarQubeRelatedEntitiesOverview.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport useAsync from 'react-use/esm/useAsync';\nimport { useEntity, useRelatedEntities } from '@backstage/plugin-catalog-react';\nimport { useApi } from '@backstage/core-plugin-api';\nimport { Progress, ResponseErrorPanel } from '@backstage/core-components';\nimport { stringifyEntityRef } from '@backstage/catalog-model';\nimport {\n sonarQubeApiRef,\n getProjectInfo,\n} from '@backstage-community/plugin-sonarqube-react';\nimport { SonarQubeTable } from '../index.ts';\n\n/**\n * @public\n */\nexport type SonarOverviewProps = {\n relationType: string;\n entityKind: string;\n};\n\n/**\n * @public\n */\nexport const SonarQubeRelatedEntitiesOverview = (props: SonarOverviewProps) => {\n const sonarQubeApi = useApi(sonarQubeApiRef);\n const { entity: parentEntity } = useEntity();\n const {\n entities,\n loading: loadingEntities,\n error: errorEntities,\n } = useRelatedEntities(parentEntity, {\n type: props.relationType,\n kind: props.entityKind,\n });\n\n const findingsRequest: Array<{\n projectInstance: string | undefined;\n componentKey: string;\n }> = [];\n\n const entityNameToProjectKey: { [key: string]: string } = {};\n\n for (const entity of entities || []) {\n const { projectKey, projectInstance } = getProjectInfo(entity);\n if (projectKey) {\n entityNameToProjectKey[entity.metadata.name] = projectKey;\n findingsRequest.push({ componentKey: projectKey, projectInstance });\n }\n }\n const {\n value: findingResults,\n loading: loadingFindings,\n error: errorFindings,\n } = useAsync(\n async () => sonarQubeApi.getFindingSummaries(findingsRequest),\n [sonarQubeApi, entities],\n );\n\n if (loadingEntities || loadingFindings) {\n return <Progress />;\n }\n const error = errorEntities || errorFindings;\n if (error) {\n return <ResponseErrorPanel error={error} />;\n }\n\n const tableContent: any[] | undefined = entities?.map(entity => {\n const projectKey = entityNameToProjectKey[entity.metadata.name];\n return {\n id: projectKey || entity.metadata.name,\n resolved: {\n entityRef: stringifyEntityRef(entity),\n name: entity.metadata.name,\n findings: findingResults?.get(projectKey),\n isSonarQubeAnnotationEnabled: !!projectKey,\n },\n };\n });\n\n return <SonarQubeTable tableContent={tableContent} />;\n};\n"],"names":[],"mappings":";;;;;;;;;;AAqCa,MAAA,gCAAA,GAAmC,CAAC,KAA8B,KAAA;AAC7E,EAAM,MAAA,YAAA,GAAe,OAAO,eAAe,CAAA;AAC3C,EAAA,MAAM,EAAE,MAAA,EAAQ,YAAa,EAAA,GAAI,SAAU,EAAA;AAC3C,EAAM,MAAA;AAAA,IACJ,QAAA;AAAA,IACA,OAAS,EAAA,eAAA;AAAA,IACT,KAAO,EAAA;AAAA,GACT,GAAI,mBAAmB,YAAc,EAAA;AAAA,IACnC,MAAM,KAAM,CAAA,YAAA;AAAA,IACZ,MAAM,KAAM,CAAA;AAAA,GACb,CAAA;AAED,EAAA,MAAM,kBAGD,EAAC;AAEN,EAAA,MAAM,yBAAoD,EAAC;AAE3D,EAAW,KAAA,MAAA,MAAA,IAAU,QAAY,IAAA,EAAI,EAAA;AACnC,IAAA,MAAM,EAAE,UAAA,EAAY,eAAgB,EAAA,GAAI,eAAe,MAAM,CAAA;AAC7D,IAAA,IAAI,UAAY,EAAA;AACd,MAAuB,sBAAA,CAAA,MAAA,CAAO,QAAS,CAAA,IAAI,CAAI,GAAA,UAAA;AAC/C,MAAA,eAAA,CAAgB,IAAK,CAAA,EAAE,YAAc,EAAA,UAAA,EAAY,iBAAiB,CAAA;AAAA;AACpE;AAEF,EAAM,MAAA;AAAA,IACJ,KAAO,EAAA,cAAA;AAAA,IACP,OAAS,EAAA,eAAA;AAAA,IACT,KAAO,EAAA;AAAA,GACL,GAAA,QAAA;AAAA,IACF,YAAY,YAAa,CAAA,mBAAA,CAAoB,eAAe,CAAA;AAAA,IAC5D,CAAC,cAAc,QAAQ;AAAA,GACzB;AAEA,EAAA,IAAI,mBAAmB,eAAiB,EAAA;AACtC,IAAA,2BAAQ,QAAS,EAAA,EAAA,CAAA;AAAA;AAEnB,EAAA,MAAM,QAAQ,aAAiB,IAAA,aAAA;AAC/B,EAAA,IAAI,KAAO,EAAA;AACT,IAAO,uBAAA,GAAA,CAAC,sBAAmB,KAAc,EAAA,CAAA;AAAA;AAG3C,EAAM,MAAA,YAAA,GAAkC,QAAU,EAAA,GAAA,CAAI,CAAU,MAAA,KAAA;AAC9D,IAAA,MAAM,UAAa,GAAA,sBAAA,CAAuB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA;AAC9D,IAAO,OAAA;AAAA,MACL,EAAA,EAAI,UAAc,IAAA,MAAA,CAAO,QAAS,CAAA,IAAA;AAAA,MAClC,QAAU,EAAA;AAAA,QACR,SAAA,EAAW,mBAAmB,MAAM,CAAA;AAAA,QACpC,IAAA,EAAM,OAAO,QAAS,CAAA,IAAA;AAAA,QACtB,QAAA,EAAU,cAAgB,EAAA,GAAA,CAAI,UAAU,CAAA;AAAA,QACxC,4BAAA,EAA8B,CAAC,CAAC;AAAA;AAClC,KACF;AAAA,GACD,CAAA;AAED,EAAO,uBAAA,GAAA,CAAC,kBAAe,YAA4B,EAAA,CAAA;AACrD;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-sonarqube",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -71,14 +71,14 @@
|
|
|
71
71
|
"test": "backstage-cli package test"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@backstage-community/plugin-sonarqube-react": "^0.
|
|
75
|
-
"@backstage/catalog-model": "^1.7.
|
|
76
|
-
"@backstage/core-compat-api": "^0.4.
|
|
77
|
-
"@backstage/core-components": "^0.17.
|
|
78
|
-
"@backstage/core-plugin-api": "^1.10.
|
|
79
|
-
"@backstage/frontend-app-api": "^0.11.
|
|
80
|
-
"@backstage/frontend-plugin-api": "^0.10.
|
|
81
|
-
"@backstage/plugin-catalog-react": "^1.19.
|
|
74
|
+
"@backstage-community/plugin-sonarqube-react": "^0.9.0",
|
|
75
|
+
"@backstage/catalog-model": "^1.7.5",
|
|
76
|
+
"@backstage/core-compat-api": "^0.4.4",
|
|
77
|
+
"@backstage/core-components": "^0.17.4",
|
|
78
|
+
"@backstage/core-plugin-api": "^1.10.9",
|
|
79
|
+
"@backstage/frontend-app-api": "^0.11.4",
|
|
80
|
+
"@backstage/frontend-plugin-api": "^0.10.4",
|
|
81
|
+
"@backstage/plugin-catalog-react": "^1.19.1",
|
|
82
82
|
"@material-ui/core": "^4.12.2",
|
|
83
83
|
"@material-ui/icons": "^4.9.1",
|
|
84
84
|
"@material-ui/styles": "^4.10.0",
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
"react-use": "^17.2.4"
|
|
90
90
|
},
|
|
91
91
|
"devDependencies": {
|
|
92
|
-
"@backstage/cli": "^0.33.
|
|
93
|
-
"@backstage/core-app-api": "^1.
|
|
94
|
-
"@backstage/dev-utils": "^1.1.
|
|
95
|
-
"@backstage/frontend-test-utils": "^0.3.
|
|
96
|
-
"@backstage/test-utils": "^1.7.
|
|
92
|
+
"@backstage/cli": "^0.33.1",
|
|
93
|
+
"@backstage/core-app-api": "^1.18.0",
|
|
94
|
+
"@backstage/dev-utils": "^1.1.12",
|
|
95
|
+
"@backstage/frontend-test-utils": "^0.3.4",
|
|
96
|
+
"@backstage/test-utils": "^1.7.10",
|
|
97
97
|
"@testing-library/dom": "^10.0.0",
|
|
98
98
|
"@testing-library/jest-dom": "^6.0.0",
|
|
99
99
|
"@testing-library/react": "^15.0.0",
|