@backstage-community/plugin-sonarqube 0.8.0 → 0.8.2
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 +14 -0
- package/README.md +42 -0
- package/alpha/package.json +7 -0
- package/dist/alpha/apis.esm.js +23 -0
- package/dist/alpha/apis.esm.js.map +1 -0
- package/dist/alpha/entityCard.esm.js +16 -0
- package/dist/alpha/entityCard.esm.js.map +1 -0
- package/dist/alpha/entityContent.esm.js +15 -0
- package/dist/alpha/entityContent.esm.js.map +1 -0
- package/dist/alpha/plugin.esm.js +12 -0
- package/dist/alpha/plugin.esm.js.map +1 -0
- package/dist/alpha.d.ts +8 -0
- package/dist/alpha.esm.js +2 -0
- package/dist/alpha.esm.js.map +1 -0
- package/package.json +32 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @backstage-community/plugin-sonarqube
|
|
2
2
|
|
|
3
|
+
## 0.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f257398: adds support for Backstage's new frontend system, available via the `/alpha` sub-path export.
|
|
8
|
+
|
|
9
|
+
## 0.8.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2143e5e: Backstage version bump to v1.30.2
|
|
14
|
+
- Updated dependencies [2143e5e]
|
|
15
|
+
- @backstage-community/plugin-sonarqube-react@0.2.1
|
|
16
|
+
|
|
3
17
|
## 0.8.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -81,6 +81,48 @@ spec:
|
|
|
81
81
|
|
|
82
82
|
`YOUR_INSTANCE_NAME/` is optional and will query the default instance if not provided.
|
|
83
83
|
|
|
84
|
+
### Integrating with `EntityPage` (New Frontend System)
|
|
85
|
+
|
|
86
|
+
Follow this section if you are using Backstage's [new frontend system](https://backstage.io/docs/frontend-system/).
|
|
87
|
+
|
|
88
|
+
1. Import `githubActionsPlugin` in your `App.tsx` and add it to your app's `features` array:
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import sonarQubePlugin from '@backstage-community/plugin-sonarqube/alpha';
|
|
92
|
+
|
|
93
|
+
// ...
|
|
94
|
+
|
|
95
|
+
export const app = createApp({
|
|
96
|
+
features: [
|
|
97
|
+
// ...
|
|
98
|
+
sonarQubePlugin,
|
|
99
|
+
// ...
|
|
100
|
+
],
|
|
101
|
+
});
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. Next, enable your desired extensions in `app-config.yaml`
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
app:
|
|
108
|
+
extensions:
|
|
109
|
+
- entity-content:sonarqube/entity
|
|
110
|
+
- entity-card:sonarqube/card
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
3. Whichever extensions you've enabled should now appear in your entity page.
|
|
114
|
+
|
|
115
|
+
You can also control which [entity kinds](https://backstage.io/docs/features/software-catalog/system-model) the sonarqube card appears on by adding a config underneath the entity-content, like so:
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
# app-config.yaml
|
|
119
|
+
app:
|
|
120
|
+
extensions:
|
|
121
|
+
- entity-content:sonarqube/entity
|
|
122
|
+
config:
|
|
123
|
+
filter: kind:component,system
|
|
124
|
+
```
|
|
125
|
+
|
|
84
126
|
## Links
|
|
85
127
|
|
|
86
128
|
- [Sonarqube Backend](../sonarqube-backend/README.md)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApiBlueprint, createApiFactory } from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { SonarQubeClient } from '../api/SonarQubeClient.esm.js';
|
|
3
|
+
import { sonarQubeApiRef } from '@backstage-community/plugin-sonarqube-react';
|
|
4
|
+
import { discoveryApiRef, identityApiRef } from '@backstage/core-plugin-api';
|
|
5
|
+
|
|
6
|
+
const sonarQubeApi = ApiBlueprint.make({
|
|
7
|
+
params: {
|
|
8
|
+
factory: createApiFactory({
|
|
9
|
+
api: sonarQubeApiRef,
|
|
10
|
+
deps: {
|
|
11
|
+
discoveryApi: discoveryApiRef,
|
|
12
|
+
identityApi: identityApiRef
|
|
13
|
+
},
|
|
14
|
+
factory: ({ discoveryApi, identityApi }) => new SonarQubeClient({
|
|
15
|
+
discoveryApi,
|
|
16
|
+
identityApi
|
|
17
|
+
})
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { sonarQubeApi };
|
|
23
|
+
//# sourceMappingURL=apis.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apis.esm.js","sources":["../../src/alpha/apis.ts"],"sourcesContent":["import { ApiBlueprint, createApiFactory } from '@backstage/frontend-plugin-api';\nimport { SonarQubeClient } from '../api';\nimport { sonarQubeApiRef } from '@backstage-community/plugin-sonarqube-react';\nimport { discoveryApiRef, identityApiRef } from '@backstage/core-plugin-api';\n\n/**\n * @alpha\n */\nexport const sonarQubeApi = ApiBlueprint.make({\n params: {\n factory: createApiFactory({\n api: sonarQubeApiRef,\n deps: {\n discoveryApi: discoveryApiRef,\n identityApi: identityApiRef,\n },\n factory: ({ discoveryApi, identityApi }) =>\n new SonarQubeClient({\n discoveryApi,\n identityApi,\n }),\n }),\n },\n});\n"],"names":[],"mappings":";;;;;AAQa,MAAA,YAAA,GAAe,aAAa,IAAK,CAAA;AAAA,EAC5C,MAAQ,EAAA;AAAA,IACN,SAAS,gBAAiB,CAAA;AAAA,MACxB,GAAK,EAAA,eAAA;AAAA,MACL,IAAM,EAAA;AAAA,QACJ,YAAc,EAAA,eAAA;AAAA,QACd,WAAa,EAAA,cAAA;AAAA,OACf;AAAA,MACA,SAAS,CAAC,EAAE,cAAc,WAAY,EAAA,KACpC,IAAI,eAAgB,CAAA;AAAA,QAClB,YAAA;AAAA,QACA,WAAA;AAAA,OACD,CAAA;AAAA,KACJ,CAAA;AAAA,GACH;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { compatWrapper } from '@backstage/core-compat-api';
|
|
2
|
+
import { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
|
|
5
|
+
const entitySonarQubeCard = EntityCardBlueprint.make({
|
|
6
|
+
name: "card",
|
|
7
|
+
params: {
|
|
8
|
+
filter: "kind:component",
|
|
9
|
+
loader: () => import('../components/SonarQubeCard/index.esm.js').then(
|
|
10
|
+
(m) => compatWrapper(/* @__PURE__ */ React.createElement(m.SonarQubeCard, null))
|
|
11
|
+
)
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export { entitySonarQubeCard };
|
|
16
|
+
//# sourceMappingURL=entityCard.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityCard.esm.js","sources":["../../src/alpha/entityCard.tsx"],"sourcesContent":["import { compatWrapper } from '@backstage/core-compat-api';\nimport { EntityCardBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport React from 'react';\n\n/**\n * @alpha\n */\nexport const entitySonarQubeCard: any = EntityCardBlueprint.make({\n name: 'card',\n params: {\n filter: 'kind:component',\n loader: () =>\n import('../components/SonarQubeCard').then(m =>\n compatWrapper(<m.SonarQubeCard />),\n ),\n },\n});\n"],"names":[],"mappings":";;;;AAOa,MAAA,mBAAA,GAA2B,oBAAoB,IAAK,CAAA;AAAA,EAC/D,IAAM,EAAA,MAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,MAAQ,EAAA,gBAAA;AAAA,IACR,MAAQ,EAAA,MACN,OAAO,0CAA6B,CAAE,CAAA,IAAA;AAAA,MAAK,OACzC,aAAc,iBAAA,KAAA,CAAA,aAAA,CAAC,CAAE,CAAA,aAAA,EAAF,IAAgB,CAAE,CAAA;AAAA,KACnC;AAAA,GACJ;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
|
|
3
|
+
|
|
4
|
+
const entitySonarQubeContent = EntityContentBlueprint.make({
|
|
5
|
+
name: "entity",
|
|
6
|
+
params: {
|
|
7
|
+
defaultPath: "sonarqube",
|
|
8
|
+
defaultTitle: "SonarQube",
|
|
9
|
+
filter: "kind:component",
|
|
10
|
+
loader: () => import('../components/SonarQubeContentPage/index.esm.js').then((m) => /* @__PURE__ */ React.createElement(m.SonarQubeContentPage, null))
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { entitySonarQubeContent };
|
|
15
|
+
//# sourceMappingURL=entityContent.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entityContent.esm.js","sources":["../../src/alpha/entityContent.tsx"],"sourcesContent":["import React from 'react';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\n\n/**\n * @alpha\n */\nexport const entitySonarQubeContent = EntityContentBlueprint.make({\n name: 'entity',\n params: {\n defaultPath: 'sonarqube',\n defaultTitle: 'SonarQube',\n filter: 'kind:component',\n loader: () =>\n import('../components/SonarQubeContentPage').then(m => (\n <m.SonarQubeContentPage />\n )),\n },\n});\n"],"names":[],"mappings":";;;AAMa,MAAA,sBAAA,GAAyB,uBAAuB,IAAK,CAAA;AAAA,EAChE,IAAM,EAAA,QAAA;AAAA,EACN,MAAQ,EAAA;AAAA,IACN,WAAa,EAAA,WAAA;AAAA,IACb,YAAc,EAAA,WAAA;AAAA,IACd,MAAQ,EAAA,gBAAA;AAAA,IACR,MAAA,EAAQ,MACN,OAAO,iDAAoC,CAAA,CAAE,IAAK,CAAA,CAAA,CAAA,qBAC/C,KAAA,CAAA,aAAA,CAAA,CAAA,CAAE,oBAAF,EAAA,IAAuB,CACzB,CAAA;AAAA,GACL;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
|
|
2
|
+
import { entitySonarQubeCard } from './entityCard.esm.js';
|
|
3
|
+
import { sonarQubeApi } from './apis.esm.js';
|
|
4
|
+
import { entitySonarQubeContent } from './entityContent.esm.js';
|
|
5
|
+
|
|
6
|
+
var plugin = createFrontendPlugin({
|
|
7
|
+
id: "sonarqube",
|
|
8
|
+
extensions: [sonarQubeApi, entitySonarQubeCard, entitySonarQubeContent]
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { plugin as default };
|
|
12
|
+
//# sourceMappingURL=plugin.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.esm.js","sources":["../../src/alpha/plugin.tsx"],"sourcesContent":["import { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { entitySonarQubeCard } from './entityCard';\nimport { sonarQubeApi } from './apis';\nimport { entitySonarQubeContent } from './entityContent';\n\n/**\n * @alpha\n */\nexport default createFrontendPlugin({\n id: 'sonarqube',\n extensions: [sonarQubeApi, entitySonarQubeCard, entitySonarQubeContent],\n});\n"],"names":[],"mappings":";;;;;AAQA,aAAe,oBAAqB,CAAA;AAAA,EAClC,EAAI,EAAA,WAAA;AAAA,EACJ,UAAY,EAAA,CAAC,YAAc,EAAA,mBAAA,EAAqB,sBAAsB,CAAA;AACxE,CAAC,CAAA;;;;"}
|
package/dist/alpha.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alpha.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage-community/plugin-sonarqube",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "frontend-plugin",
|
|
@@ -11,10 +11,21 @@
|
|
|
11
11
|
"@backstage-community/plugin-sonarqube-react"
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"import": "./dist/index.esm.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"default": "./dist/index.esm.js"
|
|
19
|
+
},
|
|
20
|
+
"./alpha": {
|
|
21
|
+
"import": "./dist/alpha.esm.js",
|
|
22
|
+
"types": "./dist/alpha.d.ts",
|
|
23
|
+
"default": "./dist/alpha.esm.js"
|
|
24
|
+
},
|
|
25
|
+
"./package.json": "./package.json"
|
|
26
|
+
},
|
|
14
27
|
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
"main": "dist/index.esm.js",
|
|
17
|
-
"types": "dist/index.d.ts"
|
|
28
|
+
"access": "public"
|
|
18
29
|
},
|
|
19
30
|
"keywords": [
|
|
20
31
|
"backstage",
|
|
@@ -29,8 +40,8 @@
|
|
|
29
40
|
},
|
|
30
41
|
"license": "Apache-2.0",
|
|
31
42
|
"sideEffects": false,
|
|
32
|
-
"main": "dist/index.esm.js",
|
|
33
|
-
"types": "dist/index.d.ts",
|
|
43
|
+
"main": "./dist/index.esm.js",
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
34
45
|
"files": [
|
|
35
46
|
"dist",
|
|
36
47
|
"alpha",
|
|
@@ -46,11 +57,14 @@
|
|
|
46
57
|
"test": "backstage-cli package test"
|
|
47
58
|
},
|
|
48
59
|
"dependencies": {
|
|
49
|
-
"@backstage-community/plugin-sonarqube-react": "^0.2.
|
|
50
|
-
"@backstage/catalog-model": "^1.
|
|
51
|
-
"@backstage/core-
|
|
60
|
+
"@backstage-community/plugin-sonarqube-react": "^0.2.1",
|
|
61
|
+
"@backstage/catalog-model": "^1.6.0",
|
|
62
|
+
"@backstage/core-compat-api": "^0.2.8",
|
|
63
|
+
"@backstage/core-components": "^0.14.10",
|
|
52
64
|
"@backstage/core-plugin-api": "^1.9.3",
|
|
53
|
-
"@backstage/
|
|
65
|
+
"@backstage/frontend-app-api": "^0.8.0",
|
|
66
|
+
"@backstage/frontend-plugin-api": "^0.7.0",
|
|
67
|
+
"@backstage/plugin-catalog-react": "^1.12.3",
|
|
54
68
|
"@material-ui/core": "^4.12.2",
|
|
55
69
|
"@material-ui/icons": "^4.9.1",
|
|
56
70
|
"@material-ui/styles": "^4.10.0",
|
|
@@ -61,10 +75,11 @@
|
|
|
61
75
|
"react-use": "^17.2.4"
|
|
62
76
|
},
|
|
63
77
|
"devDependencies": {
|
|
64
|
-
"@backstage/cli": "^0.
|
|
65
|
-
"@backstage/core-app-api": "^1.14.
|
|
66
|
-
"@backstage/dev-utils": "^1.0.
|
|
67
|
-
"@backstage/test-utils": "^1.
|
|
78
|
+
"@backstage/cli": "^0.27.0",
|
|
79
|
+
"@backstage/core-app-api": "^1.14.2",
|
|
80
|
+
"@backstage/dev-utils": "^1.0.37",
|
|
81
|
+
"@backstage/frontend-test-utils": "^0.1.12",
|
|
82
|
+
"@backstage/test-utils": "^1.5.10",
|
|
68
83
|
"@testing-library/dom": "^10.0.0",
|
|
69
84
|
"@testing-library/jest-dom": "^6.0.0",
|
|
70
85
|
"@testing-library/react": "^15.0.0",
|
|
@@ -75,6 +90,9 @@
|
|
|
75
90
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
76
91
|
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
|
77
92
|
},
|
|
93
|
+
"resolutions": {
|
|
94
|
+
"@microsoft/api-extractor": "7.36.4"
|
|
95
|
+
},
|
|
78
96
|
"peerDependencies": {
|
|
79
97
|
"react": "^16.13.1 || ^17.0.0 || ^18.0.0",
|
|
80
98
|
"react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
|