From 422eee24d9e1484f2d4a1c2e8f474f45a3e70334 Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Tue, 20 Sep 2022 19:09:35 +0100 Subject: [PATCH 1/7] added get latest facts from tech-insighs Signed-off-by: Alisson Fabiano --- plugins/tech-insights/api-report.md | 33 ++++++++++ plugins/tech-insights/package.json | 1 + .../tech-insights/src/api/TechInsightsApi.ts | 6 +- .../src/api/TechInsightsClient.ts | 66 +++++++++---------- plugins/tech-insights/src/api/types.ts | 27 ++++++++ plugins/tech-insights/src/index.ts | 2 +- yarn.lock | 8 +++ 7 files changed, 108 insertions(+), 35 deletions(-) diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index 03155a5958..b40bf9fe92 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -10,8 +10,10 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { BulkCheckResponse } from '@backstage/plugin-tech-insights-common'; import { CheckResult } from '@backstage/plugin-tech-insights-common'; import { CompoundEntityRef } from '@backstage/catalog-model'; +import { DateTime } from 'luxon'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { IdentityApi } from '@backstage/core-plugin-api'; +import { JsonValue } from '@backstage/types'; import { default as React_2 } from 'react'; import { RouteRef } from '@backstage/core-plugin-api'; @@ -51,6 +53,27 @@ export const EntityTechInsightsScorecardContent: (props: { checksId?: string[] | undefined; }) => JSX.Element; +// @public +export interface InsightFact { + // (undocumented) + [factId: string]: { + timestamp: string; + version: string; + facts: Record< + string, + | number + | string + | boolean + | DateTime + | number[] + | string[] + | boolean[] + | DateTime[] + | JsonValue + >; + }; +} + // @public export const jsonRulesEngineCheckResultRenderer: CheckResultRenderer; @@ -61,6 +84,11 @@ export interface TechInsightsApi { // (undocumented) getCheckResultRenderers: (types: string[]) => CheckResultRenderer[]; // (undocumented) + getLatestFacts( + entity: CompoundEntityRef, + facts: string[], + ): Promise; + // (undocumented) runBulkChecks( entities: CompoundEntityRef[], checks?: Check[], @@ -87,6 +115,11 @@ export class TechInsightsClient implements TechInsightsApi { // (undocumented) getCheckResultRenderers(types: string[]): CheckResultRenderer[]; // (undocumented) + getLatestFacts( + entity: CompoundEntityRef, + facts: string[], + ): Promise; + // (undocumented) runBulkChecks( entities: CompoundEntityRef[], checks?: Check[], diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index dad3263f10..06be8fd415 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,6 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", + "luxon": "^3.0.3", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/plugins/tech-insights/src/api/TechInsightsApi.ts b/plugins/tech-insights/src/api/TechInsightsApi.ts index 8ab1090304..79754d53b1 100644 --- a/plugins/tech-insights/src/api/TechInsightsApi.ts +++ b/plugins/tech-insights/src/api/TechInsightsApi.ts @@ -19,7 +19,7 @@ import { CheckResult, BulkCheckResponse, } from '@backstage/plugin-tech-insights-common'; -import { Check } from './types'; +import { Check, InsightFact } from './types'; import { CheckResultRenderer } from '../components/CheckResultRenderer'; import { CompoundEntityRef } from '@backstage/catalog-model'; @@ -48,4 +48,8 @@ export interface TechInsightsApi { entities: CompoundEntityRef[], checks?: Check[], ): Promise; + getLatestFacts( + entity: CompoundEntityRef, + facts: string[], + ): Promise; } diff --git a/plugins/tech-insights/src/api/TechInsightsClient.ts b/plugins/tech-insights/src/api/TechInsightsClient.ts index 8db5de3945..bcfb045d00 100644 --- a/plugins/tech-insights/src/api/TechInsightsClient.ts +++ b/plugins/tech-insights/src/api/TechInsightsClient.ts @@ -19,7 +19,7 @@ import { BulkCheckResponse, CheckResult, } from '@backstage/plugin-tech-insights-common'; -import { Check } from './types'; +import { Check, InsightFact } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { ResponseError } from '@backstage/errors'; import { CompoundEntityRef } from '@backstage/catalog-model'; @@ -45,76 +45,76 @@ export class TechInsightsClient implements TechInsightsApi { this.renderers = options.renderers; } + async getLatestFacts( + entity: CompoundEntityRef, + facts: string[], + ): Promise { + const { namespace, kind, name } = entity; + const entityQuery = `entity=${encodeURIComponent( + kind.toLocaleLowerCase('en-US'), + )}:${encodeURIComponent(namespace)}/${encodeURIComponent(name)}`; + const idsQuery = facts.map(id => `ids[]=${id}`).join('&'); + return await this.api( + `/facts/latest?${entityQuery}&${idsQuery}`, + ); + } + getCheckResultRenderers(types: string[]): CheckResultRenderer[] { const renderers = this.renderers ?? [jsonRulesEngineCheckResultRenderer]; return renderers.filter(d => types.includes(d.type)); } async getAllChecks(): Promise { - const url = await this.discoveryApi.getBaseUrl('tech-insights'); - const { token } = await this.identityApi.getCredentials(); - const response = await fetch(`${url}/checks`, { - headers: token - ? { - Authorization: `Bearer ${token}`, - } - : undefined, - }); - if (!response.ok) { - throw await ResponseError.fromResponse(response); - } - return await response.json(); + return this.api('/checks'); } async runChecks( entityParams: CompoundEntityRef, checks?: string[], ): Promise { - const url = await this.discoveryApi.getBaseUrl('tech-insights'); - const { token } = await this.identityApi.getCredentials(); const { namespace, kind, name } = entityParams; const requestBody = { checks }; - const response = await fetch( - `${url}/checks/run/${encodeURIComponent(namespace)}/${encodeURIComponent( + return this.api( + `/checks/run/${encodeURIComponent(namespace)}/${encodeURIComponent( kind, )}/${encodeURIComponent(name)}`, { method: 'POST', body: JSON.stringify(requestBody), - headers: { - 'Content-Type': 'application/json', - ...(token && { Authorization: `Bearer ${token}` }), - }, }, ); - if (!response.ok) { - throw await ResponseError.fromResponse(response); - } - return await response.json(); } async runBulkChecks( entities: CompoundEntityRef[], checks?: Check[], ): Promise { - const url = await this.discoveryApi.getBaseUrl('tech-insights'); - const { token } = await this.identityApi.getCredentials(); const checkIds = checks ? checks.map(check => check.id) : []; const requestBody = { entities, checks: checkIds.length > 0 ? checkIds : undefined, }; - const response = await fetch(`${url}/checks/run`, { + return this.api('/checks/run', { method: 'POST', body: JSON.stringify(requestBody), + }); + } + + private async api(path: string, init?: RequestInit): Promise { + const url = await this.discoveryApi.getBaseUrl('tech-insights'); + const { token } = await this.identityApi.getCredentials(); + + return fetch(`${url}${path}`, { + ...init, headers: { 'Content-Type': 'application/json', ...(token && { Authorization: `Bearer ${token}` }), }, + }).then(async response => { + if (!response.ok) { + throw await ResponseError.fromResponse(response); + } + return response.json() as Promise; }); - if (!response.ok) { - throw await ResponseError.fromResponse(response); - } - return await response.json(); } } diff --git a/plugins/tech-insights/src/api/types.ts b/plugins/tech-insights/src/api/types.ts index 10dfa06420..b69d4d6264 100644 --- a/plugins/tech-insights/src/api/types.ts +++ b/plugins/tech-insights/src/api/types.ts @@ -14,6 +14,9 @@ * limitations under the License. */ +import { DateTime } from 'luxon'; +import { JsonValue } from '@backstage/types'; + /** * Represents a single check defined on the TechInsights backend. * @@ -26,3 +29,27 @@ export type Check = { description: string; factIds: string[]; }; + +/** + * Represents a Fact defined on the TechInsights backend. + * + * @public + */ +export interface InsightFact { + [factId: string]: { + timestamp: string; + version: string; + facts: Record< + string, + | number + | string + | boolean + | DateTime + | number[] + | string[] + | boolean[] + | DateTime[] + | JsonValue + >; + }; +} diff --git a/plugins/tech-insights/src/index.ts b/plugins/tech-insights/src/index.ts index f3dd05c3aa..ae2f9d53a7 100644 --- a/plugins/tech-insights/src/index.ts +++ b/plugins/tech-insights/src/index.ts @@ -20,7 +20,7 @@ export { } from './plugin'; export { techInsightsApiRef, TechInsightsClient } from './api'; -export type { TechInsightsApi, Check } from './api'; +export type { TechInsightsApi, Check, InsightFact } from './api'; export { BooleanCheck } from './components/BooleanCheck'; export { jsonRulesEngineCheckResultRenderer } from './components/CheckResultRenderer'; export type { CheckResultRenderer } from './components/CheckResultRenderer'; diff --git a/yarn.lock b/yarn.lock index 919949a804..f0186e432e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6936,6 +6936,7 @@ __metadata: "@testing-library/user-event": ^14.0.0 "@types/node": ^16.11.26 cross-fetch: ^3.1.5 + luxon: ^3.0.3 msw: ^0.47.0 react-use: ^17.2.4 peerDependencies: @@ -29340,6 +29341,13 @@ __metadata: languageName: node linkType: hard +"luxon@npm:^3.0.3": + version: 3.0.3 + resolution: "luxon@npm:3.0.3" + checksum: 67d143f102f520761c4202086579a5cf30b230ea299da27cacb31e9f9d372cadef90f14cbe7e2621b70825b267fe00128b8176ed8b7172b48f77a403a662d5aa + languageName: node + linkType: hard + "lz-string@npm:^1.4.4": version: 1.4.4 resolution: "lz-string@npm:1.4.4" From a60a6807bd69e95cbbf665cb39b264a3b551b6ab Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Tue, 20 Sep 2022 19:19:00 +0100 Subject: [PATCH 2/7] added changeset Signed-off-by: Alisson Fabiano --- .changeset/lovely-peaches-fold.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lovely-peaches-fold.md diff --git a/.changeset/lovely-peaches-fold.md b/.changeset/lovely-peaches-fold.md new file mode 100644 index 0000000000..729a8c733a --- /dev/null +++ b/.changeset/lovely-peaches-fold.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-insights': minor +--- + +making available the search for the last FACTS executed From a616c11d7880934f7a3279dd1ae64b215967fa86 Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Wed, 21 Sep 2022 09:16:12 +0100 Subject: [PATCH 3/7] addded luxon type dependency Signed-off-by: Alisson Fabiano --- plugins/tech-insights/package.json | 1 + yarn.lock | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 06be8fd415..23c5fc0742 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -54,6 +54,7 @@ "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", + "@types/luxon": "^3.0.1", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", "msw": "^0.47.0" diff --git a/yarn.lock b/yarn.lock index f0186e432e..116e774711 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6934,6 +6934,7 @@ __metadata: "@testing-library/jest-dom": ^5.10.1 "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.0.0 + "@types/luxon": ^3.0.1 "@types/node": ^16.11.26 cross-fetch: ^3.1.5 luxon: ^3.0.3 @@ -14475,6 +14476,13 @@ __metadata: languageName: node linkType: hard +"@types/luxon@npm:^3.0.1": + version: 3.0.1 + resolution: "@types/luxon@npm:3.0.1" + checksum: a81444f9b474ea9b3063ab4cc68b917a2634e38b4e229f86c78c35023a32bf5e8d1044d7c229c011291662c976cb6c4cf109dc3d2077c571790a31779a554178 + languageName: node + linkType: hard + "@types/markdown-it@npm:^12.2.3": version: 12.2.3 resolution: "@types/markdown-it@npm:12.2.3" From 3e32883ad8b6155368d71e33188ca8cd371f5293 Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Wed, 21 Sep 2022 09:36:36 +0100 Subject: [PATCH 4/7] move from devDependencies to dependencies: @types/luxon Signed-off-by: Alisson Fabiano --- plugins/tech-insights/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 23c5fc0742..3903881daa 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,6 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", + "@types/luxon": "^3.0.1", "luxon": "^3.0.3", "react-use": "^17.2.4" }, @@ -54,7 +55,6 @@ "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^12.1.3", "@testing-library/user-event": "^14.0.0", - "@types/luxon": "^3.0.1", "@types/node": "^16.11.26", "cross-fetch": "^3.1.5", "msw": "^0.47.0" From b102cdbfc6f15938f45c22167a9026537b87d67f Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Thu, 22 Sep 2022 15:07:48 +0100 Subject: [PATCH 5/7] refactoring some codes, names and dependency Signed-off-by: Alisson Fabiano --- plugins/tech-insights/api-report.md | 26 ++---------- plugins/tech-insights/package.json | 3 +- .../tech-insights/src/api/TechInsightsApi.ts | 7 +--- .../src/api/TechInsightsClient.ts | 41 ++++++++++--------- plugins/tech-insights/src/api/types.ts | 16 +------- plugins/tech-insights/src/index.ts | 2 +- yarn.lock | 26 +++++------- 7 files changed, 42 insertions(+), 79 deletions(-) diff --git a/plugins/tech-insights/api-report.md b/plugins/tech-insights/api-report.md index b40bf9fe92..2d25d6d39d 100644 --- a/plugins/tech-insights/api-report.md +++ b/plugins/tech-insights/api-report.md @@ -10,7 +10,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api'; import { BulkCheckResponse } from '@backstage/plugin-tech-insights-common'; import { CheckResult } from '@backstage/plugin-tech-insights-common'; import { CompoundEntityRef } from '@backstage/catalog-model'; -import { DateTime } from 'luxon'; import { DiscoveryApi } from '@backstage/core-plugin-api'; import { IdentityApi } from '@backstage/core-plugin-api'; import { JsonValue } from '@backstage/types'; @@ -54,23 +53,12 @@ export const EntityTechInsightsScorecardContent: (props: { }) => JSX.Element; // @public -export interface InsightFact { +export interface InsightFacts { // (undocumented) [factId: string]: { timestamp: string; version: string; - facts: Record< - string, - | number - | string - | boolean - | DateTime - | number[] - | string[] - | boolean[] - | DateTime[] - | JsonValue - >; + facts: Record; }; } @@ -84,10 +72,7 @@ export interface TechInsightsApi { // (undocumented) getCheckResultRenderers: (types: string[]) => CheckResultRenderer[]; // (undocumented) - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; // (undocumented) runBulkChecks( entities: CompoundEntityRef[], @@ -115,10 +100,7 @@ export class TechInsightsClient implements TechInsightsApi { // (undocumented) getCheckResultRenderers(types: string[]): CheckResultRenderer[]; // (undocumented) - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; // (undocumented) runBulkChecks( entities: CompoundEntityRef[], diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 3903881daa..7d1d091095 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,8 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "@types/luxon": "^3.0.1", - "luxon": "^3.0.3", + "qs": "^6.11.0", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/plugins/tech-insights/src/api/TechInsightsApi.ts b/plugins/tech-insights/src/api/TechInsightsApi.ts index 79754d53b1..166f1d2782 100644 --- a/plugins/tech-insights/src/api/TechInsightsApi.ts +++ b/plugins/tech-insights/src/api/TechInsightsApi.ts @@ -19,7 +19,7 @@ import { CheckResult, BulkCheckResponse, } from '@backstage/plugin-tech-insights-common'; -import { Check, InsightFact } from './types'; +import { Check, InsightFacts } from './types'; import { CheckResultRenderer } from '../components/CheckResultRenderer'; import { CompoundEntityRef } from '@backstage/catalog-model'; @@ -48,8 +48,5 @@ export interface TechInsightsApi { entities: CompoundEntityRef[], checks?: Check[], ): Promise; - getLatestFacts( - entity: CompoundEntityRef, - facts: string[], - ): Promise; + getFacts(entity: CompoundEntityRef, facts: string[]): Promise; } diff --git a/plugins/tech-insights/src/api/TechInsightsClient.ts b/plugins/tech-insights/src/api/TechInsightsClient.ts index bcfb045d00..9bdeb119f9 100644 --- a/plugins/tech-insights/src/api/TechInsightsClient.ts +++ b/plugins/tech-insights/src/api/TechInsightsClient.ts @@ -19,15 +19,19 @@ import { BulkCheckResponse, CheckResult, } from '@backstage/plugin-tech-insights-common'; -import { Check, InsightFact } from './types'; +import { Check, InsightFacts } from './types'; import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api'; import { ResponseError } from '@backstage/errors'; -import { CompoundEntityRef } from '@backstage/catalog-model'; +import { + CompoundEntityRef, + stringifyEntityRef, +} from '@backstage/catalog-model'; import { CheckResultRenderer, jsonRulesEngineCheckResultRenderer, } from '../components/CheckResultRenderer'; +import qs from 'qs'; /** @public */ export class TechInsightsClient implements TechInsightsApi { @@ -45,18 +49,15 @@ export class TechInsightsClient implements TechInsightsApi { this.renderers = options.renderers; } - async getLatestFacts( + async getFacts( entity: CompoundEntityRef, facts: string[], - ): Promise { - const { namespace, kind, name } = entity; - const entityQuery = `entity=${encodeURIComponent( - kind.toLocaleLowerCase('en-US'), - )}:${encodeURIComponent(namespace)}/${encodeURIComponent(name)}`; - const idsQuery = facts.map(id => `ids[]=${id}`).join('&'); - return await this.api( - `/facts/latest?${entityQuery}&${idsQuery}`, - ); + ): Promise { + const query = qs.stringify({ + entity: stringifyEntityRef(entity), + ids: facts, + }); + return await this.api(`/facts/latest?${query}`); } getCheckResultRenderers(types: string[]): CheckResultRenderer[] { @@ -104,13 +105,15 @@ export class TechInsightsClient implements TechInsightsApi { const url = await this.discoveryApi.getBaseUrl('tech-insights'); const { token } = await this.identityApi.getCredentials(); - return fetch(`${url}${path}`, { - ...init, - headers: { - 'Content-Type': 'application/json', - ...(token && { Authorization: `Bearer ${token}` }), - }, - }).then(async response => { + const request = new Request(`${url}${path}`, init); + if (!request.headers.has('content-type')) { + request.headers.set('content-type', 'application/json'); + } + if (token && !request.headers.has('authorization')) { + request.headers.set('authorization', `Bearer ${token}`); + } + + return fetch(request).then(async response => { if (!response.ok) { throw await ResponseError.fromResponse(response); } diff --git a/plugins/tech-insights/src/api/types.ts b/plugins/tech-insights/src/api/types.ts index b69d4d6264..ac1f2e44ee 100644 --- a/plugins/tech-insights/src/api/types.ts +++ b/plugins/tech-insights/src/api/types.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { DateTime } from 'luxon'; import { JsonValue } from '@backstage/types'; /** @@ -35,21 +34,10 @@ export type Check = { * * @public */ -export interface InsightFact { +export interface InsightFacts { [factId: string]: { timestamp: string; version: string; - facts: Record< - string, - | number - | string - | boolean - | DateTime - | number[] - | string[] - | boolean[] - | DateTime[] - | JsonValue - >; + facts: Record; }; } diff --git a/plugins/tech-insights/src/index.ts b/plugins/tech-insights/src/index.ts index ae2f9d53a7..9e075df038 100644 --- a/plugins/tech-insights/src/index.ts +++ b/plugins/tech-insights/src/index.ts @@ -20,7 +20,7 @@ export { } from './plugin'; export { techInsightsApiRef, TechInsightsClient } from './api'; -export type { TechInsightsApi, Check, InsightFact } from './api'; +export type { TechInsightsApi, Check, InsightFacts } from './api'; export { BooleanCheck } from './components/BooleanCheck'; export { jsonRulesEngineCheckResultRenderer } from './components/CheckResultRenderer'; export type { CheckResultRenderer } from './components/CheckResultRenderer'; diff --git a/yarn.lock b/yarn.lock index 116e774711..03e3a36d0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6934,11 +6934,10 @@ __metadata: "@testing-library/jest-dom": ^5.10.1 "@testing-library/react": ^12.1.3 "@testing-library/user-event": ^14.0.0 - "@types/luxon": ^3.0.1 "@types/node": ^16.11.26 cross-fetch: ^3.1.5 - luxon: ^3.0.3 msw: ^0.47.0 + qs: ^6.11.0 react-use: ^17.2.4 peerDependencies: "@types/react": ^16.13.1 || ^17.0.0 @@ -14476,13 +14475,6 @@ __metadata: languageName: node linkType: hard -"@types/luxon@npm:^3.0.1": - version: 3.0.1 - resolution: "@types/luxon@npm:3.0.1" - checksum: a81444f9b474ea9b3063ab4cc68b917a2634e38b4e229f86c78c35023a32bf5e8d1044d7c229c011291662c976cb6c4cf109dc3d2077c571790a31779a554178 - languageName: node - linkType: hard - "@types/markdown-it@npm:^12.2.3": version: 12.2.3 resolution: "@types/markdown-it@npm:12.2.3" @@ -29349,13 +29341,6 @@ __metadata: languageName: node linkType: hard -"luxon@npm:^3.0.3": - version: 3.0.3 - resolution: "luxon@npm:3.0.3" - checksum: 67d143f102f520761c4202086579a5cf30b230ea299da27cacb31e9f9d372cadef90f14cbe7e2621b70825b267fe00128b8176ed8b7172b48f77a403a662d5aa - languageName: node - linkType: hard - "lz-string@npm:^1.4.4": version: 1.4.4 resolution: "lz-string@npm:1.4.4" @@ -34244,6 +34229,15 @@ __metadata: languageName: node linkType: hard +"qs@npm:^6.11.0": + version: 6.11.0 + resolution: "qs@npm:6.11.0" + dependencies: + side-channel: ^1.0.4 + checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 + languageName: node + linkType: hard + "qs@npm:~6.5.2": version: 6.5.2 resolution: "qs@npm:6.5.2" From d589951d9cca05363fbab938bf2bad1eaa9cf150 Mon Sep 17 00:00:00 2001 From: Alisson Fabiano Date: Fri, 23 Sep 2022 09:35:34 +0100 Subject: [PATCH 6/7] chore: bump version as patch Signed-off-by: Alisson Fabiano --- .changeset/lovely-peaches-fold.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/lovely-peaches-fold.md b/.changeset/lovely-peaches-fold.md index 729a8c733a..dcff35f4d7 100644 --- a/.changeset/lovely-peaches-fold.md +++ b/.changeset/lovely-peaches-fold.md @@ -1,5 +1,5 @@ --- -'@backstage/plugin-tech-insights': minor +'@backstage/plugin-tech-insights': patch --- making available the search for the last FACTS executed From 9a5726a48d1f44feb4b7cc4fd8f518f190459ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Tue, 27 Sep 2022 15:51:31 +0200 Subject: [PATCH 7/7] nerfed qs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fredrik Adelöw --- plugins/tech-insights/package.json | 2 +- yarn.lock | 11 +---------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/plugins/tech-insights/package.json b/plugins/tech-insights/package.json index 7d1d091095..89d19cc248 100644 --- a/plugins/tech-insights/package.json +++ b/plugins/tech-insights/package.json @@ -38,7 +38,7 @@ "@material-ui/core": "^4.12.2", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.57", - "qs": "^6.11.0", + "qs": "^6.9.4", "react-use": "^17.2.4" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 03e3a36d0b..0cdb5f55f0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6937,7 +6937,7 @@ __metadata: "@types/node": ^16.11.26 cross-fetch: ^3.1.5 msw: ^0.47.0 - qs: ^6.11.0 + qs: ^6.9.4 react-use: ^17.2.4 peerDependencies: "@types/react": ^16.13.1 || ^17.0.0 @@ -34229,15 +34229,6 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.11.0": - version: 6.11.0 - resolution: "qs@npm:6.11.0" - dependencies: - side-channel: ^1.0.4 - checksum: 6e1f29dd5385f7488ec74ac7b6c92f4d09a90408882d0c208414a34dd33badc1a621019d4c799a3df15ab9b1d0292f97c1dd71dc7c045e69f81a8064e5af7297 - languageName: node - linkType: hard - "qs@npm:~6.5.2": version: 6.5.2 resolution: "qs@npm:6.5.2"