@backstage-community/plugin-tech-insights 0.3.27

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.
@@ -0,0 +1,150 @@
1
+ import { createRouteRef, createApiRef, createPlugin, createApiFactory, discoveryApiRef, identityApiRef, createRoutableExtension } from '@backstage/core-plugin-api';
2
+ import { ResponseError } from '@backstage/errors';
3
+ import { stringifyEntityRef } from '@backstage/catalog-model';
4
+ import React from 'react';
5
+ import CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';
6
+ import ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';
7
+ import qs from 'qs';
8
+
9
+ const rootRouteRef = createRouteRef({
10
+ id: "tech-insights"
11
+ });
12
+
13
+ const techInsightsApiRef = createApiRef({
14
+ id: "plugin.techinsights.service"
15
+ });
16
+
17
+ const BooleanCheck = (props) => {
18
+ return !!props.checkResult.result ? /* @__PURE__ */ React.createElement(CheckCircleOutline, { color: "primary" }) : /* @__PURE__ */ React.createElement(ErrorOutlineIcon, { color: "error" });
19
+ };
20
+ const isBooleanCheckFailed = (checkResult) => !checkResult.result;
21
+
22
+ const jsonRulesEngineCheckResultRenderer = {
23
+ type: "json-rules-engine",
24
+ component: (checkResult) => /* @__PURE__ */ React.createElement(BooleanCheck, { checkResult }),
25
+ isFailed: isBooleanCheckFailed
26
+ };
27
+
28
+ var __defProp = Object.defineProperty;
29
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30
+ var __publicField = (obj, key, value) => {
31
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ return value;
33
+ };
34
+ class TechInsightsClient {
35
+ constructor(options) {
36
+ __publicField(this, "discoveryApi");
37
+ __publicField(this, "identityApi");
38
+ __publicField(this, "renderers");
39
+ this.discoveryApi = options.discoveryApi;
40
+ this.identityApi = options.identityApi;
41
+ this.renderers = options.renderers;
42
+ }
43
+ async getFacts(entity, facts) {
44
+ const query = qs.stringify({
45
+ entity: stringifyEntityRef(entity),
46
+ ids: facts
47
+ });
48
+ return await this.api(`/facts/latest?${query}`);
49
+ }
50
+ getCheckResultRenderers(types) {
51
+ var _a;
52
+ const renderers = (_a = this.renderers) != null ? _a : [jsonRulesEngineCheckResultRenderer];
53
+ return renderers.filter((d) => types.includes(d.type));
54
+ }
55
+ async getAllChecks() {
56
+ return this.api("/checks");
57
+ }
58
+ async getFactSchemas() {
59
+ return this.api("/fact-schemas");
60
+ }
61
+ async runChecks(entityParams, checks) {
62
+ const { namespace, kind, name } = entityParams;
63
+ const requestBody = { checks };
64
+ return this.api(
65
+ `/checks/run/${encodeURIComponent(namespace)}/${encodeURIComponent(
66
+ kind
67
+ )}/${encodeURIComponent(name)}`,
68
+ {
69
+ method: "POST",
70
+ body: JSON.stringify(requestBody)
71
+ }
72
+ );
73
+ }
74
+ async runBulkChecks(entities, checks) {
75
+ const checkIds = checks ? checks.map((check) => check.id) : [];
76
+ const requestBody = {
77
+ entities,
78
+ checks: checkIds.length > 0 ? checkIds : void 0
79
+ };
80
+ return this.api("/checks/run", {
81
+ method: "POST",
82
+ body: JSON.stringify(requestBody)
83
+ });
84
+ }
85
+ async api(path, init) {
86
+ const url = await this.discoveryApi.getBaseUrl("tech-insights");
87
+ const { token } = await this.identityApi.getCredentials();
88
+ const headers = new Headers(init == null ? void 0 : init.headers);
89
+ if (!headers.has("content-type"))
90
+ headers.set("content-type", "application/json");
91
+ if (token && !headers.has("authorization")) {
92
+ headers.set("authorization", `Bearer ${token}`);
93
+ }
94
+ const request = new Request(`${url}${path}`, {
95
+ ...init,
96
+ headers
97
+ });
98
+ return fetch(request).then(async (response) => {
99
+ if (!response.ok) {
100
+ throw await ResponseError.fromResponse(response);
101
+ }
102
+ return response.json();
103
+ });
104
+ }
105
+ }
106
+
107
+ const techInsightsPlugin = createPlugin({
108
+ id: "tech-insights",
109
+ apis: [
110
+ createApiFactory({
111
+ api: techInsightsApiRef,
112
+ deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },
113
+ factory: ({ discoveryApi, identityApi }) => new TechInsightsClient({ discoveryApi, identityApi })
114
+ })
115
+ ],
116
+ routes: {
117
+ root: rootRouteRef
118
+ }
119
+ });
120
+ const ScorecardInfo = techInsightsPlugin.provide(
121
+ createRoutableExtension({
122
+ name: "ScorecardInfo",
123
+ component: () => import('./esm/index-B0n7xKVB.esm.js').then((m) => m.ScorecardInfo),
124
+ mountPoint: rootRouteRef
125
+ })
126
+ );
127
+ const ScorecardsList = techInsightsPlugin.provide(
128
+ createRoutableExtension({
129
+ name: "ScorecardsList",
130
+ component: () => import('./esm/index-B5eokOBn.esm.js').then((m) => m.ScorecardsList),
131
+ mountPoint: rootRouteRef
132
+ })
133
+ );
134
+ const EntityTechInsightsScorecardContent = techInsightsPlugin.provide(
135
+ createRoutableExtension({
136
+ name: "EntityTechInsightsScorecardContent",
137
+ component: () => import('./esm/index-DYpZtEuv.esm.js').then((m) => m.ScorecardsContent),
138
+ mountPoint: rootRouteRef
139
+ })
140
+ );
141
+ const EntityTechInsightsScorecardCard = techInsightsPlugin.provide(
142
+ createRoutableExtension({
143
+ name: "EntityTechInsightsScorecardCard",
144
+ component: () => import('./esm/index-Dk00aaon.esm.js').then((m) => m.ScorecardsCard),
145
+ mountPoint: rootRouteRef
146
+ })
147
+ );
148
+
149
+ export { BooleanCheck, EntityTechInsightsScorecardCard, EntityTechInsightsScorecardContent, ScorecardInfo, ScorecardsList, TechInsightsClient, jsonRulesEngineCheckResultRenderer, techInsightsApiRef, techInsightsPlugin };
150
+ //# sourceMappingURL=index.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.esm.js","sources":["../src/routes.ts","../src/api/TechInsightsApi.ts","../src/components/BooleanCheck/BooleanCheck.tsx","../src/components/CheckResultRenderer.tsx","../src/api/TechInsightsClient.ts","../src/plugin.ts"],"sourcesContent":["/*\n * Copyright 2021 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 { createRouteRef } from '@backstage/core-plugin-api';\n\nexport const rootRouteRef = createRouteRef({\n id: 'tech-insights',\n});\n","/*\n * Copyright 2021 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 */\n\nimport { createApiRef } from '@backstage/core-plugin-api';\nimport {\n CheckResult,\n BulkCheckResponse,\n FactSchema,\n} from '@backstage-community/plugin-tech-insights-common';\nimport { Check, InsightFacts } from './types';\nimport { CheckResultRenderer } from '../components/CheckResultRenderer';\nimport { CompoundEntityRef } from '@backstage/catalog-model';\n\n/**\n * {@link @backstage/core-plugin-api#ApiRef} for the {@link TechInsightsApi}\n *\n * @public\n */\nexport const techInsightsApiRef = createApiRef<TechInsightsApi>({\n id: 'plugin.techinsights.service',\n});\n\n/**\n * API client interface for the Tech Insights plugin\n *\n * @public\n */\nexport interface TechInsightsApi {\n getCheckResultRenderers: (types: string[]) => CheckResultRenderer[];\n getAllChecks(): Promise<Check[]>;\n runChecks(\n entityParams: CompoundEntityRef,\n checks?: string[],\n ): Promise<CheckResult[]>;\n runBulkChecks(\n entities: CompoundEntityRef[],\n checks?: Check[],\n ): Promise<BulkCheckResponse>;\n getFacts(entity: CompoundEntityRef, facts: string[]): Promise<InsightFacts>;\n getFactSchemas(): Promise<FactSchema[]>;\n}\n","/*\n * Copyright 2021 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 */\n\nimport React from 'react';\nimport CheckCircleOutline from '@material-ui/icons/CheckCircleOutline';\nimport ErrorOutlineIcon from '@material-ui/icons/ErrorOutline';\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\n\n/**\n * @public\n */\nexport const BooleanCheck = (props: { checkResult: CheckResult }) => {\n return !!props.checkResult.result ? (\n <CheckCircleOutline color=\"primary\" />\n ) : (\n <ErrorOutlineIcon color=\"error\" />\n );\n};\n\n/**\n * @public\n */\nexport const isBooleanCheckFailed = (checkResult: CheckResult) =>\n !checkResult.result;\n","/*\n * Copyright 2022 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 */\n\nimport { CheckResult } from '@backstage-community/plugin-tech-insights-common';\nimport React from 'react';\nimport { BooleanCheck, isBooleanCheckFailed } from './BooleanCheck';\n\n/**\n * Defines a react component that is responsible for rendering a result of a given type.\n *\n * @public\n */\nexport type CheckResultRenderer = {\n type: string;\n component: (check: CheckResult) => React.ReactElement;\n description?: (check: CheckResult) => string | React.ReactElement;\n isFailed?: (check: CheckResult) => boolean;\n};\n\n/**\n * Default renderer for json-rules-engine check results.\n *\n * @public\n */\nexport const jsonRulesEngineCheckResultRenderer: CheckResultRenderer = {\n type: 'json-rules-engine',\n component: (checkResult: CheckResult) => (\n <BooleanCheck checkResult={checkResult} />\n ),\n isFailed: isBooleanCheckFailed,\n};\n","/*\n * Copyright 2021 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 */\n\nimport { TechInsightsApi } from './TechInsightsApi';\nimport {\n BulkCheckResponse,\n CheckResult,\n FactSchema,\n} from '@backstage-community/plugin-tech-insights-common';\nimport { Check, InsightFacts } from './types';\nimport { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';\nimport { ResponseError } from '@backstage/errors';\nimport {\n CompoundEntityRef,\n stringifyEntityRef,\n} from '@backstage/catalog-model';\n\nimport {\n CheckResultRenderer,\n jsonRulesEngineCheckResultRenderer,\n} from '../components/CheckResultRenderer';\nimport qs from 'qs';\n\n/** @public */\nexport class TechInsightsClient implements TechInsightsApi {\n private readonly discoveryApi: DiscoveryApi;\n private readonly identityApi: IdentityApi;\n private readonly renderers?: CheckResultRenderer[];\n\n constructor(options: {\n discoveryApi: DiscoveryApi;\n identityApi: IdentityApi;\n renderers?: CheckResultRenderer[];\n }) {\n this.discoveryApi = options.discoveryApi;\n this.identityApi = options.identityApi;\n this.renderers = options.renderers;\n }\n\n async getFacts(\n entity: CompoundEntityRef,\n facts: string[],\n ): Promise<InsightFacts> {\n const query = qs.stringify({\n entity: stringifyEntityRef(entity),\n ids: facts,\n });\n return await this.api<InsightFacts>(`/facts/latest?${query}`);\n }\n\n getCheckResultRenderers(types: string[]): CheckResultRenderer[] {\n const renderers = this.renderers ?? [jsonRulesEngineCheckResultRenderer];\n return renderers.filter(d => types.includes(d.type));\n }\n\n async getAllChecks(): Promise<Check[]> {\n return this.api('/checks');\n }\n\n async getFactSchemas(): Promise<FactSchema[]> {\n return this.api('/fact-schemas');\n }\n\n async runChecks(\n entityParams: CompoundEntityRef,\n checks?: string[],\n ): Promise<CheckResult[]> {\n const { namespace, kind, name } = entityParams;\n const requestBody = { checks };\n return this.api(\n `/checks/run/${encodeURIComponent(namespace)}/${encodeURIComponent(\n kind,\n )}/${encodeURIComponent(name)}`,\n {\n method: 'POST',\n body: JSON.stringify(requestBody),\n },\n );\n }\n\n async runBulkChecks(\n entities: CompoundEntityRef[],\n checks?: Check[],\n ): Promise<BulkCheckResponse> {\n const checkIds = checks ? checks.map(check => check.id) : [];\n const requestBody = {\n entities,\n checks: checkIds.length > 0 ? checkIds : undefined,\n };\n return this.api('/checks/run', {\n method: 'POST',\n body: JSON.stringify(requestBody),\n });\n }\n\n private async api<T>(path: string, init?: RequestInit): Promise<T> {\n const url = await this.discoveryApi.getBaseUrl('tech-insights');\n const { token } = await this.identityApi.getCredentials();\n\n const headers: HeadersInit = new Headers(init?.headers);\n if (!headers.has('content-type'))\n headers.set('content-type', 'application/json');\n if (token && !headers.has('authorization')) {\n headers.set('authorization', `Bearer ${token}`);\n }\n\n const request = new Request(`${url}${path}`, {\n ...init,\n headers,\n });\n\n return fetch(request).then(async response => {\n if (!response.ok) {\n throw await ResponseError.fromResponse(response);\n }\n return response.json() as Promise<T>;\n });\n }\n}\n","/*\n * Copyright 2021 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 {\n createPlugin,\n createRoutableExtension,\n createApiFactory,\n discoveryApiRef,\n identityApiRef,\n} from '@backstage/core-plugin-api';\nimport { rootRouteRef } from './routes';\nimport { techInsightsApiRef } from './api/TechInsightsApi';\nimport { TechInsightsClient } from './api/TechInsightsClient';\n\n/**\n * @public\n */\nexport const techInsightsPlugin = createPlugin({\n id: 'tech-insights',\n apis: [\n createApiFactory({\n api: techInsightsApiRef,\n deps: { discoveryApi: discoveryApiRef, identityApi: identityApiRef },\n factory: ({ discoveryApi, identityApi }) =>\n new TechInsightsClient({ discoveryApi, identityApi }),\n }),\n ],\n routes: {\n root: rootRouteRef,\n },\n});\n\n/**\n * @public\n */\nexport const ScorecardInfo = techInsightsPlugin.provide(\n createRoutableExtension({\n name: 'ScorecardInfo',\n component: () =>\n import('./components/ScorecardsInfo').then(m => m.ScorecardInfo),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * @public\n */\nexport const ScorecardsList = techInsightsPlugin.provide(\n createRoutableExtension({\n name: 'ScorecardsList',\n component: () =>\n import('./components/ScorecardsList').then(m => m.ScorecardsList),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * @public\n */\nexport const EntityTechInsightsScorecardContent = techInsightsPlugin.provide(\n createRoutableExtension({\n name: 'EntityTechInsightsScorecardContent',\n component: () =>\n import('./components/ScorecardsContent').then(m => m.ScorecardsContent),\n mountPoint: rootRouteRef,\n }),\n);\n\n/**\n * @public\n */\nexport const EntityTechInsightsScorecardCard = techInsightsPlugin.provide(\n createRoutableExtension({\n name: 'EntityTechInsightsScorecardCard',\n component: () =>\n import('./components/ScorecardsCard').then(m => m.ScorecardsCard),\n mountPoint: rootRouteRef,\n }),\n);\n"],"names":[],"mappings":";;;;;;;;AAiBO,MAAM,eAAe,cAAe,CAAA;AAAA,EACzC,EAAI,EAAA,eAAA;AACN,CAAC,CAAA;;ACYM,MAAM,qBAAqB,YAA8B,CAAA;AAAA,EAC9D,EAAI,EAAA,6BAAA;AACN,CAAC;;ACTY,MAAA,Y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,oCAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6BAAgC,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,iBAAiB,CAAA;AAAA,IACxE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH,EAAA;AAKO,MAAM,kCAAkC,kBAAmB,CAAA,OAAA;AAAA,EAChE,uBAAwB,CAAA;AAAA,IACtB,IAAM,EAAA,iCAAA;AAAA,IACN,SAAA,EAAW,MACT,OAAO,6BAA6B,EAAE,IAAK,CAAA,CAAA,CAAA,KAAK,EAAE,cAAc,CAAA;AAAA,IAClE,UAAY,EAAA,YAAA;AAAA,GACb,CAAA;AACH;;;;"}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@backstage-community/plugin-tech-insights",
3
+ "version": "0.3.27",
4
+ "backstage": {
5
+ "role": "frontend-plugin"
6
+ },
7
+ "publishConfig": {
8
+ "access": "public",
9
+ "main": "dist/index.esm.js",
10
+ "types": "dist/index.d.ts"
11
+ },
12
+ "homepage": "https://backstage.io",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/backstage/community-plugins",
16
+ "directory": "workspaces/tech-insights/plugins/tech-insights"
17
+ },
18
+ "license": "Apache-2.0",
19
+ "sideEffects": false,
20
+ "main": "dist/index.esm.js",
21
+ "types": "dist/index.d.ts",
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "build": "backstage-cli package build",
27
+ "clean": "backstage-cli package clean",
28
+ "lint": "backstage-cli package lint",
29
+ "prepack": "backstage-cli package prepack",
30
+ "postpack": "backstage-cli package postpack",
31
+ "start": "backstage-cli package start",
32
+ "test": "backstage-cli package test"
33
+ },
34
+ "dependencies": {
35
+ "@backstage-community/plugin-tech-insights-common": "^0.2.13",
36
+ "@backstage/catalog-model": "^1.4.5",
37
+ "@backstage/core-components": "^0.14.4",
38
+ "@backstage/core-plugin-api": "^1.9.2",
39
+ "@backstage/errors": "^1.2.4",
40
+ "@backstage/plugin-catalog-react": "^1.11.3",
41
+ "@backstage/types": "^1.1.1",
42
+ "@material-ui/core": "^4.12.2",
43
+ "@material-ui/icons": "^4.9.1",
44
+ "@material-ui/lab": "4.0.0-alpha.61",
45
+ "@types/react": "^16.13.1 || ^17.0.0 || ^18.0.0",
46
+ "qs": "^6.9.4",
47
+ "react-use": "^17.2.4"
48
+ },
49
+ "devDependencies": {
50
+ "@backstage/cli": "^0.26.3",
51
+ "@backstage/dev-utils": "^1.0.31",
52
+ "@testing-library/dom": "^10.0.0",
53
+ "@testing-library/jest-dom": "^6.0.0",
54
+ "@testing-library/react": "^15.0.0",
55
+ "@types/react-dom": "^18.2.19",
56
+ "canvas": "^2.11.2",
57
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
58
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
59
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
60
+ },
61
+ "peerDependencies": {
62
+ "react": "^16.13.1 || ^17.0.0 || ^18.0.0",
63
+ "react-dom": "^16.13.1 || ^17.0.0 || ^18.0.0",
64
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
65
+ },
66
+ "module": "./dist/index.esm.js"
67
+ }