From 53eb5e61e31ed470d5c8acf5c33328aeae1c9198 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Tue, 13 Oct 2020 19:13:05 +0530 Subject: [PATCH 001/100] feat: Implement CatalogEntityClient, mainly to get Template entity from template name --- .../src/lib/catalog/CatalogEntityClient.ts | 70 +++++++++++++++++++ .../src/lib/catalog/index.ts | 16 +++++ 2 files changed, 86 insertions(+) create mode 100644 plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts create mode 100644 plugins/scaffolder-backend/src/lib/catalog/index.ts diff --git a/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts new file mode 100644 index 0000000000..48856e7783 --- /dev/null +++ b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts @@ -0,0 +1,70 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import fetch from 'node-fetch'; +import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; +import { + ConflictError, + NotFoundError, + PluginEndpointDiscovery, +} from '@backstage/backend-common'; + +/** + * A catalog client tailored for reading out entity data from the catalog. + */ +export class CatalogEntityClient { + private readonly discovery: PluginEndpointDiscovery; + + constructor(options: { discovery: PluginEndpointDiscovery }) { + this.discovery = options.discovery; + } + + /** + * Looks up a single template using a template name. + * + * Throws a NotFoundError or ConflictError if 0 or multiple templates are found. + */ + async findTemplate(templateName: string): Promise { + const params = new URLSearchParams(); + params.append('kind', 'Template'); + + params.append('metadata.name', templateName); + + const baseUrl = await this.discovery.getBaseUrl('catalog'); + const response = await fetch(`${baseUrl}/entities?${params}`); + + if (!response.ok) { + const text = await response.text(); + throw new Error( + `Request failed with ${response.status} ${response.statusText}, ${text}`, + ); + } + + const templates: TemplateEntityV1alpha1[] = await response.json(); + + if (templates.length !== 1) { + if (templates.length > 1) { + throw new ConflictError( + 'Templates lookup resulted in multiple matches', + ); + } else { + throw new NotFoundError('Template not found'); + } + } + + return templates[0]; + } +} diff --git a/plugins/scaffolder-backend/src/lib/catalog/index.ts b/plugins/scaffolder-backend/src/lib/catalog/index.ts new file mode 100644 index 0000000000..a8de546e00 --- /dev/null +++ b/plugins/scaffolder-backend/src/lib/catalog/index.ts @@ -0,0 +1,16 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { CatalogEntityClient } from './CatalogEntityClient'; From a24b6577212edb80009ac79b8121de12a86278b5 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Tue, 13 Oct 2020 19:14:49 +0530 Subject: [PATCH 002/100] feat: use CatalogEntityClient --- plugins/scaffolder-backend/package.json | 3 ++- .../scaffolder-backend/src/service/router.ts | 23 +++++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 66d6457333..fac30df196 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -44,7 +44,8 @@ "nodegit": "0.27.0", "uuid": "^8.2.0", "winston": "^3.2.1", - "yaml": "^1.10.0" + "yaml": "^1.10.0", + "node-fetch": "^2.6.1" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.25", diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index f61d2566b9..a556916df0 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -14,8 +14,12 @@ * limitations under the License. */ +import { + loadBackendConfig, + SingleHostDiscovery, +} from '@backstage/backend-common'; +import { JsonValue, ConfigReader } from '@backstage/config'; import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; -import { JsonValue } from '@backstage/config'; import Docker from 'dockerode'; import express from 'express'; import Router from 'express-promise-router'; @@ -28,6 +32,7 @@ import { TemplaterBuilder, PublisherBuilder, } from '../scaffolder'; +import { CatalogEntityClient } from '../lib/catalog'; import { validate, ValidatorResult } from 'jsonschema'; export interface RouterOptions { @@ -56,6 +61,10 @@ export async function createRouter( const logger = parentLogger.child({ plugin: 'scaffolder' }); const jobProcessor = new JobProcessor(); + const config = ConfigReader.fromConfigs(await loadBackendConfig()); + const discovery = SingleHostDiscovery.fromConfig(config); + const entityClient = new CatalogEntityClient({ discovery }); + router .get('/v1/job/:jobId', ({ params }, res) => { const job = jobProcessor.get(params.jobId); @@ -81,14 +90,24 @@ export async function createRouter( }); }) .post('/v1/jobs', async (req, res) => { - const template: TemplateEntityV1alpha1 = req.body.template; + const templateName: string = req.body.templateName; const values: RequiredTemplateValues & Record = req.body.values; + let template: TemplateEntityV1alpha1; + try { + template = await entityClient.findTemplate(templateName); + } catch (e) { + // help me here + res.status(400).json({ errors: e }); + return; + } + const validationResult: ValidatorResult = validate( values, template.spec.schema, ); + if (!validationResult.valid) { res.status(400).json({ errors: validationResult.errors }); return; From 91e425fdabb5a024d81114ab643655422e71fb38 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Tue, 13 Oct 2020 19:16:22 +0530 Subject: [PATCH 003/100] feat: Pass entity unique id to POST body of /v1/jobs instead of entire entity --- plugins/scaffolder/src/api.ts | 10 +++------- .../src/components/TemplatePage/TemplatePage.tsx | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/plugins/scaffolder/src/api.ts b/plugins/scaffolder/src/api.ts index f58c8e68d1..ca52418e92 100644 --- a/plugins/scaffolder/src/api.ts +++ b/plugins/scaffolder/src/api.ts @@ -15,7 +15,6 @@ */ import { createApiRef, DiscoveryApi } from '@backstage/core'; -import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; export const scaffolderApiRef = createApiRef({ id: 'plugin.scaffolder.service', @@ -33,20 +32,17 @@ export class ScaffolderApi { * Executes the scaffolding of a component, given a template and its * parameter values. * - * @param template Template entity for the scaffolder to use. New project is going to be created out of this template. + * @param templateName Template name for the scaffolder to use. New project is going to be created out of this template. * @param values Parameters for the template, e.g. name, description */ - async scaffold( - template: TemplateEntityV1alpha1, - values: Record, - ) { + async scaffold(templateName: string, values: Record) { const url = `${await this.discoveryApi.getBaseUrl('scaffolder')}/v1/jobs`; const response = await fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ template, values: { ...values } }), + body: JSON.stringify({ templateName, values: { ...values } }), }); if (response.status !== 201) { diff --git a/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx b/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx index e68c795bd6..6c71a2eab1 100644 --- a/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx +++ b/plugins/scaffolder/src/components/TemplatePage/TemplatePage.tsx @@ -97,7 +97,7 @@ export const TemplatePage = () => { const handleCreate = async () => { try { - const job = await scaffolderApi.scaffold(template!, formState); + const job = await scaffolderApi.scaffold(templateName, formState); setJobId(job); } catch (e) { errorApi.post(e); From 34a94c9a583dbbbd2ec156ac3769c114dedb4415 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Mon, 12 Oct 2020 15:06:27 +0200 Subject: [PATCH 004/100] feat: make default scopes of Auth APIs configurable --- .../apis/implementations/auth/auth0/Auth0Auth.ts | 4 +++- .../implementations/auth/gitlab/GitlabAuth.ts | 4 +++- .../implementations/auth/google/GoogleAuth.ts | 16 +++++++++------- .../auth/microsoft/MicrosoftAuth.ts | 16 +++++++++------- .../apis/implementations/auth/okta/OktaAuth.ts | 4 +++- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts b/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts index 40e537169c..793d9f90d3 100644 --- a/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts +++ b/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts @@ -27,6 +27,7 @@ type CreateOptions = { discoveryApi: DiscoveryApi; oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; environment?: string; provider?: AuthProvider & { id: string }; }; @@ -43,13 +44,14 @@ class Auth0Auth { environment = 'development', provider = DEFAULT_PROVIDER, oauthRequestApi, + defaultScopes = ['openid', `email`, `profile`], }: CreateOptions): typeof auth0AuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, provider, environment, - defaultScopes: ['openid', `email`, `profile`], + defaultScopes, }); } } diff --git a/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts b/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts index 9e2acd4537..b6a2757143 100644 --- a/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts @@ -27,6 +27,7 @@ type CreateOptions = { discoveryApi: DiscoveryApi; oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; environment?: string; provider?: AuthProvider & { id: string }; }; @@ -43,13 +44,14 @@ class GitlabAuth { environment = 'development', provider = DEFAULT_PROVIDER, oauthRequestApi, + defaultScopes = ['read_user'], }: CreateOptions): typeof gitlabAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, provider, environment, - defaultScopes: ['read_user'], + defaultScopes, }); } } diff --git a/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts b/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts index 7e84226508..2d2ff3ede7 100644 --- a/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts @@ -27,6 +27,7 @@ type CreateOptions = { discoveryApi: DiscoveryApi; oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; environment?: string; provider?: AuthProvider & { id: string }; }; @@ -37,25 +38,26 @@ const DEFAULT_PROVIDER = { icon: GoogleIcon, }; +const SCOPE_PREFIX = 'https://www.googleapis.com/auth/'; + class GoogleAuth { static create({ discoveryApi, oauthRequestApi, environment = 'development', provider = DEFAULT_PROVIDER, + defaultScopes = [ + 'openid', + `${SCOPE_PREFIX}userinfo.email`, + `${SCOPE_PREFIX}userinfo.profile`, + ], }: CreateOptions): typeof googleAuthApiRef.T { - const SCOPE_PREFIX = 'https://www.googleapis.com/auth/'; - return OAuth2.create({ discoveryApi, oauthRequestApi, provider, environment, - defaultScopes: [ - 'openid', - `${SCOPE_PREFIX}userinfo.email`, - `${SCOPE_PREFIX}userinfo.profile`, - ], + defaultScopes, scopeTransform(scopes: string[]) { return scopes.map(scope => { if (scope === 'openid') { diff --git a/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts b/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts index 241ac7b802..db9180b31c 100644 --- a/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts @@ -28,6 +28,7 @@ type CreateOptions = { discoveryApi: DiscoveryApi; oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; environment?: string; provider?: AuthProvider & { id: string }; }; @@ -44,19 +45,20 @@ class MicrosoftAuth { provider = DEFAULT_PROVIDER, oauthRequestApi, discoveryApi, + defaultScopes = [ + 'openid', + 'offline_access', + 'profile', + 'email', + 'User.Read', + ], }: CreateOptions): typeof microsoftAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, provider, environment, - defaultScopes: [ - 'openid', - 'offline_access', - 'profile', - 'email', - 'User.Read', - ], + defaultScopes, }); } } diff --git a/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts b/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts index 7e9ff77678..7382d24d62 100644 --- a/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts @@ -27,6 +27,7 @@ type CreateOptions = { discoveryApi: DiscoveryApi; oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; environment?: string; provider?: AuthProvider & { id: string }; }; @@ -55,13 +56,14 @@ class OktaAuth { environment = 'development', provider = DEFAULT_PROVIDER, oauthRequestApi, + defaultScopes = ['openid', 'email', 'profile', 'offline_access'], }: CreateOptions): typeof oktaAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, provider, environment, - defaultScopes: ['openid', 'email', 'profile', 'offline_access'], + defaultScopes, scopeTransform(scopes) { return scopes.map(scope => { if (OKTA_OIDC_SCOPES.has(scope)) { From c5acbbb8c42114338747935d7c044898f6578bd0 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Fri, 23 Oct 2020 23:32:10 +0530 Subject: [PATCH 005/100] chore: replace node-fetch => cross-fetch --- plugins/scaffolder-backend/package.json | 2 +- .../scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts | 2 +- yarn.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index fac30df196..e87f86961e 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -45,7 +45,7 @@ "uuid": "^8.2.0", "winston": "^3.2.1", "yaml": "^1.10.0", - "node-fetch": "^2.6.1" + "cross-fetch": "^3.0.6" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.25", diff --git a/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts index 48856e7783..84676b63fe 100644 --- a/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts +++ b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import fetch from 'node-fetch'; +import fetch from 'cross-fetch'; import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; import { ConflictError, diff --git a/yarn.lock b/yarn.lock index 4832a549b8..2c7c609835 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9021,7 +9021,7 @@ cross-env@^7.0.0: dependencies: cross-spawn "^7.0.1" -cross-fetch@3.0.6, cross-fetch@^3.0.4, cross-fetch@^3.0.5: +cross-fetch@3.0.6, cross-fetch@^3.0.4, cross-fetch@^3.0.5, cross-fetch@^3.0.6: version "3.0.6" resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.0.6.tgz#3a4040bc8941e653e0e9cf17f29ebcd177d3365c" integrity sha512-KBPUbqgFjzWlVcURG+Svp9TlhA5uliYtiNx/0r8nv0pdypeQCRJ9IaSIc3q/x3q8t3F75cHuwxVql1HFGHCNJQ== From 8440f8f91be240cf96c7447262547adb653ba410 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Tue, 27 Oct 2020 10:02:56 +0530 Subject: [PATCH 006/100] feat: load config directly, #2976 --- plugins/scaffolder-backend/src/service/router.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index a556916df0..bf1eeae8dd 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -17,8 +17,9 @@ import { loadBackendConfig, SingleHostDiscovery, + getRootLogger, } from '@backstage/backend-common'; -import { JsonValue, ConfigReader } from '@backstage/config'; +import { JsonValue } from '@backstage/config'; import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; import Docker from 'dockerode'; import express from 'express'; @@ -61,7 +62,10 @@ export async function createRouter( const logger = parentLogger.child({ plugin: 'scaffolder' }); const jobProcessor = new JobProcessor(); - const config = ConfigReader.fromConfigs(await loadBackendConfig()); + const config = await loadBackendConfig({ + argv: process.argv, + logger: getRootLogger(), + }); const discovery = SingleHostDiscovery.fromConfig(config); const entityClient = new CatalogEntityClient({ discovery }); From f2a9bba5e27ad2e2ec29d3fdccec303d8de1e808 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Tue, 27 Oct 2020 10:53:40 +0530 Subject: [PATCH 007/100] feat: update related to #3066 --- .../src/lib/catalog/CatalogEntityClient.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts index 84676b63fe..4541f03a4a 100644 --- a/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts +++ b/plugins/scaffolder-backend/src/lib/catalog/CatalogEntityClient.ts @@ -38,13 +38,15 @@ export class CatalogEntityClient { * Throws a NotFoundError or ConflictError if 0 or multiple templates are found. */ async findTemplate(templateName: string): Promise { - const params = new URLSearchParams(); - params.append('kind', 'Template'); - - params.append('metadata.name', templateName); + const conditions = [ + 'kind=template', + `metadata.name=${encodeURIComponent(templateName)}`, + ]; const baseUrl = await this.discovery.getBaseUrl('catalog'); - const response = await fetch(`${baseUrl}/entities?${params}`); + const response = await fetch( + `${baseUrl}/entities?filter=${conditions.join(',')}`, + ); if (!response.ok) { const text = await response.text(); From 097e3d222a61889c029c109d9693f8ec298ada0d Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Wed, 28 Oct 2020 10:54:38 +0530 Subject: [PATCH 008/100] fix: error handling --- plugins/scaffolder-backend/src/service/router.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index 83a0cbd398..efe8ee46f6 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -115,10 +115,8 @@ export async function createRouter( let template: TemplateEntityV1alpha1; try { template = await entityClient.findTemplate(templateName); - } catch (e) { - // help me here - res.status(400).json({ errors: e }); - return; + } catch (err) { + throw err; } const validationResult: ValidatorResult = validate( From 833a652d055a8dafa21a5bda57b8a404fab81696 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 28 Oct 2020 10:20:43 +0100 Subject: [PATCH 009/100] v0.1.1 --- lerna.json | 2 +- packages/app/package.json | 56 ++++++++++++------------- packages/backend-common/package.json | 12 +++--- packages/backend/package.json | 32 +++++++------- packages/catalog-model/package.json | 6 +-- packages/cli-common/package.json | 2 +- packages/cli/package.json | 20 ++++----- packages/config-loader/package.json | 4 +- packages/config/package.json | 2 +- packages/core-api/package.json | 12 +++--- packages/core/package.json | 12 +++--- packages/create-app/package.json | 52 +++++++++++------------ packages/dev-utils/package.json | 10 ++--- packages/docgen/package.json | 2 +- packages/e2e-test/package.json | 4 +- packages/storybook/package.json | 4 +- packages/techdocs-cli/package.json | 4 +- packages/test-utils-core/package.json | 2 +- packages/test-utils/package.json | 10 ++--- packages/theme/package.json | 4 +- plugins/api-docs/package.json | 16 +++---- plugins/app-backend/package.json | 8 ++-- plugins/auth-backend/package.json | 10 ++--- plugins/catalog-backend/package.json | 12 +++--- plugins/catalog-graphql/package.json | 12 +++--- plugins/catalog/package.json | 18 ++++---- plugins/circleci/package.json | 16 +++---- plugins/cloudbuild/package.json | 16 +++---- plugins/cost-insights/package.json | 16 +++---- plugins/explore/package.json | 12 +++--- plugins/gcp-projects/package.json | 12 +++--- plugins/github-actions/package.json | 18 ++++---- plugins/gitops-profiles/package.json | 12 +++--- plugins/graphiql/package.json | 12 +++--- plugins/graphql/package.json | 10 ++--- plugins/jenkins/package.json | 16 +++---- plugins/kubernetes-backend/package.json | 8 ++-- plugins/kubernetes/package.json | 18 ++++---- plugins/lighthouse/package.json | 20 ++++----- plugins/newrelic/package.json | 12 +++--- plugins/proxy-backend/package.json | 8 ++-- plugins/register-component/package.json | 16 +++---- plugins/rollbar-backend/package.json | 8 ++-- plugins/rollbar/package.json | 16 +++---- plugins/scaffolder-backend/package.json | 10 ++--- plugins/scaffolder/package.json | 16 +++---- plugins/sentry-backend/package.json | 6 +-- plugins/sentry/package.json | 14 +++---- plugins/tech-radar/package.json | 14 +++---- plugins/techdocs-backend/package.json | 10 ++--- plugins/techdocs/package.json | 20 ++++----- plugins/user-settings/package.json | 12 +++--- plugins/welcome/package.json | 12 +++--- 53 files changed, 344 insertions(+), 344 deletions(-) diff --git a/lerna.json b/lerna.json index 5871423f78..dd2dd884eb 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "packages": ["packages/*", "plugins/*"], "npmClient": "yarn", "useWorkspaces": true, - "version": "0.1.1-alpha.26" + "version": "0.1.1" } diff --git a/packages/app/package.json b/packages/app/package.json index 594c12b5e5..5c0b90f0fe 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,36 +1,36 @@ { "name": "example-app", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": true, "bundled": true, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-api-docs": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/plugin-circleci": "^0.1.1-alpha.26", - "@backstage/plugin-cloudbuild": "^0.1.1-alpha.26", - "@backstage/plugin-cost-insights": "^0.1.1-alpha.26", - "@backstage/plugin-explore": "^0.1.1-alpha.26", - "@backstage/plugin-gcp-projects": "^0.1.1-alpha.26", - "@backstage/plugin-github-actions": "^0.1.1-alpha.26", - "@backstage/plugin-gitops-profiles": "^0.1.1-alpha.26", - "@backstage/plugin-graphiql": "^0.1.1-alpha.26", - "@backstage/plugin-jenkins": "^0.1.1-alpha.26", - "@backstage/plugin-kubernetes": "^0.1.1-alpha.26", - "@backstage/plugin-lighthouse": "^0.1.1-alpha.26", - "@backstage/plugin-newrelic": "^0.1.1-alpha.26", - "@backstage/plugin-register-component": "^0.1.1-alpha.26", - "@backstage/plugin-rollbar": "^0.1.1-alpha.26", - "@backstage/plugin-scaffolder": "^0.1.1-alpha.26", - "@backstage/plugin-sentry": "^0.1.1-alpha.26", - "@backstage/plugin-tech-radar": "^0.1.1-alpha.26", - "@backstage/plugin-techdocs": "^0.1.1-alpha.26", - "@backstage/plugin-user-settings": "^0.1.1-alpha.26", - "@backstage/plugin-welcome": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/cli": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-api-docs": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/plugin-circleci": "^0.1.1", + "@backstage/plugin-cloudbuild": "^0.1.1", + "@backstage/plugin-cost-insights": "^0.1.1", + "@backstage/plugin-explore": "^0.1.1", + "@backstage/plugin-gcp-projects": "^0.1.1", + "@backstage/plugin-github-actions": "^0.1.1", + "@backstage/plugin-gitops-profiles": "^0.1.1", + "@backstage/plugin-graphiql": "^0.1.1", + "@backstage/plugin-jenkins": "^0.1.1", + "@backstage/plugin-kubernetes": "^0.1.1", + "@backstage/plugin-lighthouse": "^0.1.1", + "@backstage/plugin-newrelic": "^0.1.1", + "@backstage/plugin-register-component": "^0.1.1", + "@backstage/plugin-rollbar": "^0.1.1", + "@backstage/plugin-scaffolder": "^0.1.1", + "@backstage/plugin-sentry": "^0.1.1", + "@backstage/plugin-tech-radar": "^0.1.1", + "@backstage/plugin-techdocs": "^0.1.1", + "@backstage/plugin-user-settings": "^0.1.1", + "@backstage/plugin-welcome": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@octokit/rest": "^18.0.0", diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index dea2f16bae..990c8597ce 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/cli-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/config-loader": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli-common": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/config-loader": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@types/cors": "^2.8.6", "@types/express": "^4.17.6", "compression": "^1.7.4", @@ -62,7 +62,7 @@ } }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/compression": "^1.7.0", "@types/http-errors": "^1.6.3", "@types/minimist": "^1.2.0", diff --git a/packages/backend/package.json b/packages/backend/package.json index 9f8e66bc61..76d8861717 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "dist/index.cjs.js", "types": "src/index.ts", "private": true, @@ -18,24 +18,24 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/plugin-app-backend": "^0.1.1-alpha.26", - "@backstage/plugin-auth-backend": "^0.1.1-alpha.26", - "@backstage/plugin-catalog-backend": "^0.1.1-alpha.26", - "@backstage/plugin-graphql-backend": "^0.1.1-alpha.26", - "@backstage/plugin-kubernetes-backend": "^0.1.1-alpha.26", - "@backstage/plugin-proxy-backend": "^0.1.1-alpha.26", - "@backstage/plugin-rollbar-backend": "^0.1.1-alpha.26", - "@backstage/plugin-scaffolder-backend": "^0.1.1-alpha.26", - "@backstage/plugin-sentry-backend": "^0.1.1-alpha.26", - "@backstage/plugin-techdocs-backend": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/plugin-app-backend": "^0.1.1", + "@backstage/plugin-auth-backend": "^0.1.1", + "@backstage/plugin-catalog-backend": "^0.1.1", + "@backstage/plugin-graphql-backend": "^0.1.1", + "@backstage/plugin-kubernetes-backend": "^0.1.1", + "@backstage/plugin-proxy-backend": "^0.1.1", + "@backstage/plugin-rollbar-backend": "^0.1.1", + "@backstage/plugin-scaffolder-backend": "^0.1.1", + "@backstage/plugin-sentry-backend": "^0.1.1", + "@backstage/plugin-techdocs-backend": "^0.1.1", "@gitbeaker/node": "^23.5.0", "@octokit/rest": "^18.0.0", "azure-devops-node-api": "^10.1.1", "dockerode": "^3.2.0", - "example-app": "^0.1.1-alpha.26", + "example-app": "^0.1.1", "express": "^4.17.1", "express-promise-router": "^3.0.3", "knex": "^0.21.1", @@ -45,7 +45,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/dockerode": "^2.5.32", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index c97aea9572..0d555ef5d2 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/catalog-model", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/config": "^0.1.1", "@types/json-schema": "^7.0.5", "@types/yup": "^0.29.8", "json-schema": "^0.2.5", @@ -29,7 +29,7 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/express": "^4.17.6", "@types/jest": "^26.0.7", "@types/lodash": "^4.14.151", diff --git a/packages/cli-common/package.json b/packages/cli-common/package.json index 56fb0d3417..2186f3d045 100644 --- a/packages/cli-common/package.json +++ b/packages/cli-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli-common", "description": "Common functionality used by cli, backend, and create-app", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "main": "src/index.ts", "types": "src/index.ts", diff --git a/packages/cli/package.json b/packages/cli/package.json index 668ec5e000..4ad33c997b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public" @@ -28,9 +28,9 @@ "backstage-cli": "bin/backstage-cli" }, "dependencies": { - "@backstage/cli-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/config-loader": "^0.1.1-alpha.26", + "@backstage/cli-common": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/config-loader": "^0.1.1", "@hot-loader/react-dom": "^16.13.0", "@lerna/package-graph": "^3.18.5", "@lerna/project": "^3.18.0", @@ -108,12 +108,12 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@types/diff": "^4.0.2", "@types/fs-extra": "^9.0.1", "@types/html-webpack-plugin": "^3.2.2", diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 2eef7db027..8c43832ab6 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -30,7 +30,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/config": "^0.1.1", "fs-extra": "^9.0.0", "yaml": "^1.9.2", "yup": "^0.29.3" diff --git a/packages/config/package.json b/packages/config/package.json index d8ee50e97c..4bd4bedf5d 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config", "description": "Config API used by Backstage core, backend, and CLI", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", diff --git a/packages/core-api/package.json b/packages/core-api/package.json index 34949e4315..d183ce9433 100644 --- a/packages/core-api/package.json +++ b/packages/core-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-api", "description": "Internal Core API used by Backstage plugins and apps", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -29,9 +29,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/config": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@types/react": "^16.9", @@ -42,8 +42,8 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/test-utils-core": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/test-utils-core": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/packages/core/package.json b/packages/core/package.json index ec4411b390..535fb856cf 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core", "description": "Core API used by Backstage plugins and apps", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -29,9 +29,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core-api": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/config": "^0.1.1", + "@backstage/core-api": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -55,8 +55,8 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/packages/create-app/package.json b/packages/create-app/package.json index bb321dc504..4362fc7cff 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "Create app package for Backstage", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public" @@ -27,7 +27,7 @@ "start": "nodemon --" }, "dependencies": { - "@backstage/cli-common": "^0.1.1-alpha.26", + "@backstage/cli-common": "^0.1.1", "chalk": "^4.0.0", "commander": "^6.1.0", "fs-extra": "^9.0.0", @@ -37,30 +37,30 @@ "recursive-readdir": "^2.2.2" }, "devDependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-api-docs": "^0.1.1-alpha.26", - "@backstage/plugin-auth-backend": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/plugin-catalog-backend": "^0.1.1-alpha.26", - "@backstage/plugin-circleci": "^0.1.1-alpha.26", - "@backstage/plugin-explore": "^0.1.1-alpha.26", - "@backstage/plugin-github-actions": "^0.1.1-alpha.26", - "@backstage/plugin-lighthouse": "^0.1.1-alpha.26", - "@backstage/plugin-proxy-backend": "^0.1.1-alpha.26", - "@backstage/plugin-register-component": "^0.1.1-alpha.26", - "@backstage/plugin-rollbar-backend": "^0.1.1-alpha.26", - "@backstage/plugin-scaffolder": "^0.1.1-alpha.26", - "@backstage/plugin-scaffolder-backend": "^0.1.1-alpha.26", - "@backstage/plugin-tech-radar": "^0.1.1-alpha.26", - "@backstage/plugin-techdocs": "^0.1.1-alpha.26", - "@backstage/plugin-techdocs-backend": "^0.1.1-alpha.26", - "@backstage/plugin-user-settings": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/cli": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-api-docs": "^0.1.1", + "@backstage/plugin-auth-backend": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/plugin-catalog-backend": "^0.1.1", + "@backstage/plugin-circleci": "^0.1.1", + "@backstage/plugin-explore": "^0.1.1", + "@backstage/plugin-github-actions": "^0.1.1", + "@backstage/plugin-lighthouse": "^0.1.1", + "@backstage/plugin-proxy-backend": "^0.1.1", + "@backstage/plugin-register-component": "^0.1.1", + "@backstage/plugin-rollbar-backend": "^0.1.1", + "@backstage/plugin-scaffolder": "^0.1.1", + "@backstage/plugin-scaffolder-backend": "^0.1.1", + "@backstage/plugin-tech-radar": "^0.1.1", + "@backstage/plugin-techdocs": "^0.1.1", + "@backstage/plugin-techdocs-backend": "^0.1.1", + "@backstage/plugin-user-settings": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@types/fs-extra": "^9.0.1", "@types/inquirer": "^7.3.1", "@types/ora": "^3.2.0", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index d61336465f..b8420d17b1 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 18f26d6941..db045baedb 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -1,7 +1,7 @@ { "name": "docgen", "description": "Tool for generating API Documentation for itself", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": true, "homepage": "https://backstage.io", "repository": { diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 9098b3cd07..0420b426c6 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -1,7 +1,7 @@ { "name": "e2e-test", "description": "E2E test for verifying Backstage packages", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": true, "homepage": "https://backstage.io", "repository": { @@ -24,7 +24,7 @@ "e2e-test": "bin/e2e-test" }, "devDependencies": { - "@backstage/cli-common": "^0.1.1-alpha.26", + "@backstage/cli-common": "^0.1.1", "@types/fs-extra": "^9.0.1", "@types/node": "^13.7.2", "chalk": "^4.0.0", diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 9eefd85128..4c9cc88dd0 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "description": "Storybook build for core package", "private": true, "scripts": { @@ -14,7 +14,7 @@ ] }, "dependencies": { - "@backstage/theme": "^0.1.1-alpha.26" + "@backstage/theme": "^0.1.1" }, "devDependencies": { "@storybook/addon-actions": "^6.0.21", diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index c111a2973a..a81d4b9044 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "CLI for running TechDocs locally.", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public" @@ -40,7 +40,7 @@ "ext": "ts" }, "dependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "commander": "^6.1.0", "fs-extra": "^9.0.1", "http-proxy": "^1.18.1", diff --git a/packages/test-utils-core/package.json b/packages/test-utils-core/package.json index 1db8f6f023..1b69f48b08 100644 --- a/packages/test-utils-core/package.json +++ b/packages/test-utils-core/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils-core", "description": "Utilities to test Backstage core", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 74e0c8dcf7..cf05dd583c 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/core-api": "^0.1.1-alpha.26", - "@backstage/test-utils-core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/core-api": "^0.1.1", + "@backstage/test-utils-core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", diff --git a/packages/theme/package.json b/packages/theme/package.json index ddec0e7981..47b0c497eb 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/theme", "description": "material-ui theme for use with Backstage.", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -31,7 +31,7 @@ "@material-ui/core": "^4.11.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26" + "@backstage/cli": "^0.1.1" }, "files": [ "dist" diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index baf574d5b5..23c072201e 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@kyma-project/asyncapi-react": "^0.13.1", "@material-icons/font": "^1.0.2", "@material-ui/core": "^4.11.0", @@ -39,9 +39,9 @@ "swagger-ui-react": "^3.31.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 8297b466af..4e91bf2161 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config-loader": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config-loader": "^0.1.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^3.0.3", @@ -30,7 +30,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/supertest": "^2.0.8", "msw": "^0.20.5", "supertest": "^4.0.2" diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 6489c8547d..217aaa9e58 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "compression": "^1.7.4", "cookie-parser": "^1.4.5", @@ -51,7 +51,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/jwt-decode": "2.2.1", diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index cd8e363901..ef1401d4d3 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", "@octokit/graphql": "^4.5.6", "@types/express": "^4.17.6", "codeowners-utils": "^1.0.2", @@ -45,8 +45,8 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/ldapjs": "^1.0.9", diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index f74aaf7b57..a43f512856 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graphql", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", "@graphql-modules/core": "^0.7.17", "apollo-server": "^2.16.1", "cross-fetch": "^3.0.6", @@ -32,8 +32,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@graphql-codegen/cli": "^1.17.7", "@graphql-codegen/typescript": "^1.17.7", "@graphql-codegen/typescript-resolvers": "^1.17.7", diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 663ac7554b..da03d1a584 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-scaffolder": "^0.1.1-alpha.26", - "@backstage/plugin-techdocs": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-scaffolder": "^0.1.1", + "@backstage/plugin-techdocs": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -41,9 +41,9 @@ "swr": "^0.3.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/react-hooks": "^3.3.0", diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index 7733d713ab..dc09713024 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-circleci", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "postpack": "backstage-cli postpack" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -38,9 +38,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index 29bfd1b261..f29f30f255 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-cloudbuild", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -39,9 +39,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index abefb601d2..f978e13a8c 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-cost-insights", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/config": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -46,9 +46,9 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 4db68909b9..fa682e8dde 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-explore", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -33,9 +33,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 4c6375ebf6..86b525f1c9 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcp-projects", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -31,9 +31,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index 75fed63465..ea5d8c4278 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-actions", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/core-api": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/core-api": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -40,9 +40,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 18486bc2b7..714c63da20 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gitops-profiles", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 9e1ffd5ef1..ea61845e18 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "private": false, "publishConfig": { "access": "public", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -43,9 +43,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/graphql/package.json b/plugins/graphql/package.json index 58b6c763c6..16c3572251 100644 --- a/plugins/graphql/package.json +++ b/plugins/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-graphql-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,9 +19,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/plugin-catalog-graphql": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/plugin-catalog-graphql": "^0.1.1", "@graphql-modules/core": "^0.7.17", "@types/express": "^4.17.6", "apollo-server": "^2.16.1", @@ -35,7 +35,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.20.5", diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index 194ae71429..cbf9791809 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index 26cc842db9..c66c364871 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config": "^0.1.1", "@kubernetes/client-node": "^0.12.1", "@types/express": "^4.17.6", "compression": "^1.7.4", @@ -37,7 +37,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "supertest": "^4.0.2" }, "files": [ diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 6544d751e1..850dd4cada 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,11 +20,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-kubernetes-backend": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-kubernetes-backend": "^0.1.1", + "@backstage/theme": "^0.1.1", "@kubernetes/client-node": "^0.12.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 8285d29635..587d826d9d 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-lighthouse", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,12 +21,12 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/core-api": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/core-api": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -39,9 +39,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index b9a12cc648..0b52220239 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -31,9 +31,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index fcb68dcd78..57594cfe3f 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-proxy-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,8 +19,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^3.0.3", @@ -33,7 +33,7 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/register-component/package.json b/plugins/register-component/package.json index 5c3f985b4d..58d3b122ca 100644 --- a/plugins/register-component/package.json +++ b/plugins/register-component/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-register-component", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index cb553d859b..91e0000d6c 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "axios": "^0.20.0", "camelcase-keys": "^6.2.2", @@ -37,7 +37,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@types/supertest": "^2.0.8", "supertest": "^4.0.2" }, diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index 27421cfd4d..a3b11ace55 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -37,9 +37,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/react-hooks": "^3.3.0", diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 1c85adc23a..676ddc9b8a 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", "@gitbeaker/core": "^23.5.0", "@gitbeaker/node": "^23.5.0", "@octokit/rest": "^18.0.0", @@ -47,7 +47,7 @@ "yaml": "^1.10.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "@octokit/types": "^5.4.1", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 751f4075b2..4f7dbdae20 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -41,9 +41,9 @@ "swr": "^0.3.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/sentry-backend/package.json b/plugins/sentry-backend/package.json index b51eb1509a..cf9bf7886f 100644 --- a/plugins/sentry-backend/package.json +++ b/plugins/sentry-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sentry-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", "@types/express": "^4.17.6", "axios": "^0.20.0", "compression": "^1.7.4", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26" + "@backstage/cli": "^0.1.1" }, "files": [ "dist" diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 4d9cd59bc3..69c6f130eb 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sentry", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "timeago.js": "^4.0.2" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index f27f4c1784..c7163cc918 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-radar", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 5bdc7ba282..b65540be97 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,9 +20,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1-alpha.26", - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/config": "^0.1.1-alpha.26", + "@backstage/backend-common": "^0.1.1", + "@backstage/catalog-model": "^0.1.1", + "@backstage/config": "^0.1.1", "@types/dockerode": "^2.5.34", "@types/express": "^4.17.6", "command-exists-promise": "^2.0.2", @@ -37,7 +37,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", "supertest": "^4.0.2" }, "files": [ diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 9d14f0a919..551932369c 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/core-api": "^0.1.1-alpha.26", - "@backstage/plugin-catalog": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/core-api": "^0.1.1", + "@backstage/plugin-catalog": "^0.1.1", + "@backstage/test-utils": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -40,9 +40,9 @@ "sanitize-html": "^1.27.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 6f96d7b2fd..3e67c8cae6 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 380a4b0a46..846388eaec 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-welcome", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -21,8 +21,8 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", From 55af83a78a9ce8c0591728c2fec13dbdd2d39e9a Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Thu, 29 Oct 2020 14:33:09 +0530 Subject: [PATCH 010/100] chore: move entityClient to createPlugin, mock entityClient in tests --- packages/backend/src/plugins/scaffolder.ts | 6 ++ plugins/scaffolder-backend/src/index.ts | 1 + .../src/service/router.test.ts | 91 ++++++++++--------- .../scaffolder-backend/src/service/router.ts | 5 +- 4 files changed, 59 insertions(+), 44 deletions(-) diff --git a/packages/backend/src/plugins/scaffolder.ts b/packages/backend/src/plugins/scaffolder.ts index 6eacd143c1..5d36d508a5 100644 --- a/packages/backend/src/plugins/scaffolder.ts +++ b/packages/backend/src/plugins/scaffolder.ts @@ -21,7 +21,9 @@ import { Publishers, CreateReactAppTemplater, Templaters, + CatalogEntityClient, } from '@backstage/plugin-scaffolder-backend'; +import { SingleHostDiscovery } from '@backstage/backend-common'; import type { PluginEnvironment } from '../types'; import Docker from 'dockerode'; @@ -40,6 +42,9 @@ export default async function createPlugin({ const dockerClient = new Docker(); + const discovery = SingleHostDiscovery.fromConfig(config); + const entityClient = new CatalogEntityClient({ discovery }); + return await createRouter({ preparers, templaters, @@ -47,5 +52,6 @@ export default async function createPlugin({ logger, config, dockerClient, + entityClient, }); } diff --git a/plugins/scaffolder-backend/src/index.ts b/plugins/scaffolder-backend/src/index.ts index c461bfede6..28e6a2b24c 100644 --- a/plugins/scaffolder-backend/src/index.ts +++ b/plugins/scaffolder-backend/src/index.ts @@ -16,3 +16,4 @@ export * from './scaffolder'; export * from './service/router'; +export * from './lib/catalog'; diff --git a/plugins/scaffolder-backend/src/service/router.test.ts b/plugins/scaffolder-backend/src/service/router.test.ts index fae7ee8beb..c2b60a2040 100644 --- a/plugins/scaffolder-backend/src/service/router.test.ts +++ b/plugins/scaffolder-backend/src/service/router.test.ts @@ -35,6 +35,10 @@ import Docker from 'dockerode'; jest.mock('dockerode'); +const generateEntityClient: any = (template: any) => ({ + findTemplate: () => Promise.resolve(template), +}); + describe('createRouter - working directory', () => { const mockPrepare = jest.fn(); const mockPreparers = new Preparers(); @@ -74,6 +78,8 @@ describe('createRouter - working directory', () => { }, }; + const mockedEntityClient = generateEntityClient(template); + it('should throw an error when working directory does not exist or is not writable', async () => { mockAccess.mockImplementation(() => { throw new Error('access error'); @@ -87,6 +93,7 @@ describe('createRouter - working directory', () => { publishers: new Publishers(), config: ConfigReader.fromConfigs([workDirConfig('/path')]), dockerClient: new Docker(), + entityClient: mockedEntityClient, }), ).rejects.toThrow('access error'); }); @@ -99,11 +106,12 @@ describe('createRouter - working directory', () => { publishers: new Publishers(), config: ConfigReader.fromConfigs([workDirConfig('/path')]), dockerClient: new Docker(), + entityClient: mockedEntityClient, }); const app = express().use(router); await request(app).post('/v1/jobs').send({ - template, + templateName: '', values: {}, }); @@ -121,11 +129,12 @@ describe('createRouter - working directory', () => { publishers: new Publishers(), config: ConfigReader.fromConfigs([]), dockerClient: new Docker(), + entityClient: mockedEntityClient, }); const app = express().use(router); await request(app).post('/v1/jobs').send({ - template, + templateName: '', values: {}, }); @@ -137,6 +146,43 @@ describe('createRouter - working directory', () => { describe('createRouter', () => { let app: express.Express; + const template = { + apiVersion: 'backstage.io/v1alpha1', + kind: 'Template', + metadata: { + description: 'Create a new CRA website project', + name: 'create-react-app-template', + tags: ['experimental', 'react', 'cra'], + title: 'Create React App Template', + }, + spec: { + owner: 'web@example.com', + path: '.', + schema: { + properties: { + component_id: { + description: 'Unique name of the component', + title: 'Name', + type: 'string', + }, + description: { + description: 'Description of the component', + title: 'Description', + type: 'string', + }, + use_typescript: { + default: true, + description: 'Include typescript', + title: 'Use Typescript', + type: 'boolean', + }, + }, + required: ['component_id', 'use_typescript'], + }, + templater: 'cra', + type: 'website', + }, + }; beforeAll(async () => { const router = await createRouter({ @@ -146,6 +192,7 @@ describe('createRouter', () => { publishers: new Publishers(), config: ConfigReader.fromConfigs([]), dockerClient: new Docker(), + entityClient: generateEntityClient(template), }); app = express().use(router); }); @@ -155,47 +202,9 @@ describe('createRouter', () => { }); describe('POST /v1/jobs', () => { - const template = { - apiVersion: 'backstage.io/v1alpha1', - kind: 'Template', - metadata: { - description: 'Create a new CRA website project', - name: 'create-react-app-template', - tags: ['experimental', 'react', 'cra'], - title: 'Create React App Template', - }, - spec: { - owner: 'web@example.com', - path: '.', - schema: { - properties: { - component_id: { - description: 'Unique name of the component', - title: 'Name', - type: 'string', - }, - description: { - description: 'Description of the component', - title: 'Description', - type: 'string', - }, - use_typescript: { - default: true, - description: 'Include typescript', - title: 'Use Typescript', - type: 'boolean', - }, - }, - required: ['component_id', 'use_typescript'], - }, - templater: 'cra', - type: 'website', - }, - }; - it('rejects template values which do not match the template schema definition', async () => { const response = await request(app).post('/v1/jobs').send({ - template, + templateName: '', values: {}, }); diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index efe8ee46f6..e4d3d5c45a 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { SingleHostDiscovery } from '@backstage/backend-common'; import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; import { Config, JsonValue } from '@backstage/config'; import fs from 'fs-extra'; @@ -41,6 +40,7 @@ export interface RouterOptions { logger: Logger; config: Config; dockerClient: Docker; + entityClient: CatalogEntityClient; } export async function createRouter( @@ -56,13 +56,12 @@ export async function createRouter( logger: parentLogger, config, dockerClient, + entityClient, } = options; const logger = parentLogger.child({ plugin: 'scaffolder' }); const jobProcessor = new JobProcessor(); - const discovery = SingleHostDiscovery.fromConfig(config); - const entityClient = new CatalogEntityClient({ discovery }); let workingDirectory: string; if (config.has('backend.workingDirectory')) { workingDirectory = config.getString('backend.workingDirectory'); From 1ddcf191dbf5f0280383e3bb20f251016ed14889 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Thu, 29 Oct 2020 14:46:55 +0530 Subject: [PATCH 011/100] fix: use entityClient in create-app package --- .../default-app/packages/backend/src/plugins/scaffolder.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/create-app/templates/default-app/packages/backend/src/plugins/scaffolder.ts b/packages/create-app/templates/default-app/packages/backend/src/plugins/scaffolder.ts index 8de15920e9..2dc69feb45 100644 --- a/packages/create-app/templates/default-app/packages/backend/src/plugins/scaffolder.ts +++ b/packages/create-app/templates/default-app/packages/backend/src/plugins/scaffolder.ts @@ -11,7 +11,9 @@ import { CreateReactAppTemplater, Templaters, RepoVisibilityOptions, + CatalogEntityClient, } from '@backstage/plugin-scaffolder-backend'; +import { SingleHostDiscovery } from '@backstage/backend-common'; import { Octokit } from '@octokit/rest'; import { Gitlab } from '@gitbeaker/node'; import type { PluginEnvironment } from '../types'; @@ -97,6 +99,10 @@ export default async function createPlugin({ } const dockerClient = new Docker(); + + const discovery = SingleHostDiscovery.fromConfig(config); + const entityClient = new CatalogEntityClient({ discovery }); + return await createRouter({ preparers, templaters, @@ -104,5 +110,6 @@ export default async function createPlugin({ logger, config, dockerClient, + entityClient, }); } From 364939e5e3dee6511e62185a6d492a2f904e8f4a Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Thu, 29 Oct 2020 14:54:30 +0530 Subject: [PATCH 012/100] chore: remove try/catch --- plugins/scaffolder-backend/src/service/router.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/scaffolder-backend/src/service/router.ts b/plugins/scaffolder-backend/src/service/router.ts index e4d3d5c45a..2dc6a794fb 100644 --- a/plugins/scaffolder-backend/src/service/router.ts +++ b/plugins/scaffolder-backend/src/service/router.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { TemplateEntityV1alpha1 } from '@backstage/catalog-model'; import { Config, JsonValue } from '@backstage/config'; import fs from 'fs-extra'; import Docker from 'dockerode'; @@ -111,12 +110,7 @@ export async function createRouter( const values: RequiredTemplateValues & Record = req.body.values; - let template: TemplateEntityV1alpha1; - try { - template = await entityClient.findTemplate(templateName); - } catch (err) { - throw err; - } + const template = await entityClient.findTemplate(templateName); const validationResult: ValidatorResult = validate( values, From 21e071fa6c26ebec4dcca013d55351d56e024d59 Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Wed, 28 Oct 2020 18:23:13 -0500 Subject: [PATCH 013/100] working onelogin auth implementation --- app-config.yaml | 8 + packages/app/src/identityProviders.ts | 7 + .../core-api/src/apis/definitions/auth.ts | 11 ++ .../src/apis/implementations/auth/index.ts | 1 + .../auth/onelogin/OktaAuth.test.ts | 61 +++++++ .../auth/onelogin/OneLoginAuth.ts | 82 +++++++++ .../implementations/auth/onelogin/index.ts | 17 ++ packages/core/src/api-wrappers/defaultApis.ts | 11 ++ .../lib/passport/PassportStrategyHelper.ts | 1 - .../auth-backend/src/providers/factories.ts | 2 + .../src/providers/onelogin/index.ts | 1 + .../src/providers/onelogin/provider.ts | 160 ++++++++++++++++++ .../src/providers/onelogin/types.d.ts | 20 +++ 13 files changed, 381 insertions(+), 1 deletion(-) create mode 100644 packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts create mode 100644 packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts create mode 100644 packages/core-api/src/apis/implementations/auth/onelogin/index.ts create mode 100644 plugins/auth-backend/src/providers/onelogin/index.ts create mode 100644 plugins/auth-backend/src/providers/onelogin/provider.ts create mode 100644 plugins/auth-backend/src/providers/onelogin/types.d.ts diff --git a/app-config.yaml b/app-config.yaml index 4746e822da..a495df0263 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -232,6 +232,14 @@ auth: $env: AUTH_MICROSOFT_CLIENT_SECRET tenantId: $env: AUTH_MICROSOFT_TENANT_ID + onelogin: + development: + clientId: + $env: AUTH_ONELOGIN_CLIENT_ID + clientSecret: + $env: AUTH_ONELOGIN_CLIENT_SECRET + issuer: + $env: AUTH_ONELOGIN_ISSUER costInsights: engineerCost: 200000 products: diff --git a/packages/app/src/identityProviders.ts b/packages/app/src/identityProviders.ts index 388bc8d8b6..06ff6b07d3 100644 --- a/packages/app/src/identityProviders.ts +++ b/packages/app/src/identityProviders.ts @@ -21,6 +21,7 @@ import { githubAuthApiRef, samlAuthApiRef, microsoftAuthApiRef, + oneloginAuthApiRef, } from '@backstage/core'; export const providers = [ @@ -60,4 +61,10 @@ export const providers = [ message: 'Sign In using SAML', apiRef: samlAuthApiRef, }, + { + id: 'onelogin-auth-provider', + title: 'OneLogin', + message: 'Sign In using OneLogin', + apiRef: oneloginAuthApiRef, + }, ]; diff --git a/packages/core-api/src/apis/definitions/auth.ts b/packages/core-api/src/apis/definitions/auth.ts index 946baeabd9..c538065f3a 100644 --- a/packages/core-api/src/apis/definitions/auth.ts +++ b/packages/core-api/src/apis/definitions/auth.ts @@ -320,3 +320,14 @@ export const samlAuthApiRef: ApiRef< id: 'core.auth.saml', description: 'Example of how to use SAML custom provider', }); + +export const oneloginAuthApiRef: ApiRef< + OAuthApi & + OpenIdConnectApi & + ProfileInfoApi & + BackstageIdentityApi & + SessionApi +> = createApiRef({ + id: 'core.auth.onelogin', + description: 'Provides authentication towards OneLogin APIs and identities', +}); diff --git a/packages/core-api/src/apis/implementations/auth/index.ts b/packages/core-api/src/apis/implementations/auth/index.ts index 39223e8e15..7ef78d19cf 100644 --- a/packages/core-api/src/apis/implementations/auth/index.ts +++ b/packages/core-api/src/apis/implementations/auth/index.ts @@ -22,3 +22,4 @@ export * from './okta'; export * from './saml'; export * from './auth0'; export * from './microsoft'; +export * from './onelogin'; diff --git a/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts b/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts new file mode 100644 index 0000000000..d6b1a07d9d --- /dev/null +++ b/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts @@ -0,0 +1,61 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import OktaAuth from './OktaAuth'; +import MockOAuthApi from '../../OAuthRequestApi/MockOAuthApi'; +import { UrlPatternDiscovery } from '../../DiscoveryApi'; + +const PREFIX = 'okta.'; + +const getSession = jest.fn(); + +jest.mock('../../../../lib/AuthSessionManager', () => ({ + ...(jest.requireActual('../../../../lib/AuthSessionManager') as any), + RefreshingAuthSessionManager: class { + getSession = getSession; + }, +})); + +describe('OktaAuth', () => { + afterEach(() => { + jest.resetAllMocks(); + }); + + it.each([ + ['openid', ['openid']], + ['profile email', ['profile', 'email']], + [`${PREFIX}groups.manage`, [`${PREFIX}groups.manage`]], + ['groups.read', [`${PREFIX}groups.read`]], + [ + `${PREFIX}groups.manage groups.read, openid`, + [`${PREFIX}groups.manage`, `${PREFIX}groups.read`, 'openid'], + ], + [`email\t ${PREFIX}groups.read`, ['email', `${PREFIX}groups.read`]], + + // Some incorrect scopes that we don't try to fix + [`${PREFIX}email`, [`${PREFIX}email`]], + [`${PREFIX}profile`, [`${PREFIX}profile`]], + [`${PREFIX}openid`, [`${PREFIX}openid`]], + ])(`should normalize scopes correctly - %p`, (scope, scopes) => { + const auth = OktaAuth.create({ + oauthRequestApi: new MockOAuthApi(), + discoveryApi: UrlPatternDiscovery.compile('http://example.com'), + }); + + auth.getAccessToken(scope); + expect(getSession).toHaveBeenCalledWith({ scopes: new Set(scopes) }); + }); +}); diff --git a/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts b/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts new file mode 100644 index 0000000000..7420b21510 --- /dev/null +++ b/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts @@ -0,0 +1,82 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import OneLoginIcon from '@material-ui/icons/AcUnit'; +import { oneloginAuthApiRef } from '@backstage/core-api/src/apis/definitions/auth'; +import { + OAuthRequestApi, + AuthProvider, + DiscoveryApi, +} from '@backstage/core-api/src/apis/definitions'; +import { OAuth2 } from '@backstage/core-api/src/apis/implementations/auth/oauth2'; + +type CreateOptions = { + discoveryApi: DiscoveryApi; + oauthRequestApi: OAuthRequestApi; + + environment?: string; + provider?: AuthProvider & { id: string }; +}; + +const DEFAULT_PROVIDER = { + id: 'onelogin', + title: 'onelogin', + icon: OneLoginIcon, +}; + +const OIDC_SCOPES: Set = new Set([ + 'openid', + 'profile', + 'email', + 'phone', + 'address', + 'groups', + 'offline_access', +]); + +const SCOPE_PREFIX: string = 'onelogin.'; + +class OneLoginAuth { + static create({ + discoveryApi, + environment = 'development', + provider = DEFAULT_PROVIDER, + oauthRequestApi, + }: CreateOptions): typeof oneloginAuthApiRef.T { + return OAuth2.create({ + discoveryApi, + oauthRequestApi, + provider, + environment, + defaultScopes: ['openid', 'email', 'profile', 'offline_access'], + scopeTransform(scopes) { + return scopes.map(scope => { + if (OIDC_SCOPES.has(scope)) { + return scope; + } + + if (scope.startsWith(SCOPE_PREFIX)) { + return scope; + } + + return `${SCOPE_PREFIX}${scope}`; + }); + }, + }); + } +} + +export default OneLoginAuth; diff --git a/packages/core-api/src/apis/implementations/auth/onelogin/index.ts b/packages/core-api/src/apis/implementations/auth/onelogin/index.ts new file mode 100644 index 0000000000..1d163207db --- /dev/null +++ b/packages/core-api/src/apis/implementations/auth/onelogin/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { default as OneLoginAuth } from './OneLoginAuth'; diff --git a/packages/core/src/api-wrappers/defaultApis.ts b/packages/core/src/api-wrappers/defaultApis.ts index d0a777dc94..61d4f3a7e1 100644 --- a/packages/core/src/api-wrappers/defaultApis.ts +++ b/packages/core/src/api-wrappers/defaultApis.ts @@ -44,6 +44,8 @@ import { UrlPatternDiscovery, samlAuthApiRef, SamlAuth, + oneloginAuthApiRef, + OneLoginAuth, } from '@backstage/core-api'; export const defaultApis = [ @@ -142,4 +144,13 @@ export const defaultApis = [ }, factory: ({ discoveryApi }) => SamlAuth.create({ discoveryApi }), }), + createApiFactory({ + api: oneloginAuthApiRef, + deps: { + discoveryApi: discoveryApiRef, + oauthRequestApi: oauthRequestApiRef, + }, + factory: ({ discoveryApi, oauthRequestApi }) => + OneLoginAuth.create({ discoveryApi, oauthRequestApi }), + }), ]; diff --git a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts index 3264fd8faa..28f15ee9e8 100644 --- a/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts +++ b/plugins/auth-backend/src/lib/passport/PassportStrategyHelper.ts @@ -116,7 +116,6 @@ export const executeFrameHandlerStrategy = async ( strategy.redirect = () => { reject(new Error('Unexpected redirect')); }; - strategy.authenticate(req, {}); }, ); diff --git a/plugins/auth-backend/src/providers/factories.ts b/plugins/auth-backend/src/providers/factories.ts index 37761c2305..a764d0b50e 100644 --- a/plugins/auth-backend/src/providers/factories.ts +++ b/plugins/auth-backend/src/providers/factories.ts @@ -22,6 +22,7 @@ import { createOktaProvider } from './okta'; import { createSamlProvider } from './saml'; import { createAuth0Provider } from './auth0'; import { createMicrosoftProvider } from './microsoft'; +import { createOneLoginProvider } from './onelogin'; import { AuthProviderFactory, AuthProviderFactoryOptions } from './types'; const factories: { [providerId: string]: AuthProviderFactory } = { @@ -33,6 +34,7 @@ const factories: { [providerId: string]: AuthProviderFactory } = { auth0: createAuth0Provider, microsoft: createMicrosoftProvider, oauth2: createOAuth2Provider, + onelogin: createOneLoginProvider, }; export function createAuthProvider( diff --git a/plugins/auth-backend/src/providers/onelogin/index.ts b/plugins/auth-backend/src/providers/onelogin/index.ts new file mode 100644 index 0000000000..4c110c56ac --- /dev/null +++ b/plugins/auth-backend/src/providers/onelogin/index.ts @@ -0,0 +1 @@ +export { createOneLoginProvider } from './provider'; \ No newline at end of file diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts new file mode 100644 index 0000000000..a9b43fc8d4 --- /dev/null +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -0,0 +1,160 @@ +//import { Strategy as OneLoginStrategy } from 'passport-openidconnect'; +import { Strategy as OneLoginStrategy } from 'passport-onelogin'; +import express from 'express'; +import { + OAuthAdapter, + OAuthProviderOptions, + OAuthHandlers, + OAuthResponse, + OAuthEnvironmentHandler, + OAuthStartRequest, + encodeState, + OAuthRefreshRequest, +} from '../../lib/oauth'; +import passport from 'passport'; +import { + executeFrameHandlerStrategy, + executeRedirectStrategy, + executeRefreshTokenStrategy, + makeProfileInfo, + executeFetchUserProfileStrategy, + PassportDoneCallback, +} from '../../lib/passport'; +import { RedirectInfo, AuthProviderFactory } from '../types'; + +type PrivateInfo = { + refreshToken: string; +}; + +export type OneLoginProviderOptions = OAuthProviderOptions & { + issuer: string +} + +export class OneLoginProvider implements OAuthHandlers { + private readonly _strategy: any; + + constructor(options: OneLoginProviderOptions) { + this._strategy = new OneLoginStrategy( + { + issuer: options.issuer, + clientID: options.clientId, + clientSecret: options.clientSecret, + callbackURL: options.callbackUrl, + passReqToCallback: false as true, + }, + ( + accessToken: any, + refreshToken: any, + params: any, + rawProfile: passport.Profile, + done: PassportDoneCallback, + ) => { + const profile = makeProfileInfo(rawProfile, params.id_token); + + done( + undefined, + { + providerInfo: { + idToken: params.id_token, + accessToken, + scope: params.scope, + //scope: 'profile', + expiresInSeconds: params.expires_in, + }, + profile, + }, + { + refreshToken, + }, + ); + }, + ); + } + async start(req: OAuthStartRequest): Promise { + return await executeRedirectStrategy(req, this._strategy, { + accessType: 'offline', + prompt: 'consent', + scope: 'openid', + state: encodeState(req.state), + }); + } + + async handler( + req: express.Request, + ): Promise<{ response: OAuthResponse; refreshToken: string }> { + const { response, privateInfo } = await executeFrameHandlerStrategy< + OAuthResponse, + PrivateInfo + >(req, this._strategy); + + return { + response: await this.populateIdentity(response), + refreshToken: privateInfo.refreshToken, + }; + } + + async refresh(req: OAuthRefreshRequest): Promise { + const { accessToken, params } = await executeRefreshTokenStrategy( + this._strategy, + req.refreshToken, + req.scope, + ); + + const profile = await executeFetchUserProfileStrategy( + this._strategy, + accessToken, + params.id_token, + ); + + return this.populateIdentity({ + providerInfo: { + accessToken, + idToken: params.id_token, + expiresInSeconds: params.expires_in, + scope: params.scope, + }, + profile, + }); + } + + private async populateIdentity( + response: OAuthResponse, + ): Promise { + const { profile } = response; + + if (!profile.email) { + throw new Error('OIDC profile contained no email'); + } + + const id = profile.email.split('@')[0]; + + return { ...response, backstageIdentity: { id } }; + } +} + + +export const createOneLoginProvider: AuthProviderFactory = ({ + globalConfig, + config, + tokenIssuer, +}) => + OAuthEnvironmentHandler.mapConfig(config, envConfig => { + const providerId = 'onelogin'; + const clientId = envConfig.getString('clientId'); + const clientSecret = envConfig.getString('clientSecret'); + const issuer = envConfig.getString('issuer'); + const callbackUrl = `${globalConfig.baseUrl}/${providerId}/handler/frame`; + + const provider = new OneLoginProvider({ + clientId, + clientSecret, + callbackUrl, + issuer, + }); + + return OAuthAdapter.fromConfig(globalConfig, provider, { + disableRefresh: false, + providerId, + tokenIssuer, + }); + }); diff --git a/plugins/auth-backend/src/providers/onelogin/types.d.ts b/plugins/auth-backend/src/providers/onelogin/types.d.ts new file mode 100644 index 0000000000..bff5a7e33c --- /dev/null +++ b/plugins/auth-backend/src/providers/onelogin/types.d.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +declare module 'passport-openidconnect' { + export class Strategy { + constructor(options: any, verify: any); + } +} From 159f5ee77c5042eb84acce2d5563eef9ca214df0 Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Wed, 28 Oct 2020 19:18:13 -0500 Subject: [PATCH 014/100] add passport-onelogin dependency --- .../auth/onelogin/OktaAuth.test.ts | 61 ------------------- plugins/auth-backend/package.json | 1 + yarn.lock | 9 +++ 3 files changed, 10 insertions(+), 61 deletions(-) delete mode 100644 packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts diff --git a/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts b/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts deleted file mode 100644 index d6b1a07d9d..0000000000 --- a/packages/core-api/src/apis/implementations/auth/onelogin/OktaAuth.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import OktaAuth from './OktaAuth'; -import MockOAuthApi from '../../OAuthRequestApi/MockOAuthApi'; -import { UrlPatternDiscovery } from '../../DiscoveryApi'; - -const PREFIX = 'okta.'; - -const getSession = jest.fn(); - -jest.mock('../../../../lib/AuthSessionManager', () => ({ - ...(jest.requireActual('../../../../lib/AuthSessionManager') as any), - RefreshingAuthSessionManager: class { - getSession = getSession; - }, -})); - -describe('OktaAuth', () => { - afterEach(() => { - jest.resetAllMocks(); - }); - - it.each([ - ['openid', ['openid']], - ['profile email', ['profile', 'email']], - [`${PREFIX}groups.manage`, [`${PREFIX}groups.manage`]], - ['groups.read', [`${PREFIX}groups.read`]], - [ - `${PREFIX}groups.manage groups.read, openid`, - [`${PREFIX}groups.manage`, `${PREFIX}groups.read`, 'openid'], - ], - [`email\t ${PREFIX}groups.read`, ['email', `${PREFIX}groups.read`]], - - // Some incorrect scopes that we don't try to fix - [`${PREFIX}email`, [`${PREFIX}email`]], - [`${PREFIX}profile`, [`${PREFIX}profile`]], - [`${PREFIX}openid`, [`${PREFIX}openid`]], - ])(`should normalize scopes correctly - %p`, (scope, scopes) => { - const auth = OktaAuth.create({ - oauthRequestApi: new MockOAuthApi(), - discoveryApi: UrlPatternDiscovery.compile('http://example.com'), - }); - - auth.getAccessToken(scope); - expect(getSession).toHaveBeenCalledWith({ scopes: new Set(scopes) }); - }); -}); diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index 6489c8547d..7266395c78 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -45,6 +45,7 @@ "passport-microsoft": "^0.1.0", "passport-oauth2": "^1.5.0", "passport-okta-oauth": "^0.0.1", + "passport-onelogin-oauth": "^0.0.1", "passport-saml": "^1.3.3", "uuid": "^8.0.0", "winston": "^3.2.1", diff --git a/yarn.lock b/yarn.lock index b2b87be5e0..4d1a4cd856 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17915,6 +17915,15 @@ passport-okta-oauth@^0.0.1: pkginfo "0.2.x" uid2 "0.0.3" +passport-onelogin-oauth@^0.0.1: + version "0.0.1" + resolved "https://registry.npmjs.org/passport-onelogin-oauth/-/passport-onelogin-oauth-0.0.1.tgz#6e991ac6720783fdd80d4caa08c36cc71ef19962" + integrity sha512-EXFBqlJdHf5AX4QaiZsLfhgQUOR6z3zGA5479SUJF4I4rnAt7yasZEbs27pg8MRiQh/uLZEWLGMoVXr6LHV9mQ== + dependencies: + passport-oauth "1.0.0" + pkginfo "0.2.x" + uid2 "0.0.3" + passport-saml@^1.3.3: version "1.3.3" resolved "https://registry.npmjs.org/passport-saml/-/passport-saml-1.3.3.tgz#cbea1a2b21ff32b3bc4bfd84dc39c3a370df9935" From 11664e3a99c79e95f92ec60ad681ca8849e282ea Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Wed, 28 Oct 2020 19:34:02 -0500 Subject: [PATCH 015/100] run prettier --- plugins/auth-backend/src/providers/onelogin/index.ts | 2 +- plugins/auth-backend/src/providers/onelogin/provider.ts | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/auth-backend/src/providers/onelogin/index.ts b/plugins/auth-backend/src/providers/onelogin/index.ts index 4c110c56ac..c356ef2d6d 100644 --- a/plugins/auth-backend/src/providers/onelogin/index.ts +++ b/plugins/auth-backend/src/providers/onelogin/index.ts @@ -1 +1 @@ -export { createOneLoginProvider } from './provider'; \ No newline at end of file +export { createOneLoginProvider } from './provider'; diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index a9b43fc8d4..bafc0c61ca 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -27,8 +27,8 @@ type PrivateInfo = { }; export type OneLoginProviderOptions = OAuthProviderOptions & { - issuer: string -} + issuer: string; +}; export class OneLoginProvider implements OAuthHandlers { private readonly _strategy: any; @@ -132,7 +132,6 @@ export class OneLoginProvider implements OAuthHandlers { } } - export const createOneLoginProvider: AuthProviderFactory = ({ globalConfig, config, From b652bf2cc58ae56e34a73d4f74f25904d53ab61e Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Wed, 28 Oct 2020 19:48:21 -0500 Subject: [PATCH 016/100] add changeset for onelogin --- .changeset/beige-pandas-thank.md | 5 +++++ .../src/providers/onelogin/index.ts | 16 ++++++++++++++++ .../src/providers/onelogin/provider.ts | 19 +++++++++++++++++-- .../src/providers/onelogin/types.d.ts | 2 +- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 .changeset/beige-pandas-thank.md diff --git a/.changeset/beige-pandas-thank.md b/.changeset/beige-pandas-thank.md new file mode 100644 index 0000000000..b2c52842fc --- /dev/null +++ b/.changeset/beige-pandas-thank.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Add OneLogin Identity Provider to Auth Backend diff --git a/plugins/auth-backend/src/providers/onelogin/index.ts b/plugins/auth-backend/src/providers/onelogin/index.ts index c356ef2d6d..79af226cd1 100644 --- a/plugins/auth-backend/src/providers/onelogin/index.ts +++ b/plugins/auth-backend/src/providers/onelogin/index.ts @@ -1 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + export { createOneLoginProvider } from './provider'; diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index bafc0c61ca..d11baa605d 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -1,5 +1,20 @@ -//import { Strategy as OneLoginStrategy } from 'passport-openidconnect'; -import { Strategy as OneLoginStrategy } from 'passport-onelogin'; +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Strategy as OneLoginStrategy } from 'passport-onelogin-oauth'; import express from 'express'; import { OAuthAdapter, diff --git a/plugins/auth-backend/src/providers/onelogin/types.d.ts b/plugins/auth-backend/src/providers/onelogin/types.d.ts index bff5a7e33c..d418f1bcd4 100644 --- a/plugins/auth-backend/src/providers/onelogin/types.d.ts +++ b/plugins/auth-backend/src/providers/onelogin/types.d.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -declare module 'passport-openidconnect' { +declare module 'passport-onelogin-oauth' { export class Strategy { constructor(options: any, verify: any); } From 842acf4f5d95915bae902c89650a22573aafd596 Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Wed, 28 Oct 2020 19:56:05 -0500 Subject: [PATCH 017/100] remove commented code --- plugins/auth-backend/src/providers/onelogin/provider.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/auth-backend/src/providers/onelogin/provider.ts b/plugins/auth-backend/src/providers/onelogin/provider.ts index d11baa605d..97cf182e5a 100644 --- a/plugins/auth-backend/src/providers/onelogin/provider.ts +++ b/plugins/auth-backend/src/providers/onelogin/provider.ts @@ -73,7 +73,6 @@ export class OneLoginProvider implements OAuthHandlers { idToken: params.id_token, accessToken, scope: params.scope, - //scope: 'profile', expiresInSeconds: params.expires_in, }, profile, From 05b0ed81f543a2eac67606bb4ad225b0d2b95d30 Mon Sep 17 00:00:00 2001 From: Forrest Waters Date: Thu, 29 Oct 2020 12:02:29 -0500 Subject: [PATCH 018/100] fix imports --- .../src/apis/implementations/auth/onelogin/OneLoginAuth.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts b/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts index 7420b21510..ff5c7c1990 100644 --- a/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/onelogin/OneLoginAuth.ts @@ -15,13 +15,13 @@ */ import OneLoginIcon from '@material-ui/icons/AcUnit'; -import { oneloginAuthApiRef } from '@backstage/core-api/src/apis/definitions/auth'; +import { oneloginAuthApiRef } from '../../../definitions/auth'; import { OAuthRequestApi, AuthProvider, DiscoveryApi, -} from '@backstage/core-api/src/apis/definitions'; -import { OAuth2 } from '@backstage/core-api/src/apis/implementations/auth/oauth2'; +} from '../../../definitions'; +import { OAuth2 } from '../oauth2'; type CreateOptions = { discoveryApi: DiscoveryApi; From 8fc93d46967e6f15c48b9c402058a09d619583eb Mon Sep 17 00:00:00 2001 From: Alan Crosswell Date: Thu, 29 Oct 2020 16:57:16 -0400 Subject: [PATCH 019/100] Gitlab Enterprise documentation Most importantly documents the Gitlab callback URL but also the various scopes that seem appropriate. --- plugins/auth-backend/README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/plugins/auth-backend/README.md b/plugins/auth-backend/README.md index 355fcc1536..4f5a9ef6c7 100644 --- a/plugins/auth-backend/README.md +++ b/plugins/auth-backend/README.md @@ -52,9 +52,27 @@ export AUTH_GITHUB_ENTERPRISE_INSTANCE_URL=https://x ### Gitlab +#### Creating a Gitlab Enterprise OAuth application + +Follow this link, substituting `gitlab.example.com` for your Gitlab enterprise domain, https://gitlab.example.com/profile/applications + +1. Set Application Name to `backstage-dev` or something along those lines. +1. The Authorization Callback URL should match the redirect URI set in Backstage. + 1. Set this to `http://localhost:7000/api/auth/gitlab/handler/frame` for local development. + 1. Set this to `http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/gitlab/handler/frame` for non-local deployments. + 1. Select the checked scopes from this list: + - [ ] `api` Grants complete read/write access to the API, including all groups and projects. + - [x] `read_user` Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users. + - [x] `read_repository` Grants read-only access to repositories on private projects using Git-over-HTTP (not using the API). + - [x] `write_repository` Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API). + - [ ] `sudo` Grants permission to perform API actions as any user in the system, when authenticated as an admin user. + - [x] `openid` Grants permission to authenticate with GitLab using OpenID Connect. Also gives read-only access to the user's profile and group memberships. + - [x] `profile` Grants read-only access to the user's profile data using OpenID Connect. + - [x] `email` Grants read-only access to the user's primary email address using OpenID Connect. + ```bash -export GITLAB_BASE_URL=x # default is https://gitlab.com -export AUTH_GITLAB_CLIENT_ID=x +export GITLAB_BASE_URL=https://gitlab.example.com # for GitLab Enterprise. default is https://gitlab.com +export AUTH_GITLAB_CLIENT_ID=x # Gitlab calls this the Application ID export AUTH_GITLAB_CLIENT_SECRET=x ``` From efff67c205aed75997a1badca2e91385f236e662 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Fri, 30 Oct 2020 09:49:53 +0100 Subject: [PATCH 020/100] TechDocs: Update docs around docker-in-docker installation Fix python package name to mkdocs-techdocs-core Refer to the original Dockerfile where users can seek inspiration from --- docs/features/techdocs/getting-started.md | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/docs/features/techdocs/getting-started.md b/docs/features/techdocs/getting-started.md index 72efb6eee0..288ddb74ae 100644 --- a/docs/features/techdocs/getting-started.md +++ b/docs/features/techdocs/getting-started.md @@ -73,10 +73,10 @@ required. ### Disable Docker in Docker situation (Optional) -The TechDocs backend plugin runs a docker container with mkdocs to generate the -frontend of the docs from source files (Markdown). If you are deploying -Backstage using Docker, this will mean that your Backstage Docker container will -try to run another Docker container for TechDocs backend. +The TechDocs backend plugin runs a docker container with mkdocs installed to +generate the frontend of the docs from source files (Markdown). If you are +deploying Backstage using Docker, this will mean that your Backstage Docker +container will try to run another Docker container for TechDocs backend. To avoid this problem, we have a configuration available. You can set a value in your `app-config.yaml` that tells the techdocs generator if it should run the @@ -90,10 +90,16 @@ techdocs: ``` Setting `generators.techdocs` to `local` means you will have to make sure your -environment is compatible with techdocs. You will have to install the -`mkdocs-techdocs-container` and 'mkdocs' package from pip, as well as graphviz -and plantuml from your package manager. This has only been tested with python -3.7 and python 3.8. +environment is compatible with techdocs. + +You will have to install the `mkdocs-techdocs-core` and `mkdocs` package from +pip, as well as `graphviz` and `plantuml` from your OS package manager (e.g. +apt). See our +[Dockerfile](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/Dockerfile) +for the latest requirements. You should be trying to match your Dockerfile with +this one. + +It is worth mentioning that we recommend Python version 3.7 or higher. ## Run Backstage locally From 6018855f34e1d1cb19bf904285ed52984243d1cb Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Fri, 30 Oct 2020 10:28:31 +0100 Subject: [PATCH 021/100] TechDocs: Add caveat around Markdown version --- docs/features/techdocs/getting-started.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/features/techdocs/getting-started.md b/docs/features/techdocs/getting-started.md index 288ddb74ae..cbbbc1e6cd 100644 --- a/docs/features/techdocs/getting-started.md +++ b/docs/features/techdocs/getting-started.md @@ -92,14 +92,21 @@ techdocs: Setting `generators.techdocs` to `local` means you will have to make sure your environment is compatible with techdocs. -You will have to install the `mkdocs-techdocs-core` and `mkdocs` package from +You will have to install the `mkdocs` and `mkdocs-techdocs-core` package from pip, as well as `graphviz` and `plantuml` from your OS package manager (e.g. apt). See our [Dockerfile](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/Dockerfile) for the latest requirements. You should be trying to match your Dockerfile with this one. -It is worth mentioning that we recommend Python version 3.7 or higher. +Note: We recommend Python version 3.7 or higher. + +Caveat: Please install the `mkdocs-techdocs-core` package after all other Python +packages. The order is important to make sure we get correct version of some of +the dependencies. For example, we want `Markdown` version to be +[3.2.2](https://github.com/spotify/backstage/blob/f9f70c225548017b6a14daea75b00fbd399c11eb/packages/techdocs-container/techdocs-core/requirements.txt#L11). +You can also explicitly install `Markdown==3.2.2` after installing all other +Python packages. ## Run Backstage locally From 28a5c9b5649f60aad3570c2774c33f9b5811b9a8 Mon Sep 17 00:00:00 2001 From: Abhishek Jakhar Date: Wed, 28 Oct 2020 22:19:16 +0530 Subject: [PATCH 022/100] make export of HeaderTabs consistent with other components export --- .../core/src/layout/HeaderTabs/HeaderTabs.tsx | 90 +++++++++++++++++++ packages/core/src/layout/HeaderTabs/index.tsx | 75 +--------------- 2 files changed, 91 insertions(+), 74 deletions(-) create mode 100644 packages/core/src/layout/HeaderTabs/HeaderTabs.tsx diff --git a/packages/core/src/layout/HeaderTabs/HeaderTabs.tsx b/packages/core/src/layout/HeaderTabs/HeaderTabs.tsx new file mode 100644 index 0000000000..b509cae14f --- /dev/null +++ b/packages/core/src/layout/HeaderTabs/HeaderTabs.tsx @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// TODO(blam): Remove this implementation when the Tabs are ready +// This is just a temporary solution to implementing tabs for now + +import React, { useState, useEffect } from 'react'; +import { makeStyles, Tabs, Tab } from '@material-ui/core'; + +const useStyles = makeStyles(theme => ({ + tabsWrapper: { + gridArea: 'pageSubheader', + backgroundColor: theme.palette.background.paper, + paddingLeft: theme.spacing(3), + }, + defaultTab: { + padding: theme.spacing(3, 3), + ...theme.typography.caption, + textTransform: 'uppercase', + fontWeight: 'bold', + color: theme.palette.text.secondary, + }, + selected: { + color: theme.palette.text.primary, + }, +})); + +export type Tab = { + id: string; + label: string; +}; + +export const HeaderTabs: React.FC<{ + tabs: Tab[]; + onChange?: (index: number) => void; + selectedIndex?: number; +}> = ({ tabs, onChange, selectedIndex }) => { + const [selectedTab, setSelectedTab] = useState(selectedIndex ?? 0); + const styles = useStyles(); + + const handleChange = (_: React.ChangeEvent<{}>, index: number) => { + if (selectedIndex === undefined) { + setSelectedTab(index); + } + if (onChange) onChange(index); + }; + + useEffect(() => { + if (selectedIndex !== undefined) { + setSelectedTab(selectedIndex); + } + }, [selectedIndex]); + + return ( +
+ + {tabs.map((tab, index) => ( + + ))} + +
+ ); +}; diff --git a/packages/core/src/layout/HeaderTabs/index.tsx b/packages/core/src/layout/HeaderTabs/index.tsx index b509cae14f..9a37f20af9 100644 --- a/packages/core/src/layout/HeaderTabs/index.tsx +++ b/packages/core/src/layout/HeaderTabs/index.tsx @@ -14,77 +14,4 @@ * limitations under the License. */ -// TODO(blam): Remove this implementation when the Tabs are ready -// This is just a temporary solution to implementing tabs for now - -import React, { useState, useEffect } from 'react'; -import { makeStyles, Tabs, Tab } from '@material-ui/core'; - -const useStyles = makeStyles(theme => ({ - tabsWrapper: { - gridArea: 'pageSubheader', - backgroundColor: theme.palette.background.paper, - paddingLeft: theme.spacing(3), - }, - defaultTab: { - padding: theme.spacing(3, 3), - ...theme.typography.caption, - textTransform: 'uppercase', - fontWeight: 'bold', - color: theme.palette.text.secondary, - }, - selected: { - color: theme.palette.text.primary, - }, -})); - -export type Tab = { - id: string; - label: string; -}; - -export const HeaderTabs: React.FC<{ - tabs: Tab[]; - onChange?: (index: number) => void; - selectedIndex?: number; -}> = ({ tabs, onChange, selectedIndex }) => { - const [selectedTab, setSelectedTab] = useState(selectedIndex ?? 0); - const styles = useStyles(); - - const handleChange = (_: React.ChangeEvent<{}>, index: number) => { - if (selectedIndex === undefined) { - setSelectedTab(index); - } - if (onChange) onChange(index); - }; - - useEffect(() => { - if (selectedIndex !== undefined) { - setSelectedTab(selectedIndex); - } - }, [selectedIndex]); - - return ( -
- - {tabs.map((tab, index) => ( - - ))} - -
- ); -}; +export { HeaderTabs } from './HeaderTabs'; From 805626336f8fa755b8d93a9bd2f1639668bf817e Mon Sep 17 00:00:00 2001 From: Abhishek Jakhar Date: Wed, 28 Oct 2020 22:30:23 +0530 Subject: [PATCH 023/100] export type Tab from HeaderTabs index.tsx --- packages/core/src/layout/HeaderTabs/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/layout/HeaderTabs/index.tsx b/packages/core/src/layout/HeaderTabs/index.tsx index 9a37f20af9..1097698265 100644 --- a/packages/core/src/layout/HeaderTabs/index.tsx +++ b/packages/core/src/layout/HeaderTabs/index.tsx @@ -14,4 +14,5 @@ * limitations under the License. */ +export type { Tab } from './HeaderTabs'; export { HeaderTabs } from './HeaderTabs'; From 357f42b6a105d7ce1ed93b66abe10bb1e8e464f7 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Thu, 29 Oct 2020 13:14:15 +0100 Subject: [PATCH 024/100] feat: add MarkdownContent component --- .changeset/wet-tools-exercise.md | 15 +++ packages/core/package.json | 4 +- .../MarkdownContent.stories.tsx | 120 ++++++++++++++++++ .../MarkdownContent/MarkdownContent.test.tsx | 43 +++++++ .../MarkdownContent/MarkdownContent.tsx | 74 +++++++++++ .../src/components/MarkdownContent/index.ts | 17 +++ packages/core/src/components/index.ts | 1 + 7 files changed, 273 insertions(+), 1 deletion(-) create mode 100644 .changeset/wet-tools-exercise.md create mode 100644 packages/core/src/components/MarkdownContent/MarkdownContent.stories.tsx create mode 100644 packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx create mode 100644 packages/core/src/components/MarkdownContent/MarkdownContent.tsx create mode 100644 packages/core/src/components/MarkdownContent/index.ts diff --git a/.changeset/wet-tools-exercise.md b/.changeset/wet-tools-exercise.md new file mode 100644 index 0000000000..ba6eb8314f --- /dev/null +++ b/.changeset/wet-tools-exercise.md @@ -0,0 +1,15 @@ +--- +'@backstage/core': minor +--- + +Adds the MarkdownContent component to render and display markdown input. + +``` + +``` + +Render and display the github flavored markdown [GFM](https://github.github.com/gfm/) input: + +``` + +``` diff --git a/packages/core/package.json b/packages/core/package.json index ec4411b390..a78fcc0a82 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -48,11 +48,13 @@ "react-dom": "^16.12.0", "react-helmet": "6.1.0", "react-hook-form": "^6.6.0", + "react-markdown": "^5.0.2", "react-router": "6.0.0-beta.0", "react-router-dom": "6.0.0-beta.0", "react-sparklines": "^1.7.0", "react-syntax-highlighter": "^13.5.1", - "react-use": "^15.3.3" + "react-use": "^15.3.3", + "remark-gfm": "^1.0.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.26", diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.stories.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.stories.tsx new file mode 100644 index 0000000000..b3747971a7 --- /dev/null +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.stories.tsx @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { MarkdownContent } from './MarkdownContent'; + +export default { + title: 'Data Display/MarkdownContent', + component: MarkdownContent, +}; + +const markdownGithubFlavored = + '# GFM\n' + + '\n' + + '## Autolink literals\n' + + '\n' + + 'www.example.com, https://example.com, and contact@example.com.\n' + + '\n' + + '## Strikethrough\n' + + '\n' + + '~one~ or ~~two~~ tildes.\n' + + '\n' + + '## Table\n' + + '\n' + + '| foo | bar |\n' + + '| --- | --- |\n' + + '| baz | bim |\n' + + '| buz | bum |\n' + + '| biz | bim |\n' + + '\n' + + '## Tasklist\n' + + '\n' + + '* [ ] to do\n' + + '* [x] done'; + +const markdown = + '# Choreas Iovis\n' + + '\n' + + '## Incedere retenta\n' + + '\n' + + 'Lorem markdownum velamina [nupta amici aequoreis](http://est-quae.org/sic)\n' + + 'desertum factum premunt: falcato parvos nihil. Facietque vulnus tum dumque\n' + + 'reserato Maeandros insignia solidis, tot longi causa et nimium arcuerat altera\n' + + 'unus, in quis.\n' + + '\n' + + '1. Est qui dixere nullus\n' + + '2. Fuit obicit\n' + + '3. Vim patrem portae materiem ulla quod crater\n' + + '4. Rigido est magis raptor quid crepitante aequa\n' + + '5. Imago quis ignis tamen\n' + + '\n' + + '## Vix posse vestem\n' + + '\n' + + 'Nec deos robora visa pater toris remittit *crimina* utque, ora ego lacerae quae\n' + + 'laboris laturus silvas audax terrae. Qua fuisse patrio inlaesas [sine\n' + + 'seque](http://ambitvictore.org/), nondum et tamen annis, nec. Poscimur magnum,\n' + + 'Hesperium dedisti, ait ipse et fides terras scalas.\n' + + '\n' + + '- Quas superis satyri adloquitur natura hausimus\n' + + '- Dux suspicere siccare\n' + + '- Cape huc quid videor\n' + + '- Foret vivit concolor\n' + + '- Occupat morte oblectamina minuunt quaeque placidis nate\n' + + '- Non posset' + + '\n' + + 'Licet movitque dederat potest in sorores in sola pendere luce pro quod, sit.\n' + + 'Inpia ut in opibus flores uno quam quo multifidasque fera anhelitus retorsit.\n' + + 'Sustinui premebat puppe somnos. Dicit genu sic qualia excussit facunde parvae in\n' + + 'robur, Ianthe Interea. Superis victorque ponat puta cum: est enim.\n' + + '\n' + + '## Tacetve est in nullis Cerberus silvani luminibus\n' + + '\n' + + 'Divulsere *summissoque esse manes*; artus ausus conatoque utque: illo\n' + + 'Phaestiadas quod pascat et referentem, nec. In seris, iubebat iam nomina:\n' + + 'tergoque occidit ingenii.\n' + + '\n' + + ' mouseDdl(tablet_definition * phishing_icann_mamp);\n' + + ' vector += 20 + key_ram.source_isa(hard_tunneling_zone(w_wireless_page));\n' + + ' if (rate_client_direct) {\n' + + ' textXDpi += sql_cloud_class.sdk.speakers_wired_warm(pcZettabyteGis(\n' + + ' market_bezel, 1), 1);\n' + + ' tag_scraping = format_ppi;\n' + + ' }\n' + + '\n' + + 'Per quem, nec formosior qui cum Peliden me interea **ornatos**! Te facit\n' + + 'instimulat sequentia in flumina exilium te vulnere, sola. Coetum nec amnes.\n' + + 'Protinus nam Caras cava, *a* vocantem dicta inevitabile, nata nulla.\n' + + '\n' + + '## Piscem Iunoni maius\n' + + '\n' + + 'Prece fallere arduus, *ad Athamantis laticem* simillima in ante Temesesque opus!\n' + + 'Ausim quoslibet crede Tyria: Medusa [muneris Aeneaden\n' + + 'tutaque](http://cragon-aequoribus.io/) genitor fistula cogeris abstrahere nati,\n' + + 'relevare videri *non*.\n' + + '\n' + + '> Promissas ulterius senectae Desinet his ait pedum! Libet *sublime* vibrantia\n' + + '> si *dicta quod* pectora cupidine hastam dominoque.\n' + + '\n' + + 'Pedis hic, est bis quod, adhaeret et reditum. Fixa sic vel pugnare **forte est**\n' + + 'parte in quaerite generisque repugnat; de quod, creatos.'; +export const MarkdownContentCommonMark = () => ( + +); + +export const MarkdownContentGithubFlavoredCommonMark = () => ( + +); diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx new file mode 100644 index 0000000000..a96525a3f6 --- /dev/null +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -0,0 +1,43 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { renderWithEffects, wrapInTestApp } from '@backstage/test-utils'; +import { MarkdownContent } from './MarkdownContent'; + +describe('', () => { + it('render MarkdownContent component with common mark', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + , + ), + ); + expect(rendered.getByText('H1', { selector: 'h1' })).toBeInTheDocument(); + expect(rendered.getByText('H2', { selector: 'h2' })).toBeInTheDocument(); + expect(rendered.getByText('H3', { selector: 'h3' })).toBeInTheDocument(); + }); + + it('render MarkdownContent component with common mark github flavored', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + , + ), + ); + expect( + rendered.getByText('https://example.com', { selector: 'a' }), + ).toBeInTheDocument(); + }); +}); diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx new file mode 100644 index 0000000000..1449c5b1be --- /dev/null +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx @@ -0,0 +1,74 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { makeStyles } from '@material-ui/core'; +import ReactMarkdown from 'react-markdown'; +import gfm from 'remark-gfm'; +import React from 'react'; + +const useStyles = makeStyles(theme => ({ + markdown: { + '& table': { + borderCollapse: 'collapse', + border: '1px solid #dfe2e5', + color: 'rgb(36, 41, 46)', + }, + '& th, & td': { + border: '1px solid #dfe2e5', + padding: theme.spacing(1), + }, + '& tr': { + backgroundColor: '#fff', + }, + '& tr:nth-child(2n)': { + backgroundColor: '#f6f8fa', + }, + '& pre': { + padding: '16px', + overflow: 'auto', + fontSize: '85%', + lineHeight: 1.45, + backgroundColor: '#f6f8fa', + borderRadius: '6px', + color: 'rgba(0, 0, 0, 0.87)', + }, + '& a': { + color: '#2E77D0', + }, + '& img': { + maxWidth: '100%', + }, + }, +})); + +/** + * MarkdownContent. Renders markdown (CommonMark, optionally with [GFM](https://github.com/remarkjs/remark-gfm)) to formatted HTML. + */ +type Props = { + content: string; + enableGfm?: boolean; +}; + +export const MarkdownContent = ({ content, enableGfm = false }: Props) => { + const classes = useStyles(); + return ( + + ); +}; diff --git a/packages/core/src/components/MarkdownContent/index.ts b/packages/core/src/components/MarkdownContent/index.ts new file mode 100644 index 0000000000..7267ff191c --- /dev/null +++ b/packages/core/src/components/MarkdownContent/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { MarkdownContent } from './MarkdownContent'; diff --git a/packages/core/src/components/index.ts b/packages/core/src/components/index.ts index 4f085ffd6a..40c4ef0c11 100644 --- a/packages/core/src/components/index.ts +++ b/packages/core/src/components/index.ts @@ -35,3 +35,4 @@ export * from './Tabs'; export * from './TrendLine'; export * from './WarningPanel'; export * from './EmptyState'; +export * from './MarkdownContent'; From 7b37d65fd8ffc3e06737a6815a4beadf08ec5f12 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Fri, 30 Oct 2020 11:02:57 +0100 Subject: [PATCH 025/100] fix: update github-insights-plugin to resolve conflicts --- .changeset/3157.md | 9 +++++++++ .changeset/wet-tools-exercise.md | 15 --------------- 2 files changed, 9 insertions(+), 15 deletions(-) create mode 100644 .changeset/3157.md delete mode 100644 .changeset/wet-tools-exercise.md diff --git a/.changeset/3157.md b/.changeset/3157.md new file mode 100644 index 0000000000..d6c0120d8a --- /dev/null +++ b/.changeset/3157.md @@ -0,0 +1,9 @@ +--- +'@backstage/core': minor +--- + +Adds the MarkdownContent component to render and display markdown input. + +``` + +``` diff --git a/.changeset/wet-tools-exercise.md b/.changeset/wet-tools-exercise.md deleted file mode 100644 index ba6eb8314f..0000000000 --- a/.changeset/wet-tools-exercise.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/core': minor ---- - -Adds the MarkdownContent component to render and display markdown input. - -``` - -``` - -Render and display the github flavored markdown [GFM](https://github.github.com/gfm/) input: - -``` - -``` From ef8e3c20ac52626ced7b2ddabbd0235f0d9a7703 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Fri, 30 Oct 2020 12:08:12 +0100 Subject: [PATCH 026/100] feat: add code block to backstage theme --- packages/theme/src/themes.ts | 8 ++++++++ packages/theme/src/types.ts | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index 5b233ac303..48142d48b9 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -48,6 +48,10 @@ export const lightTheme = createTheme({ text: '#FFFFFF', link: '#000000', }, + code: { + background: '#333333', + text: '#FFFFFF', + }, border: '#E6E6E6', textContrast: '#000000', textVerySubtle: '#DDD', @@ -110,6 +114,10 @@ export const darkTheme = createTheme({ text: '#FFFFFF', link: '#000000', }, + code: { + background: '#F8F8F8', + text: '#333333', + }, border: '#E6E6E6', textContrast: '#FFFFFF', textVerySubtle: '#727272', diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index 5acc0f75e9..c87c5c26f4 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -69,6 +69,10 @@ type PaletteAdditions = { text: string; link: string; }; + code: { + background: string; + text: string; + }; }; export type BackstagePalette = Palette & PaletteAdditions; From bbc15f5112f5982d333c1a4991d426bdf5e85f05 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Fri, 30 Oct 2020 12:08:36 +0100 Subject: [PATCH 027/100] fix: use backstage theme for MarkdownContent --- .changeset/3157.md | 6 ++++ .../MarkdownContent/MarkdownContent.tsx | 33 +++++++++++++------ 2 files changed, 29 insertions(+), 10 deletions(-) diff --git a/.changeset/3157.md b/.changeset/3157.md index d6c0120d8a..ba6eb8314f 100644 --- a/.changeset/3157.md +++ b/.changeset/3157.md @@ -7,3 +7,9 @@ Adds the MarkdownContent component to render and display markdown input. ``` ``` + +Render and display the github flavored markdown [GFM](https://github.github.com/gfm/) input: + +``` + +``` diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx index 1449c5b1be..baa3f45862 100644 --- a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx @@ -18,35 +18,48 @@ import { makeStyles } from '@material-ui/core'; import ReactMarkdown from 'react-markdown'; import gfm from 'remark-gfm'; import React from 'react'; +import { BackstageTheme } from '@backstage/theme'; -const useStyles = makeStyles(theme => ({ +const useStyles = makeStyles(theme => ({ markdown: { '& table': { borderCollapse: 'collapse', - border: '1px solid #dfe2e5', - color: 'rgb(36, 41, 46)', + border: `1px solid ${theme.palette.border}`, }, '& th, & td': { - border: '1px solid #dfe2e5', + border: `1px solid ${theme.palette.border}`, padding: theme.spacing(1), }, + '& td': { + wordBreak: 'break-word', + overflow: 'hidden', + verticalAlign: 'middle', + lineHeight: '1', + margin: 0, + padding: theme.spacing(3, 2, 3, 2.5), + borderBottom: 0, + }, + '& th': { + backgroundColor: theme.palette.background.paper, + }, '& tr': { - backgroundColor: '#fff', + backgroundColor: theme.palette.background.paper, }, - '& tr:nth-child(2n)': { - backgroundColor: '#f6f8fa', + '& tr:nth-child(odd)': { + backgroundColor: theme.palette.background.default, }, + '& pre': { padding: '16px', overflow: 'auto', fontSize: '85%', lineHeight: 1.45, - backgroundColor: '#f6f8fa', + backgroundColor: theme.palette.code.background, borderRadius: '6px', - color: 'rgba(0, 0, 0, 0.87)', + color: theme.palette.code.text, }, '& a': { - color: '#2E77D0', + color: theme.palette.link, }, '& img': { maxWidth: '100%', From 992072cc9455430ad44cf8fd2d022754f15522af Mon Sep 17 00:00:00 2001 From: Alan Crosswell Date: Sat, 31 Oct 2020 10:37:00 -0400 Subject: [PATCH 028/100] add lowercase gitlab to styles vocab --- .github/styles/vocab.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index 0cbd0ffa05..e05c5f8623 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -62,6 +62,7 @@ Firekube Fredrik github Github +gitlab Gitlab graphql graphviz From 13e6a6d337d3076e92f134b9e03f0d0fb52f3f0d Mon Sep 17 00:00:00 2001 From: Alan Crosswell Date: Sat, 31 Oct 2020 14:41:07 -0400 Subject: [PATCH 029/100] update GitLab docs to include both gitlab.com and GitLab Enterprise configuration --- plugins/auth-backend/README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/plugins/auth-backend/README.md b/plugins/auth-backend/README.md index 4f5a9ef6c7..affaca9987 100644 --- a/plugins/auth-backend/README.md +++ b/plugins/auth-backend/README.md @@ -52,30 +52,41 @@ export AUTH_GITHUB_ENTERPRISE_INSTANCE_URL=https://x ### Gitlab -#### Creating a Gitlab Enterprise OAuth application +#### Creating a GitLab OAuth application -Follow this link, substituting `gitlab.example.com` for your Gitlab enterprise domain, https://gitlab.example.com/profile/applications +Follow this link, [Add new application](https://gitlab.com/-/profile/applications). 1. Set Application Name to `backstage-dev` or something along those lines. 1. The Authorization Callback URL should match the redirect URI set in Backstage. 1. Set this to `http://localhost:7000/api/auth/gitlab/handler/frame` for local development. 1. Set this to `http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/gitlab/handler/frame` for non-local deployments. - 1. Select the checked scopes from this list: - - [ ] `api` Grants complete read/write access to the API, including all groups and projects. + 1. Select the following scopes from the list: - [x] `read_user` Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users. - [x] `read_repository` Grants read-only access to repositories on private projects using Git-over-HTTP (not using the API). - [x] `write_repository` Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API). - - [ ] `sudo` Grants permission to perform API actions as any user in the system, when authenticated as an admin user. - [x] `openid` Grants permission to authenticate with GitLab using OpenID Connect. Also gives read-only access to the user's profile and group memberships. - [x] `profile` Grants read-only access to the user's profile data using OpenID Connect. - [x] `email` Grants read-only access to the user's primary email address using OpenID Connect. ```bash -export GITLAB_BASE_URL=https://gitlab.example.com # for GitLab Enterprise. default is https://gitlab.com +export GITLAB_BASE_URL=https://gitlab.com export AUTH_GITLAB_CLIENT_ID=x # Gitlab calls this the Application ID export AUTH_GITLAB_CLIENT_SECRET=x ``` +#### Creating a GitLab Enterprise OAuth application + +If you have GitLab Enterprise, perform the steps above, replacing `gitlab.example.com` in the following +with the domain of your GitLab Enterprise host: + +Create new application at: `https://gitlab.example.com/profile/applications`. + +```bash +export GITLAB_BASE_URL=https://gitlab.example.com +export AUTH_GITLAB_CLIENT_ID=x # GitLab calls this the Application ID +export AUTH_GITLAB_CLIENT_SECRET=x +``` + ### Okta ```bash From f82ec384cb94da3120836e1b387474bbf12ab8ba Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Fri, 30 Oct 2020 15:32:17 +0100 Subject: [PATCH 030/100] feat(plugin-sonarqube): add links to each rating --- plugins/sonarqube/src/api/index.test.ts | 77 +++++++++++-------- plugins/sonarqube/src/api/index.ts | 17 +++- plugins/sonarqube/src/api/types.ts | 2 + .../components/SonarQubeCard/RatingCard.tsx | 30 ++++---- .../SonarQubeCard/SonarQubeCard.tsx | 5 ++ 5 files changed, 86 insertions(+), 45 deletions(-) diff --git a/plugins/sonarqube/src/api/index.test.ts b/plugins/sonarqube/src/api/index.test.ts index 272d021493..2d96fc2135 100644 --- a/plugins/sonarqube/src/api/index.test.ts +++ b/plugins/sonarqube/src/api/index.test.ts @@ -114,22 +114,29 @@ describe('SonarQubeApi', () => { const client = new SonarQubeApi({ discoveryApi }); const summary = await client.getFindingSummary('our-service'); - - expect(summary).toEqual({ - lastAnalysis: '2020-01-01T00:00:00Z', - metrics: { - alert_status: 'OK', - bugs: '2', - reliability_rating: '3.0', - vulnerabilities: '4', - security_rating: '1.0', - code_smells: '100', - sqale_rating: '2.0', - coverage: '55.5', - duplicated_lines_density: '1.0', - }, - projectUrl: 'https://sonarcloud.io/dashboard?id=our-service', - } as FindingSummary); + expect(summary).toEqual( + expect.objectContaining({ + lastAnalysis: '2020-01-01T00:00:00Z', + metrics: { + alert_status: 'OK', + bugs: '2', + reliability_rating: '3.0', + vulnerabilities: '4', + security_rating: '1.0', + code_smells: '100', + sqale_rating: '2.0', + coverage: '55.5', + duplicated_lines_density: '1.0', + }, + projectUrl: 'https://sonarcloud.io/dashboard?id=our-service', + }), + ); + expect(summary?.getIssuesUrl('CODE_SMELL')).toEqual( + 'https://sonarcloud.io/project/issues?id=our-service&types=CODE_SMELL&resolved=false', + ); + expect(summary?.getComponentMeasuresUrl('COVERAGE')).toEqual( + 'https://sonarcloud.io/component_measures?id=our-service&metric=coverage&resolved=false&view=list', + ); }); it('should report finding summary (custom baseUrl)', async () => { @@ -142,20 +149,28 @@ describe('SonarQubeApi', () => { const summary = await client.getFindingSummary('our-service'); - expect(summary).toEqual({ - lastAnalysis: '2020-01-01T00:00:00Z', - metrics: { - alert_status: 'OK', - bugs: '2', - reliability_rating: '3.0', - vulnerabilities: '4', - security_rating: '1.0', - code_smells: '100', - sqale_rating: '2.0', - coverage: '55.5', - duplicated_lines_density: '1.0', - }, - projectUrl: 'http://a.instance.local/dashboard?id=our-service', - } as FindingSummary); + expect(summary).toEqual( + expect.objectContaining({ + lastAnalysis: '2020-01-01T00:00:00Z', + metrics: { + alert_status: 'OK', + bugs: '2', + reliability_rating: '3.0', + vulnerabilities: '4', + security_rating: '1.0', + code_smells: '100', + sqale_rating: '2.0', + coverage: '55.5', + duplicated_lines_density: '1.0', + }, + projectUrl: 'http://a.instance.local/dashboard?id=our-service', + }) as FindingSummary, + ); + expect(summary?.getIssuesUrl('CODE_SMELL')).toEqual( + 'http://a.instance.local/project/issues?id=our-service&types=CODE_SMELL&resolved=false', + ); + expect(summary?.getComponentMeasuresUrl('COVERAGE')).toEqual( + 'http://a.instance.local/component_measures?id=our-service&metric=coverage&resolved=false&view=list', + ); }); }); diff --git a/plugins/sonarqube/src/api/index.ts b/plugins/sonarqube/src/api/index.ts index 01f6f74fe3..f2c616f53c 100644 --- a/plugins/sonarqube/src/api/index.ts +++ b/plugins/sonarqube/src/api/index.ts @@ -16,7 +16,12 @@ import { createApiRef, DiscoveryApi } from '@backstage/core'; import fetch from 'cross-fetch'; -import { ComponentWrapper, MeasuresWrapper, MetricKey } from './types'; +import { + ComponentWrapper, + MeasuresWrapper, + MetricKey, + SonarUrlProcessorFunc, +} from './types'; /** * Define a type to make sure that all metrics are used @@ -29,6 +34,8 @@ export interface FindingSummary { lastAnalysis: string; metrics: Metrics; projectUrl: string; + getIssuesUrl: SonarUrlProcessorFunc; + getComponentMeasuresUrl: SonarUrlProcessorFunc; } export const sonarQubeApiRef = createApiRef({ @@ -105,6 +112,14 @@ export class SonarQubeApi { lastAnalysis: component.component.analysisDate, metrics, projectUrl: `${this.baseUrl}dashboard?id=${componentKey}`, + getIssuesUrl: identifier => + `${ + this.baseUrl + }project/issues?id=${componentKey}&types=${identifier.toUpperCase()}&resolved=false`, + getComponentMeasuresUrl: (identifier: string) => + `${ + this.baseUrl + }component_measures?id=${componentKey}&metric=${identifier.toLowerCase()}&resolved=false&view=list`, }; } } diff --git a/plugins/sonarqube/src/api/types.ts b/plugins/sonarqube/src/api/types.ts index 17539070cb..fc99b2d87d 100644 --- a/plugins/sonarqube/src/api/types.ts +++ b/plugins/sonarqube/src/api/types.ts @@ -53,3 +53,5 @@ export interface Measure { value: string; component: string; } + +export type SonarUrlProcessorFunc = (identifier: string) => string; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.tsx index cd678b7366..6a94f7e8f4 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/RatingCard.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ -import { Grid, Typography } from '@material-ui/core'; +import { Grid, Typography, Link } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import React, { ReactNode } from 'react'; @@ -50,29 +50,33 @@ export const RatingCard = ({ rightSlot, title, titleIcon, + link, }: { leftSlot: ReactNode; rightSlot: ReactNode; title: string; titleIcon?: ReactNode; + link: string; }) => { const classes = useStyles(); return ( - - - - {leftSlot} + + + + + {leftSlot} + + + {rightSlot} + - - {rightSlot} + + + {titleIcon} {title} + - - - {titleIcon} {title} - - - + ); }; diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index 8e6cc817a1..2b836d714b 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -181,29 +181,34 @@ export const SonarQubeCard = ({ } title="Bugs" + link={value.getIssuesUrl('BUG')} leftSlot={} rightSlot={} /> } title="Vulnerabilities" + link={value.getIssuesUrl('VULNERABILITY')} leftSlot={} rightSlot={} /> } title="Code Smells" + link={value.getIssuesUrl('CODE_SMELL')} leftSlot={} rightSlot={} />
} rightSlot={} /> } rightSlot={ From d20a481942eefe1278eb508c9df1fd14537234ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 26 Oct 2020 17:53:27 +0100 Subject: [PATCH 031/100] fix(catalog-backend): simplify the filtering logic --- .../catalog/DatabaseEntitiesCatalog.test.ts | 66 +++++----- .../src/catalog/DatabaseEntitiesCatalog.ts | 40 +++--- plugins/catalog-backend/src/catalog/types.ts | 4 +- .../src/database/CommonDatabase.test.ts | 64 ++-------- .../src/database/CommonDatabase.ts | 67 +++------- plugins/catalog-backend/src/database/index.ts | 2 +- plugins/catalog-backend/src/database/types.ts | 46 ++++--- .../src/ingestion/HigherOrderOperations.ts | 2 +- .../src/ingestion/processors/ldap/config.ts | 2 +- .../ingestion/processors/ldap/read.test.ts | 2 +- .../ingestion/processors/ldap/util.test.ts | 16 +-- .../src/ingestion/processors/ldap/util.ts | 11 -- .../src/service/EntityFilters.test.ts | 113 +++++++++++++++++ .../src/service/EntityFilters.ts | 120 ++++++++++++++++++ .../src/service/filterQuery.test.ts | 61 +-------- .../src/service/filterQuery.ts | 57 +-------- .../src/service/router.test.ts | 55 ++++---- plugins/catalog-backend/src/service/router.ts | 32 ++--- .../src/util/RecursivePartial.test.ts | 31 +++++ .../src/util/RecursivePartial.ts | 26 ++++ plugins/catalog-backend/src/util/index.ts | 2 + 21 files changed, 455 insertions(+), 364 deletions(-) create mode 100644 plugins/catalog-backend/src/service/EntityFilters.test.ts create mode 100644 plugins/catalog-backend/src/service/EntityFilters.ts create mode 100644 plugins/catalog-backend/src/util/RecursivePartial.test.ts create mode 100644 plugins/catalog-backend/src/util/RecursivePartial.ts diff --git a/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.test.ts b/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.test.ts index f3db4c8dc6..00898b33a6 100644 --- a/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.test.ts +++ b/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.test.ts @@ -17,6 +17,7 @@ import { getVoidLogger } from '@backstage/backend-common'; import type { Entity } from '@backstage/catalog-model'; import { Database, DatabaseManager, Transaction } from '../database'; +import { EntityFilters } from '../service/EntityFilters'; import { DatabaseEntitiesCatalog } from './DatabaseEntitiesCatalog'; import { EntityUpsertRequest } from './types'; @@ -73,13 +74,12 @@ describe('DatabaseEntitiesCatalog', () => { ]); expect(db.entities).toHaveBeenCalledTimes(1); - expect(db.entities).toHaveBeenCalledWith(expect.anything(), [ - { - kind: 'b', - 'metadata.namespace': 'd', - 'metadata.name': ['c'], - }, - ]); + expect(db.entities).toHaveBeenCalledWith( + expect.anything(), + EntityFilters.ofFilterString( + 'kind=b,metadata.namespace=d,metadata.name=c', + ), + ); expect(db.setRelations).toHaveBeenCalledTimes(1); expect(db.setRelations).toHaveBeenCalledWith(expect.anything(), 'u', []); expect(db.addEntities).toHaveBeenCalledTimes(1); @@ -107,13 +107,12 @@ describe('DatabaseEntitiesCatalog', () => { ); expect(db.entities).toHaveBeenCalledTimes(1); - expect(db.entities).toHaveBeenCalledWith(expect.anything(), [ - { - kind: 'b', - 'metadata.namespace': 'd', - 'metadata.name': ['c'], - }, - ]); + expect(db.entities).toHaveBeenCalledWith( + expect.anything(), + EntityFilters.ofFilterString( + 'kind=b,metadata.namespace=d,metadata.name=c', + ), + ); expect(db.setRelations).toHaveBeenCalledTimes(1); expect(db.setRelations).toHaveBeenCalledWith(expect.anything(), 'u', []); expect(db.addEntities).toHaveBeenCalledTimes(1); @@ -204,13 +203,12 @@ describe('DatabaseEntitiesCatalog', () => { ]); expect(db.entities).toHaveBeenCalledTimes(1); - expect(db.entities).toHaveBeenCalledWith(expect.anything(), [ - { - kind: 'b', - 'metadata.namespace': 'd', - 'metadata.name': ['c'], - }, - ]); + expect(db.entities).toHaveBeenCalledWith( + expect.anything(), + EntityFilters.ofFilterString( + 'kind=b,metadata.namespace=d,metadata.name=c', + ), + ); expect(db.entityByName).not.toHaveBeenCalled(); expect(db.entityByUid).toHaveBeenCalledTimes(1); expect(db.entityByUid).toHaveBeenCalledWith(transaction, 'u'); @@ -280,13 +278,12 @@ describe('DatabaseEntitiesCatalog', () => { ]); expect(db.entities).toHaveBeenCalledTimes(1); - expect(db.entities).toHaveBeenCalledWith(expect.anything(), [ - { - kind: 'b', - 'metadata.namespace': 'd', - 'metadata.name': ['c'], - }, - ]); + expect(db.entities).toHaveBeenCalledWith( + expect.anything(), + EntityFilters.ofFilterString( + 'kind=b,metadata.namespace=d,metadata.name=c', + ), + ); expect(db.entityByName).toHaveBeenCalledTimes(1); expect(db.entityByName).toHaveBeenCalledWith(transaction, { kind: 'b', @@ -342,13 +339,12 @@ describe('DatabaseEntitiesCatalog', () => { ]); expect(db.entities).toHaveBeenCalledTimes(1); - expect(db.entities).toHaveBeenCalledWith(expect.anything(), [ - { - kind: 'b', - 'metadata.namespace': 'd', - 'metadata.name': ['c'], - }, - ]); + expect(db.entities).toHaveBeenCalledWith( + expect.anything(), + EntityFilters.ofFilterString( + 'kind=b,metadata.namespace=d,metadata.name=c', + ), + ); expect(db.entityByName).not.toHaveBeenCalled(); expect(db.entityByUid).not.toHaveBeenCalled(); expect(db.updateEntity).not.toHaveBeenCalled(); diff --git a/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.ts b/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.ts index c97ee023e6..5c55a30a55 100644 --- a/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.ts +++ b/plugins/catalog-backend/src/catalog/DatabaseEntitiesCatalog.ts @@ -16,13 +16,13 @@ import { ConflictError, NotFoundError } from '@backstage/backend-common'; import { + Entity, entityHasChanges, + EntityRelationSpec, generateUpdatedEntity, getEntityName, LOCATION_ANNOTATION, serializeEntityRef, - Entity, - EntityRelationSpec, } from '@backstage/catalog-model'; import { chunk, groupBy } from 'lodash'; import limiterFactory from 'p-limit'; @@ -30,9 +30,10 @@ import { Logger } from 'winston'; import type { Database, DbEntityResponse, - EntityFilters, + EntityFilter, Transaction, } from '../database'; +import { EntityFilters } from '../service/EntityFilters'; import { durationText } from '../util/timing'; import type { EntitiesCatalog, @@ -65,9 +66,9 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { private readonly logger: Logger, ) {} - async entities(filters?: EntityFilters[]): Promise { + async entities(filter?: EntityFilter): Promise { const items = await this.database.transaction(tx => - this.database.entities(tx, filters), + this.database.entities(tx, filter), ); return items.map(i => i.entity); } @@ -113,9 +114,12 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { const location = entityResponse.entity.metadata.annotations?.[LOCATION_ANNOTATION]; const colocatedEntities = location - ? await this.database.entities(tx, [ - { [`metadata.annotations.${LOCATION_ANNOTATION}`]: location }, - ]) + ? await this.database.entities( + tx, + EntityFilters.ofMatchers({ + [`metadata.annotations.${LOCATION_ANNOTATION}`]: location, + }), + ) : [entityResponse]; for (const dbResponse of colocatedEntities) { await this.database.removeEntityByUid( @@ -219,9 +223,12 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { } if (options?.outputEntities) { - const writtenEntities = await this.database.entities(tx, [ - { 'metadata.uid': modifiedEntityIds.map(e => e.entityId) }, - ]); + const writtenEntities = await this.database.entities( + tx, + EntityFilters.ofMatchers({ + 'metadata.uid': modifiedEntityIds.map(e => e.entityId), + }), + ); modifiedEntityIds = writtenEntities.map(e => ({ entityId: e.entity.metadata.uid!, @@ -241,7 +248,7 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { // If this is only a dry run, cancel the database transaction even if it was successful. await tx.rollback(); - this.logger.debug(`Perfomed successful dry run of adding entities`); + this.logger.debug(`Performed successful dry run of adding entities`); } return entityUpserts; @@ -273,13 +280,14 @@ export class DatabaseEntitiesCatalog implements EntitiesCatalog { const markTimestamp = process.hrtime(); const names = requests.map(({ entity }) => entity.metadata.name); - const oldEntities = await this.database.entities(tx, [ - { + const oldEntities = await this.database.entities( + tx, + EntityFilters.ofMatchers({ kind: kind, 'metadata.namespace': namespace, 'metadata.name': names, - }, - ]); + }), + ); const oldEntitiesByName = new Map( oldEntities.map(e => [e.entity.metadata.name, e.entity]), diff --git a/plugins/catalog-backend/src/catalog/types.ts b/plugins/catalog-backend/src/catalog/types.ts index edc6ed2772..52bb6e95ab 100644 --- a/plugins/catalog-backend/src/catalog/types.ts +++ b/plugins/catalog-backend/src/catalog/types.ts @@ -15,7 +15,7 @@ */ import { Entity, EntityRelationSpec, Location } from '@backstage/catalog-model'; -import type { EntityFilters } from '../database'; +import type { EntityFilter } from '../database'; // // Entities @@ -32,7 +32,7 @@ export type EntityUpsertResponse = { }; export type EntitiesCatalog = { - entities(filters?: EntityFilters[]): Promise; + entities(filter?: EntityFilter): Promise; removeEntityByUid(uid: string): Promise; /** diff --git a/plugins/catalog-backend/src/database/CommonDatabase.test.ts b/plugins/catalog-backend/src/database/CommonDatabase.test.ts index b2a238b111..ffffd85f04 100644 --- a/plugins/catalog-backend/src/database/CommonDatabase.test.ts +++ b/plugins/catalog-backend/src/database/CommonDatabase.test.ts @@ -16,6 +16,7 @@ import { ConflictError } from '@backstage/backend-common'; import { Entity, Location, parseEntityRef } from '@backstage/catalog-model'; +import { EntityFilters } from '../service/EntityFilters'; import { DatabaseManager } from './DatabaseManager'; import type { DbEntityRequest, @@ -348,7 +349,7 @@ describe('CommonDatabase', () => { await db.transaction(async tx => { await db.addEntities(tx, [{ entity: e1 }, { entity: e2 }]); }); - const result = await db.transaction(async tx => db.entities(tx, [])); + const result = await db.transaction(async tx => db.entities(tx)); expect(result.length).toEqual(2); expect(result).toEqual( expect.arrayContaining([ @@ -390,7 +391,7 @@ describe('CommonDatabase', () => { await expect( db.transaction(async tx => - db.entities(tx, [{ kind: 'k2', 'spec.c': 'some' }]), + db.entities(tx, EntityFilters.ofFilterString('kind=k2,spec.c=some')), ), ).resolves.toEqual([ { @@ -400,56 +401,14 @@ describe('CommonDatabase', () => { ]); }); - it('can get all specific entities for matching filters with nulls (both missing and literal null value)', async () => { + it('can get all specific entities for matching filters case insensitively', async () => { const entities: Entity[] = [ - { apiVersion: 'a', kind: 'k1', metadata: { name: 'n' } }, { - apiVersion: 'a', - kind: 'k2', - metadata: { name: 'n' }, - spec: { c: 'some' }, + apiVersion: 'A', + kind: 'K1', + metadata: { name: 'N' }, + spec: { c: 'SOME' }, }, - { - apiVersion: 'a', - kind: 'k3', - metadata: { name: 'n' }, - spec: { c: null }, - }, - ]; - - await db.transaction(async tx => { - await db.addEntities( - tx, - entities.map(entity => ({ entity })), - ); - }); - - const rows = await db.transaction(async tx => - db.entities(tx, [{ apiVersion: 'a', 'spec.c': [null, 'some'] }]), - ); - - expect(rows.length).toEqual(3); - expect(rows).toEqual( - expect.arrayContaining([ - { - locationId: undefined, - entity: expect.objectContaining({ kind: 'k1' }), - }, - { - locationId: undefined, - entity: expect.objectContaining({ kind: 'k2' }), - }, - { - locationId: undefined, - entity: expect.objectContaining({ kind: 'k3' }), - }, - ]), - ); - }); - - it('can get all specific entities for matching filters case insensitively)', async () => { - const entities: Entity[] = [ - { apiVersion: 'A', kind: 'K1', metadata: { name: 'N' } }, { apiVersion: 'a', kind: 'k2', @@ -460,7 +419,7 @@ describe('CommonDatabase', () => { apiVersion: 'a', kind: 'k3', metadata: { name: 'n' }, - spec: { c: null }, + spec: { c: 'somE' }, }, ]; @@ -472,7 +431,10 @@ describe('CommonDatabase', () => { }); const rows = await db.transaction(async tx => - db.entities(tx, [{ ApiVersioN: 'A', 'spEc.C': [null, 'some'] }]), + db.entities( + tx, + EntityFilters.ofFilterString('ApiVersioN=A,spEc.C=some'), + ), ); expect(rows.length).toEqual(3); diff --git a/plugins/catalog-backend/src/database/CommonDatabase.ts b/plugins/catalog-backend/src/database/CommonDatabase.ts index bd6dc29abc..f86ab9e598 100644 --- a/plugins/catalog-backend/src/database/CommonDatabase.ts +++ b/plugins/catalog-backend/src/database/CommonDatabase.ts @@ -45,7 +45,7 @@ import { DbEntityResponse, DbLocationsRow, DbLocationsRowWithStatus, - EntityFilters, + EntityFilter, Transaction, } from './types'; @@ -233,71 +233,36 @@ export class CommonDatabase implements Database { async entities( txOpaque: Transaction, - filters?: EntityFilters[], + filter?: EntityFilter, ): Promise { const tx = txOpaque as Knex.Transaction; let entitiesQuery = tx('entities'); - for (const singleFilter of filters ?? []) { + for (const singleFilter of filter?.anyOf ?? []) { entitiesQuery = entitiesQuery.orWhere(function singleFilterFn() { - for (const [matchKey, matchVal] of Object.entries(singleFilter)) { - const key = matchKey.toLowerCase().replace(/[*]/g, '%'); - const keyOp = key.includes('%') ? 'like' : '='; - const values = Array.isArray(matchVal) ? matchVal : [matchVal]; - - let matchNulls = false; - const matchIn: string[] = []; - const matchLike: string[] = []; - - for (const value of values) { - if (!value) { - matchNulls = true; - } else if (value.includes('*')) { - matchLike.push(value.toLowerCase().replace(/[*]/g, '%')); - } else { - matchIn.push(value.toLowerCase()); - } - } - + for (const { key, matchValueIn } of singleFilter.allOf) { // NOTE(freben): This used to be a set of OUTER JOIN, which may seem to // make a lot of sense. However, it had abysmal performance on sqlite // when datasets grew large, so we're using IN instead. const matchQuery = tx('entities_search') .select('entity_id') .where(function keyFilter() { - this.andWhere('key', keyOp, key); - this.andWhere(function valueFilter() { - if (matchIn.length === 1) { - this.orWhere({ value: matchIn[0] }); - } else if (matchIn.length > 1) { - this.orWhereIn('value', matchIn); + this.andWhere({ key: key.toLowerCase() }); + if (matchValueIn) { + if (matchValueIn.length === 1) { + this.andWhere({ value: matchValueIn[0].toLowerCase() }); + } else if (matchValueIn.length > 1) { + this.andWhere( + 'value', + 'in', + matchValueIn.map(v => v.toLowerCase()), + ); } - if (matchLike.length) { - for (const x of matchLike) { - this.orWhere('value', 'like', tx.raw('?', [x])); - } - } - if (matchNulls) { - // Match explicit nulls, and then handle absence separately - // below - this.orWhereNull('value'); - } - }); + } }); - // Handle absence as nulls as well - this.andWhere(function match() { - this.whereIn('id', matchQuery); - if (matchNulls) { - this.orWhereNotIn( - 'id', - tx('entities_search') - .select('entity_id') - .where('key', keyOp, key), - ); - } - }); + this.andWhere('id', 'in', matchQuery); } }); } diff --git a/plugins/catalog-backend/src/database/index.ts b/plugins/catalog-backend/src/database/index.ts index 0d84106815..c2cc07788a 100644 --- a/plugins/catalog-backend/src/database/index.ts +++ b/plugins/catalog-backend/src/database/index.ts @@ -20,7 +20,7 @@ export type { Database, DbEntityRequest, DbEntityResponse, + EntitiesSearchFilter, EntityFilter, - EntityFilters, Transaction, } from './types'; diff --git a/plugins/catalog-backend/src/database/types.ts b/plugins/catalog-backend/src/database/types.ts index 62b2d55b88..1307b063f2 100644 --- a/plugins/catalog-backend/src/database/types.ts +++ b/plugins/catalog-backend/src/database/types.ts @@ -17,8 +17,8 @@ import type { Entity, EntityName, - Location, EntityRelationSpec, + Location, } from '@backstage/catalog-model'; export type DbEntitiesRow = { @@ -80,26 +80,35 @@ export type DatabaseLocationUpdateLogEvent = { }; /** - * Filter matcher for a single entity field. - * - * Can be either null or a string, or an array of those. Null and the empty - * string are treated equally, and match both a present field with a null or - * empty value, as well as an absent field. - * - * A filter may contain asterisks (*) that are treated as wildcards for zero - * or more arbitrary characters. + * Matches rows in the entities_search table. */ -export type EntityFilter = null | string | (null | string)[]; +export type EntitiesSearchFilter = { + /** + * The key to match on. + * + * Matches are always case insensitive. + */ + key: string; + + /** + * Match on plain equality of values. + * + * If undefined, this factor is not taken into account. Otherwise, match on + * values that are equal to any of the given array items. Matches are always + * case insensitive. + */ + matchValueIn?: string[]; +}; /** - * A set of filter matchers used for filtering entities. + * A filter expression for entities. * - * The keys are full dot-separated paths into the structure of an entity, for - * example "metadata.name". You can also address any item in an array the same - * way, e.g. "a.b.c": "x" works if b is an array of objects that have a c field - * and any of those have the value x. + * Any (at least one) of the outer sets must match, within which all of the + * individual filters must match. */ -export type EntityFilters = Record; +export type EntityFilter = { + anyOf: { allOf: EntitiesSearchFilter[] }[]; +}; /** * An abstraction for transactions of the underlying database technology. @@ -160,10 +169,7 @@ export type Database = { matchingGeneration?: number, ): Promise; - entities( - tx: Transaction, - filters?: EntityFilters[], - ): Promise; + entities(tx: Transaction, filter?: EntityFilter): Promise; entityByName( tx: Transaction, diff --git a/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts b/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts index 902e26e0e3..f352e8d3fd 100644 --- a/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts +++ b/plugins/catalog-backend/src/ingestion/HigherOrderOperations.ts @@ -18,7 +18,7 @@ import { Location, LocationSpec } from '@backstage/catalog-model'; import { v4 as uuidv4 } from 'uuid'; import { Logger } from 'winston'; import { EntitiesCatalog, LocationsCatalog } from '../catalog'; -import { durationText } from '../util/timing'; +import { durationText } from '../util'; import { AddLocationResult, HigherOrderOperation, diff --git a/plugins/catalog-backend/src/ingestion/processors/ldap/config.ts b/plugins/catalog-backend/src/ingestion/processors/ldap/config.ts index 74c02e3f84..2a63b20619 100644 --- a/plugins/catalog-backend/src/ingestion/processors/ldap/config.ts +++ b/plugins/catalog-backend/src/ingestion/processors/ldap/config.ts @@ -17,7 +17,7 @@ import { Config, JsonValue } from '@backstage/config'; import { SearchOptions } from 'ldapjs'; import mergeWith from 'lodash/mergeWith'; -import { RecursivePartial } from './util'; +import { RecursivePartial } from '../../../util'; /** * The configuration parameters for a single LDAP provider. diff --git a/plugins/catalog-backend/src/ingestion/processors/ldap/read.test.ts b/plugins/catalog-backend/src/ingestion/processors/ldap/read.test.ts index e7a7d1c567..e644bab22a 100644 --- a/plugins/catalog-backend/src/ingestion/processors/ldap/read.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/ldap/read.test.ts @@ -17,6 +17,7 @@ import { GroupEntity, UserEntity } from '@backstage/catalog-model'; import { SearchEntry } from 'ldapjs'; import merge from 'lodash/merge'; +import { RecursivePartial } from '../../../util'; import { LdapClient } from './client'; import { GroupConfig, UserConfig } from './config'; import { @@ -25,7 +26,6 @@ import { LDAP_UUID_ANNOTATION, } from './constants'; import { readLdapGroups, readLdapUsers, resolveRelations } from './read'; -import { RecursivePartial } from './util'; function user(data: RecursivePartial): UserEntity { return merge( diff --git a/plugins/catalog-backend/src/ingestion/processors/ldap/util.test.ts b/plugins/catalog-backend/src/ingestion/processors/ldap/util.test.ts index 2def6ad960..63c7253411 100644 --- a/plugins/catalog-backend/src/ingestion/processors/ldap/util.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/ldap/util.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { errorString, RecursivePartial } from './util'; +import { errorString } from './util'; describe('errorString', () => { it('formats', () => { @@ -22,17 +22,3 @@ describe('errorString', () => { expect(errorString(e)).toEqual('1 n: m'); }); }); - -describe('RecursivePartial', () => { - it('is recursive', () => { - type X = { - required: { - required: string; - }; - }; - const x: RecursivePartial = { - required: {}, - }; - expect(x).toEqual({ required: {} }); - }); -}); diff --git a/plugins/catalog-backend/src/ingestion/processors/ldap/util.ts b/plugins/catalog-backend/src/ingestion/processors/ldap/util.ts index 29159dc219..f5751b1e9f 100644 --- a/plugins/catalog-backend/src/ingestion/processors/ldap/util.ts +++ b/plugins/catalog-backend/src/ingestion/processors/ldap/util.ts @@ -24,14 +24,3 @@ import { Error as LDAPError } from 'ldapjs'; export function errorString(error: LDAPError) { return `${error.code} ${error.name}: ${error.message}`; } - -/** - * Makes all keys of an entire hierarchy optional. - */ -export type RecursivePartial = { - [P in keyof T]?: T[P] extends (infer U)[] - ? RecursivePartial[] - : T[P] extends object - ? RecursivePartial - : T[P]; -}; diff --git a/plugins/catalog-backend/src/service/EntityFilters.test.ts b/plugins/catalog-backend/src/service/EntityFilters.test.ts new file mode 100644 index 0000000000..bfc20c625a --- /dev/null +++ b/plugins/catalog-backend/src/service/EntityFilters.test.ts @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { EntityFilters } from './EntityFilters'; + +describe('EntityFilters', () => { + describe('ofQuery', () => { + it('translates empty query to empty list', () => { + const result = EntityFilters.ofQuery({}); + expect(result).toEqual(undefined); + }); + + it('supports single-string format', () => { + const result = EntityFilters.ofQuery({ filter: 'a=1' })!; + expect(result).toEqual({ + anyOf: [{ allOf: [{ key: 'a', matchValueIn: ['1'] }] }], + }); + }); + + it('supports array-of-strings format', () => { + const result = EntityFilters.ofQuery({ filter: ['a=1', 'b=2'] }); + expect(result).toEqual({ + anyOf: [ + { allOf: [{ key: 'a', matchValueIn: ['1'] }] }, + { allOf: [{ key: 'b', matchValueIn: ['2'] }] }, + ], + }); + }); + + it('throws for non-strings', () => { + expect(() => EntityFilters.ofQuery({ filter: [3] })).toThrow(/string/); + }); + }); + + describe('ofFilterString', () => { + it('runs the happy path', () => { + const result = EntityFilters.ofFilterString('a=1,b=2'); + expect(result).toEqual({ + anyOf: [ + { + allOf: [ + { key: 'a', matchValueIn: ['1'] }, + { key: 'b', matchValueIn: ['2'] }, + ], + }, + ], + }); + }); + + it('ignores empty', () => { + const result = EntityFilters.ofFilterString('a=1,,b=2,'); + expect(result).toEqual({ + anyOf: [ + { + allOf: [ + { key: 'a', matchValueIn: ['1'] }, + { key: 'b', matchValueIn: ['2'] }, + ], + }, + ], + }); + }); + + it('trims', () => { + const result = EntityFilters.ofFilterString(' a = 1 ,, b=2 ,'); + expect(result).toEqual({ + anyOf: [ + { + allOf: [ + { key: 'a', matchValueIn: ['1'] }, + { key: 'b', matchValueIn: ['2'] }, + ], + }, + ], + }); + }); + + it('merges multiple of the same key', () => { + const result = EntityFilters.ofFilterString('a=1,a=2,b=3'); + expect(result).toEqual({ + anyOf: [ + { + allOf: [ + { key: 'a', matchValueIn: ['1', '2'] }, + { key: 'b', matchValueIn: ['3'] }, + ], + }, + ], + }); + }); + + it('throws on missing equal sign', () => { + expect(() => EntityFilters.ofFilterString('a,b=2')).toThrow(); + }); + + it('throws on misplaced equal sign', () => { + expect(() => EntityFilters.ofFilterString('a=,b=2')).toThrow(); + }); + }); +}); diff --git a/plugins/catalog-backend/src/service/EntityFilters.ts b/plugins/catalog-backend/src/service/EntityFilters.ts new file mode 100644 index 0000000000..5a93407424 --- /dev/null +++ b/plugins/catalog-backend/src/service/EntityFilters.ts @@ -0,0 +1,120 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { InputError } from '@backstage/backend-common'; +import { EntitiesSearchFilter, EntityFilter } from '../database'; + +/** + * A builder that assists in creating entity filter instances. + */ +export class EntityFilters { + // Builds a filter from the value of a filter=a=1,b=2 type filter string + static ofFilterString(filterString: string): EntityFilter | undefined { + const builder = new EntityFilters(); + builder.addFilterString(filterString); + return builder.build(); + } + + // Builds a filter from an entire query params structure + static ofQuery(query: Record): EntityFilter | undefined { + const filterStrings = [query.filter || []].flat(); + + if (filterStrings.some(f => typeof f !== 'string')) { + throw new InputError( + 'Only string type filter query parameters are supported', + ); + } + + const builder = new EntityFilters(); + for (const filterString of filterStrings) { + builder.addFilterString(filterString); + } + + return builder.build(); + } + + // Builds a filter from a { key: value } matcher object + static ofMatchers( + matchers: Record, + ): EntityFilter | undefined { + const builder = new EntityFilters(); + builder.addMatchers(matchers); + return builder.build(); + } + + private filters: EntitiesSearchFilter[][]; + + constructor() { + this.filters = []; + } + + addFilterString(filterString: string): EntityFilters { + const filtersByKey: Record = {}; + + const addFilter = (key: string, value: string) => { + const f = + key in filtersByKey + ? filtersByKey[key] + : (filtersByKey[key] = { key, matchValueIn: [] }); + f.matchValueIn!.push(value); + }; + + const statements = filterString + .split(',') + .map(s => s.trim()) + .filter(Boolean); + + for (const statement of statements) { + const equalsIndex = statement.indexOf('='); + if (equalsIndex < 1) { + throw new InputError('Malformed filter query'); + } else { + const key = statement.substr(0, equalsIndex).trim(); + const value = statement.substr(equalsIndex + 1).trim(); + if (!key || !value) { + throw new InputError('Malformed filter query'); + } + addFilter(key, value); + } + } + + this.filters.push(Object.values(filtersByKey)); + + return this; + } + + addMatchers(matchers: Record): EntityFilters { + const filters: EntitiesSearchFilter[] = []; + + for (const [key, value] of Object.entries(matchers)) { + filters.push({ key, matchValueIn: [value].flat() }); + } + + if (filters.length) { + this.filters.push(filters); + } + + return this; + } + + build(): EntityFilter | undefined { + if (!this.filters.length) { + return undefined; + } + + return { anyOf: this.filters.map(f => ({ allOf: f })) }; + } +} diff --git a/plugins/catalog-backend/src/service/filterQuery.test.ts b/plugins/catalog-backend/src/service/filterQuery.test.ts index bfb58568b5..a4b3d9c671 100644 --- a/plugins/catalog-backend/src/service/filterQuery.test.ts +++ b/plugins/catalog-backend/src/service/filterQuery.test.ts @@ -15,66 +15,7 @@ */ import { Entity } from '@backstage/catalog-model'; -import { - translateFilterQueryEntryToEntityFilters, - translateQueryToEntityFilters, - translateQueryToFieldMapper, -} from './filterQuery'; - -describe('translateQueryToEntityFilters', () => { - it('translates empty query to empty list', () => { - const result = translateQueryToEntityFilters({}); - expect(result).toEqual([]); - }); - - it('supports single-string format', () => { - const result = translateQueryToEntityFilters({ filter: 'a=1' }); - expect(result).toEqual([{ a: ['1'] }]); - }); - - it('supports array-of-strings format', () => { - const result = translateQueryToEntityFilters({ filter: ['a=1', 'b=2'] }); - expect(result).toEqual([{ a: ['1'] }, { b: ['2'] }]); - }); - - it('throws for non-strings', () => { - expect(() => translateQueryToEntityFilters({ filter: [3] })).toThrow( - /string/, - ); - }); -}); - -describe('translateFilterQueryEntryToEntityFilters', () => { - it('runs the happy path', () => { - const result = translateFilterQueryEntryToEntityFilters('a=1,b=2'); - expect(result).toEqual({ a: ['1'], b: ['2'] }); - }); - - it('ignores empty', () => { - const result = translateFilterQueryEntryToEntityFilters('a=1,,b=2,'); - expect(result).toEqual({ a: ['1'], b: ['2'] }); - }); - - it('trims', () => { - const result = translateFilterQueryEntryToEntityFilters(' a = 1 ,, b=2 ,'); - expect(result).toEqual({ a: ['1'], b: ['2'] }); - }); - - it('merges multiple of the same key', () => { - const result = translateFilterQueryEntryToEntityFilters('a=1,a=2,b=3'); - expect(result).toEqual({ a: ['1', '2'], b: ['3'] }); - }); - - it('treats missing equal signs as presence', () => { - const result = translateFilterQueryEntryToEntityFilters('a,b=2'); - expect(result).toEqual({ a: ['*'], b: ['2'] }); - }); - - it('treats empty value as null/absence', () => { - const result = translateFilterQueryEntryToEntityFilters('a=,b=2'); - expect(result).toEqual({ a: [null], b: ['2'] }); - }); -}); +import { translateQueryToFieldMapper } from './filterQuery'; describe('translateQueryToFieldMapper', () => { const entity: Entity = { diff --git a/plugins/catalog-backend/src/service/filterQuery.ts b/plugins/catalog-backend/src/service/filterQuery.ts index 4ab471ffcd..e9b6ef6062 100644 --- a/plugins/catalog-backend/src/service/filterQuery.ts +++ b/plugins/catalog-backend/src/service/filterQuery.ts @@ -17,62 +17,7 @@ import { InputError } from '@backstage/backend-common'; import { Entity } from '@backstage/catalog-model'; import lodash from 'lodash'; -import { EntityFilters } from '../database'; -import { RecursivePartial } from '../ingestion/processors/ldap/util'; - -export function translateQueryToEntityFilters( - query: Record, -): EntityFilters[] { - if (!query.filter) { - return []; - } - - const filterStrings = [query.filter].flat(); - - if (filterStrings.some(s => typeof s !== 'string')) { - throw new InputError( - 'Only string type filter query parameters are supported', - ); - } - - return filterStrings - .filter(Boolean) - .map(translateFilterQueryEntryToEntityFilters); -} - -// Parses the value of a filter=a=1,b=2 type query param -export function translateFilterQueryEntryToEntityFilters( - filterString: string, -): EntityFilters { - const filters: Record = {}; - - const addFilter = (key: string, value: string | null) => { - const matchers = key in filters ? filters[key] : (filters[key] = []); - matchers.push(value || null); - }; - - const statements = filterString - .split(',') - .map(s => s.trim()) - .filter(Boolean); - - for (const statement of statements) { - const equalsIndex = statement.indexOf('='); - if (equalsIndex < 0) { - // Check presence, any value - addFilter(statement, '*'); - } else { - const key = statement.substr(0, equalsIndex).trim(); - const value = statement.substr(equalsIndex + 1).trim(); - if (!key) { - throw new InputError('Malformed filter query'); - } - addFilter(key, value); - } - } - - return filters; -} +import { RecursivePartial } from '../util'; type FieldMapper = (entity: Entity) => Entity; diff --git a/plugins/catalog-backend/src/service/router.test.ts b/plugins/catalog-backend/src/service/router.test.ts index 1cf64945ee..cef40a9aac 100644 --- a/plugins/catalog-backend/src/service/router.test.ts +++ b/plugins/catalog-backend/src/service/router.test.ts @@ -21,6 +21,7 @@ import request from 'supertest'; import { EntitiesCatalog, LocationsCatalog } from '../catalog'; import { LocationResponse } from '../catalog/types'; import { HigherOrderOperation } from '../ingestion/types'; +import { EntityFilters } from './EntityFilters'; import { createRouter } from './router'; describe('createRouter', () => { @@ -78,18 +79,22 @@ describe('createRouter', () => { it('parses single and multiple request parameters and passes them down', async () => { entitiesCatalog.entities.mockResolvedValueOnce([]); const response = await request(app).get( - '/entities?filter=a=1,a=,a=3,b=4&filter=c=', + '/entities?filter=a=1,a=2,b=3&filter=c=4', ); expect(response.status).toEqual(200); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { - a: ['1', null, '3'], - b: ['4'], - }, - { c: [null] }, - ]); + expect(entitiesCatalog.entities).toHaveBeenCalledWith({ + anyOf: [ + { + allOf: [ + { key: 'a', matchValueIn: ['1', '2'] }, + { key: 'b', matchValueIn: ['3'] }, + ], + }, + { allOf: [{ key: 'c', matchValueIn: ['4'] }] }, + ], + }); }); }); @@ -107,9 +112,9 @@ describe('createRouter', () => { const response = await request(app).get('/entities/by-uid/zzz'); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { 'metadata.uid': 'zzz' }, - ]); + expect(entitiesCatalog.entities).toHaveBeenCalledWith( + EntityFilters.ofMatchers({ 'metadata.uid': 'zzz' }), + ); expect(response.status).toEqual(200); expect(response.body).toEqual(expect.objectContaining(entity)); }); @@ -120,9 +125,9 @@ describe('createRouter', () => { const response = await request(app).get('/entities/by-uid/zzz'); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { 'metadata.uid': 'zzz' }, - ]); + expect(entitiesCatalog.entities).toHaveBeenCalledWith( + EntityFilters.ofMatchers({ 'metadata.uid': 'zzz' }), + ); expect(response.status).toEqual(404); expect(response.text).toMatch(/uid/); }); @@ -143,13 +148,13 @@ describe('createRouter', () => { const response = await request(app).get('/entities/by-name/k/ns/n'); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { + expect(entitiesCatalog.entities).toHaveBeenCalledWith( + EntityFilters.ofMatchers({ kind: 'k', 'metadata.namespace': 'ns', 'metadata.name': 'n', - }, - ]); + }), + ); expect(response.status).toEqual(200); expect(response.body).toEqual(expect.objectContaining(entity)); }); @@ -160,13 +165,13 @@ describe('createRouter', () => { const response = await request(app).get('/entities/by-name/b/d/c'); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { + expect(entitiesCatalog.entities).toHaveBeenCalledWith( + EntityFilters.ofMatchers({ kind: 'b', 'metadata.namespace': 'd', 'metadata.name': 'c', - }, - ]); + }), + ); expect(response.status).toEqual(404); expect(response.text).toMatch(/name/); }); @@ -209,9 +214,9 @@ describe('createRouter', () => { { entity, relations: [] }, ]); expect(entitiesCatalog.entities).toHaveBeenCalledTimes(1); - expect(entitiesCatalog.entities).toHaveBeenCalledWith([ - { 'metadata.uid': 'u' }, - ]); + expect(entitiesCatalog.entities).toHaveBeenCalledWith( + EntityFilters.ofMatchers({ 'metadata.uid': 'u' }), + ); expect(response.status).toEqual(200); expect(response.body).toEqual(entity); }); diff --git a/plugins/catalog-backend/src/service/router.ts b/plugins/catalog-backend/src/service/router.ts index 96b343a184..ebad544bef 100644 --- a/plugins/catalog-backend/src/service/router.ts +++ b/plugins/catalog-backend/src/service/router.ts @@ -23,10 +23,8 @@ import { Logger } from 'winston'; import yn from 'yn'; import { EntitiesCatalog, LocationsCatalog } from '../catalog'; import { HigherOrderOperation } from '../ingestion/types'; -import { - translateQueryToEntityFilters, - translateQueryToFieldMapper, -} from './filterQuery'; +import { EntityFilters } from './EntityFilters'; +import { translateQueryToFieldMapper } from './filterQuery'; import { requireRequestBody, validateRequestBody } from './util'; export interface RouterOptions { @@ -47,9 +45,9 @@ export async function createRouter( if (entitiesCatalog) { router .get('/entities', async (req, res) => { - const filters = translateQueryToEntityFilters(req.query); + const filter = EntityFilters.ofQuery(req.query); const fieldMapper = translateQueryToFieldMapper(req.query); - const entities = await entitiesCatalog.entities(filters); + const entities = await entitiesCatalog.entities(filter); res.status(200).send(entities.map(fieldMapper)); }) .post('/entities', async (req, res) => { @@ -57,18 +55,16 @@ export async function createRouter( const [result] = await entitiesCatalog.batchAddOrUpdateEntities([ { entity: body as Entity, relations: [] }, ]); - const [entity] = await entitiesCatalog.entities([ - { 'metadata.uid': result.entityId }, - ]); + const [entity] = await entitiesCatalog.entities( + EntityFilters.ofMatchers({ 'metadata.uid': result.entityId }), + ); res.status(200).send(entity); }) .get('/entities/by-uid/:uid', async (req, res) => { const { uid } = req.params; - const entities = await entitiesCatalog.entities([ - { - 'metadata.uid': uid, - }, - ]); + const entities = await entitiesCatalog.entities( + EntityFilters.ofMatchers({ 'metadata.uid': uid }), + ); if (!entities.length) { res.status(404).send(`No entity with uid ${uid}`); } @@ -81,13 +77,13 @@ export async function createRouter( }) .get('/entities/by-name/:kind/:namespace/:name', async (req, res) => { const { kind, namespace, name } = req.params; - const entities = await entitiesCatalog.entities([ - { + const entities = await entitiesCatalog.entities( + EntityFilters.ofMatchers({ kind: kind, 'metadata.namespace': namespace, 'metadata.name': name, - }, - ]); + }), + ); if (!entities.length) { res .status(404) diff --git a/plugins/catalog-backend/src/util/RecursivePartial.test.ts b/plugins/catalog-backend/src/util/RecursivePartial.test.ts new file mode 100644 index 0000000000..7f16226188 --- /dev/null +++ b/plugins/catalog-backend/src/util/RecursivePartial.test.ts @@ -0,0 +1,31 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { RecursivePartial } from './RecursivePartial'; + +describe('RecursivePartial', () => { + it('is recursive', () => { + type X = { + required: { + required: string; + }; + }; + const x: RecursivePartial = { + required: {}, + }; + expect(x).toEqual({ required: {} }); + }); +}); diff --git a/plugins/catalog-backend/src/util/RecursivePartial.ts b/plugins/catalog-backend/src/util/RecursivePartial.ts new file mode 100644 index 0000000000..0fa468b4c4 --- /dev/null +++ b/plugins/catalog-backend/src/util/RecursivePartial.ts @@ -0,0 +1,26 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Makes all keys of an entire hierarchy optional. + */ +export type RecursivePartial = { + [P in keyof T]?: T[P] extends (infer U)[] + ? RecursivePartial[] + : T[P] extends object + ? RecursivePartial + : T[P]; +}; diff --git a/plugins/catalog-backend/src/util/index.ts b/plugins/catalog-backend/src/util/index.ts index 6f0505d8c5..8364819f99 100644 --- a/plugins/catalog-backend/src/util/index.ts +++ b/plugins/catalog-backend/src/util/index.ts @@ -15,3 +15,5 @@ */ export * from './runPeriodically'; +export * from './RecursivePartial'; +export * from './timing'; From d76b4659755b9d5e987a7a0efa2d184e1c4de0dc Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Fri, 30 Oct 2020 14:25:03 +0100 Subject: [PATCH 032/100] fix: use code snippet for code rendering --- .../MarkdownContent/MarkdownContent.test.tsx | 13 +++++++++++++ .../MarkdownContent/MarkdownContent.tsx | 17 ++++++++--------- packages/theme/src/themes.ts | 8 -------- packages/theme/src/types.ts | 4 ---- yarn.lock | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx index a96525a3f6..2fb40d2f4f 100644 --- a/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -40,4 +40,17 @@ describe('', () => { rendered.getByText('https://example.com', { selector: 'a' }), ).toBeInTheDocument(); }); + + it('render MarkdownContent component with CodeSnippet for code blocks', async () => { + const rendered = await renderWithEffects( + wrapInTestApp(), + ); + const fp1 = rendered.getByText('jest', { selector: 'span' }); + expect(fp1).toBeInTheDocument(); + expect(fp1.className).toEqual('hljs-function'); + const fp2 = rendered.getByText('(test: string)', { selector: 'span' }); + expect(fp2).toBeInTheDocument(); + expect(fp2.className).toEqual('hljs-function'); + expect(rendered.getByText(';', { selector: 'span' })).toBeInTheDocument(); + }); }); diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx index baa3f45862..4f234565d2 100644 --- a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx @@ -19,6 +19,7 @@ import ReactMarkdown from 'react-markdown'; import gfm from 'remark-gfm'; import React from 'react'; import { BackstageTheme } from '@backstage/theme'; +import { CodeSnippet } from '../CodeSnippet'; const useStyles = makeStyles(theme => ({ markdown: { @@ -49,15 +50,6 @@ const useStyles = makeStyles(theme => ({ backgroundColor: theme.palette.background.default, }, - '& pre': { - padding: '16px', - overflow: 'auto', - fontSize: '85%', - lineHeight: 1.45, - backgroundColor: theme.palette.code.background, - borderRadius: '6px', - color: theme.palette.code.text, - }, '& a': { color: theme.palette.link, }, @@ -75,6 +67,12 @@ type Props = { enableGfm?: boolean; }; +const renderers = { + code: ({ language, value }: { language: string; value: string }) => { + return ; + }, +}; + export const MarkdownContent = ({ content, enableGfm = false }: Props) => { const classes = useStyles(); return ( @@ -82,6 +80,7 @@ export const MarkdownContent = ({ content, enableGfm = false }: Props) => { plugins={enableGfm ? [gfm] : []} className={classes.markdown} children={content} + renderers={renderers} /> ); }; diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index 48142d48b9..5b233ac303 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -48,10 +48,6 @@ export const lightTheme = createTheme({ text: '#FFFFFF', link: '#000000', }, - code: { - background: '#333333', - text: '#FFFFFF', - }, border: '#E6E6E6', textContrast: '#000000', textVerySubtle: '#DDD', @@ -114,10 +110,6 @@ export const darkTheme = createTheme({ text: '#FFFFFF', link: '#000000', }, - code: { - background: '#F8F8F8', - text: '#333333', - }, border: '#E6E6E6', textContrast: '#FFFFFF', textVerySubtle: '#727272', diff --git a/packages/theme/src/types.ts b/packages/theme/src/types.ts index c87c5c26f4..5acc0f75e9 100644 --- a/packages/theme/src/types.ts +++ b/packages/theme/src/types.ts @@ -69,10 +69,6 @@ type PaletteAdditions = { text: string; link: string; }; - code: { - background: string; - text: string; - }; }; export type BackstagePalette = Palette & PaletteAdditions; diff --git a/yarn.lock b/yarn.lock index 80d96ad134..3615ad7f7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19682,7 +19682,7 @@ react-markdown@^4.3.1: unist-util-visit "^1.3.0" xtend "^4.0.1" -react-markdown@^5.0.0: +react-markdown@^5.0.0, react-markdown@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-5.0.2.tgz#d15a8beb37b4ec34fc23dd892e7755eb7040b8db" integrity sha512-kmkB4JbV7LqkDAjvaKRKtodB3n3Id76/DalaDun1U8FuLB0SenPfvH+jAQ5Pcpo54cACRQc1LB1yXmuuuIVecw== From 59166e5ec2b98e6389ba19c1353122c32c150a84 Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Mon, 2 Nov 2020 22:19:56 +0530 Subject: [PATCH 033/100] chore: run changeset --- .changeset/weak-otters-love.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/weak-otters-love.md diff --git a/.changeset/weak-otters-love.md b/.changeset/weak-otters-love.md new file mode 100644 index 0000000000..fb4ac19d3a --- /dev/null +++ b/.changeset/weak-otters-love.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-scaffolder': minor +'@backstage/plugin-scaffolder-backend': minor +--- + +Scaffolder's API `/v1/jobs` will accept `templateName` instead of `template` Entity. From 240036496013d4cb0c52dce9d47d3548705e7a8f Mon Sep 17 00:00:00 2001 From: Marvin9 Date: Mon, 2 Nov 2020 22:48:44 +0530 Subject: [PATCH 034/100] chore: mention entityClient as an additional option of createRouter --- .changeset/weak-otters-love.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.changeset/weak-otters-love.md b/.changeset/weak-otters-love.md index fb4ac19d3a..2c273e067b 100644 --- a/.changeset/weak-otters-love.md +++ b/.changeset/weak-otters-love.md @@ -3,4 +3,14 @@ '@backstage/plugin-scaffolder-backend': minor --- -Scaffolder's API `/v1/jobs` will accept `templateName` instead of `template` Entity. +`createRouter` of scaffolder backend will now require additional option as `entityClient` which could be generated by `CatalogEntityClient` in `plugin-scaffolder-backend` package. Here is example to generate `entityClient`. + +```js +import { CatalogEntityClient } from '@backstage/plugin-scaffolder-backend'; +import { SingleHostDiscovery } from '@backstage/backend-common'; + +const discovery = SingleHostDiscovery.fromConfig(config); +const entityClient = new CatalogEntityClient({ discovery }); +``` + +- Scaffolder's API `/v1/jobs` will accept `templateName` instead of `template` Entity. From 4a5fcc0e0136f2c338799dd19f90bc628b936d03 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 2 Nov 2020 12:28:28 -0500 Subject: [PATCH 035/100] Fix wording --- docs/api/utility-apis.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/utility-apis.md b/docs/api/utility-apis.md index 1ebf2ae88b..d9a71c92cd 100644 --- a/docs/api/utility-apis.md +++ b/docs/api/utility-apis.md @@ -22,7 +22,7 @@ during their entire life cycle. Each Utility API is tied to an `ApiRef` instance, which is a global singleton object without any additional state or functionality, its only purpose is to -reference Utility APIs. `ApiRef`s are create using `createApiRef`, which is +reference Utility APIs. `ApiRef`s are created using `createApiRef`, which is exported by `@backstage/core`. There are many [predefined Utility APIs](../reference/utility-apis/README.md) defined in `@backstage/core`, and they're all exported with a name of the pattern From 8a497983411af61e74101f016a37c44007fd7f7a Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 2 Nov 2020 12:29:34 -0500 Subject: [PATCH 036/100] Link to baking, update chapter header, remove old footer --- docs/dls/design.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/dls/design.md b/docs/dls/design.md index fa3a0c159e..3fe9a0adb1 100644 --- a/docs/dls/design.md +++ b/docs/dls/design.md @@ -99,9 +99,10 @@ issues in GitHub with ‘design’ and/or ‘storybook’ - so feel free to brow tackle the tasks that interest you. If you have any questions regarding an issue, you can ask them in the comments section of the issue or on [Discord](https://discord.gg/EBHEGzX). We absolutely adore our external -contributors and will send you virtual semlas for your contributions! +contributors and will send you virtual +[semlas](https://en.wikipedia.org/wiki/Semla) for your contributions! -### Request a component. +### Request a component Create an issue (label it design and assign it to katz95) or send us a message on [Discord](https://discord.gg/EBHEGzX) (_#design_ channel) with details of @@ -135,5 +136,3 @@ contributing to Backstage as a designer is easy. From styling guidelines to UX principles to Figma documents, we’ll make sure you’re equipped to chip in on this project. We’re excited to work with you! In the meantime, we’d love to hear from you on [Discord](https://discord.gg/EBHEGzX). - -[Back to Docs](../README.md) From 9a3786309fa248e7135e76404d41dfe5c9784af4 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 2 Nov 2020 12:29:47 -0500 Subject: [PATCH 037/100] Remove extraneous footer --- docs/plugins/publishing.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/plugins/publishing.md b/docs/plugins/publishing.md index fbeab6340c..71c24a2c07 100644 --- a/docs/plugins/publishing.md +++ b/docs/plugins/publishing.md @@ -56,5 +56,3 @@ $ git reset --hard master $ yarn release $ git push --force ``` - -[Back to Docs](../README.md) From 1344f481294d03cc940971905bd52deb61552c16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ca=C5=82us?= Date: Mon, 2 Nov 2020 19:00:35 +0100 Subject: [PATCH 038/100] Bump travis-ci plugin version Due to a bug fix, travis-ci plugin version has to be updated. --- packages/app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app/package.json b/packages/app/package.json index f36806b93a..8d1e5a6289 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -36,7 +36,7 @@ "@octokit/rest": "^18.0.0", "@roadiehq/backstage-plugin-github-insights": "^0.2.10", "@roadiehq/backstage-plugin-github-pull-requests": "^0.6.0", - "@roadiehq/backstage-plugin-travis-ci": "^0.2.5", + "@roadiehq/backstage-plugin-travis-ci": "^0.2.6", "history": "^5.0.0", "prop-types": "^15.7.2", "react": "^16.12.0", From 8635aec73449a567ee7f5b59153614ea7ef459f6 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 2 Nov 2020 19:16:12 +0100 Subject: [PATCH 039/100] cli: bump @spotify/eslint-* packages to v9 --- packages/cli/package.json | 6 +++--- yarn.lock | 24 ++++++++++++------------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index 9f8ad850e0..fdc0acddbf 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -38,9 +38,9 @@ "@rollup/plugin-json": "^4.0.2", "@rollup/plugin-node-resolve": "^9.0.0", "@rollup/plugin-yaml": "^2.1.1", - "@spotify/eslint-config-base": "^8.0.0", - "@spotify/eslint-config-react": "^8.0.0", - "@spotify/eslint-config-typescript": "^8.0.0", + "@spotify/eslint-config-base": "^9.0.0", + "@spotify/eslint-config-react": "^9.0.0", + "@spotify/eslint-config-typescript": "^9.0.0", "@sucrase/webpack-loader": "^2.0.0", "@svgr/plugin-jsx": "5.4.x", "@svgr/plugin-svgo": "5.4.x", diff --git a/yarn.lock b/yarn.lock index 38a37b8ab3..90d2657f0f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3812,10 +3812,10 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@spotify/eslint-config-base@^8.0.0": - version "8.0.0" - resolved "https://registry.npmjs.org/@spotify/eslint-config-base/-/eslint-config-base-8.0.0.tgz#c3d10d8a05ad9129d579952cb80063e4c4fa216e" - integrity sha512-07Fo+KoTMl4AaZJPD6deFnYmG634wzgeqfFcWdFlIrOLAasvWSH8Lp6ZE9cJBKuffOAy8kuEE1SwFo34+5X8bQ== +"@spotify/eslint-config-base@^9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@spotify/eslint-config-base/-/eslint-config-base-9.0.0.tgz#e122b2e6d1a11750170badc5be6774ded95953d2" + integrity sha512-LNGY6bBM0IlosvMIx9Ic5gqatpa5LPvrJhN4RnrUnP9oaXNLgPTKDE89p3eC5Tnh78ADdX4HD+rbHDSyP2tBgg== "@spotify/eslint-config-oss@^1.0.1": version "1.0.2" @@ -3824,15 +3824,15 @@ dependencies: eslint-plugin-notice "^0.9.10" -"@spotify/eslint-config-react@^8.0.0": - version "8.0.2" - resolved "https://registry.npmjs.org/@spotify/eslint-config-react/-/eslint-config-react-8.0.2.tgz#91af3c58b22d49a96795336ed66927e722cda430" - integrity sha512-V0gzO/jWmjhODLINAfeunHj+OBdj/cQeVDw+92ZUlkonAg6BZLjX6Vy8jeIUFjfgmVOtI9eKbcApxaurj1jN6g== +"@spotify/eslint-config-react@^9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@spotify/eslint-config-react/-/eslint-config-react-9.0.0.tgz#9c032e257090a5b3f5b08b28c1311485bf0fbae3" + integrity sha512-3w+cmbUljBLxZGLk4dn1oJD8v4uxW7bKackkcpZhac6VkQmg01EDN04Bx9qmbNe5S/2uHwrOJGcWlge5R8Ml1Q== -"@spotify/eslint-config-typescript@^8.0.0": - version "8.1.1" - resolved "https://registry.npmjs.org/@spotify/eslint-config-typescript/-/eslint-config-typescript-8.1.1.tgz#a8c6f74ef9445fe740008ae3a26003a2eef78f93" - integrity sha512-0NkE6ZiSRf9IBWwCxzn/l7UdwcL/KZsbzjjOSweafyYueajEn+eIpKjOgDGUL/ebxSrOtjEp+YeFc4lSPkP0qg== +"@spotify/eslint-config-typescript@^9.0.0": + version "9.0.0" + resolved "https://registry.npmjs.org/@spotify/eslint-config-typescript/-/eslint-config-typescript-9.0.0.tgz#be68cfaf212599f0bfeb6536c7c58ec05d2b6fba" + integrity sha512-ZsXTwMA68ZCz943U4N8XwprdWcc7ErOO/IW8PewLK5lycCZtLnmRkOvAbae7O5qNJPD8b/l0iUMTLaZuwjXWwg== "@spotify/prettier-config@^8.0.0": version "8.0.0" From 3cbebc9c13dbaed9eb01d821b8d582848bb87fc5 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Mon, 2 Nov 2020 19:20:23 +0100 Subject: [PATCH 040/100] fix: fix edge case of sonarqube plugin if no quality gate was computed Initially no quality gate is available, till the first analysis. Previously this was handled as "failed". Now it has its own state. --- .../SonarQubeCard/SonarQubeCard.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx index 8e6cc817a1..677ce4f7eb 100644 --- a/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx +++ b/plugins/sonarqube/src/components/SonarQubeCard/SonarQubeCard.tsx @@ -51,6 +51,9 @@ const useStyles = makeStyles(theme => ({ margin: 0, backgroundColor: theme.palette.success.main, }, + badgeUnknown: { + backgroundColor: theme.palette.grey[500], + }, header: { padding: theme.spacing(2, 2, 2, 2.5), }, @@ -104,17 +107,20 @@ export const SonarQubeCard = ({ } : undefined; - const gatePassed = value && value.metrics.alert_status === 'OK'; - const classes = useStyles(); + let gateLabel = 'Not computed'; + let gateColor = classes.badgeUnknown; + + if (value?.metrics.alert_status) { + const gatePassed = value.metrics.alert_status === 'OK'; + gateLabel = gatePassed ? 'Gate passed' : 'Gate failed'; + gateColor = gatePassed ? classes.badgeSuccess : classes.badgeError; + } const qualityBadge = !loading && value && ( ); From 1249cbb07a46b1d5ff1d3a76c241a663d7b8822f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 00:29:09 +0100 Subject: [PATCH 041/100] cli: disable lint rules that depend on @typescript-eslint v4 --- packages/cli/config/eslint.backend.js | 4 ++++ packages/cli/config/eslint.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/cli/config/eslint.backend.js b/packages/cli/config/eslint.backend.js index 2c0b05c196..67f0a49b9f 100644 --- a/packages/cli/config/eslint.backend.js +++ b/packages/cli/config/eslint.backend.js @@ -37,6 +37,10 @@ module.exports = { }, ignorePatterns: ['.eslintrc.js', '**/dist/**', '**/dist-types/**'], rules: { + // TODO(Rugvip): We need to bump @typescript-eslint to v4 to enable these + '@typescript-eslint/no-shadow': 0, + '@typescript-eslint/no-redeclare': 0, + 'no-console': 0, // Permitted in console programs 'new-cap': ['error', { capIsNew: false }], // Because Express constructs things e.g. like 'const r = express.Router()' 'import/newline-after-import': 'error', diff --git a/packages/cli/config/eslint.js b/packages/cli/config/eslint.js index 3e171d1f82..9b1880c1db 100644 --- a/packages/cli/config/eslint.js +++ b/packages/cli/config/eslint.js @@ -41,6 +41,10 @@ module.exports = { }, ignorePatterns: ['.eslintrc.js', '**/dist/**', '**/dist-types/**'], rules: { + // TODO(Rugvip): We need to bump @typescript-eslint to v4 to enable these + '@typescript-eslint/no-shadow': 0, + '@typescript-eslint/no-redeclare': 0, + 'import/newline-after-import': 'error', 'import/no-duplicates': 'warn', 'import/no-extraneous-dependencies': [ From d53ecd6dc6f68817283fe25a720a351504514922 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 00:39:44 +0100 Subject: [PATCH 042/100] core-api: fix outdated eslint ignore --- packages/core-api/src/apis/system/ApiRegistry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core-api/src/apis/system/ApiRegistry.ts b/packages/core-api/src/apis/system/ApiRegistry.ts index 14f58268b4..b105633c51 100644 --- a/packages/core-api/src/apis/system/ApiRegistry.ts +++ b/packages/core-api/src/apis/system/ApiRegistry.ts @@ -27,7 +27,7 @@ class ApiRegistryBuilder { } build(): ApiRegistry { - // eslint-disable-next-line no-use-before-define + // eslint-disable-next-line @typescript-eslint/no-use-before-define return new ApiRegistry(new Map(this.apis)); } } From eef09cbd013dbcf02d60bd6a348029b0d04c57ec Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Nov 2020 04:28:22 +0000 Subject: [PATCH 043/100] chore(deps): bump pg from 8.3.0 to 8.4.2 Bumps [pg](https://github.com/brianc/node-postgres) from 8.3.0 to 8.4.2. - [Release notes](https://github.com/brianc/node-postgres/releases) - [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md) - [Commits](https://github.com/brianc/node-postgres/compare/pg@8.3.0...pg@8.4.2) Signed-off-by: dependabot[bot] --- yarn.lock | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/yarn.lock b/yarn.lock index 38a37b8ab3..a438e1bf05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -18253,11 +18253,16 @@ pg-connection-string@0.1.3, pg-connection-string@^0.1.3: resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-0.1.3.tgz#da1847b20940e42ee1492beaf65d49d91b245df7" integrity sha1-2hhHsglA5C7hSSvq9l1J2RskXfc= -pg-connection-string@2.3.0, pg-connection-string@^2.3.0: +pg-connection-string@2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.3.0.tgz#c13fcb84c298d0bfa9ba12b40dd6c23d946f55d6" integrity sha512-ukMTJXLI7/hZIwTW7hGMZJ0Lj0S2XQBCJ4Shv4y1zgQ/vqVea+FLhzywvPj0ujSuofu+yA4MYHGZPTsgjBgJ+w== +pg-connection-string@^2.3.0, pg-connection-string@^2.4.0: + version "2.4.0" + resolved "https://registry.npmjs.org/pg-connection-string/-/pg-connection-string-2.4.0.tgz#c979922eb47832999a204da5dbe1ebf2341b6a10" + integrity sha512-3iBXuv7XKvxeMrIgym7njT+HlZkwZqqGX4Bu9cci8xHZNT+Um1gWKqCsAzcC0d95rcKMU5WBg6YRUcHyV0HZKQ== + pg-int8@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" @@ -18271,15 +18276,15 @@ pg-pool@1.*: generic-pool "2.4.3" object-assign "4.1.0" -pg-pool@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.1.tgz#5f4afc0f58063659aeefa952d36af49fa28b30e0" - integrity sha512-BQDPWUeKenVrMMDN9opfns/kZo4lxmSWhIqo+cSAF7+lfi9ZclQbr9vfnlNaPr8wYF3UYjm5X0yPAhbcgqNOdA== +pg-pool@^3.2.2: + version "3.2.2" + resolved "https://registry.npmjs.org/pg-pool/-/pg-pool-3.2.2.tgz#a560e433443ed4ad946b84d774b3f22452694dff" + integrity sha512-ORJoFxAlmmros8igi608iVEbQNNZlp89diFVx6yV5v+ehmpMY9sK6QgpmgoXbmkNaBAx8cOOZh9g80kJv1ooyA== -pg-protocol@^1.2.5: - version "1.2.5" - resolved "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.2.5.tgz#28a1492cde11646ff2d2d06bdee42a3ba05f126c" - integrity sha512-1uYCckkuTfzz/FCefvavRywkowa6M5FohNMF5OjKrqo9PSR8gYc8poVmwwYQaBxhmQdBjhtP514eXy9/Us2xKg== +pg-protocol@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/pg-protocol/-/pg-protocol-1.3.0.tgz#3c8fb7ca34dbbfcc42776ce34ac5f537d6e34770" + integrity sha512-64/bYByMrhWULUaCd+6/72c9PMWhiVFs3EVxl9Ct6a3v/U8+rKgqP2w+kKg/BIGgMJyB+Bk/eNivT32Al+Jghw== pg-types@1.*: version "1.13.0" @@ -18318,18 +18323,17 @@ pg@^6.1.0: semver "4.3.2" pg@^8.3.0: - version "8.3.0" - resolved "https://registry.npmjs.org/pg/-/pg-8.3.0.tgz#941383300d38eef51ecb88a0188cec441ab64d81" - integrity sha512-jQPKWHWxbI09s/Z9aUvoTbvGgoj98AU7FDCcQ7kdejupn/TcNpx56v2gaOTzXkzOajmOEJEdi9eTh9cA2RVAjQ== + version "8.4.2" + resolved "https://registry.npmjs.org/pg/-/pg-8.4.2.tgz#2aa58166a23391e91d56a7ea57c6d99931c0642a" + integrity sha512-E9FlUrrc7w3+sbRmL1CSw99vifACzB2TjhMM9J5w9D1LIg+6un0jKkpHS1EQf2CWhKhec2bhrBLVMmUBDbjPRQ== dependencies: buffer-writer "2.0.0" packet-reader "1.0.0" - pg-connection-string "^2.3.0" - pg-pool "^3.2.1" - pg-protocol "^1.2.5" + pg-connection-string "^2.4.0" + pg-pool "^3.2.2" + pg-protocol "^1.3.0" pg-types "^2.1.0" pgpass "1.x" - semver "4.3.2" pgpass@1.*, pgpass@1.x: version "1.0.2" From 7c12fc656f1c358661c4ad6d47585f1f1c0d3360 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 10:34:10 +0100 Subject: [PATCH 044/100] Update CODEOWNERS to fit new org --- .github/CODEOWNERS | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index d161a8e1a9..7cce08798a 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,14 +4,14 @@ # The last matching pattern takes precedence. # https://help.github.com/articles/about-codeowners/ -* @spotify/backstage-core -/docs/features/techdocs @spotify/techdocs-core -/plugins/cost-insights @spotify/silver-lining +* @backstage/maintainers +/docs/features/techdocs @backstage/techdocs-core +/plugins/cost-insights @backstage/silver-lining /plugins/cloudbuild @trivago/ebarrios -/plugins/techdocs @spotify/techdocs-core -/plugins/techdocs-backend @spotify/techdocs-core -/packages/techdocs-cli @spotify/techdocs-core -/packages/techdocs-container @spotify/techdocs-core -/.github/workflows/techdocs.yml @spotify/techdocs-core -/.github/workflows/techdocs-pypi.yml @spotify/techdocs-core -/.changeset/cost-insights-* @spotify/silver-lining +/plugins/techdocs @backstage/techdocs-core +/plugins/techdocs-backend @backstage/techdocs-core +/packages/techdocs-cli @backstage/techdocs-core +/packages/techdocs-container @backstage/techdocs-core +/.github/workflows/techdocs.yml @backstage/techdocs-core +/.github/workflows/techdocs-pypi.yml @backstage/techdocs-core +/.changeset/cost-insights-* @backstage/silver-lining From 4703305bc6b46b9c497fb53a9e97f3888a536773 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 10:51:43 +0100 Subject: [PATCH 045/100] Release new version of mkdocs-techdocs-core (#3207) --- packages/techdocs-container/techdocs-core/README.md | 4 ++++ packages/techdocs-container/techdocs-core/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/techdocs-container/techdocs-core/README.md b/packages/techdocs-container/techdocs-core/README.md index 423a076cbf..7bd6fe4187 100644 --- a/packages/techdocs-container/techdocs-core/README.md +++ b/packages/techdocs-container/techdocs-core/README.md @@ -82,6 +82,10 @@ Extensions: ## Changelog +### 0.0.11 + +- Any MkDocs plugin configurations from mkdocs.yml will now work and override the default configuration. See https://github.com/spotify/backstage/issues/3017 + ### 0.0.10 - Pin Markdown version to fix issue with Graphviz diff --git a/packages/techdocs-container/techdocs-core/setup.py b/packages/techdocs-container/techdocs-core/setup.py index 44ff653d72..b70805a3d0 100644 --- a/packages/techdocs-container/techdocs-core/setup.py +++ b/packages/techdocs-container/techdocs-core/setup.py @@ -23,7 +23,7 @@ with open(path.join(this_dir, "README.md"), encoding="utf-8") as file: setup( name="mkdocs-techdocs-core", - version="0.0.10", + version="0.0.11", description="A Mkdocs package that contains TechDocs defaults", long_description=long_description, long_description_content_type="text/markdown", From af141c0766db5536045a2f849d43214f151f9430 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 10:37:24 +0100 Subject: [PATCH 046/100] rewrite repo location urls --- .changeset/3066.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/techdocs-project-board.yml | 10 +- CHANGELOG.md | 58 ++++----- CONTRIBUTING.md | 18 +-- README.md | 10 +- app-config.yaml | 12 +- catalog-info.yaml | 2 +- contrib/chart/backstage/Chart.yaml | 2 +- contrib/chart/backstage/README.md | 2 +- .../files/app-config.development.yaml.tpl | 10 +- docs/FAQ.md | 30 ++--- .../adr002-default-catalog-file-format.md | 4 +- ...adr007-use-msw-to-mock-service-requests.md | 2 +- .../adr008-default-catalog-file-name.md | 2 +- .../adr009-entity-references.md | 2 +- docs/architecture-decisions/index.md | 4 +- docs/auth/index.md | 2 +- docs/auth/oauth.md | 8 +- docs/conf/reading.md | 4 +- .../software-catalog/configuration.md | 2 +- .../software-catalog/extending-the-model.md | 2 +- docs/features/software-catalog/index.md | 8 +- .../features/software-catalog/installation.md | 18 +-- .../features/software-catalog/system-model.md | 4 +- .../well-known-annotations.md | 4 +- .../extending/create-your-own-preparer.md | 6 +- .../extending/create-your-own-publisher.md | 4 +- .../extending/create-your-own-templater.md | 4 +- .../software-templates/extending/index.md | 2 +- .../software-templates/installation.md | 6 +- docs/features/techdocs/FAQ.md | 4 +- docs/features/techdocs/README.md | 16 +-- docs/features/techdocs/concepts.md | 12 +- docs/getting-started/app-custom-theme.md | 2 +- docs/getting-started/deployment-helm.md | 6 +- docs/getting-started/deployment-k8s.md | 2 +- .../development-environment.md | 4 +- docs/getting-started/index.md | 2 +- .../running-backstage-locally.md | 10 +- docs/openapi/definitions/auth.yaml | 4 +- docs/overview/architecture-overview.md | 10 +- docs/overview/logos.md | 2 +- docs/overview/roadmap.md | 50 ++++---- docs/overview/what-is-backstage.md | 2 +- docs/plugins/add-to-marketplace.md | 2 +- docs/plugins/call-existing-api.md | 2 +- docs/plugins/index.md | 2 +- docs/plugins/publishing.md | 2 +- docs/plugins/structure-of-a-plugin.md | 2 +- docs/reference/utility-apis/AlertApi.md | 10 +- docs/reference/utility-apis/AppThemeApi.md | 20 ++-- .../utility-apis/BackstageIdentityApi.md | 6 +- docs/reference/utility-apis/Config.md | 10 +- docs/reference/utility-apis/DiscoveryApi.md | 2 +- docs/reference/utility-apis/ErrorApi.md | 12 +- .../reference/utility-apis/FeatureFlagsApi.md | 8 +- docs/reference/utility-apis/IdentityApi.md | 4 +- docs/reference/utility-apis/OAuthApi.md | 6 +- .../reference/utility-apis/OAuthRequestApi.md | 16 +-- .../utility-apis/OpenIdConnectApi.md | 4 +- docs/reference/utility-apis/ProfileInfoApi.md | 6 +- docs/reference/utility-apis/README.md | 36 +++--- docs/reference/utility-apis/SessionApi.md | 10 +- .../reference/utility-apis/SessionStateApi.md | 10 +- docs/reference/utility-apis/StorageApi.md | 12 +- docs/support/project-structure.md | 113 +++++++++--------- docs/support/support.md | 4 +- docs/tutorials/quickstart-app-plugin.md | 6 +- .../blog/2020-03-18-what-is-backstage.md | 4 +- .../blog/2020-04-06-lighthouse-plugin.md | 2 +- ...0-04-30-how-to-quickly-set-up-backstage.md | 2 +- .../blog/2020-05-14-tech-radar-plugin.md | 4 +- .../2020-05-22-phase-2-service-catalog.md | 10 +- ...0-06-22-backstage-service-catalog-alpha.md | 4 +- ...hentication-in-backstage-using-passport.md | 4 +- ...announcing-backstage-software-templates.md | 2 +- .../blog/2020-09-08-announcing-tech-docs.md | 6 +- .../blog/2020-09-23-backstage-cncf-sandbox.md | 2 +- .../2020-09-30-backstage-design-system.md | 4 +- .../blog/2020-09-30-plugin-marketplace.md | 4 +- .../blog/2020-10-22-cost-insights-plugin.md | 8 +- microsite/core/Footer.js | 2 +- microsite/data/plugins/api-docs.yaml | 2 +- microsite/data/plugins/circleci.yaml | 2 +- microsite/data/plugins/cloud-build.yaml | 2 +- microsite/data/plugins/cost-insights.yaml | 2 +- microsite/data/plugins/gcp-projects.yaml | 2 +- microsite/data/plugins/github-actions.yaml | 2 +- microsite/data/plugins/gitops-cluster.yaml | 2 +- microsite/data/plugins/graphiql.yaml | 2 +- microsite/data/plugins/jenkins.yaml | 2 +- microsite/data/plugins/lighthouse.yaml | 2 +- microsite/data/plugins/new-relic.yaml | 2 +- microsite/data/plugins/rollbar.yaml | 2 +- microsite/data/plugins/sentry.yaml | 2 +- microsite/data/plugins/sonarqube.yaml | 2 +- microsite/data/plugins/tech-radar.yaml | 2 +- microsite/pages/en/index.js | 4 +- microsite/pages/en/plugins.js | 4 +- microsite/siteConfig.js | 6 +- packages/backend-common/README.md | 4 +- packages/backend-common/package.json | 2 +- packages/backend/README.md | 6 +- packages/catalog-model/README.md | 4 +- .../catalog-model/examples/acme-corp.yaml | 2 +- packages/catalog-model/examples/acme/org.yaml | 14 +-- packages/catalog-model/examples/all-apis.yaml | 10 +- .../examples/all-components.yaml | 18 +-- .../policies/FieldFormatEntityPolicy.ts | 2 +- .../src/kinds/LocationEntityV1alpha1.test.ts | 6 +- packages/cli-common/README.md | 4 +- packages/cli-common/package.json | 2 +- packages/cli/README.md | 4 +- packages/cli/package.json | 2 +- packages/config-loader/README.md | 4 +- packages/config-loader/package.json | 2 +- packages/config/README.md | 4 +- packages/config/package.json | 2 +- packages/core-api/README.md | 4 +- packages/core-api/package.json | 2 +- packages/core/README.md | 4 +- packages/core/package.json | 2 +- .../core/src/layout/ErrorPage/ErrorPage.tsx | 2 +- packages/create-app/README.md | 4 +- packages/create-app/package.json | 2 +- .../templates/default-app/app-config.yaml.hbs | 12 +- .../default-app/catalog-info.yaml.hbs | 10 +- .../default-app/packages/backend/README.md | 8 +- packages/dev-utils/README.md | 4 +- packages/dev-utils/package.json | 2 +- packages/docgen/package.json | 2 +- packages/docgen/src/docgen/ApiDocsPrinter.ts | 2 +- .../src/docgen/GitHubMarkdownPrinter.ts | 2 +- .../src/docgen/TechdocsMarkdownPrinter.ts | 2 +- packages/e2e-test/README.md | 4 +- packages/e2e-test/package.json | 2 +- .../webpack-plugin-fail-build-on-warning.js | 2 +- packages/techdocs-cli/README.md | 4 +- packages/techdocs-cli/package.json | 2 +- packages/techdocs-container/README.md | 4 +- .../techdocs-container/techdocs-core/setup.py | 2 +- packages/test-utils-core/README.md | 4 +- packages/test-utils-core/package.json | 2 +- packages/test-utils/README.md | 4 +- packages/test-utils/package.json | 2 +- packages/theme/README.md | 4 +- packages/theme/package.json | 2 +- plugins/README.md | 6 +- plugins/auth-backend/README.md | 2 +- plugins/catalog-backend/README.md | 2 +- .../processors/CodeOwnersProcessor.test.ts | 14 ++- .../processors/PlaceholderProcessor.test.ts | 30 +++-- plugins/catalog/README.md | 2 +- .../components/AboutCard/AboutCard.test.tsx | 4 +- .../src/components/AboutCard/AboutCard.tsx | 2 +- plugins/cost-insights/README.md | 6 +- plugins/github-actions/examples/sample.yaml | 2 +- plugins/graphiql/package.json | 4 +- plugins/lighthouse/README.md | 6 +- .../lighthouse/src/components/Intro/index.tsx | 4 +- plugins/rollbar-backend/README.md | 2 +- plugins/rollbar/README.md | 4 +- .../sample-templates/all-templates.yaml | 8 +- plugins/scaffolder/README.md | 2 +- plugins/techdocs-backend/README.md | 4 +- .../documented-component.yaml | 2 +- .../techdocs/stages/prepare/commonGit.test.ts | 2 +- .../src/techdocs/stages/prepare/dir.test.ts | 2 +- .../components/WelcomePage/WelcomePage.tsx | 8 +- 170 files changed, 549 insertions(+), 542 deletions(-) diff --git a/.changeset/3066.md b/.changeset/3066.md index 7bb67e70d1..7c157c94c3 100644 --- a/.changeset/3066.md +++ b/.changeset/3066.md @@ -6,7 +6,7 @@ Filters passed to the `/entities` endpoint of the catalog has changed format. The old way was to pass things on the form `?a=b&c=d`; the new way is to pass things on the form `?filter=a=b,c=d`. See discussion in -[#2910](https://github.com/spotify/backstage/issues/2910) for details. +[#2910](https://github.com/backstage/backstage/issues/2910) for details. The comma separated items within a single filter have an AND between them. If multiple such filters are passed, they have an OR between those item groups. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index de7ce773bb..d68af23491 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -7,7 +7,7 @@ -- [ ] A changeset describing the change and affected packages. ([more info](https://github.com/spotify/backstage/blob/master/CONTRIBUTING.md#creating-changesets)) +- [ ] A changeset describing the change and affected packages. ([more info](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#creating-changesets)) - [ ] Added or updated documentation - [ ] Tests for new functionality and regression tests for bug fixes - [ ] Screenshots attached (for UI changes) diff --git a/.github/workflows/techdocs-project-board.yml b/.github/workflows/techdocs-project-board.yml index b389cf6bf5..a0691f2a79 100644 --- a/.github/workflows/techdocs-project-board.yml +++ b/.github/workflows/techdocs-project-board.yml @@ -1,5 +1,5 @@ name: Automatically add new TechDocs Issues and PRs to the GitHub project board -# Development of TechDocs in Backstage is managed by this Kanban board - https://github.com/spotify/backstage/projects/5 +# Development of TechDocs in Backstage is managed by this Kanban board - https://github.com/backstage/backstage/projects/5 # New issues with TechDocs in their title or docs-like-code label will be added to the board. on: @@ -23,7 +23,7 @@ jobs: contains(github.event.issue.title, 'techdocs') || contains(github.event.issue.title, 'Techdocs') with: - project: 'https://github.com/spotify/backstage/projects/5' + project: 'https://github.com/backstage/backstage/projects/5' column_name: 'Incoming' - name: Assign new issue to Incoming based on its label. @@ -31,7 +31,7 @@ jobs: if: | contains(github.event.issue.labels.*.name, 'docs-like-code') with: - project: 'https://github.com/spotify/backstage/projects/5' + project: 'https://github.com/backstage/backstage/projects/5' column_name: 'Incoming' - name: Assign new PR to Incoming based on its title. @@ -41,7 +41,7 @@ jobs: contains(github.event.pull_request.title, 'techdocs') || contains(github.event.pull_request.title, 'Techdocs') with: - project: 'https://github.com/spotify/backstage/projects/5' + project: 'https://github.com/backstage/backstage/projects/5' column_name: 'Incoming' - name: Assign new PR to Incoming based on its label. @@ -49,5 +49,5 @@ jobs: if: | contains(github.event.pull_request.labels.*.name, 'docs-like-code') with: - project: 'https://github.com/spotify/backstage/projects/5' + project: 'https://github.com/backstage/backstage/projects/5' column_name: 'Incoming' diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ab3459628..1ac33ca7f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ This is a best-effort changelog where we manually collect breaking changes. It is not an exhaustive list of all changes or even features added. -If you encounter issues while upgrading to a newer version, don't hesitate to reach out on [Discord](https://discord.gg/EBHEGzX) or [open an issue](https://github.com/spotify/backstage/issues/new/choose)! +If you encounter issues while upgrading to a newer version, don't hesitate to reach out on [Discord](https://discord.gg/EBHEGzX) or [open an issue](https://github.com/backstage/backstage/issues/new/choose)! ## Next Release @@ -26,18 +26,18 @@ If you encounter issues while upgrading to a newer version, don't hesitate to re ### Backend (example-backend, or backends created with @backstage/create-app) -- A plugin database manager has been created, and plugins can now accept that interface as an argument during initialisation. Notably, the `auth` plugin has a [`createRouter` signature change](./plugins/auth-backend/src/service/router.ts). See [packages/backend/src/index.ts](./packages/backend/src/index.ts) on how to set it up. [#2697](https://github.com/spotify/backstage/pull/2697) +- A plugin database manager has been created, and plugins can now accept that interface as an argument during initialisation. Notably, the `auth` plugin has a [`createRouter` signature change](./plugins/auth-backend/src/service/router.ts). See [packages/backend/src/index.ts](./packages/backend/src/index.ts) on how to set it up. [#2697](https://github.com/backstage/backstage/pull/2697) ## v0.1.1-alpha.24 ### Backend (example-backend, or backends created with @backstage/create-app) -- The default mount point for backend plugins have been changed to `/api`. These changes are done in the backend package itself, so it is recommended that you sync up existing backend packages with this new pattern. [#2562](https://github.com/spotify/backstage/pull/2562) -- A service discovery mechanism for backend plugins has been added, and is now a requirement for several backend plugins. See [packages/backend/src/index.ts](./packages/backend/src/index.ts) for how to set it up using `SingleHostDiscovery` from `@backstage/backend-common`. Note that the default base path for plugins is set to `/api` to that change, but it can be set to use the old behavior via the `basePath` option. [#2600](https://github.com/spotify/backstage/pull/2600) +- The default mount point for backend plugins have been changed to `/api`. These changes are done in the backend package itself, so it is recommended that you sync up existing backend packages with this new pattern. [#2562](https://github.com/backstage/backstage/pull/2562) +- A service discovery mechanism for backend plugins has been added, and is now a requirement for several backend plugins. See [packages/backend/src/index.ts](./packages/backend/src/index.ts) for how to set it up using `SingleHostDiscovery` from `@backstage/backend-common`. Note that the default base path for plugins is set to `/api` to that change, but it can be set to use the old behavior via the `basePath` option. [#2600](https://github.com/backstage/backstage/pull/2600) ### @backstage/auth-backend -- The default mount path of backend plugins was changed to `/api/:pluginId`, and as part of that it was needed to enable configuration of the base path of the auth backend, so that it can construct redirect URLs correctly. Note that you will also need to reconfigure any allowed redirect URLs to include `/api` if you switch to the new recommended pattern. [#2562](https://github.com/spotify/backstage/pull/2562) +- The default mount path of backend plugins was changed to `/api/:pluginId`, and as part of that it was needed to enable configuration of the base path of the auth backend, so that it can construct redirect URLs correctly. Note that you will also need to reconfigure any allowed redirect URLs to include `/api` if you switch to the new recommended pattern. [#2562](https://github.com/backstage/backstage/pull/2562) - The auth backend now requires an implementation of `PluginEndpointDiscovery` from `@backstage/backend-common` to be passed in as `discovery`. See the changes to `@backstage/backend`. ### @backstage/proxy-backend @@ -50,28 +50,28 @@ If you encounter issues while upgrading to a newer version, don't hesitate to re ### @backstage/plugin-identity-backend -- This plugin was removed, remove it from your backend if it's there. [#2616](https://github.com/spotify/backstage/pull/2616) +- This plugin was removed, remove it from your backend if it's there. [#2616](https://github.com/backstage/backstage/pull/2616) ## v0.1.1-alpha.23 ### @backstage/core -- Renamed `SessionStateApi` to `SessionApi` and `logout` to `signOut`. Custom implementations of the `SingInPage` app-component will need to rename their `logout` function. The different auth provider items for the `UserSettingsMenu` have been consolidated into a single `ProviderSettingsItem`, meaning you need to replace existing usages of `OAuthProviderSettings` and `OIDCProviderSettings`. [#2555](https://github.com/spotify/backstage/pull/2555). +- Renamed `SessionStateApi` to `SessionApi` and `logout` to `signOut`. Custom implementations of the `SingInPage` app-component will need to rename their `logout` function. The different auth provider items for the `UserSettingsMenu` have been consolidated into a single `ProviderSettingsItem`, meaning you need to replace existing usages of `OAuthProviderSettings` and `OIDCProviderSettings`. [#2555](https://github.com/backstage/backstage/pull/2555). ## v0.1.1-alpha.22 ### @backstage/core -- Introduced initial version of an inverted app/plugin relationship, where plugins export components for apps to use, instead registering themselves directly into the app. This enables more fine-grained control of plugin features, and also composition of plugins such as catalog pages with additional cards and tabs. This breaks the use of `RouteRef`s, and there will be more changes related to this in the future, but this change lays the initial foundation. See `packages/app` and followup PRs for how to update plugins for this change. [#2076](https://github.com/spotify/backstage/pull/2076) -- Switch to an automatic dependency injection mechanism for all Utility APIs, allowing plugins to ship default implementations of their APIs. See [https://backstage.io/docs/api/utility-apis](https://backstage.io/docs/api/utility-apis). [#2285](https://github.com/spotify/backstage/pull/2285) +- Introduced initial version of an inverted app/plugin relationship, where plugins export components for apps to use, instead registering themselves directly into the app. This enables more fine-grained control of plugin features, and also composition of plugins such as catalog pages with additional cards and tabs. This breaks the use of `RouteRef`s, and there will be more changes related to this in the future, but this change lays the initial foundation. See `packages/app` and followup PRs for how to update plugins for this change. [#2076](https://github.com/backstage/backstage/pull/2076) +- Switch to an automatic dependency injection mechanism for all Utility APIs, allowing plugins to ship default implementations of their APIs. See [https://backstage.io/docs/api/utility-apis](https://backstage.io/docs/api/utility-apis). [#2285](https://github.com/backstage/backstage/pull/2285) ### @backstage/cli -- Change `backstage-cli backend:build-image` to forward all args to `docker image build`, instead of just tag. Also add `--build` flag for building all dependent packages before packaging the workspace for the docker build. [#2299](https://github.com/spotify/backstage/pull/2299) +- Change `backstage-cli backend:build-image` to forward all args to `docker image build`, instead of just tag. Also add `--build` flag for building all dependent packages before packaging the workspace for the docker build. [#2299](https://github.com/backstage/backstage/pull/2299) ### @backstage/create-app -- Change root `tsc` output dir to `dist-types`, in order to allow for standalone plugin repos. [#2278](https://github.com/spotify/backstage/pull/2278) +- Change root `tsc` output dir to `dist-types`, in order to allow for standalone plugin repos. [#2278](https://github.com/backstage/backstage/pull/2278) ### @backstage/catalog-backend @@ -79,7 +79,7 @@ If you encounter issues while upgrading to a newer version, don't hesitate to re ## v0.1.1-alpha.21 -- Added many more frontend plugins to the template along with the sidebar. [#1942](https://github.com/spotify/backstage/pull/1942), [#2084](https://github.com/spotify/backstage/pull/2084) +- Added many more frontend plugins to the template along with the sidebar. [#1942](https://github.com/backstage/backstage/pull/1942), [#2084](https://github.com/backstage/backstage/pull/2084) ### @backstage/core @@ -90,14 +90,14 @@ If you encounter issues while upgrading to a newer version, don't hesitate to re ### @backstage/cli -- Set `NODE_ENV` to `test` when running test. [#2214](https://github.com/spotify/backstage/pull/2214) +- Set `NODE_ENV` to `test` when running test. [#2214](https://github.com/backstage/backstage/pull/2214) -- Fix for backend plugins names requiring to be prefixed with `@backstage` to build. [#2224](https://github.com/spotify/backstage/pull/2224) +- Fix for backend plugins names requiring to be prefixed with `@backstage` to build. [#2224](https://github.com/backstage/backstage/pull/2224) ### @backstage/backend-common - The backend plugin - [service builder](https://github.com/spotify/backstage/blob/master/packages/backend-common/src/service/lib/ServiceBuilderImpl.ts) + [service builder](https://github.com/backstage/backstage/blob/master/packages/backend-common/src/service/lib/ServiceBuilderImpl.ts) no longer adds `express.json()` automatically to all routes. While convenient in a lot of cases, it also led to problems where for example the proxy middleware could hang because the body had already been altered and could not @@ -107,61 +107,61 @@ If you encounter issues while upgrading to a newer version, don't hesitate to re ### @backstage/catalog-backend -- Add rules configuration for catalog location and entity kinds. The default rules should cover most use-cases, but you may need to allow specific entity kinds when using things like Template or Group entities. [#2118](https://github.com/spotify/backstage/pull/2118) +- Add rules configuration for catalog location and entity kinds. The default rules should cover most use-cases, but you may need to allow specific entity kinds when using things like Template or Group entities. [#2118](https://github.com/backstage/backstage/pull/2118) ## v0.1.1-alpha.20 ### @backstage/cli -- Use config files according to `NODE_ENV` when serving and building frontend packages. [#2077](https://github.com/spotify/backstage/pull/2077) +- Use config files according to `NODE_ENV` when serving and building frontend packages. [#2077](https://github.com/backstage/backstage/pull/2077) -- Pin `rollup-plugin-dts` to avoid a later broken version. [#2097](https://github.com/spotify/backstage/pull/2097) +- Pin `rollup-plugin-dts` to avoid a later broken version. [#2097](https://github.com/backstage/backstage/pull/2097) ## v0.1.1-alpha.19 ### @backstage/backend-common -- Allow listen host and port to be configured separately, in order to support PORT environment variables. [#1950](https://github.com/spotify/backstage/pull/1950) +- Allow listen host and port to be configured separately, in order to support PORT environment variables. [#1950](https://github.com/backstage/backstage/pull/1950) ### @backstage/core -- Added new `DiscoveryApi` for discovering backend endpoint in the frontend, and use in most plugins. See [packages/app/src/apis.ts](https://github.com/spotify/backstage/blob/master/packages/app/src/apis.ts) for how to register in your app. [#2074](https://github.com/spotify/backstage/pull/2074) +- Added new `DiscoveryApi` for discovering backend endpoint in the frontend, and use in most plugins. See [packages/app/src/apis.ts](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts) for how to register in your app. [#2074](https://github.com/backstage/backstage/pull/2074) ### @backstage/create-app -- Added catalog and scaffolder frontend plugins to the template along with the sidebar. [#1942](https://github.com/spotify/backstage/pull/1942), [#2084](https://github.com/spotify/backstage/pull/2084) -- Many plugins have been added to the catalog and will for now be required to be added to separate apps as well. This will be solved as [#1536](https://github.com/spotify/backstage/issues/1536) gets sorted out, but for now you may need to install some plugins just to get pages to work. +- Added catalog and scaffolder frontend plugins to the template along with the sidebar. [#1942](https://github.com/backstage/backstage/pull/1942), [#2084](https://github.com/backstage/backstage/pull/2084) +- Many plugins have been added to the catalog and will for now be required to be added to separate apps as well. This will be solved as [#1536](https://github.com/backstage/backstage/issues/1536) gets sorted out, but for now you may need to install some plugins just to get pages to work. ### @backstage/catalog-backend -- Added the possibility to add static locations via `app-config.yaml`. This changed the signature of `new LocationReaders(logger)` inside `packages/backend/src/plugins/catalog.ts` to `new LocationReaders({config, logger})`. [#1890](https://github.com/spotify/backstage/pull/1890) +- Added the possibility to add static locations via `app-config.yaml`. This changed the signature of `new LocationReaders(logger)` inside `packages/backend/src/plugins/catalog.ts` to `new LocationReaders({config, logger})`. [#1890](https://github.com/backstage/backstage/pull/1890) ### @backstage/theme -- Changed the type signature of the palette, removing `sidebar: string` and adding `navigation: { background: string; indicator: string}`. [#1880](https://github.com/spotify/backstage/pull/1880) +- Changed the type signature of the palette, removing `sidebar: string` and adding `navigation: { background: string; indicator: string}`. [#1880](https://github.com/backstage/backstage/pull/1880) ## v0.1.1-alpha.18 ### @backstage/catalog-backend -- Fixed an issue with duplicated location logs. Applying the database migrations from this fix will clear the existing migration logs. [#1836](https://github.com/spotify/backstage/pull/1836) +- Fixed an issue with duplicated location logs. Applying the database migrations from this fix will clear the existing migration logs. [#1836](https://github.com/backstage/backstage/pull/1836) ### @backstage/auth-backend This version fixes a breakage in CSP policies set by the auth backend. If you're facing trouble with auth in alpha.17, upgrade to alpha.18. -- OAuth redirect URLs no longer receive the `env` parameter, as it is now passed through state instead. This will likely require a reconfiguration of the OAuth app, where a redirect URL like `http://localhost:7000/auth/google/handler/frame?env=development` should now be configured as `http://localhost:7000/auth/google/handler/frame`. [#1812](https://github.com/spotify/backstage/pull/1812) +- OAuth redirect URLs no longer receive the `env` parameter, as it is now passed through state instead. This will likely require a reconfiguration of the OAuth app, where a redirect URL like `http://localhost:7000/auth/google/handler/frame?env=development` should now be configured as `http://localhost:7000/auth/google/handler/frame`. [#1812](https://github.com/backstage/backstage/pull/1812) ### @backstage/core -- `SignInPage` props have been changed to receive a list of provider objects instead of simple string identifiers for all but the `'guest'` and `'custom'` providers. This opens up for configuration of custom providers, but may break existing configurations. See [packages/app/src/App.tsx](https://github.com/spotify/backstage/blob/032ba401af36a760efdac41668d7000ccf09bc57/packages/app/src/App.tsx#L36) and [packages/app/src/identityProviders.ts](https://github.com/spotify/backstage/blob/032ba401af36a760efdac41668d7000ccf09bc57/packages/app/src/identityProviders.ts#L24) for how to bring back the existing providers. [#1816](https://github.com/spotify/backstage/pull/1816) +- `SignInPage` props have been changed to receive a list of provider objects instead of simple string identifiers for all but the `'guest'` and `'custom'` providers. This opens up for configuration of custom providers, but may break existing configurations. See [packages/app/src/App.tsx](https://github.com/backstage/backstage/blob/032ba401af36a760efdac41668d7000ccf09bc57/packages/app/src/App.tsx#L36) and [packages/app/src/identityProviders.ts](https://github.com/backstage/backstage/blob/032ba401af36a760efdac41668d7000ccf09bc57/packages/app/src/identityProviders.ts#L24) for how to bring back the existing providers. [#1816](https://github.com/backstage/backstage/pull/1816) ## v0.1.1-alpha.17 ### @backstage/techdocs-backend -- The techdocs backend now requires more configuration to be supplied when creating the router. See [packages/backend/src/plugins/techdocs.ts](https://github.com/spotify/backstage/blob/0201fd9b4a52429519dd59e9184106ba69456deb/packages/backend/src/plugins/techdocs.ts#L42) for an example. [#1736](https://github.com/spotify/backstage/pull/1736) +- The techdocs backend now requires more configuration to be supplied when creating the router. See [packages/backend/src/plugins/techdocs.ts](https://github.com/backstage/backstage/blob/0201fd9b4a52429519dd59e9184106ba69456deb/packages/backend/src/plugins/techdocs.ts#L42) for an example. [#1736](https://github.com/backstage/backstage/pull/1736) ### @backstage/cli -- The `create-app` command was moved out from the CLI to a standalone package. It's now invoked with `npx @backstage/create-app` instead. [#1745](https://github.com/spotify/backstage/pull/1745) +- The `create-app` command was moved out from the CLI to a standalone package. It's now invoked with `npx @backstage/create-app` instead. [#1745](https://github.com/backstage/backstage/pull/1745) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7edbc6d17b..b7157d9f05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,11 +12,11 @@ Backstage is released under the Apache2.0 License, and original creations contri ## Report bugs -No one likes bugs. Report bugs as an issue [here](https://github.com/spotify/backstage/issues/new?template=bug_template.md). +No one likes bugs. Report bugs as an issue [here](https://github.com/backstage/backstage/issues/new?template=bug_template.md). ## Fix bugs or build new features -Look through the GitHub issues for [bugs](https://github.com/spotify/backstage/labels/bugs), [good first issues](https://github.com/spotify/backstage/labels/good%20first%20issue) or [help wanted](https://github.com/spotify/backstage/labels/help%20wanted). +Look through the GitHub issues for [bugs](https://github.com/backstage/backstage/labels/bugs), [good first issues](https://github.com/backstage/backstage/labels/good%20first%20issue) or [help wanted](https://github.com/backstage/backstage/labels/help%20wanted). ## Build a plugin @@ -24,17 +24,17 @@ The value of Backstage grows with every new plugin that gets added. Wouldn't it A great reference example of a plugin can be found on [our blog](https://backstage.io/blog/2020/04/06/lighthouse-plugin) (thanks [@fastfrwrd](https://github.com/fastfrwrd)!) -What kind of plugins should/could be created? Some inspiration from the 120+ plugins that we have developed inside Spotify can be found [here](https://backstage.io/demos), but we will keep a running list of suggestions labeled with [[plugin]](https://github.com/spotify/backstage/labels/plugin). +What kind of plugins should/could be created? Some inspiration from the 120+ plugins that we have developed inside Spotify can be found [here](https://backstage.io/demos), but we will keep a running list of suggestions labeled with [[plugin]](https://github.com/backstage/backstage/labels/plugin). ## Suggesting a plugin -If you start developing a plugin that you aim to release as open source, we suggest that you create a [new Issue](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). This helps the community know what plugins are in development. +If you start developing a plugin that you aim to release as open source, we suggest that you create a [new Issue](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). This helps the community know what plugins are in development. You can also use this process if you have an idea for a good plugin but you hope that someone else will pick up the work. ## Adding Non-code Contributions -Since there is such a large landscape of possible development, build, and deployment environments, we welcome community contributions in these areas in the [`/contrib`](https://github.com/spotify/backstage/tree/master/contrib) folder of the project. This is an excellent place to put things that help out the community at large, but which may not fit within the scope of the core product to support natively. Here, you will find Helm charts, alternative Docker images, and much more. +Since there is such a large landscape of possible development, build, and deployment environments, we welcome community contributions in these areas in the [`/contrib`](https://github.com/backstage/backstage/tree/master/contrib) folder of the project. This is an excellent place to put things that help out the community at large, but which may not fit within the scope of the core product to support natively. Here, you will find Helm charts, alternative Docker images, and much more. ## Write Documentation @@ -44,11 +44,11 @@ The current documentation is very limited. Help us make the `/docs` folder come We think the best way to ensure different plugins provide a consistent experience is through a solid set of reusable UI/UX components. Backstage uses [Storybook](http://backstage.io/storybook). -Either help us [create new components](https://github.com/spotify/backstage/labels/help%20wanted) or improve stories for the existing ones (look for files with `*.stories.tsx`). +Either help us [create new components](https://github.com/backstage/backstage/labels/help%20wanted) or improve stories for the existing ones (look for files with `*.stories.tsx`). ## Submit Feedback -The best way to send feedback is to file [an issue](https://github.com/spotify/backstage/issues). +The best way to send feedback is to file [an issue](https://github.com/backstage/backstage/issues). If you are proposing a feature: @@ -74,7 +74,7 @@ All code is formatted with `prettier` using the configuration in the repo. If po If you're contributing to the backend or CLI tooling, be mindful of cross-platform support. [This](https://shapeshed.com/writing-cross-platform-node/) blog post is a good guide of what to keep in mind when writing cross-platform NodeJS. -Also be sure to skim through our [ADRs](https://github.com/spotify/backstage/tree/master/docs/architecture-decisions) to see if they cover what you're working on. In particular [ADR006: Avoid React.FC and React.SFC](https://github.com/spotify/backstage/blob/master/docs/architecture-decisions/adr006-avoid-react-fc.md) is one to look out for. +Also be sure to skim through our [ADRs](https://github.com/backstage/backstage/tree/master/docs/architecture-decisions) to see if they cover what you're working on. In particular [ADR006: Avoid React.FC and React.SFC](https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr006-avoid-react-fc.md) is one to look out for. If there are any updates in `markdown` file please make sure to run `yarn run lint:docs`. Though it is checked on `lint-staged`. It is required to install [vale](https://docs.errata.ai/vale/install) separately and make sure it is accessed by global command. @@ -97,7 +97,7 @@ For more information, checkout [adding a changeset](https://github.com/atlassian This project adheres to the [Spotify FOSS Code of Conduct][code-of-conduct]. By participating, you are expected to honor this code. -[code-of-conduct]: https://github.com/spotify/backstage/blob/master/CODE_OF_CONDUCT.md +[code-of-conduct]: https://github.com/backstage/backstage/blob/master/CODE_OF_CONDUCT.md # Security Issues? diff --git a/README.md b/README.md index 70badd5321..b1926f070e 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![CNCF Status](https://img.shields.io/badge/cncf%20status-sandbox-blue.svg)](https://www.cncf.io/projects) -[![Main CI Build](https://github.com/spotify/backstage/workflows/Main%20Master%20Build/badge.svg)](https://github.com/spotify/backstage/actions?query=workflow%3A%22Main+Master+Build%22) +[![Main CI Build](https://github.com/backstage/backstage/workflows/Main%20Master%20Build/badge.svg)](https://github.com/backstage/backstage/actions?query=workflow%3A%22Main+Master+Build%22) [![Discord](https://img.shields.io/discord/687207715902193673)](https://discord.gg/EBHEGzX) ![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg) [![Codecov](https://img.shields.io/codecov/c/github/spotify/backstage)](https://codecov.io/gh/spotify/backstage) -[![](https://img.shields.io/npm/v/@backstage/core?label=Version)](https://github.com/spotify/backstage/releases) +[![](https://img.shields.io/npm/v/@backstage/core?label=Version)](https://github.com/backstage/backstage/releases) ## What is Backstage? @@ -23,7 +23,7 @@ Out of the box, Backstage includes: - [Backstage Service Catalog](https://backstage.io/docs/features/software-catalog/software-catalog-overview) for managing all your software (microservices, libraries, data pipelines, websites, ML models, etc.) - [Backstage Software Templates](https://backstage.io/docs/features/software-templates/software-templates-index) for quickly spinning up new projects and standardizing your tooling with your organization’s best practices - [Backstage TechDocs](https://backstage.io/docs/features/techdocs/techdocs-overview) for making it easy to create, maintain, find, and use technical documentation, using a "docs like code" approach -- Plus, a growing ecosystem of [open source plugins](https://github.com/spotify/backstage/tree/master/plugins) that further expand Backstage’s customizability and functionality +- Plus, a growing ecosystem of [open source plugins](https://github.com/backstage/backstage/tree/master/plugins) that further expand Backstage’s customizability and functionality Backstage was created by Spotify but is now hosted by the [Cloud Native Computing Foundation (CNCF)](https://www.cncf.io) as a Sandbox level project. Read the announcement [here](https://backstage.io/blog/2020/09/23/backstage-cncf-sandbox). @@ -46,8 +46,8 @@ Check out [the documentation](https://backstage.io/docs/getting-started) on how ## Community - [Discord chatroom](https://discord.gg/MUpMjP2) - Get support or discuss the project -- [Good First Issues](https://github.com/spotify/backstage/contribute) - Start here if you want to contribute -- [RFCs](https://github.com/spotify/backstage/labels/rfc) - Help shape the technical direction +- [Good First Issues](https://github.com/backstage/backstage/contribute) - Start here if you want to contribute +- [RFCs](https://github.com/backstage/backstage/labels/rfc) - Help shape the technical direction - [FAQ](https://backstage.io/docs/FAQ) - Frequently Asked Questions - [Code of Conduct](CODE_OF_CONDUCT.md) - This is how we roll - [Adopters](ADOPTERS.md) - Companies already using Backstage diff --git a/app-config.yaml b/app-config.yaml index a495df0263..bc25b7d71e 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -138,22 +138,22 @@ catalog: locations: # Backstage example components - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-components.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-components.yaml # Example component for github-actions - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/github-actions/examples/sample.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/github-actions/examples/sample.yaml # Example component for techdocs - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/techdocs-backend/examples/documented-component/documented-component.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend/examples/documented-component/documented-component.yaml # Backstage example APIs - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml # Backstage example templates - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/all-templates.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/all-templates.yaml # Backstage example groups and users - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml scaffolder: github: diff --git a/catalog-info.yaml b/catalog-info.yaml index 405c3f31b4..9c7e5309dd 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -6,7 +6,7 @@ metadata: Backstage is an open-source developer portal that puts the developer experience first. annotations: github.com/project-slug: spotify/backstage - backstage.io/techdocs-ref: github:https://github.com/spotify/backstage.git + backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git lighthouse.com/website-url: https://backstage.io spec: type: library diff --git a/contrib/chart/backstage/Chart.yaml b/contrib/chart/backstage/Chart.yaml index 24c6f2a4d7..be5c20af82 100644 --- a/contrib/chart/backstage/Chart.yaml +++ b/contrib/chart/backstage/Chart.yaml @@ -12,7 +12,7 @@ version: 0.1.1 appVersion: v0.1.1-alpha.23 sources: - - https://github.com/spotify/backstage + - https://github.com/backstage/backstage - https://github.com/spotify/lighthouse-audit-service dependencies: diff --git a/contrib/chart/backstage/README.md b/contrib/chart/backstage/README.md index 9d1c93765b..8b922a6b56 100644 --- a/contrib/chart/backstage/README.md +++ b/contrib/chart/backstage/README.md @@ -36,7 +36,7 @@ appConfig: Then use it to run: ``` -git clone https://github.com/spotify/backstage.git +git clone https://github.com/backstage/backstage.git cd contrib/chart/backstage helm dependency update helm install -f backstage-mydomain.yaml backstage . diff --git a/contrib/chart/backstage/files/app-config.development.yaml.tpl b/contrib/chart/backstage/files/app-config.development.yaml.tpl index 76d6499145..1e0a41ad63 100644 --- a/contrib/chart/backstage/files/app-config.development.yaml.tpl +++ b/contrib/chart/backstage/files/app-config.development.yaml.tpl @@ -18,19 +18,19 @@ catalog: locations: # Backstage example components - type: github - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-components.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-components.yaml # Example component for github-actions - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/github-actions/examples/sample.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/github-actions/examples/sample.yaml # Example component for techdocs - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/techdocs-backend/examples/documented-component/documented-component.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend/examples/documented-component/documented-component.yaml # Backstage example APIs - type: github - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml # Backstage example templates - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/all-templates.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/all-templates.yaml {{- else }} locations: [] {{- end }} diff --git a/docs/FAQ.md b/docs/FAQ.md index 7163d955c7..7b906a341b 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -48,11 +48,11 @@ source candidates. (And we'll probably end up writing some brand new ones, too.) ### What's the roadmap for Backstage? We envision three phases, which you can learn about in -[our project roadmap](https://github.com/spotify/backstage#project-roadmap). +[our project roadmap](https://github.com/backstage/backstage#project-roadmap). Even though the open source version of Backstage is relatively new compared to our internal version, we have already begun work on various aspects of all three phases. Looking at the -[milestones for active issues](https://github.com/spotify/backstage/milestones) +[milestones for active issues](https://github.com/backstage/backstage/milestones) will also give you a sense of our progress. ### My company doesn't have thousands of developers or services. Is Backstage overkill? @@ -87,8 +87,8 @@ well-known tech and a large flora of components. ### What technology does Backstage use? The codebase is a large-scale React application that uses TypeScript. For -[Phase 2](https://github.com/spotify/backstage#project-roadmap), we plan to use -Node.js and GraphQL. +[Phase 2](https://github.com/backstage/backstage#project-roadmap), we plan to +use Node.js and GraphQL. ### What is the end-to-end user flow? The happy path story. @@ -116,7 +116,7 @@ components. Plugins can fetch data either from the backend or an API exposed through the proxy. Learn more about -[the different components](https://github.com/spotify/backstage#overview) that +[the different components](https://github.com/backstage/backstage#overview) that make up Backstage. ### Do I have to write plugins in TypeScript? @@ -127,10 +127,10 @@ APIs in TypeScript, but aren't forcing it on individual plugins. ### How do I find out if a plugin already exists? Before you write a plugin, -[search the plugin issues](https://github.com/spotify/backstage/issues?q=is%3Aissue+label%3Aplugin+) +[search the plugin issues](https://github.com/backstage/backstage/issues?q=is%3Aissue+label%3Aplugin+) to see if it already exists or is in the works. If no one's thought of it yet, great! Open a new issue as -[a plugin suggestion](https://github.com/spotify/backstage/issues/new/choose) +[a plugin suggestion](https://github.com/backstage/backstage/issues/new/choose) and describe what your plugin will do. This will help coordinate our contributors' efforts and avoid duplicating existing functionality. @@ -151,7 +151,7 @@ above) ### Are you planning to have plugins baked into the repo? Or should they be developed in separate repos? Contributors can add open source plugins to the plugins directory in -[this monorepo](https://github.com/spotify/backstage). Integrators can then +[this monorepo](https://github.com/backstage/backstage). Integrators can then configure which open source plugins are available to use in their instance of the app. Open source plugins are downloaded as npm packages published in the open source repository. While we encourage using the open source model, we know @@ -166,7 +166,7 @@ We chose GitHub because it is the tool that we are most familiar with, so that will naturally lead to integrations for GitHub being developed at an early stage. Hosting this project on GitHub does not exclude integrations with alternatives, such as -[GitLab](https://github.com/spotify/backstage/issues?q=is%3Aissue+is%3Aopen+GitLab) +[GitLab](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+GitLab) or Bitbucket. We believe that in time there will be plugins that will provide functionality for these tools as well. Hopefully, contributed by the community! Also note, implementations of Backstage can be hosted wherever you feel suits @@ -215,17 +215,17 @@ data is shared with. Yes. The core frontend framework could be used for building any large-scale web application where (1) multiple teams are building separate parts of the app, and (2) you want the overall experience to be consistent. That being said, in -[Phase 2](https://github.com/spotify/backstage#project-roadmap) of the project +[Phase 2](https://github.com/backstage/backstage#project-roadmap) of the project we will add features that are needed for developer portals and systems for managing software ecosystems. Our ambition will be to keep Backstage modular. ### How can I get involved? Jump right in! Come help us fix some of the -[early bugs and first issues](https://github.com/spotify/backstage/labels/good%20first%20issue) -or reach [a new milestone](https://github.com/spotify/backstage/milestones). Or -write an open source plugin for Backstage, like this -[Lighthouse plugin](https://github.com/spotify/backstage/tree/master/plugins/lighthouse). +[early bugs and first issues](https://github.com/backstage/backstage/labels/good%20first%20issue) +or reach [a new milestone](https://github.com/backstage/backstage/milestones). +Or write an open source plugin for Backstage, like this +[Lighthouse plugin](https://github.com/backstage/backstage/tree/master/plugins/lighthouse). See all the ways you can -[contribute here](https://github.com/spotify/backstage/blob/master/CONTRIBUTING.md). +[contribute here](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md). We'd love to have you as part of the community. diff --git a/docs/architecture-decisions/adr002-default-catalog-file-format.md b/docs/architecture-decisions/adr002-default-catalog-file-format.md index d831581d5b..699f7af8ed 100644 --- a/docs/architecture-decisions/adr002-default-catalog-file-format.md +++ b/docs/architecture-decisions/adr002-default-catalog-file-format.md @@ -39,7 +39,7 @@ inside Backstage, or by push events from a CI/CD pipelines, or by webhook triggers from the version control system, etc. Each file describes one or more entities in accordance with the -[Backstage System Model](https://github.com/spotify/backstage/issues/390). All +[Backstage System Model](https://github.com/backstage/backstage/issues/390). All of these entities have a common structure and nomenclature, and they are stored in the software catalog from which they then can be queried. @@ -87,7 +87,7 @@ The root envelope object has the following structure. ### `apiVersion` and `kind` The `kind` is the high level entity type being described, typically from the -[Backstage system model](https://github.com/spotify/backstage/issues/390). The +[Backstage system model](https://github.com/backstage/backstage/issues/390). The first versions of the catalog will focus on the `Component` kind. The `apiVersion`is the version of specification format for that particular diff --git a/docs/architecture-decisions/adr007-use-msw-to-mock-service-requests.md b/docs/architecture-decisions/adr007-use-msw-to-mock-service-requests.md index 045588f505..68394de17c 100644 --- a/docs/architecture-decisions/adr007-use-msw-to-mock-service-requests.md +++ b/docs/architecture-decisions/adr007-use-msw-to-mock-service-requests.md @@ -41,7 +41,7 @@ worker.start(); ``` and in a more real life scenario, taken from -[CatalogClient.test.ts](https://github.com/spotify/backstage/blob/f3245c4f8f0b6b2625c4a6d5d50161b612fb4757/plugins/catalog/src/api/CatalogClient.test.ts) +[CatalogClient.test.ts](https://github.com/backstage/backstage/blob/f3245c4f8f0b6b2625c4a6d5d50161b612fb4757/plugins/catalog/src/api/CatalogClient.test.ts) ```ts beforeEach(() => { diff --git a/docs/architecture-decisions/adr008-default-catalog-file-name.md b/docs/architecture-decisions/adr008-default-catalog-file-name.md index d4716318bc..6794dc87cc 100644 --- a/docs/architecture-decisions/adr008-default-catalog-file-name.md +++ b/docs/architecture-decisions/adr008-default-catalog-file-name.md @@ -11,7 +11,7 @@ While the spec for the catalog file format is well described in to the name of the catalog file. Following discussion in -[Issue 1822](https://github.com/spotify/backstage/pull/1822#pullrequestreview-461253670), +[Issue 1822](https://github.com/backstage/backstage/pull/1822#pullrequestreview-461253670), a decision was made. ## Name diff --git a/docs/architecture-decisions/adr009-entity-references.md b/docs/architecture-decisions/adr009-entity-references.md index 8b7984ea49..a6fe3ee583 100644 --- a/docs/architecture-decisions/adr009-entity-references.md +++ b/docs/architecture-decisions/adr009-entity-references.md @@ -13,7 +13,7 @@ There was also some confusion on how to reference entities in URLs in the Backstage frontend. Following discussion in -[Issue 1947](https://github.com/spotify/backstage/issues/1947), a decision was +[Issue 1947](https://github.com/backstage/backstage/issues/1947), a decision was made. ## Entity References in YAML files diff --git a/docs/architecture-decisions/index.md b/docs/architecture-decisions/index.md index ddf2805e75..3211f37550 100644 --- a/docs/architecture-decisions/index.md +++ b/docs/architecture-decisions/index.md @@ -25,9 +25,9 @@ Records should be stored under the `architecture-decisions` directory. - Address and integrate feedback from the community - Eventually, assign a number - Add the path of the ADR to the microsite sidebar in - [`sidebars.json`](https://github.com/spotify/backstage/blob/master/microsite/sidebars.json) + [`sidebars.json`](https://github.com/backstage/backstage/blob/master/microsite/sidebars.json) - Add the path of the ADR to the - [`mkdocs.yml`](https://github.com/spotify/backstage/blob/master/mkdocs.yml) + [`mkdocs.yml`](https://github.com/backstage/backstage/blob/master/mkdocs.yml) - Merge the pull request ## Superseding an ADR diff --git a/docs/auth/index.md b/docs/auth/index.md index d7fb5d8c59..3f95efaf61 100644 --- a/docs/auth/index.md +++ b/docs/auth/index.md @@ -58,7 +58,7 @@ token used to make authenticated calls within Backstage. The middleware that will be provided by `@backstage/backend-common` allows verification of Backstage ID tokens, and optionally loading additional information about the user. The progress is tracked in -https://github.com/spotify/backstage/issues/1435. +https://github.com/backstage/backstage/issues/1435. #### Identity for App Developers diff --git a/docs/auth/oauth.md b/docs/auth/oauth.md index 178b99b153..0655175b58 100644 --- a/docs/auth/oauth.md +++ b/docs/auth/oauth.md @@ -15,10 +15,10 @@ to various third party APIs. There are occasions when the user wants to perform actions towards third party services that require authorization via OAuth. Backstage provides standardized [Utility APIs](../api/utility-apis.md) such as the -[GoogleAuthApi](https://github.com/spotify/backstage/blob/master/packages/core-api/src/apis/definitions/auth.ts) +[GoogleAuthApi](https://github.com/backstage/backstage/blob/master/packages/core-api/src/apis/definitions/auth.ts) for that use-case. Backstage also includes a set of implementations of these APIs that integrate with the -[auth-backend](https://github.com/spotify/backstage/tree/master/plugins/auth-backend) +[auth-backend](https://github.com/backstage/backstage/tree/master/plugins/auth-backend) plugin to provide a popup-based OAuth flow. ## Background @@ -58,9 +58,9 @@ easier to make authenticated requests inside a plugin. ## OAuth Flow The following describes the OAuth flow implemented by the -[auth-backend](https://github.com/spotify/backstage/tree/master/plugins/auth-backend) +[auth-backend](https://github.com/backstage/backstage/tree/master/plugins/auth-backend) and -[DefaultAuthConnector](https://github.com/spotify/backstage/blob/master/packages/core-api/src/lib/AuthConnector/DefaultAuthConnector.ts) +[DefaultAuthConnector](https://github.com/backstage/backstage/blob/master/packages/core-api/src/lib/AuthConnector/DefaultAuthConnector.ts) in `@backstage/core-api`. Component and APIs can request Access or ID Tokens from any available Auth diff --git a/docs/conf/reading.md b/docs/conf/reading.md index a43ec8c026..6d4b61224d 100644 --- a/docs/conf/reading.md +++ b/docs/conf/reading.md @@ -117,7 +117,7 @@ The [ConfigApi](../reference/utility-apis/Config.md) in the frontend is a Depending on the config api in another API is slightly different though, as the `ConfigApi` implementation is supplied via the App itself and not instantiated like other APIs. See -[packages/app/src/apis.ts](https://github.com/spotify/backstage/blob/244eef851f5aa19f91c7c9b5c12d5df95cf482ca/packages/app/src/apis.ts#L66) +[packages/app/src/apis.ts](https://github.com/backstage/backstage/blob/244eef851f5aa19f91c7c9b5c12d5df95cf482ca/packages/app/src/apis.ts#L66) for an example of how this wiring is done. For standalone plugin setups in `dev/index.ts`, register a factory with a @@ -129,4 +129,4 @@ from `@backstage/core`. In backend plugins the configuration is passed in via options from the main backend package. See for example -[packages/backend/src/plugins/auth.ts](https://github.com/spotify/backstage/blob/244eef851f5aa19f91c7c9b5c12d5df95cf482ca/packages/backend/src/plugins/auth.ts#L23). +[packages/backend/src/plugins/auth.ts](https://github.com/backstage/backstage/blob/244eef851f5aa19f91c7c9b5c12d5df95cf482ca/packages/backend/src/plugins/auth.ts#L23). diff --git a/docs/features/software-catalog/configuration.md b/docs/features/software-catalog/configuration.md index dd19d4cd51..d10fb29e30 100644 --- a/docs/features/software-catalog/configuration.md +++ b/docs/features/software-catalog/configuration.md @@ -89,7 +89,7 @@ the catalog under the `catalog.locations` key, for example: catalog: locations: - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml ``` The locations added through static configuration can not be removed through the diff --git a/docs/features/software-catalog/extending-the-model.md b/docs/features/software-catalog/extending-the-model.md index b045660202..72170fb576 100644 --- a/docs/features/software-catalog/extending-the-model.md +++ b/docs/features/software-catalog/extending-the-model.md @@ -36,6 +36,6 @@ through plugins. Different plugins are used for managing different types of components. For example, the -[Lighthouse plugin](https://github.com/spotify/backstage/tree/master/plugins/lighthouse) +[Lighthouse plugin](https://github.com/backstage/backstage/tree/master/plugins/lighthouse) only makes sense for Websites. The more specific you can be in how you model your software, the easier it is to provide plugins that are contextual. diff --git a/docs/features/software-catalog/index.md b/docs/features/software-catalog/index.md index 953540227c..a7c80d45cc 100644 --- a/docs/features/software-catalog/index.md +++ b/docs/features/software-catalog/index.md @@ -62,11 +62,11 @@ Users can register new components by going to `/create` and clicking the Backstage expects the full URL to the YAML in your source control. Example: ```bash -https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml +https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml ``` _More examples can be found -[here](https://github.com/spotify/backstage/tree/master/packages/catalog-model/examples)._ +[here](https://github.com/backstage/backstage/tree/master/packages/catalog-model/examples)._ ![](../../assets/software-catalog/bsc-register-2.png) @@ -91,7 +91,7 @@ above example can be added using the following configuration: catalog: locations: - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml ``` More information about catalog configuration can be found @@ -135,7 +135,7 @@ in the catalog. ![tools](https://backstage.io/blog/assets/20-05-20/tabs.png) The Backstage platform can be customized by incorporating -[existing open source plugins](https://github.com/spotify/backstage/tree/master/plugins), +[existing open source plugins](https://github.com/backstage/backstage/tree/master/plugins), or by [building your own](../../plugins/index.md). ## Links diff --git a/docs/features/software-catalog/installation.md b/docs/features/software-catalog/installation.md index 1e037461b4..b2afd62878 100644 --- a/docs/features/software-catalog/installation.md +++ b/docs/features/software-catalog/installation.md @@ -56,7 +56,7 @@ The catalog components depend on a number of other [Utility APIs](../../api/utility-apis.md) to function, including at least the `ErrorApi` and `StorageApi`. You can find an example of how to install these in your app -[here](https://github.com/spotify/backstage/blob/61c3a7e5b750dc7c059ef16b188594d31b2c04c2/packages/app/src/apis.ts#L80). +[here](https://github.com/backstage/backstage/blob/61c3a7e5b750dc7c059ef16b188594d31b2c04c2/packages/app/src/apis.ts#L80). ## Gotchas that we will fix @@ -168,21 +168,21 @@ catalog: locations: # Backstage Example Component - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/artist-lookup-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/playback-order-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/playback-order-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/podcast-api-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/podcast-api-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/queue-proxy-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/queue-proxy-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/searcher-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/searcher-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/playback-lib-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/playback-lib-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/www-artist-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/www-artist-component.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/shuffle-api-component.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/shuffle-api-component.yaml ``` ### Running the Backend diff --git a/docs/features/software-catalog/system-model.md b/docs/features/software-catalog/system-model.md index 44dac13d65..53f49d5df9 100644 --- a/docs/features/software-catalog/system-model.md +++ b/docs/features/software-catalog/system-model.md @@ -8,7 +8,7 @@ We believe that a strong shared understanding and terminology around software and resources leads to a better Backstage experience. _This description originates from -[this RFC](https://github.com/spotify/backstage/issues/390). Note that some of +[this RFC](https://github.com/backstage/backstage/issues/390). Note that some of the concepts are not yet supported in Backstage._ ## Core Entities @@ -113,5 +113,5 @@ Backstage currently supports Components and APIs. ## Links -- [Original RFC](https://github.com/spotify/backstage/issues/390) +- [Original RFC](https://github.com/backstage/backstage/issues/390) - [YAML file format](../../architecture-decisions/adr002-default-catalog-file-format.md) diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index 47b1d5885d..f1ea9347a7 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -23,7 +23,7 @@ use. # Example: metadata: annotations: - backstage.io/managed-by-location: github:http://github.com/spotify/backstage/catalog-info.yaml + backstage.io/managed-by-location: github:http://github.com/backstage/backstage/catalog-info.yaml ``` The value of this annotation is a so called location reference string, that @@ -47,7 +47,7 @@ colon is always present. # Example: metadata: annotations: - backstage.io/techdocs-ref: github:https://github.com/spotify/backstage.git + backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git ``` The value of this annotation is a location reference string (see above). If this diff --git a/docs/features/software-templates/extending/create-your-own-preparer.md b/docs/features/software-templates/extending/create-your-own-preparer.md index ef9d709bce..186b2a3c0a 100644 --- a/docs/features/software-templates/extending/create-your-own-preparer.md +++ b/docs/features/software-templates/extending/create-your-own-preparer.md @@ -18,7 +18,7 @@ These two are added to the `PreparersBuilder` and then passed into the `createRouter` function of the `@spotify/plugin-scaffolder-backend`. A full example backend can be found in -[`scaffolder.ts`](https://github.com/spotify/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), +[`scaffolder.ts`](https://github.com/backstage/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), but it looks something like the following ```ts @@ -85,8 +85,8 @@ and put the contents into a temporary directory and return that directory path. Some good examples exist here: -- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/file.ts -- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/github.ts +- https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/file.ts +- https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/prepare/github.ts ### Registering your own Preparer diff --git a/docs/features/software-templates/extending/create-your-own-publisher.md b/docs/features/software-templates/extending/create-your-own-publisher.md index 546980f033..f076640ebe 100644 --- a/docs/features/software-templates/extending/create-your-own-publisher.md +++ b/docs/features/software-templates/extending/create-your-own-publisher.md @@ -22,7 +22,7 @@ This publisher is passed through to the `createRouter` function of the supported, but PR's are always welcome. An full example backend can be found -[here](https://github.com/spotify/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), +[here](https://github.com/backstage/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), but it looks something like the following ```ts @@ -82,7 +82,7 @@ Now it's up to you to implement the `publish` function and return Some good examples exist here: -- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts +- https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/publish/github.ts ### Registering your own Publisher diff --git a/docs/features/software-templates/extending/create-your-own-templater.md b/docs/features/software-templates/extending/create-your-own-templater.md index d4a6eef5d2..26e01e2782 100644 --- a/docs/features/software-templates/extending/create-your-own-templater.md +++ b/docs/features/software-templates/extending/create-your-own-templater.md @@ -20,7 +20,7 @@ This templater is added to the `TemplaterBuilder` and then passed into the `createRouter` function of the `@spotify/plugin-scaffolder-backend` An full example backend can be found -[here](https://github.com/spotify/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), +[here](https://github.com/backstage/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), but it looks something like the following ```ts @@ -96,7 +96,7 @@ Now it's up to you to implement the `run` function, and then return a Some good examples exist here: -- https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.ts +- https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.ts ### Registering your own Templater diff --git a/docs/features/software-templates/extending/index.md b/docs/features/software-templates/extending/index.md index 944bf0e3ca..aaf42d6b12 100644 --- a/docs/features/software-templates/extending/index.md +++ b/docs/features/software-templates/extending/index.md @@ -51,7 +51,7 @@ passed through to the scaffolder backend. ### How it works Most of the heavy lifting is done in the -[router.ts](https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/src/service/router.ts#L93) +[router.ts](https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/src/service/router.ts#L93) file in the `scaffolder-backend` plugin. There are two routes defined in the router: `POST /v1/jobs` and diff --git a/docs/features/software-templates/installation.md b/docs/features/software-templates/installation.md index bac5f60789..724b86aed1 100644 --- a/docs/features/software-templates/installation.md +++ b/docs/features/software-templates/installation.md @@ -156,11 +156,11 @@ catalog: locations: # Backstage Example Templates - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml - type: url - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml - type: url target: https://github.com/spotify/cookiecutter-golang/blob/master/template.yaml ``` diff --git a/docs/features/techdocs/FAQ.md b/docs/features/techdocs/FAQ.md index e81e9d82c7..080346b9d0 100644 --- a/docs/features/techdocs/FAQ.md +++ b/docs/features/techdocs/FAQ.md @@ -17,14 +17,14 @@ This page answers frequently asked questions about [TechDocs](README.md). TechDocs is using [MkDocs](https://www.mkdocs.org/) to build project documentation under the hood. Documentation built with the -[techdocs-container](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/README.md) +[techdocs-container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) is using the MkDocs [Material Theme](https://github.com/squidfunk/mkdocs-material). #### What is the mkdocs-techdocs-core plugin? The -[mkdocs-techdocs-core](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) +[mkdocs-techdocs-core](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) package is a MkDocs Plugin that works like a wrapper around multiple MkDocs plugins (e.g. [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin)) as diff --git a/docs/features/techdocs/README.md b/docs/features/techdocs/README.md index e2b81b4a53..a16776868a 100644 --- a/docs/features/techdocs/README.md +++ b/docs/features/techdocs/README.md @@ -40,10 +40,10 @@ about TechDocs and the philosophy in its | [TechDocs V.2 🔮⌛][v2] | Easy adoption of TechDocs (whatever environment you have) [See V.2 Use Cases.](#techdocs-v2) | | [TechDocs V.3 🔮⌛][v3] | Build a widget (plugin) framework so that contributors can easily contribute features to TechDocs - that others can use. [See V.3 Use Cases.](#techdocs-v3) | -[v0]: https://github.com/spotify/backstage/milestone/15 -[v1]: https://github.com/spotify/backstage/milestone/16 -[v2]: https://github.com/spotify/backstage/milestone/22 -[v3]: https://github.com/spotify/backstage/milestone/17 +[v0]: https://github.com/backstage/backstage/milestone/15 +[v1]: https://github.com/backstage/backstage/milestone/16 +[v2]: https://github.com/backstage/backstage/milestone/22 +[v3]: https://github.com/backstage/backstage/milestone/17 @@ -117,10 +117,10 @@ migrate Spotify's existing TechDocs features to open source. [creating and publishing documentation]: creating-and-publishing.md [faq]: FAQ.md 'Frequently asked questions' [techdocs/frontend]: - https://github.com/spotify/backstage/blob/master/plugins/techdocs + https://github.com/backstage/backstage/blob/master/plugins/techdocs [techdocs/backend]: - https://github.com/spotify/backstage/blob/master/plugins/techdocs-backend + https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend [techdocs/container]: - https://github.com/spotify/backstage/blob/master/packages/techdocs-container + https://github.com/backstage/backstage/blob/master/packages/techdocs-container [techdocs/cli]: - https://github.com/spotify/backstage/blob/master/packages/techdocs-cli + https://github.com/backstage/backstage/blob/master/packages/techdocs-cli diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md index 13144f8df0..13b780524b 100644 --- a/docs/features/techdocs/concepts.md +++ b/docs/features/techdocs/concepts.md @@ -14,7 +14,7 @@ The TechDocs Core Plugin is an [MkDocs](https://www.mkdocs.org/) plugin created as a wrapper around multiple MkDocs plugins and Python Markdown extensions to standardize the configuration of MkDocs used for TechDocs. -[TechDocs Core](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) +[TechDocs Core](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) ### TechDocs container @@ -23,14 +23,14 @@ The TechDocs container is a Docker container available at pages, including stylesheets and scripts from Python flavored Markdown, through MkDocs. -[TechDocs Container](https://github.com/spotify/backstage/blob/master/packages/techdocs-container/README.md) +[TechDocs Container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) ### TechDocs publisher The `techdocs-backend` plugin currently comes with one publisher - `LocalPublish`. -[TechDocs Backend](https://github.com/spotify/backstage/tree/master/plugins/techdocs-backend) +[TechDocs Backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend) More standalone publishers will come in the near future... @@ -41,7 +41,7 @@ documentation for publishing. Currently it mostly acts as a wrapper around the TechDocs container and provides an easy-to-use interface for our docker container. -[TechDocs CLI](https://github.com/spotify/backstage/blob/master/packages/techdocs-cli/README.md) +[TechDocs CLI](https://github.com/backstage/backstage/blob/master/packages/techdocs-cli/README.md) ### TechDocs Reader @@ -53,7 +53,7 @@ The TechDocs Reader purpose is also to open up the opportunity to integrate TechDocs widgets for a customized full-featured TechDocs experience. ([coming soon V.3](./README.md#project-roadmap)) -[TechDocs Reader](https://github.com/spotify/backstage/blob/master/plugins/techdocs/src/reader/README.md) +[TechDocs Reader](https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/reader/README.md) ### Transformers @@ -62,4 +62,4 @@ Reader. The reason why transformers were introduced was to provide a way to transform the HTML content on pre and post render (e.g. rewrite docs links or modify css). -[Transformers API docs](https://github.com/spotify/backstage/blob/master/plugins/techdocs/src/reader/README.md) +[Transformers API docs](https://github.com/backstage/backstage/blob/master/plugins/techdocs/src/reader/README.md) diff --git a/docs/getting-started/app-custom-theme.md b/docs/getting-started/app-custom-theme.md index 97876c2ba1..79cd405198 100644 --- a/docs/getting-started/app-custom-theme.md +++ b/docs/getting-started/app-custom-theme.md @@ -37,7 +37,7 @@ in combination with [createMuiTheme](https://material-ui.com/customization/theming/#createmuitheme-options-args-theme) from [@material-ui/core](https://www.npmjs.com/package/@material-ui/core). See the -[@backstage/theme source](https://github.com/spotify/backstage/tree/master/packages/theme/src) +[@backstage/theme source](https://github.com/backstage/backstage/tree/master/packages/theme/src) and the implementation of the `createTheme` function for how this is done. You can also create a theme from scratch that matches the `BackstageTheme` type diff --git a/docs/getting-started/deployment-helm.md b/docs/getting-started/deployment-helm.md index c062ed3951..e1f3ea7629 100644 --- a/docs/getting-started/deployment-helm.md +++ b/docs/getting-started/deployment-helm.md @@ -8,7 +8,7 @@ sidebar_label: Kubernetes and Helm # Helm charts An example Backstage app can be deployed in Kubernetes using the -[Backstage Helm charts](https://github.com/spotify/backstage/tree/master/contrib/chart/backstage). +[Backstage Helm charts](https://github.com/backstage/backstage/tree/master/contrib/chart/backstage). First, choose a DNS name where Backstage will be hosted, and create a YAML file for your custom configuration. @@ -32,7 +32,7 @@ appConfig: Then use it to run: ```bash -git clone https://github.com/spotify/backstage.git +git clone https://github.com/backstage/backstage.git cd contrib/chart/backstage helm dependency update helm install -f backstage-mydomain.yaml backstage . @@ -61,4 +61,4 @@ backstage-ingress * 123.1.2.3 80 17m > **NOTE**: this is not a production ready deployment. For more information on how to customize the deployment check the -[README](https://github.com/spotify/backstage/tree/master/contrib/chart/backstage/README.md). +[README](https://github.com/backstage/backstage/tree/master/contrib/chart/backstage/README.md). diff --git a/docs/getting-started/deployment-k8s.md b/docs/getting-started/deployment-k8s.md index f123dd2548..5b7ce80051 100644 --- a/docs/getting-started/deployment-k8s.md +++ b/docs/getting-started/deployment-k8s.md @@ -9,5 +9,5 @@ Beyond that point we do not have an opinionated way to deploy Backstage within Kubernetes, as each cluster has its own unique set of tooling and patterns. We do provide examples to help you get started though. Check out -[this example](https://github.com/spotify/backstage/tree/master/contrib/kubernetes/plain_single_backend_deplyoment/) +[this example](https://github.com/backstage/backstage/tree/master/contrib/kubernetes/plain_single_backend_deplyoment/) for a basic single-deployment setup. diff --git a/docs/getting-started/development-environment.md b/docs/getting-started/development-environment.md index aa9aa0bde1..c5275114ce 100644 --- a/docs/getting-started/development-environment.md +++ b/docs/getting-started/development-environment.md @@ -56,7 +56,7 @@ system resources and slow things down. ## Package Scripts There are many commands to be found in the root -[package.json](https://github.com/spotify/backstage/blob/master/package.json), +[package.json](https://github.com/backstage/backstage/blob/master/package.json), here are some useful ones: ```python @@ -86,7 +86,7 @@ yarn create-plugin # Create a new plugin ``` > See -> [package.json](https://github.com/spotify/backstage/blob/master/package.json) +> [package.json](https://github.com/backstage/backstage/blob/master/package.json) > for other yarn commands/options. ## Local configuration diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 855c8b0634..eb199f4bc8 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -44,7 +44,7 @@ look something like this. You can read more about this process in ### Contributing to Backstage You can read more in our -[CONTRIBUTING](https://github.com/spotify/backstage/blob/master/CONTRIBUTING.md) +[CONTRIBUTING](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md) guide, which can help you get setup with a Backstage development environment. ### Next steps diff --git a/docs/getting-started/running-backstage-locally.md b/docs/getting-started/running-backstage-locally.md index 1a9097afd3..de3dbe93b5 100644 --- a/docs/getting-started/running-backstage-locally.md +++ b/docs/getting-started/running-backstage-locally.md @@ -84,19 +84,19 @@ exploring. But you can also set up any of the available authentication methods. The easiest option will be GitHub. To setup GitHub authentication in Backstage, see -[these instructions](https://github.com/spotify/backstage/tree/master/plugins/auth-backend#github). +[these instructions](https://github.com/backstage/backstage/tree/master/plugins/auth-backend#github). --- Congratulations! That should be it. Let us know how it went [on discord](https://discord.gg/EBHEGzX), file issues for any -[feature](https://github.com/spotify/backstage/issues/new?labels=help+wanted&template=feature_template.md) +[feature](https://github.com/backstage/backstage/issues/new?labels=help+wanted&template=feature_template.md) or -[plugin suggestions](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME), +[plugin suggestions](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME), or -[bugs](https://github.com/spotify/backstage/issues/new?labels=bug&template=bug_template.md) +[bugs](https://github.com/backstage/backstage/issues/new?labels=bug&template=bug_template.md) you have, and feel free to -[contribute](https://github.com/spotify/backstage/blob/master/CONTRIBUTING.md)! +[contribute](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md)! ## Creating a Plugin diff --git a/docs/openapi/definitions/auth.yaml b/docs/openapi/definitions/auth.yaml index cb736fd2a9..411ce69253 100644 --- a/docs/openapi/definitions/auth.yaml +++ b/docs/openapi/definitions/auth.yaml @@ -12,14 +12,14 @@ info: The API is supplied with a list of providers - such as `Google` or `Github` - and will add the endpoints described below to each of those providers. - Read more about [User Authentication and Authorization in Backstage](https://github.com/spotify/backstage/blob/master/docs/auth/overview.md). + Read more about [User Authentication and Authorization in Backstage](https://github.com/backstage/backstage/blob/master/docs/auth/overview.md). license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html version: 0.1.1-alpha.8 externalDocs: description: Backstage official documentation - url: https://github.com/spotify/backstage/blob/master/docs/README.md + url: https://github.com/backstage/backstage/blob/master/docs/README.md servers: - url: http://localhost:7000/api/auth/ tags: diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md index 6f3c6b1a71..ddf7980cbc 100644 --- a/docs/overview/architecture-overview.md +++ b/docs/overview/architecture-overview.md @@ -63,17 +63,17 @@ Each plugin is a client side application which mounts itself on the UI. Plugins are written in TypeScript or JavaScript. They each live in their own directory in `backstage/plugins`. For example, the source code for the lighthouse plugin is available at -[backstage/plugins/lighthouse](https://github.com/spotify/backstage/tree/master/plugins/lighthouse). +[backstage/plugins/lighthouse](https://github.com/backstage/backstage/tree/master/plugins/lighthouse). ### Installing plugins Plugins are typically loaded by the UI in your Backstage applications `plugins.ts` file. For example, -[here](https://github.com/spotify/backstage/blob/master/packages/app/src/plugins.ts) +[here](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) is that file in the Backstage sample app. Plugins can be enabled, and passed configuration in `apis.ts`. For example, -[here](https://github.com/spotify/backstage/blob/master/packages/app/src/apis.ts) +[here](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts) is that file in the Backstage sample app. This is how the Lighthouse plugin would be enabled in a typical Backstage @@ -169,8 +169,8 @@ in the future. To learn more about the future of databases and Backstage, see the following GitHub issues. -- [Knex + Plugins (Multiple vs Single Database) · Issue #1598 · spotify/backstage](https://github.com/spotify/backstage/issues/1598) -- [Update migrations to support postgres by dariddler · Pull Request #1527 · spotify/backstage](https://github.com/spotify/backstage/pull/1527#discussion_r450374145) +- [Knex + Plugins (Multiple vs Single Database) · Issue #1598 · spotify/backstage](https://github.com/backstage/backstage/issues/1598) +- [Update migrations to support postgres by dariddler · Pull Request #1527 · spotify/backstage](https://github.com/backstage/backstage/pull/1527#discussion_r450374145) ## Containerization diff --git a/docs/overview/logos.md b/docs/overview/logos.md index 2a684420bc..4c0c345f36 100644 --- a/docs/overview/logos.md +++ b/docs/overview/logos.md @@ -8,7 +8,7 @@ description: Guidelines for how to use the Backstage logos and icons Guidelines for how to use the Backstage logo and icon can be found [here](/logo_assets/Backstage_Identity_Assets_Overview.pdf). The assets below are all in `.svg` format. Other formats are available in the -[repository](https://github.com/spotify/backstage/tree/master/microsite/static/logo_assets). +[repository](https://github.com/backstage/backstage/tree/master/microsite/static/logo_assets). ## Backstage logo diff --git a/docs/overview/roadmap.md b/docs/overview/roadmap.md index 51f09347ce..5ff4d49a7c 100644 --- a/docs/overview/roadmap.md +++ b/docs/overview/roadmap.md @@ -9,8 +9,8 @@ description: Roadmap of Backstage Project > Backstage is currently under rapid development. This means that you can expect > APIs and features to evolve. It is also recommended that teams who adopt > Backstage today upgrade their installation as new -> [releases](https://github.com/spotify/backstage/releases) become available, as -> Backwards compatibility is not yet guaranteed. +> [releases](https://github.com/backstage/backstage/releases) become available, +> as Backwards compatibility is not yet guaranteed. ## Phases @@ -37,34 +37,34 @@ We have divided the project into three high-level _phases_: If you have questions about the roadmap or want to provide feedback, we would love to hear from you! Please create an -[Issue](https://github.com/spotify/backstage/issues/new/choose), ping us on +[Issue](https://github.com/backstage/backstage/issues/new/choose), ping us on [Discord](https://discord.gg/EBHEGzX) or reach out directly at [alund@spotify.com](mailto:alund@spotify.com). Want to help out? Awesome ❤️ Head over to -[CONTRIBUTING](https://github.com/spotify/backstage/blob/master/CONTRIBUTING.md) +[CONTRIBUTING](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md) guidelines to get started. ### Ongoing work 🚧 -- **[Plugins for managing micro services end-2-end](https://github.com/spotify/backstage/milestone/14)** +- **[Plugins for managing micro services end-2-end](https://github.com/backstage/backstage/milestone/14)** Out of the box Backstage will ship with a set of plugins (Overview, CI, API and Docs) that will demonstrate how a user can manage a micro service and follow a change all the way out in production. Completing this work will make it much easier to see how a plugin can be built that integrates with the Backstage Service Catalog. -- **[Users and teams](https://github.com/spotify/backstage/issues/1807)** +- **[Users and teams](https://github.com/backstage/backstage/issues/1807)** Ownership is a central concept in Backstage. It should be easy to import your existing organizational data, such as users and groups/teams, into Backstage. A user the logs into Backstage should see software components owned by the team(s) they are in. -- **[Backstage platform is stable](https://github.com/spotify/backstage/milestone/19)** - +- **[Backstage platform is stable](https://github.com/backstage/backstage/milestone/19)** - The platform APIs and features are stable and can be depended on for production use. After this plugins will require little to no maintenance. -* **[Improved Kubernetes plugin](https://github.com/spotify/backstage/issues/2857)** - +* **[Improved Kubernetes plugin](https://github.com/backstage/backstage/issues/2857)** - Native support for Kubernetes, making it easier for developers to see and manage their services running in k8s. @@ -77,21 +77,21 @@ guidelines to get started. deployment available publicly so that people can click around and get a feel for the product without having to install anything. -- **[Global search](https://github.com/spotify/backstage/issues/1499)** - Extend - the basic search available in the Backstage Service Catalog with a global - search experience. Long term this search solution should be extensible, making - it possible for you add custom search results. +- **[Global search](https://github.com/backstage/backstage/issues/1499)** - + Extend the basic search available in the Backstage Service Catalog with a + global search experience. Long term this search solution should be extensible, + making it possible for you add custom search results. -- **[[TechDocs V.2] Stabilization release](https://github.com/spotify/backstage/milestone/17)** - +- **[[TechDocs V.2] Stabilization release](https://github.com/backstage/backstage/milestone/17)** - Platform stability and compatibility improvements. - **Additional auth providers** - Backstage should work for most (all!) auth solutions. Since Backstage can be used by companies regardless of what cloud (or on prem) you are using we are especially keen to get auth support for - [AWS](https://github.com/spotify/backstage/issues/290), - [Azure](https://github.com/spotify/backstage/issues/348) and others. + [AWS](https://github.com/backstage/backstage/issues/290), + [Azure](https://github.com/backstage/backstage/issues/348) and others. -- **[Initial GraphQL API](https://github.com/spotify/backstage/milestone/13)** - +- **[Initial GraphQL API](https://github.com/backstage/backstage/milestone/13)** - A GraphQL API will open up the rich metadata provided by Backstage in a single query. Plugins can easily query this API as well as extend the model where needed. @@ -102,18 +102,18 @@ Building and maintaining [plugins](https://backstage.io/plugins) is the work of the entire Backstage community. A list of plugins that are in development is -[available here](https://github.com/spotify/backstage/issues?q=is%3Aissue+is%3Aopen+label%3Aplugin+sort%3Areactions-%2B1-desc). +[available here](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+label%3Aplugin+sort%3Areactions-%2B1-desc). We strongly recommend to upvote 👍 plugins you are interested in. This helps us and the community prioritize what plugins to build. Are you missing a plugin for your favorite tool? Please -[suggest a new one](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). +[suggest a new one](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). Chances are that someone will jump in and help build it. ### Completed milestones ✅ -- [Kubernetes plugin - v1](https://github.com/spotify/backstage/tree/master/plugins/kubernetes) -- [Helm charts](https://github.com/spotify/backstage/tree/master/contrib/chart/backstage) +- [Kubernetes plugin - v1](https://github.com/backstage/backstage/tree/master/plugins/kubernetes) +- [Helm charts](https://github.com/backstage/backstage/tree/master/contrib/chart/backstage) - [Backstage Design System 💅](https://backstage.io/blog/2020/09/30/backstage-design-system) - [Cost Insights plugin 💸](https://engineering.atspotify.com/2020/09/29/managing-clouds-from-the-ground-up-cost-engineering-at-spotify/) - [Donate Backstage to the CNCF 🎉](https://backstage.io/blog/2020/09/23/backstage-cncf-sandbox) @@ -123,11 +123,11 @@ Chances are that someone will jump in and help build it. - [Backstage Service Catalog (alpha)](https://backstage.io/blog/2020/06/22/backstage-service-catalog-alpha) - [Backstage Software Templates (alpha)](https://backstage.io/blog/2020/08/05/announcing-backstage-software-templates) - [Make it possible to add custom auth providers](https://backstage.io/blog/2020/07/01/how-to-enable-authentication-in-backstage-using-passport) -- [TechDocs v0](https://github.com/spotify/backstage/milestone/15) +- [TechDocs v0](https://github.com/backstage/backstage/milestone/15) - CI plugins: CircleCI, Jenkins, GitHub Actions and TravisCI -- [Service API documentation](https://github.com/spotify/backstage/pull/1737) +- [Service API documentation](https://github.com/backstage/backstage/pull/1737) - Backstage Service Catalog can read from: GitHub, GitLab, - [Bitbucket](https://github.com/spotify/backstage/pull/1938) + [Bitbucket](https://github.com/backstage/backstage/pull/1938) - Support auth providers: Google, Okta, GitHub, GitLab, - [auth0](https://github.com/spotify/backstage/pull/1611), - [AWS](https://github.com/spotify/backstage/pull/1990) + [auth0](https://github.com/backstage/backstage/pull/1611), + [AWS](https://github.com/backstage/backstage/pull/1990) diff --git a/docs/overview/what-is-backstage.md b/docs/overview/what-is-backstage.md index 3d41c714ee..5439b838bd 100644 --- a/docs/overview/what-is-backstage.md +++ b/docs/overview/what-is-backstage.md @@ -30,7 +30,7 @@ Out of the box, Backstage includes: code" approach - Plus, a growing ecosystem of - [open source plugins](https://github.com/spotify/backstage/tree/master/plugins) + [open source plugins](https://github.com/backstage/backstage/tree/master/plugins) that further expand Backstage’s customizability and functionality ## Backstage and the CNCF diff --git a/docs/plugins/add-to-marketplace.md b/docs/plugins/add-to-marketplace.md index 59cca07bff..790512e6aa 100644 --- a/docs/plugins/add-to-marketplace.md +++ b/docs/plugins/add-to-marketplace.md @@ -8,7 +8,7 @@ description: Documentation on Adding Plugin to Marketplace To add a new plugin to the [plugin marketplace](https://backstage.io/plugins) create a file in -[`microsite/data/plugins`](https://github.com/spotify/backstage/tree/master/microsite/data/plugins) +[`microsite/data/plugins`](https://github.com/backstage/backstage/tree/master/microsite/data/plugins) with your plugin's information. Example: ```yaml diff --git a/docs/plugins/call-existing-api.md b/docs/plugins/call-existing-api.md index 3fff90c3f6..75e054d2b9 100644 --- a/docs/plugins/call-existing-api.md +++ b/docs/plugins/call-existing-api.md @@ -137,7 +137,7 @@ router.use('/summary', async (req, res) => { ``` For a more detailed example, see -[the lighthouse plugin](https://github.com/spotify/backstage/tree/master/plugins/lighthouse) +[the lighthouse plugin](https://github.com/backstage/backstage/tree/master/plugins/lighthouse) that stores some state in a database and adds new capabilities to the underlying API. diff --git a/docs/plugins/index.md b/docs/plugins/index.md index 8836c1cd42..dcef3f995c 100644 --- a/docs/plugins/index.md +++ b/docs/plugins/index.md @@ -22,7 +22,7 @@ To create a plugin, follow the steps outlined [here](create-a-plugin.md). If you start developing a plugin that you aim to release as open source, we suggest that you create a -[new Issue](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). +[new Issue](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). This helps the community know what plugins are in development. You can also use this process if you have an idea for a good plugin but you hope diff --git a/docs/plugins/publishing.md b/docs/plugins/publishing.md index fbeab6340c..1a94daf8a5 100644 --- a/docs/plugins/publishing.md +++ b/docs/plugins/publishing.md @@ -7,7 +7,7 @@ description: Documentation on Publishing NPM packages ## NPM NPM packages are published through CI/CD in the -[.github/workflows/master.yml](https://github.com/spotify/backstage/blob/master/.github/workflows/master.yml) +[.github/workflows/master.yml](https://github.com/backstage/backstage/blob/master/.github/workflows/master.yml) workflow. Every commit that is merged to master will be checked for new versions of all public packages, and any new versions will automatically be published to NPM. diff --git a/docs/plugins/structure-of-a-plugin.md b/docs/plugins/structure-of-a-plugin.md index 0f11896f7a..3f631a9a46 100644 --- a/docs/plugins/structure-of-a-plugin.md +++ b/docs/plugins/structure-of-a-plugin.md @@ -106,6 +106,6 @@ environment you will probably face challenges like CORS policies and/or backend-side authorization. To smooth this process out you can use proxy - either the one you already have (like Nginx, HAProxy, etc.) or the proxy-backend plugin that we provide for the Backstage backend. -[Read more](https://github.com/spotify/backstage/blob/master/plugins/proxy-backend/README.md) +[Read more](https://github.com/backstage/backstage/blob/master/plugins/proxy-backend/README.md) [Back to Getting Started](../README.md) diff --git a/docs/reference/utility-apis/AlertApi.md b/docs/reference/utility-apis/AlertApi.md index 7d3167fdb7..4116e964ae 100644 --- a/docs/reference/utility-apis/AlertApi.md +++ b/docs/reference/utility-apis/AlertApi.md @@ -1,7 +1,7 @@ # AlertApi The AlertApi type is defined at -[packages/core-api/src/apis/definitions/AlertApi.ts:29](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L29). +[packages/core-api/src/apis/definitions/AlertApi.ts:29](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L29). The following Utility API implements this type: [alertApiRef](./README.md#alert) @@ -38,7 +38,7 @@ export type AlertMessage = { Defined at -[packages/core-api/src/apis/definitions/AlertApi.ts:19](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L19). +[packages/core-api/src/apis/definitions/AlertApi.ts:19](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L19). Referenced by: [post](#post), [alert\$](#alert). @@ -67,7 +67,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [alert\$](#alert). @@ -86,7 +86,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -109,6 +109,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/AppThemeApi.md b/docs/reference/utility-apis/AppThemeApi.md index e103511246..0f5c095825 100644 --- a/docs/reference/utility-apis/AppThemeApi.md +++ b/docs/reference/utility-apis/AppThemeApi.md @@ -1,7 +1,7 @@ # AppThemeApi The AppThemeApi type is defined at -[packages/core-api/src/apis/definitions/AppThemeApi.ts:56](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L56). +[packages/core-api/src/apis/definitions/AppThemeApi.ts:56](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L56). The following Utility API implements this type: [appThemeApiRef](./README.md#apptheme) @@ -81,7 +81,7 @@ export type AppTheme = { Defined at -[packages/core-api/src/apis/definitions/AppThemeApi.ts:25](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L25). +[packages/core-api/src/apis/definitions/AppThemeApi.ts:25](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L25). Referenced by: [getInstalledThemes](#getinstalledthemes). @@ -92,7 +92,7 @@ export type BackstagePalette = Palette & Palette Defined at -[packages/theme/src/types.ts:74](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L74). +[packages/theme/src/types.ts:74](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L74). Referenced by: [BackstageTheme](#backstagetheme). @@ -107,7 +107,7 @@ export interface BackstageTheme extends Theme { Defined at -[packages/theme/src/types.ts:81](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L81). +[packages/theme/src/types.ts:81](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L81). Referenced by: [AppTheme](#apptheme). @@ -136,7 +136,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [activeThemeId\$](#activethemeid). @@ -155,7 +155,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -170,7 +170,7 @@ export type PageTheme = { Defined at -[packages/theme/src/types.ts:103](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L103). +[packages/theme/src/types.ts:103](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L103). Referenced by: [BackstageTheme](#backstagetheme). @@ -183,7 +183,7 @@ export type PageThemeSelector = { Defined at -[packages/theme/src/types.ts:77](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L77). +[packages/theme/src/types.ts:77](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L77). Referenced by: [BackstageTheme](#backstagetheme). @@ -243,7 +243,7 @@ type PaletteAdditions = { Defined at -[packages/theme/src/types.ts:23](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L23). +[packages/theme/src/types.ts:23](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/theme/src/types.ts#L23). Referenced by: [BackstagePalette](#backstagepalette). @@ -266,6 +266,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/BackstageIdentityApi.md b/docs/reference/utility-apis/BackstageIdentityApi.md index 4e86717101..dafdb7d55f 100644 --- a/docs/reference/utility-apis/BackstageIdentityApi.md +++ b/docs/reference/utility-apis/BackstageIdentityApi.md @@ -1,7 +1,7 @@ # BackstageIdentityApi The BackstageIdentityApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:134](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L134). +[packages/core-api/src/apis/definitions/auth.ts:134](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L134). The following Utility APIs implement this type: @@ -70,7 +70,7 @@ export type AuthRequestOptions = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). +[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). Referenced by: [getBackstageIdentity](#getbackstageidentity). @@ -91,6 +91,6 @@ export type BackstageIdentity = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:147](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L147). +[packages/core-api/src/apis/definitions/auth.ts:147](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L147). Referenced by: [getBackstageIdentity](#getbackstageidentity). diff --git a/docs/reference/utility-apis/Config.md b/docs/reference/utility-apis/Config.md index 9d184dd56a..2ae047a700 100644 --- a/docs/reference/utility-apis/Config.md +++ b/docs/reference/utility-apis/Config.md @@ -1,7 +1,7 @@ # Config The Config type is defined at -[packages/config/src/types.ts:32](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L32). +[packages/config/src/types.ts:32](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L32). The following Utility API implements this type: [configApiRef](./README.md#config) @@ -140,7 +140,7 @@ export type Config = { Defined at -[packages/config/src/types.ts:32](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L32). +[packages/config/src/types.ts:32](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L32). Referenced by: [getConfig](#getconfig), [getOptionalConfig](#getoptionalconfig), [getConfigArray](#getconfigarray), @@ -153,7 +153,7 @@ export type JsonArray = JsonValue[] Defined at -[packages/config/src/types.ts:18](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L18). +[packages/config/src/types.ts:18](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L18). Referenced by: [JsonValue](#jsonvalue). @@ -164,7 +164,7 @@ export type JsonObject = { [key in string]?: JsonValue Defined at -[packages/config/src/types.ts:17](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L17). +[packages/config/src/types.ts:17](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L17). Referenced by: [JsonValue](#jsonvalue). @@ -181,7 +181,7 @@ export type JsonValue = Defined at -[packages/config/src/types.ts:19](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L19). +[packages/config/src/types.ts:19](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/config/src/types.ts#L19). Referenced by: [get](#get), [getOptional](#getoptional), [JsonObject](#jsonobject), [JsonArray](#jsonarray), [Config](#config). diff --git a/docs/reference/utility-apis/DiscoveryApi.md b/docs/reference/utility-apis/DiscoveryApi.md index 72f37dc58d..ac278fdd97 100644 --- a/docs/reference/utility-apis/DiscoveryApi.md +++ b/docs/reference/utility-apis/DiscoveryApi.md @@ -1,7 +1,7 @@ # DiscoveryApi The DiscoveryApi type is defined at -[packages/core-api/src/apis/definitions/DiscoveryApi.ts:30](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/DiscoveryApi.ts#L30). +[packages/core-api/src/apis/definitions/DiscoveryApi.ts:30](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/DiscoveryApi.ts#L30). The following Utility API implements this type: [discoveryApiRef](./README.md#discovery) diff --git a/docs/reference/utility-apis/ErrorApi.md b/docs/reference/utility-apis/ErrorApi.md index 2234aaa543..93f4f9cd48 100644 --- a/docs/reference/utility-apis/ErrorApi.md +++ b/docs/reference/utility-apis/ErrorApi.md @@ -1,7 +1,7 @@ # ErrorApi The ErrorApi type is defined at -[packages/core-api/src/apis/definitions/ErrorApi.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L53). +[packages/core-api/src/apis/definitions/ErrorApi.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L53). The following Utility API implements this type: [errorApiRef](./README.md#error) @@ -41,7 +41,7 @@ type Error = { Defined at -[packages/core-api/src/apis/definitions/ErrorApi.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L24). +[packages/core-api/src/apis/definitions/ErrorApi.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L24). Referenced by: [post](#post), [error\$](#error). @@ -58,7 +58,7 @@ export type ErrorContext = { Defined at -[packages/core-api/src/apis/definitions/ErrorApi.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L33). +[packages/core-api/src/apis/definitions/ErrorApi.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L33). Referenced by: [post](#post), [error\$](#error). @@ -87,7 +87,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [error\$](#error). @@ -106,7 +106,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -129,6 +129,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/FeatureFlagsApi.md b/docs/reference/utility-apis/FeatureFlagsApi.md index ed04ecfd8d..529d2ac5dc 100644 --- a/docs/reference/utility-apis/FeatureFlagsApi.md +++ b/docs/reference/utility-apis/FeatureFlagsApi.md @@ -1,7 +1,7 @@ # FeatureFlagsApi The FeatureFlagsApi type is defined at -[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:60](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L60). +[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:60](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L60). The following Utility API implements this type: [featureFlagsApiRef](./README.md#featureflags) @@ -68,7 +68,7 @@ export type FeatureFlag = { Defined at -[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:31](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L31). +[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:31](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L31). Referenced by: [registerFlag](#registerflag), [getRegisteredFlags](#getregisteredflags). @@ -83,7 +83,7 @@ export enum FeatureFlagState { Defined at -[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:36](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L36). +[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:36](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L36). Referenced by: [FeatureFlagsSaveOptions](#featureflagssaveoptions). @@ -108,6 +108,6 @@ export type FeatureFlagsSaveOptions = { Defined at -[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:44](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L44). +[packages/core-api/src/apis/definitions/FeatureFlagsApi.ts:44](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L44). Referenced by: [save](#save). diff --git a/docs/reference/utility-apis/IdentityApi.md b/docs/reference/utility-apis/IdentityApi.md index 51ea146eec..a88aaf0b8a 100644 --- a/docs/reference/utility-apis/IdentityApi.md +++ b/docs/reference/utility-apis/IdentityApi.md @@ -1,7 +1,7 @@ # IdentityApi The IdentityApi type is defined at -[packages/core-api/src/apis/definitions/IdentityApi.ts:22](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/IdentityApi.ts#L22). +[packages/core-api/src/apis/definitions/IdentityApi.ts:22](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/IdentityApi.ts#L22). The following Utility API implements this type: [identityApiRef](./README.md#identity) @@ -76,6 +76,6 @@ export type ProfileInfo = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:162](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L162). +[packages/core-api/src/apis/definitions/auth.ts:162](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L162). Referenced by: [getProfile](#getprofile). diff --git a/docs/reference/utility-apis/OAuthApi.md b/docs/reference/utility-apis/OAuthApi.md index 42517410fa..79b55812ef 100644 --- a/docs/reference/utility-apis/OAuthApi.md +++ b/docs/reference/utility-apis/OAuthApi.md @@ -1,7 +1,7 @@ # OAuthApi The OAuthApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:67](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L67). +[packages/core-api/src/apis/definitions/auth.ts:67](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L67). The following Utility APIs implement this type: @@ -82,7 +82,7 @@ export type AuthRequestOptions = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). +[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). Referenced by: [getAccessToken](#getaccesstoken). @@ -108,6 +108,6 @@ export type OAuthScope = string | string[] Defined at -[packages/core-api/src/apis/definitions/auth.ts:38](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L38). +[packages/core-api/src/apis/definitions/auth.ts:38](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L38). Referenced by: [getAccessToken](#getaccesstoken). diff --git a/docs/reference/utility-apis/OAuthRequestApi.md b/docs/reference/utility-apis/OAuthRequestApi.md index 690df9dbff..f1c2311ce9 100644 --- a/docs/reference/utility-apis/OAuthRequestApi.md +++ b/docs/reference/utility-apis/OAuthRequestApi.md @@ -1,7 +1,7 @@ # OAuthRequestApi The OAuthRequestApi type is defined at -[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:99](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L99). +[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:99](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L99). The following Utility API implements this type: [oauthRequestApiRef](./README.md#oauthrequest) @@ -73,7 +73,7 @@ export type AuthProvider = { Defined at -[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:27](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L27). +[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:27](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L27). Referenced by: [AuthRequesterOptions](#authrequesteroptions), [PendingAuthRequest](#pendingauthrequest). @@ -97,7 +97,7 @@ export type AuthRequester<AuthResponse> = ( Defined at -[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:66](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L66). +[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:66](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L66). Referenced by: [createAuthRequester](#createauthrequester). @@ -122,7 +122,7 @@ export type AuthRequesterOptions<AuthResponse> = { Defined at -[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:43](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L43). +[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:43](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L43). Referenced by: [createAuthRequester](#createauthrequester). @@ -151,7 +151,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [authRequest\$](#authrequest). @@ -170,7 +170,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -205,7 +205,7 @@ export type PendingAuthRequest = { Defined at -[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:77](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L77). +[packages/core-api/src/apis/definitions/OAuthRequestApi.ts:77](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L77). Referenced by: [authRequest\$](#authrequest). @@ -228,6 +228,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/OpenIdConnectApi.md b/docs/reference/utility-apis/OpenIdConnectApi.md index 11ac589ef1..eaea530708 100644 --- a/docs/reference/utility-apis/OpenIdConnectApi.md +++ b/docs/reference/utility-apis/OpenIdConnectApi.md @@ -1,7 +1,7 @@ # OpenIdConnectApi The OpenIdConnectApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:99](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L99). +[packages/core-api/src/apis/definitions/auth.ts:99](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L99). The following Utility APIs implement this type: @@ -66,6 +66,6 @@ export type AuthRequestOptions = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). +[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). Referenced by: [getIdToken](#getidtoken). diff --git a/docs/reference/utility-apis/ProfileInfoApi.md b/docs/reference/utility-apis/ProfileInfoApi.md index c5b2ae456b..76d04045e8 100644 --- a/docs/reference/utility-apis/ProfileInfoApi.md +++ b/docs/reference/utility-apis/ProfileInfoApi.md @@ -1,7 +1,7 @@ # ProfileInfoApi The ProfileInfoApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:117](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L117). +[packages/core-api/src/apis/definitions/auth.ts:117](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L117). The following Utility APIs implement this type: @@ -67,7 +67,7 @@ export type AuthRequestOptions = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). +[packages/core-api/src/apis/definitions/auth.ts:40](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L40). Referenced by: [getProfile](#getprofile). @@ -95,6 +95,6 @@ export type ProfileInfo = { Defined at -[packages/core-api/src/apis/definitions/auth.ts:162](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L162). +[packages/core-api/src/apis/definitions/auth.ts:162](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L162). Referenced by: [getProfile](#getprofile). diff --git a/docs/reference/utility-apis/README.md b/docs/reference/utility-apis/README.md index 84674d9fff..1ef5b6197e 100644 --- a/docs/reference/utility-apis/README.md +++ b/docs/reference/utility-apis/README.md @@ -3,7 +3,7 @@ The following is a list of all Utility APIs defined by `@backstage/core`. They are available to use by plugins and components, and can be accessed using the `useApi` hook, also provided by `@backstage/core`. For more information, see -https://github.com/spotify/backstage/blob/master/docs/api/utility-apis.md. +https://github.com/backstage/backstage/blob/master/docs/api/utility-apis.md. ### alert @@ -12,7 +12,7 @@ Used to report alerts and forward them to the app Implemented type: [AlertApi](./AlertApi.md) ApiRef: -[alertApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L41) +[alertApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AlertApi.ts#L41) ### appTheme @@ -21,7 +21,7 @@ API Used to configure the app theme, and enumerate options Implemented type: [AppThemeApi](./AppThemeApi.md) ApiRef: -[appThemeApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L80) +[appThemeApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/AppThemeApi.ts#L80) ### auth0Auth @@ -32,7 +32,7 @@ Implemented types: [OpenIdConnectApi](./OpenIdConnectApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[auth0AuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L275) +[auth0AuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L275) ### config @@ -41,7 +41,7 @@ Used to access runtime configuration Implemented type: [Config](./Config.md) ApiRef: -[configApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ConfigApi.ts#L22) +[configApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ConfigApi.ts#L22) ### discovery @@ -50,7 +50,7 @@ Provides service discovery of backend plugins Implemented type: [DiscoveryApi](./DiscoveryApi.md) ApiRef: -[discoveryApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/DiscoveryApi.ts#L44) +[discoveryApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/DiscoveryApi.ts#L44) ### error @@ -59,7 +59,7 @@ Used to report errors and forward them to the app Implemented type: [ErrorApi](./ErrorApi.md) ApiRef: -[errorApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L65) +[errorApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/ErrorApi.ts#L65) ### featureFlags @@ -68,7 +68,7 @@ Used to toggle functionality in features across Backstage Implemented type: [FeatureFlagsApi](./FeatureFlagsApi.md) ApiRef: -[featureFlagsApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L83) +[featureFlagsApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/FeatureFlagsApi.ts#L83) ### githubAuth @@ -79,7 +79,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[githubAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L232) +[githubAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L232) ### gitlabAuth @@ -90,7 +90,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[gitlabAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L262) +[gitlabAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L262) ### googleAuth @@ -102,7 +102,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[googleAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L215) +[googleAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L215) ### identity @@ -111,7 +111,7 @@ Provides access to the identity of the signed in user Implemented type: [IdentityApi](./IdentityApi.md) ApiRef: -[identityApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/IdentityApi.ts#L54) +[identityApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/IdentityApi.ts#L54) ### microsoftAuth @@ -123,7 +123,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[microsoftAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L289) +[microsoftAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L289) ### oauth2 @@ -135,7 +135,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[oauth2ApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L303) +[oauth2ApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L303) ### oauthRequest @@ -144,7 +144,7 @@ An API for implementing unified OAuth flows in Backstage Implemented type: [OAuthRequestApi](./OAuthRequestApi.md) ApiRef: -[oauthRequestApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L130) +[oauthRequestApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/OAuthRequestApi.ts#L130) ### oktaAuth @@ -156,7 +156,7 @@ Implemented types: [OAuthApi](./OAuthApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[oktaAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L245) +[oktaAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L245) ### samlAuth @@ -166,7 +166,7 @@ Implemented types: [ProfileInfoApi](./ProfileInfoApi.md), [BackstageIdentityApi](./BackstageIdentityApi.md), [SessionApi](./SessionApi.md) ApiRef: -[samlAuthApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L317) +[samlAuthApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L317) ### storage @@ -175,4 +175,4 @@ Provides the ability to store data which is unique to the user Implemented type: [StorageApi](./StorageApi.md) ApiRef: -[storageApiRef](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L68) +[storageApiRef](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L68) diff --git a/docs/reference/utility-apis/SessionApi.md b/docs/reference/utility-apis/SessionApi.md index f2e9097143..7d271558d6 100644 --- a/docs/reference/utility-apis/SessionApi.md +++ b/docs/reference/utility-apis/SessionApi.md @@ -1,7 +1,7 @@ # SessionApi The SessionApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:190](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L190). +[packages/core-api/src/apis/definitions/auth.ts:190](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L190). The following Utility APIs implement this type: @@ -77,7 +77,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [sessionState\$](#sessionstate). @@ -96,7 +96,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -112,7 +112,7 @@ export enum SessionState { Defined at -[packages/core-api/src/apis/definitions/auth.ts:182](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L182). +[packages/core-api/src/apis/definitions/auth.ts:182](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/auth.ts#L182). Referenced by: [sessionState\$](#sessionstate). @@ -135,6 +135,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/SessionStateApi.md b/docs/reference/utility-apis/SessionStateApi.md index 81f25aa349..a8a4c3bc3d 100644 --- a/docs/reference/utility-apis/SessionStateApi.md +++ b/docs/reference/utility-apis/SessionStateApi.md @@ -1,7 +1,7 @@ # SessionStateApi The SessionStateApi type is defined at -[packages/core-api/src/apis/definitions/auth.ts:201](https://github.com/spotify/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/apis/definitions/auth.ts#L201). +[packages/core-api/src/apis/definitions/auth.ts:201](https://github.com/backstage/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/apis/definitions/auth.ts#L201). The following Utility APIs implement this type: @@ -56,7 +56,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L53). Referenced by: [sessionState\$](#sessionstate). @@ -75,7 +75,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -91,7 +91,7 @@ export enum SessionState { Defined at -[packages/core-api/src/apis/definitions/auth.ts:192](https://github.com/spotify/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/apis/definitions/auth.ts#L192). +[packages/core-api/src/apis/definitions/auth.ts:192](https://github.com/backstage/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/apis/definitions/auth.ts#L192). Referenced by: [sessionState\$](#sessionstate). @@ -114,6 +114,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/82d329555c16af46db9b4e5cd2f44a3cc006a52e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/reference/utility-apis/StorageApi.md b/docs/reference/utility-apis/StorageApi.md index 9fe10e358b..6c5595d3d8 100644 --- a/docs/reference/utility-apis/StorageApi.md +++ b/docs/reference/utility-apis/StorageApi.md @@ -1,7 +1,7 @@ # StorageApi The StorageApi type is defined at -[packages/core-api/src/apis/definitions/StorageApi.ts:31](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L31). +[packages/core-api/src/apis/definitions/StorageApi.ts:31](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L31). The following Utility API implements this type: [storageApiRef](./README.md#storage) @@ -79,7 +79,7 @@ export type Observable<T> = { Defined at -[packages/core-api/src/types.ts:53](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). +[packages/core-api/src/types.ts:53](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L53). Referenced by: [observe\$](#observe), [StorageApi](#storageapi). @@ -98,7 +98,7 @@ export type Observer<T> = { Defined at -[packages/core-api/src/types.ts:24](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). +[packages/core-api/src/types.ts:24](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L24). Referenced by: [Observable](#observable). @@ -144,7 +144,7 @@ export interface StorageApi { Defined at -[packages/core-api/src/apis/definitions/StorageApi.ts:31](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L31). +[packages/core-api/src/apis/definitions/StorageApi.ts:31](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L31). Referenced by: [forBucket](#forbucket). @@ -158,7 +158,7 @@ export type StorageValueChange<T = any> = { Defined at -[packages/core-api/src/apis/definitions/StorageApi.ts:21](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L21). +[packages/core-api/src/apis/definitions/StorageApi.ts:21](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/apis/definitions/StorageApi.ts#L21). Referenced by: [observe\$](#observe), [StorageApi](#storageapi). @@ -181,6 +181,6 @@ export type Subscription = { Defined at -[packages/core-api/src/types.ts:33](https://github.com/spotify/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). +[packages/core-api/src/types.ts:33](https://github.com/backstage/backstage/blob/ca535f2f66c3a4980c80f4b1a049dfd07569010e/packages/core-api/src/types.ts#L33). Referenced by: [Observable](#observable). diff --git a/docs/support/project-structure.md b/docs/support/project-structure.md index 9720c4db3e..9bf143e0f2 100644 --- a/docs/support/project-structure.md +++ b/docs/support/project-structure.md @@ -15,48 +15,48 @@ In the project root, there are a set of files and folders which are not part of the project as such, and may or may not be familiar to someone looking through the code. -- [`.changeset/`](https://github.com/spotify/backstage/tree/master/.changeset) - +- [`.changeset/`](https://github.com/backstage/backstage/tree/master/.changeset) - This folder contains files outlining which changes occurred in the project since the last release. These files are added manually, but managed by [changesets](https://github.com/atlassian/changesets) and will be removed at every new release. They are essentially building-blocks of a CHANGELOG. -- [`.github/`](https://github.com/spotify/backstage/tree/master/.github) - +- [`.github/`](https://github.com/backstage/backstage/tree/master/.github) - Standard GitHub folder. It contains - amongst other things - our workflow definitions and templates. Worth noting is the - [styles](https://github.com/spotify/backstage/tree/master/.github/styles) + [styles](https://github.com/backstage/backstage/tree/master/.github/styles) folder which is used for a markdown spellchecker. -- [`.yarn/`](https://github.com/spotify/backstage/tree/master/.yarn) - Backstage - ships with it's own `yarn` implementation. This allows us to have better - control over our `yarn.lock` file and hopefully avoid problems due to yarn - versioning differences. +- [`.yarn/`](https://github.com/backstage/backstage/tree/master/.yarn) - + Backstage ships with it's own `yarn` implementation. This allows us to have + better control over our `yarn.lock` file and hopefully avoid problems due to + yarn versioning differences. -- [`docker/`](https://github.com/spotify/backstage/tree/master/docker) - Files +- [`docker/`](https://github.com/backstage/backstage/tree/master/docker) - Files related to our root Dockerfile. We are planning to refactor this, so expect this folder to be moved in the future. -- [`contrib/`](https://github.com/spotify/backstage/tree/master/contrib) - +- [`contrib/`](https://github.com/backstage/backstage/tree/master/contrib) - Collection of examples or resources provided by the community. We really appreciate contributions in here and encourage them being kept up to date. -- [`docs/`](https://github.com/spotify/backstage/tree/master/docs) - This is +- [`docs/`](https://github.com/backstage/backstage/tree/master/docs) - This is where we keep all of our documentation Markdown files. These ends up on http://backstage.io/docs. Just keep in mind that changes to the - [`sidebars.json`](https://github.com/spotify/backstage/blob/master/microsite/sidebars.json) + [`sidebars.json`](https://github.com/backstage/backstage/blob/master/microsite/sidebars.json) file may be needed as sections are added/removed. -- [`.editorconfig`](https://github.com/spotify/backstage/tree/master/.editorconfig) - +- [`.editorconfig`](https://github.com/backstage/backstage/tree/master/.editorconfig) - A configuration file used by most common code editors. -- [`.imgbotconfig`](https://github.com/spotify/backstage/tree/master/.imgbotconfig) - +- [`.imgbotconfig`](https://github.com/backstage/backstage/tree/master/.imgbotconfig) - Configuration for a [bot](https://imgbot.net/) ## Monorepo packages Every folder in both `packages/` and `plugins/` is within our monorepo setup, as defined in -[`package.json`](https://github.com/spotify/backstage/blob/master/package.json): +[`package.json`](https://github.com/backstage/backstage/blob/master/package.json): ```json "workspaces": { @@ -74,30 +74,30 @@ Let's look at them individually. These are all the packages that we use within the project. [Plugins](#plugins) are separated out into their own folder, see further down. -- [`app/`](https://github.com/spotify/backstage/tree/master/packages/app) - This - is our take on how an App could look like, bringing together a set of packages - and plugins into a working Backstage App. This is not a published package, and - the main goals are to provide a demo of what an App could look like and to - enable local development. +- [`app/`](https://github.com/backstage/backstage/tree/master/packages/app) - + This is our take on how an App could look like, bringing together a set of + packages and plugins into a working Backstage App. This is not a published + package, and the main goals are to provide a demo of what an App could look + like and to enable local development. -- [`backend/`](https://github.com/spotify/backstage/tree/master/packages/backend) - +- [`backend/`](https://github.com/backstage/backstage/tree/master/packages/backend) - Every standalone Backstage project will have both an `app` _and_ a `backend` package. The `backend` uses plugins to construct a working backend that the frontend (`app`) can use. -- [`backend-common/`](https://github.com/spotify/backstage/tree/master/packages/backend-common) - +- [`backend-common/`](https://github.com/backstage/backstage/tree/master/packages/backend-common) - There are no "core" packages in the backend. Instead we have `backend-common` which contains helper middleware and other utils. -- [`catalog-model/`](https://github.com/spotify/backstage/tree/master/packages/catalog-model) - +- [`catalog-model/`](https://github.com/backstage/backstage/tree/master/packages/catalog-model) - You can consider this to be a library for working with the catalog of sorts. It contains the definition of an [Entity](https://backstage.io/docs/features/software-catalog/references#docsNav), as well as validation and other logic related to it. This package can be used in both the frontend and the backend. -- [`cli/`](https://github.com/spotify/backstage/tree/master/packages/cli) - One - of the biggest packages in our project, the `cli` is used to build, serve, +- [`cli/`](https://github.com/backstage/backstage/tree/master/packages/cli) - + One of the biggest packages in our project, the `cli` is used to build, serve, diff, create-plugins and more. In the early days of this project, we started out with calling tools directly - such as `eslint` - through `package.json`. But as it was tricky to have a good development experience around that when we @@ -105,86 +105,87 @@ are separated out into their own folder, see further down. everything looks the same in `package.json`. Much like [react-scripts](https://github.com/facebook/create-react-app/tree/master/packages/react-scripts). -- [`cli-common/`](https://github.com/spotify/backstage/tree/master/packages/cli-common) - +- [`cli-common/`](https://github.com/backstage/backstage/tree/master/packages/cli-common) - This package mainly handles path resolving. It is a separate package to reduce - bugs in [cli](https://github.com/spotify/backstage/tree/master/packages/cli). - We also want as few dependencies as possible to reduce download time when - running the cli which is another reason this is a separate package. + bugs in + [cli](https://github.com/backstage/backstage/tree/master/packages/cli). We + also want as few dependencies as possible to reduce download time when running + the cli which is another reason this is a separate package. -- [`config/`](https://github.com/spotify/backstage/tree/master/packages/config) - +- [`config/`](https://github.com/backstage/backstage/tree/master/packages/config) - The way we read configuration data. This package can take a bunch of config objects and merge them together. - [app-config.yaml](https://github.com/spotify/backstage/blob/master/app-config.yaml) + [app-config.yaml](https://github.com/backstage/backstage/blob/master/app-config.yaml) is an example of an config object. -- [`config-loader/`](https://github.com/spotify/backstage/tree/master/packages/config-loader) - +- [`config-loader/`](https://github.com/backstage/backstage/tree/master/packages/config-loader) - This package is used to read config objects. It does not know how to merge, but only reads files and passes them on to the config. As this part is only used by the backend, we chose to separate `config` and `config-loader` into two different packages. -- [`core/`](https://github.com/spotify/backstage/tree/master/packages/core) - +- [`core/`](https://github.com/backstage/backstage/tree/master/packages/core) - This package contains our visual React components, some of which you can find in [plugin examples](https://backstage.io/storybook/?path=/story/plugins-examples--plugin-with-data). Apart from that it re-exports everything from [`core-api`] so that users only need to rely on one package. -- [`core-api/`](https://github.com/spotify/backstage/tree/master/packages/core-api) - +- [`core-api/`](https://github.com/backstage/backstage/tree/master/packages/core-api) - This package contains APIs and definitions of such. It is it's own package because we needed to split our `test-utils` package. It's an implementation detail that we try to hide from our users, and no one should have to depend on it directly. -- [`test-utils/`](https://github.com/spotify/backstage/tree/master/packages/test-utils) - +- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) - This package contains specific testing facilities used when testing `core-api`. -- [`test-utils-core/`](https://github.com/spotify/backstage/tree/master/packages/test-utils-core) - +- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) - This package contains more general purpose testing facilities for testing a Backstage App. -- [`create-app/`](https://github.com/spotify/backstage/tree/master/packages/create-app) - +- [`create-app/`](https://github.com/backstage/backstage/tree/master/packages/create-app) - An CLI to specifically scaffold a new Backstage App. It does so by using a - [template](https://github.com/spotify/backstage/tree/master/packages/create-app/templates/default-app). + [template](https://github.com/backstage/backstage/tree/master/packages/create-app/templates/default-app). -- [`dev-utils/`](https://github.com/spotify/backstage/tree/master/packages/dev-utils) - +- [`dev-utils/`](https://github.com/backstage/backstage/tree/master/packages/dev-utils) - Helps you setup a plugin for isolated development so that it can be served separately. -- [`docgen/`](https://github.com/spotify/backstage/tree/master/packages/docgen) - +- [`docgen/`](https://github.com/backstage/backstage/tree/master/packages/docgen) - Uses the [Typescript Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API) to read out definitions and generate documentation for it. -- [`e2e-test/`](https://github.com/spotify/backstage/tree/master/packages/e2e-test) - +- [`e2e-test/`](https://github.com/backstage/backstage/tree/master/packages/e2e-test) - Another CLI that can be run to try out what would happen if you built all the packages, publish them, created a new app, and the run it. CI uses this for e2e-tests. -- [`storybook/`](https://github.com/spotify/backstage/tree/master/packages/storybook) - +- [`storybook/`](https://github.com/backstage/backstage/tree/master/packages/storybook) - This folder contains only the storybook config. Stories are within the core package. The Backstage Storybook is found [here](https://backstage.io/storybook) -- [`techdocs-cli/`](https://github.com/spotify/backstage/tree/master/packages/techdocs-cli) - +- [`techdocs-cli/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) - Used for verifying TechDocs locally. -- [`techdocs-container/`](https://github.com/spotify/backstage/tree/master/packages/techdocs-container) - +- [`techdocs-container/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-container) - Used by the `techdocs-cli` -- [`test-utils-core/`](https://github.com/spotify/backstage/tree/master/packages/test-utils-core) +- [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) -- [`test-utils/`](https://github.com/spotify/backstage/tree/master/packages/test-utils) +- [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) -- [`theme/`](https://github.com/spotify/backstage/tree/master/packages/theme) - +- [`theme/`](https://github.com/backstage/backstage/tree/master/packages/theme) - Holds the Backstage Theme. ### `plugins/` Most of the functionality of a Backstage App comes from plugins. Even core features can be plugins, take the -[catalog](https://github.com/spotify/backstage/tree/master/plugins/catalog) as +[catalog](https://github.com/backstage/backstage/tree/master/plugins/catalog) as an example. We can categorize plugins into three different types; **Frontend**, **Backend** @@ -196,18 +197,18 @@ reason is for clear separation of concerns. Take a look at our [Plugin Gallery](https://backstage.io/plugins) or browse through the -[`plugins/`](https://github.com/spotify/backstage/tree/master/plugins) folder. +[`plugins/`](https://github.com/backstage/backstage/tree/master/plugins) folder. ## Packages outside of the monorepo For convenience we include packages in our project that are not part of our monorepo setup. -- [`microsite/`](https://github.com/spotify/backstage/blob/master/microsite) - +- [`microsite/`](https://github.com/backstage/backstage/blob/master/microsite) - This folder contains the source code for backstage.io. It is built with [Docusaurus](https://docusaurus.io/). This folder is not part of the monorepo due to dependency reasons. Look at the - [README](https://github.com/spotify/backstage/blob/master/microsite/README.md) + [README](https://github.com/backstage/backstage/blob/master/microsite/README.md) for instructions on how to run it locally. ## Root files specifically used by the `app` @@ -216,22 +217,22 @@ These files are kept in the root of the project mostly by historical reasons. Some of these files may be subject to be moved out of the root sometime in the future. -- [`.npmrc`](https://github.com/spotify/backstage/tree/master/.npmrc) - It's +- [`.npmrc`](https://github.com/backstage/backstage/tree/master/.npmrc) - It's common for companies to have their own npm registry, this files makes sure that this folder use the public registry. -- [`.vale.ini`](https://github.com/spotify/backstage/tree/master/.vale.ini) - +- [`.vale.ini`](https://github.com/backstage/backstage/tree/master/.vale.ini) - [Spell checker](https://github.com/errata-ai/vale) for Markdown files. -- [`.yarnrc`](https://github.com/spotify/backstage/tree/master/.yarnrc) - +- [`.yarnrc`](https://github.com/backstage/backstage/tree/master/.yarnrc) - Enforces "our" version of Yarn. -- [`app-config.yaml`](https://github.com/spotify/backstage/tree/master/app-config.yaml) - +- [`app-config.yaml`](https://github.com/backstage/backstage/tree/master/app-config.yaml) - Configuration for the app, both frontend and backend. -- [`catalog-info.yaml`](https://github.com/spotify/backstage/tree/master/catalog-info.yaml) - +- [`catalog-info.yaml`](https://github.com/backstage/backstage/tree/master/catalog-info.yaml) - Description of Backstage in the Backstage Entity format. -- [`lerna.json`](https://github.com/spotify/backstage/tree/master/lerna.json) - +- [`lerna.json`](https://github.com/backstage/backstage/tree/master/lerna.json) - [Lerna](https://github.com/lerna/lerna) monorepo config. We are using `yarn workspaces`, so this will only be used for executing scripts. diff --git a/docs/support/support.md b/docs/support/support.md index 12bc7cfaf9..797aca041f 100644 --- a/docs/support/support.md +++ b/docs/support/support.md @@ -6,9 +6,9 @@ description: Support and Community Details and Links - [Discord chatroom](https://discord.gg/MUpMjP2) - Get support or discuss the project -- [Good First Issues](https://github.com/spotify/backstage/contribute) - Start +- [Good First Issues](https://github.com/backstage/backstage/contribute) - Start here if you want to contribute -- [RFCs](https://github.com/spotify/backstage/labels/rfc) - Help shape the +- [RFCs](https://github.com/backstage/backstage/labels/rfc) - Help shape the technical direction - [FAQ](../FAQ.md) - Frequently Asked Questions - [Code of Conduct](../../CODE_OF_CONDUCT.md) - This is how we roll diff --git a/docs/tutorials/quickstart-app-plugin.md b/docs/tutorials/quickstart-app-plugin.md index daf76aa1cd..216ff9659f 100644 --- a/docs/tutorials/quickstart-app-plugin.md +++ b/docs/tutorials/quickstart-app-plugin.md @@ -120,10 +120,10 @@ If everything is saved, you should see your name, id, and email on the github-playground page. Our data accessed is synchronous. So we just grab and go. -https://github.com/spotify/backstage/tree/master/contrib +https://github.com/backstage/backstage/tree/master/contrib 6. Here is the entire file for reference - [ExampleComponent.tsx](https://github.com/spotify/backstage/tree/master/contrib/docs/tutorials/quickstart-app-plugin/ExampleComponent.md) + [ExampleComponent.tsx](https://github.com/backstage/backstage/tree/master/contrib/docs/tutorials/quickstart-app-plugin/ExampleComponent.md) # The Wipe @@ -302,7 +302,7 @@ return ( 8. After saving that, and given we don't have any errors, you should see a table with basic information on your repositories. 9. Here is the entire file for reference - [ExampleFetchComponent.tsx](https://github.com/spotify/backstage/tree/master/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md) + [ExampleFetchComponent.tsx](https://github.com/backstage/backstage/tree/master/contrib/docs/tutorials/quickstart-app-plugin/ExampleFetchComponent.md) 10. We finished! You should see your own GitHub repository's information displayed in a basic table. If you run into issues, you can compare the repo that backs this document, diff --git a/microsite/blog/2020-03-18-what-is-backstage.md b/microsite/blog/2020-03-18-what-is-backstage.md index 8b0a0fcbe6..0a0ff9e0b1 100644 --- a/microsite/blog/2020-03-18-what-is-backstage.md +++ b/microsite/blog/2020-03-18-what-is-backstage.md @@ -81,8 +81,8 @@ Similar to how Backstage ties together all of Spotify’s infrastructure, our am ## What’s next? -We are envisioning [three phases](https://github.com/spotify/backstage/milestones) of the project (so far), and we have already begun work on various aspects of these phases. The best way to track the work and see where you can jump in and help out is: +We are envisioning [three phases](https://github.com/backstage/backstage/milestones) of the project (so far), and we have already begun work on various aspects of these phases. The best way to track the work and see where you can jump in and help out is: -https://github.com/spotify/backstage/milestones +https://github.com/backstage/backstage/milestones Want to discuss the project or need support? Join us on [Discord](https://discord.gg/MUpMjP2) or reach out on [alund@spotify.com](mailto:alund@spotify.com). diff --git a/microsite/blog/2020-04-06-lighthouse-plugin.md b/microsite/blog/2020-04-06-lighthouse-plugin.md index 2d5c7b96b7..b8fd68e783 100644 --- a/microsite/blog/2020-04-06-lighthouse-plugin.md +++ b/microsite/blog/2020-04-06-lighthouse-plugin.md @@ -33,7 +33,7 @@ Trigger an audit directly from Backstage, or trigger audits programmatically wit ## Using Lighthouse in Backstage -To learn how you can enable Lighthouse auditing within Backstage, head over to the [README](https://github.com/spotify/backstage/tree/master/plugins/lighthouse) for the plugin to get started. +To learn how you can enable Lighthouse auditing within Backstage, head over to the [README](https://github.com/backstage/backstage/tree/master/plugins/lighthouse) for the plugin to get started. ## A personal note diff --git a/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.md b/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.md index dff567eaf3..85f40dd9ea 100644 --- a/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.md +++ b/microsite/blog/2020-04-30-how-to-quickly-set-up-backstage.md @@ -132,4 +132,4 @@ If you are developing a plugin that might be useful for others, consider releasi ## Ready to get started? -Head over to GitHub and check out the [project](https://github.com/spotify/backstage) or download our [CLI](https://www.npmjs.com/package/@backstage/cli). If you have more questions, join us on [Discord](https://discord.gg/MUpMjP2) or [create an issue](https://github.com/spotify/backstage/issues/new/choose). +Head over to GitHub and check out the [project](https://github.com/backstage/backstage) or download our [CLI](https://www.npmjs.com/package/@backstage/cli). If you have more questions, join us on [Discord](https://discord.gg/MUpMjP2) or [create an issue](https://github.com/backstage/backstage/issues/new/choose). diff --git a/microsite/blog/2020-05-14-tech-radar-plugin.md b/microsite/blog/2020-05-14-tech-radar-plugin.md index d78d5d67fa..80c1eb8b5a 100644 --- a/microsite/blog/2020-05-14-tech-radar-plugin.md +++ b/microsite/blog/2020-05-14-tech-radar-plugin.md @@ -34,11 +34,11 @@ To learn about how you can bring the Tech Radar to your Backstage installation, I want to thank both the Backstage team and Spotify. Firstly, I’ve been working with our internal version of Backstage for over a year, and the developer experience since open sourcing has been even more of a joy to work with. Secondly, the 10% hack time that Spotify generously provides to all engineers enabled me to open source the Tech Radar plugin. -Since open sourcing it, the community has shown great interest in yet another powerful use case of Backstage. There was also an enthusiastic open source contributor who volunteered to migrate the plugin to TypeScript and React Hooks [in just 29 minutes](https://github.com/spotify/backstage/issues/661) of opening the issue! +Since open sourcing it, the community has shown great interest in yet another powerful use case of Backstage. There was also an enthusiastic open source contributor who volunteered to migrate the plugin to TypeScript and React Hooks [in just 29 minutes](https://github.com/backstage/backstage/issues/661) of opening the issue! I can’t wait to see how others benefit from the Tech Radar in their organizations! [lighthouse website audits]: https://backstage.io/blog/2020/04/06/lighthouse-plugin -[tech radar plugin]: https://github.com/spotify/backstage/tree/master/plugins/tech-radar +[tech radar plugin]: https://github.com/backstage/backstage/tree/master/plugins/tech-radar [thoughtworks]: https://www.thoughtworks.com/radar [zalando]: https://opensource.zalando.com/tech-radar/ diff --git a/microsite/blog/2020-05-22-phase-2-service-catalog.md b/microsite/blog/2020-05-22-phase-2-service-catalog.md index 5c988c03aa..103750dcc6 100644 --- a/microsite/blog/2020-05-22-phase-2-service-catalog.md +++ b/microsite/blog/2020-05-22-phase-2-service-catalog.md @@ -7,7 +7,7 @@ authorImageURL: https://pbs.twimg.com/profile_images/121166861/6919c047c0d0edaac **TL;DR** Thanks to the help from the Backstage community, we’ve made excellent progress and are now moving into Phase 2 of Backstage — building out a Service Catalog and the surrounding systems that will help unify the tools you use to manage your software. -We released the open source version of Backstage a little less than two months ago, and have been thrilled to see so many people jumping in and contributing to the project in its early stages. We’re excited to see what the community can build together as we progress through [each phase of Backstage](https://github.com/spotify/backstage#project-roadmap). +We released the open source version of Backstage a little less than two months ago, and have been thrilled to see so many people jumping in and contributing to the project in its early stages. We’re excited to see what the community can build together as we progress through [each phase of Backstage](https://github.com/backstage/backstage#project-roadmap). ![img](assets/20-05-20/Service_Catalog_MVP.png) @@ -15,7 +15,7 @@ We released the open source version of Backstage a little less than two months a ## Progress so far -Phase 1 was all about building an extensible frontend platform, enabling teams to start creating a single, consistent UI layer for your internal infrastructure and tools in the form of [plugins](https://github.com/spotify/backstage/labels/plugin). In fact, thanks to our amazing (30+) [contributors](https://github.com/spotify/backstage/graphs/contributors), we were able to complete most of Phase 1 earlier than expected. 🎉 +Phase 1 was all about building an extensible frontend platform, enabling teams to start creating a single, consistent UI layer for your internal infrastructure and tools in the form of [plugins](https://github.com/backstage/backstage/labels/plugin). In fact, thanks to our amazing (30+) [contributors](https://github.com/backstage/backstage/graphs/contributors), we were able to complete most of Phase 1 earlier than expected. 🎉 Today, we are happy to announce that we are shifting our focus to Phase 2! @@ -27,7 +27,7 @@ Quote from [Platform Nuts & Bolts: Extendable Data Models](https://www.kislayver Entities, or what we refer to as “components” in Backstage, represent all software, including services, websites, libraries, data pipelines, and so forth. The focus of Phase 2 will be on adding an entity model in Backstage that makes it easy for engineers to create and manage the software components they own. -With the ability to create a plethora of components in Backstage, how does one keep track of all the software in the ecosystem? Therein lies the highlight feature of Phase 2: the [Service Catalog](https://github.com/spotify/backstage/milestone/4). The service catalog — or software catalog — is a centralized system that keeps track of ownership and metadata about all software in your ecosystem. The catalog is built around the concept of [metadata yaml files](/docs/architecture-decisions/adrs-adr002) stored together with the code, which are then harvested and visualized in Backstage. +With the ability to create a plethora of components in Backstage, how does one keep track of all the software in the ecosystem? Therein lies the highlight feature of Phase 2: the [Service Catalog](https://github.com/backstage/backstage/milestone/4). The service catalog — or software catalog — is a centralized system that keeps track of ownership and metadata about all software in your ecosystem. The catalog is built around the concept of [metadata yaml files](/docs/architecture-decisions/adrs-adr002) stored together with the code, which are then harvested and visualized in Backstage. ![img](assets/20-05-20/Service_Catalog_MVP.png) @@ -39,13 +39,13 @@ On top of that, we have found that the service catalog is a great way to organis ![img](assets/20-05-20/tabs.png) -More concretely, having this structure in place will allow plugins such as [CircleCI](https://github.com/spotify/backstage/tree/master/plugins/circleci) to show only the builds for the specific service you are viewing, or a [Spinnaker](https://github.com/spotify/backstage/issues/631) plugin to show running deployments, or an Open API plugin to [show documentation](https://github.com/spotify/backstage/issues/627) for endpoints exposed by the service, or the [Lighthouse](https://github.com/spotify/backstage/tree/master/plugins/lighthouse) plugin to show audit reports for your website. You get the point. +More concretely, having this structure in place will allow plugins such as [CircleCI](https://github.com/backstage/backstage/tree/master/plugins/circleci) to show only the builds for the specific service you are viewing, or a [Spinnaker](https://github.com/backstage/backstage/issues/631) plugin to show running deployments, or an Open API plugin to [show documentation](https://github.com/backstage/backstage/issues/627) for endpoints exposed by the service, or the [Lighthouse](https://github.com/backstage/backstage/tree/master/plugins/lighthouse) plugin to show audit reports for your website. You get the point. ## Timeline Our estimated timeline has us delivering these pieces in increments leading up to June 22. But with the support of the community we wouldn’t be surprised if things land earlier than that. 🙏 -If you are interested in joining us, check out our [Milestones](https://github.com/spotify/backstage/milestones) and connected Issues. +If you are interested in joining us, check out our [Milestones](https://github.com/backstage/backstage/milestones) and connected Issues. ## Long-term vision diff --git a/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md b/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md index 167cc753f8..eeed43b713 100644 --- a/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md +++ b/microsite/blog/2020-06-22-backstage-service-catalog-alpha.md @@ -40,7 +40,7 @@ You’ll be able to see many of these virtues in action with this alpha release Alpha is our shorthand for "we don’t yet think Backstage is ready for production, but we’d love for you to test it and provide us with feedback". However, you should be able to try out the functionality of the service catalog: -1. Register software components ([examples](https://github.com/spotify/backstage/tree/master/packages/catalog-model/examples)) +1. Register software components ([examples](https://github.com/backstage/backstage/tree/master/packages/catalog-model/examples)) 2. See all components represented in the catalog 3. Search across all components 4. Get an overview of the metadata of the components @@ -49,6 +49,6 @@ Alpha is our shorthand for "we don’t yet think Backstage is ready for producti As with most alpha releases, you should expect things to change quite a lot until we reach the beta stage (we’re targeting the end of summer). There are obviously many things missing as well, but we wanted to start collecting feedback early and make it easier to see the end-to-end flow. -If you have feedback or questions, please open a [GitHub issue](https://github.com/spotify/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send me an email at [alund@spotify.com](mailto:alund@spotify.com) 🙏 +If you have feedback or questions, please open a [GitHub issue](https://github.com/backstage/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send me an email at [alund@spotify.com](mailto:alund@spotify.com) 🙏 To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://mailchi.mp/spotify/backstage-community). diff --git a/microsite/blog/2020-07-01-how-to-enable-authentication-in-backstage-using-passport.md b/microsite/blog/2020-07-01-how-to-enable-authentication-in-backstage-using-passport.md index b2a944bf26..9d41a21d05 100644 --- a/microsite/blog/2020-07-01-how-to-enable-authentication-in-backstage-using-passport.md +++ b/microsite/blog/2020-07-01-how-to-enable-authentication-in-backstage-using-passport.md @@ -21,7 +21,7 @@ Passport has allowed us to leverage an existing open-source authentication frame ![auth-landing-page](assets/20-07-01/auth-sidebar.png) -First, check out the provided Google and GitHub implementations! [Spin up a local copy of Backstage](https://backstage.io/blog/2020/04/30/how-to-quickly-set-up-backstage) along with our example-backend. You can find more documentation on setting up the example backend [here](https://github.com/spotify/backstage/tree/master/packages/backend), but be sure to include the relevant client IDs and secrets when running `yarn start`: +First, check out the provided Google and GitHub implementations! [Spin up a local copy of Backstage](https://backstage.io/blog/2020/04/30/how-to-quickly-set-up-backstage) along with our example-backend. You can find more documentation on setting up the example backend [here](https://github.com/backstage/backstage/tree/master/packages/backend), but be sure to include the relevant client IDs and secrets when running `yarn start`: ``` AUTH_GOOGLE_CLIENT_ID=x AUTH_GOOGLE_CLIENT_SECRET=x AUTH_GITHUB_CLIENT_ID=x AUTH_GITHUB_CLIENT_SECRET=x SENTRY_TOKEN=x LOG_LEVEL=debug yarn start @@ -43,4 +43,4 @@ For full details, take a look at our [“Adding authentication providers” docu ## Interested in contributing to the next steps for authentication? -We’ve already seen both GitLab and Okta contributions from the community — and we’re thinking about a few more providers we’d like to add to Backstage, too. You can find those, and other authentication-related issues, in our repository by filtering with the [auth label](https://github.com/spotify/backstage/issues?q=is%3Aissue+is%3Aopen+label%3Aauth). +We’ve already seen both GitLab and Okta contributions from the community — and we’re thinking about a few more providers we’d like to add to Backstage, too. You can find those, and other authentication-related issues, in our repository by filtering with the [auth label](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+label%3Aauth). diff --git a/microsite/blog/2020-08-05-announcing-backstage-software-templates.md b/microsite/blog/2020-08-05-announcing-backstage-software-templates.md index 81d495e1c3..c216d7e398 100644 --- a/microsite/blog/2020-08-05-announcing-backstage-software-templates.md +++ b/microsite/blog/2020-08-05-announcing-backstage-software-templates.md @@ -73,6 +73,6 @@ Backstage ships with four example templates, but since these are likely not the We have learned that one of the keys to getting these standards adopted is to keep an open process. Templates are code. By making it clear to your engineers that you are open to pull requests, and that teams with different needs can add their own templates, you are on the path of striking a good balance between autonomy and standardization. -If you have feedback or questions, please open a [GitHub issue](https://github.com/spotify/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send me an email at [alund@spotify.com](mailto:alund@spotify.com) 🙏 +If you have feedback or questions, please open a [GitHub issue](https://github.com/backstage/backstage/issues), ping us on [Discord chat](https://discord.gg/EBHEGzX) or send me an email at [alund@spotify.com](mailto:alund@spotify.com) 🙏 To get regular product updates and news about the Backstage community, sign up for the [Backstage newsletter](https://mailchi.mp/spotify/backstage-community). diff --git a/microsite/blog/2020-09-08-announcing-tech-docs.md b/microsite/blog/2020-09-08-announcing-tech-docs.md index 48b6eeb7cc..ecf678a5bd 100644 --- a/microsite/blog/2020-09-08-announcing-tech-docs.md +++ b/microsite/blog/2020-09-08-announcing-tech-docs.md @@ -21,11 +21,11 @@ But this is just one way to do it. Today we’re most excited for what the open ## Okay, let’s start collaborating -If you go to [GitHub](https://github.com/spotify/backstage/tree/master/plugins) now, you’ll find everything you need to start collaborating with us to build out the docs-like-code Backstage plugin — we’ll call it TechDocs in the open as well. +If you go to [GitHub](https://github.com/backstage/backstage/tree/master/plugins) now, you’ll find everything you need to start collaborating with us to build out the docs-like-code Backstage plugin — we’ll call it TechDocs in the open as well. -You’ll find the code in [techdocs](https://github.com/spotify/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/spotify/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/spotify/backstage/tree/master/packages/techdocs-cli) and [techdocs-container](https://github.com/spotify/backstage/tree/master/packages/techdocs-container).) +You’ll find the code in [techdocs](https://github.com/backstage/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) and [techdocs-container](https://github.com/backstage/backstage/tree/master/packages/techdocs-container).) -You’ll find issues to work on in the [issues queue](https://github.com/spotify/backstage/issues?q=is%3Aissue+is%3Aopen+label%3A%22docs-like-code%22+label%3A%22help+wanted%22), typically starting with TechDocs: and labeled with docs-like-code, some labeled good first issue. Feel free to add your own issues, of course. +You’ll find issues to work on in the [issues queue](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+label%3A%22docs-like-code%22+label%3A%22help+wanted%22), typically starting with TechDocs: and labeled with docs-like-code, some labeled good first issue. Feel free to add your own issues, of course. ![available-templates](assets/announcing-techdocs/github-issues.png) diff --git a/microsite/blog/2020-09-23-backstage-cncf-sandbox.md b/microsite/blog/2020-09-23-backstage-cncf-sandbox.md index bcfd7c6245..fbf47a39c3 100644 --- a/microsite/blog/2020-09-23-backstage-cncf-sandbox.md +++ b/microsite/blog/2020-09-23-backstage-cncf-sandbox.md @@ -14,7 +14,7 @@ Backstage garnered quite a bit of interest from developers and organizations whe Backstage’s ability to simplify tooling and standardize engineering practices has attracted interest from other major tech companies, as well as airlines, auto manufacturers, investment firms, and global retailers. We know that Backstage solves a problem — infrastructure complexity — that’s common to a lot of large and growing companies today. But different companies work differently, use particular toolsets, and have unique use cases. By making Backstage open source, we can build it with people working inside a variety of engineering organizations all over the world. It makes for a better product that serves a wider group of users (beyond that of Spotify’s) and their needs. -The Backstage community is healthy and growing quickly. Over [130 people](https://github.com/spotify/backstage/graphs/contributors) have contributed to the project, and roughly 40% of pull requests are now coming from external, non-Spotify, contributors. With companies now deciding to [adopt Backstage](https://github.com/spotify/backstage/blob/master/ADOPTERS.md) we are also seeing a shift in the kinds of contributions we are getting from the community. It is truly amazing to see contributions to core parts of the platform as well as significant functionality additions through working [plugins](https://backstage.io/plugins). +The Backstage community is healthy and growing quickly. Over [130 people](https://github.com/backstage/backstage/graphs/contributors) have contributed to the project, and roughly 40% of pull requests are now coming from external, non-Spotify, contributors. With companies now deciding to [adopt Backstage](https://github.com/backstage/backstage/blob/master/ADOPTERS.md) we are also seeing a shift in the kinds of contributions we are getting from the community. It is truly amazing to see contributions to core parts of the platform as well as significant functionality additions through working [plugins](https://backstage.io/plugins). We’re excited to embark on this journey with the CNCF community. There’s so much great tech being built here, and it’s about time we share it to build even greater products, together. Entering into the CNCF Sandbox is just the first step. We are committed to working with the community to bring Backstage through the Incubation step, and finally all the way to becoming a Graduated, top-level project. diff --git a/microsite/blog/2020-09-30-backstage-design-system.md b/microsite/blog/2020-09-30-backstage-design-system.md index 4faea98782..bb12a26100 100644 --- a/microsite/blog/2020-09-30-backstage-design-system.md +++ b/microsite/blog/2020-09-30-backstage-design-system.md @@ -68,9 +68,9 @@ To keep up with our latest design guidelines, go to [Designing for Backstage](ht ![img](assets/backstage-github-ds.png) -### [GitHub](https://github.com/spotify/backstage) +### [GitHub](https://github.com/backstage/backstage) -Join in on the action [at spotify/backstage on GitHub](https://github.com/spotify/backstage) by submitting issues and opening pull requests for all things related to components and patterns in Backstage. +Join in on the action [at spotify/backstage on GitHub](https://github.com/backstage/backstage) by submitting issues and opening pull requests for all things related to components and patterns in Backstage. ![img](assets/backstage-discord-DS.png) diff --git a/microsite/blog/2020-09-30-plugin-marketplace.md b/microsite/blog/2020-09-30-plugin-marketplace.md index 0b96abbc60..10928112b8 100644 --- a/microsite/blog/2020-09-30-plugin-marketplace.md +++ b/microsite/blog/2020-09-30-plugin-marketplace.md @@ -34,10 +34,10 @@ This grand vision is actually not that far off. Already today there is a growing Not all plugins you need will be open source. Every company has their own homegrown tooling. Building internal plugins lets you tailor your version of Backstage to be a perfect fit for your infrastructure and software development needs. If you end up [building plugins](https://backstage.io/docs/plugins/create-a-plugin) that could be useful for other companies, please consider releasing them as open source and [add them to the Marketplace](https://backstage.io/docs/plugins/add-to-marketplace). -If you start developing a plugin that you aim to release as open source, we suggest that you create a [new plugin Issue](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). This helps the community know what plugins are in development and opens up opportunities for collaboration. You can also use this process if you have an idea for a good plugin, but you need help building it. +If you start developing a plugin that you aim to release as open source, we suggest that you create a [new plugin Issue](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME). This helps the community know what plugins are in development and opens up opportunities for collaboration. You can also use this process if you have an idea for a good plugin, but you need help building it. We are really excited to see all the amazing plugins that have already been built, and look forward to seeing even more ideas and collaboration as the Backstage community continues to grow. -What plugins would you like to see in the Plugin Marketplace? [Tell us](https://github.com/spotify/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME)! +What plugins would you like to see in the Plugin Marketplace? [Tell us](https://github.com/backstage/backstage/issues/new?labels=plugin&template=plugin_template.md&title=%5BPlugin%5D+THE+PLUGIN+NAME)! _Special shout-out to community member [Iain Billett](https://github.com/iain-b) from [Roadie](https://roadie.io) for helping build and contribute the [Plugin Marketplace page](https://backstage.io/plugins) (as his first PR no less!)._ diff --git a/microsite/blog/2020-10-22-cost-insights-plugin.md b/microsite/blog/2020-10-22-cost-insights-plugin.md index 421ebacdd2..15647f8418 100644 --- a/microsite/blog/2020-10-22-cost-insights-plugin.md +++ b/microsite/blog/2020-10-22-cost-insights-plugin.md @@ -4,7 +4,7 @@ author: Janisa Anandamohan authorURL: https://twitter.com/janisa_a --- -How did Spotify save millions on cloud costs within a matter of months?? We made cost optimization just another part of the daily development process. Our newly open sourced [Cost Insights plugin](https://github.com/spotify/backstage/tree/master/plugins/cost-insights) makes a team’s cloud costs visible — and actionable — right inside Backstage. So engineers can see the impact of their cloud usage (down to a product and resource level) and make optimizations wherever and whenever it makes sense. By managing cloud costs from the ground up, you can make smarter decisions that let you continue to build and scale quickly, without wasting resources. +How did Spotify save millions on cloud costs within a matter of months?? We made cost optimization just another part of the daily development process. Our newly open sourced [Cost Insights plugin](https://github.com/backstage/backstage/tree/master/plugins/cost-insights) makes a team’s cloud costs visible — and actionable — right inside Backstage. So engineers can see the impact of their cloud usage (down to a product and resource level) and make optimizations wherever and whenever it makes sense. By managing cloud costs from the ground up, you can make smarter decisions that let you continue to build and scale quickly, without wasting resources. @@ -59,7 +59,7 @@ Engineers can then determine for themselves if the time invested in an optimizat ## Getting started -You can begin working with the Cost Insights plugin today on [GitHub](https://github.com/spotify/backstage/tree/master/plugins/cost-insights). We include an example client with static data in the expected format. The `CostInsightsApi` should talk with a cloud billing backend that aggregates billing data from your cloud provider. +You can begin working with the Cost Insights plugin today on [GitHub](https://github.com/backstage/backstage/tree/master/plugins/cost-insights). We include an example client with static data in the expected format. The `CostInsightsApi` should talk with a cloud billing backend that aggregates billing data from your cloud provider. The current release of Cost Insights includes: @@ -72,8 +72,8 @@ The current release of Cost Insights includes: Our hope is to help other companies translate their cloud cost in a relatable way for their engineers to better understand their impact and accurately identify their opportunities for optimizations. -And if you’re interested in contributing to our outstanding issues, you can find them in the issues queue, filtered under the [‘cost-insights’ label](https://github.com/spotify/backstage/labels/cost-insights). +And if you’re interested in contributing to our outstanding issues, you can find them in the issues queue, filtered under the [‘cost-insights’ label](https://github.com/backstage/backstage/labels/cost-insights). ## Ready for DevSecCostOpsPlus (and whatever’s next) -There’s DevOps, there’s DevSecOps, and then there’s Backstage: one frontend for all your infrastructure. From building, testing, and deploying to monitoring and security — Backstage helps you manage your entire tech organization and provides a seamless developer experience for engineers, from end to end to end. And now that also extends to cost management for your cloud infrastructure and tooling. Happy building and [happy optimizing](https://github.com/spotify/backstage/tree/master/plugins/cost-insights). +There’s DevOps, there’s DevSecOps, and then there’s Backstage: one frontend for all your infrastructure. From building, testing, and deploying to monitoring and security — Backstage helps you manage your entire tech organization and provides a seamless developer experience for engineers, from end to end to end. And now that also extends to cost management for your cloud infrastructure and tooling. Happy building and [happy optimizing](https://github.com/backstage/backstage/tree/master/plugins/cost-insights). diff --git a/microsite/core/Footer.js b/microsite/core/Footer.js index d41b15b74c..e48c86acce 100644 --- a/microsite/core/Footer.js +++ b/microsite/core/Footer.js @@ -41,7 +41,7 @@ class Footer extends React.Component {
Community
Support chatroom - + Contributing diff --git a/microsite/data/plugins/api-docs.yaml b/microsite/data/plugins/api-docs.yaml index babcbf74f1..3343a46693 100644 --- a/microsite/data/plugins/api-docs.yaml +++ b/microsite/data/plugins/api-docs.yaml @@ -4,6 +4,6 @@ author: SDA SE authorUrl: https://sda.se/ category: Discovery description: Components to discover and display API entities as an extension to the catalog plugin. -documentation: https://github.com/spotify/backstage/blob/master/plugins/api-docs/README.md +documentation: https://github.com/backstage/backstage/blob/master/plugins/api-docs/README.md iconUrl: https://thecoders.io/wp-content/uploads/2019/11/tech-swagger.svg npmPackageName: '@backstage/plugin-api-docs' diff --git a/microsite/data/plugins/circleci.yaml b/microsite/data/plugins/circleci.yaml index 5f7b4b08e2..467da9fb1e 100644 --- a/microsite/data/plugins/circleci.yaml +++ b/microsite/data/plugins/circleci.yaml @@ -4,7 +4,7 @@ author: Spotify authorUrl: https://github.com/spotify category: CI description: Automate your development process with CI hosted in the cloud or on a private server. -documentation: https://github.com/spotify/backstage/tree/master/plugins/circleci +documentation: https://github.com/backstage/backstage/tree/master/plugins/circleci iconUrl: https://www.saaves.com/storage/brochure/logo-circleci-icon1583764538.png npmPackageName: '@backstage/plugin-circleci' tags: diff --git a/microsite/data/plugins/cloud-build.yaml b/microsite/data/plugins/cloud-build.yaml index cbd3a3cb6c..2b40d02de2 100644 --- a/microsite/data/plugins/cloud-build.yaml +++ b/microsite/data/plugins/cloud-build.yaml @@ -4,7 +4,7 @@ author: Trivago authorUrl: https://www.trivago.com category: CI description: Build, test, and deploy on Google's serverless CI/CD platform. -documentation: https://github.com/spotify/backstage/tree/master/plugins/cloudbuild +documentation: https://github.com/backstage/backstage/tree/master/plugins/cloudbuild iconUrl: https://avatars2.githubusercontent.com/u/38220399?s=400&v=4 npmPackageName: '@backstage/plugin-cloudbuild' tags: diff --git a/microsite/data/plugins/cost-insights.yaml b/microsite/data/plugins/cost-insights.yaml index 7950879833..daa4f55a02 100644 --- a/microsite/data/plugins/cost-insights.yaml +++ b/microsite/data/plugins/cost-insights.yaml @@ -4,7 +4,7 @@ author: Spotify authorUrl: https://github.com/spotify category: Discovery description: Visualize, understand and optimize your team's cloud costs. -documentation: https://github.com/spotify/backstage/tree/master/plugins/cost-insights +documentation: https://github.com/backstage/backstage/tree/master/plugins/cost-insights iconUrl: https://www.materialui.co/materialIcons/editor/monetization_on_white_192x192.png npmPackageName: '@backstage/plugin-cost-insights' tags: diff --git a/microsite/data/plugins/gcp-projects.yaml b/microsite/data/plugins/gcp-projects.yaml index 7eff42af98..1c015821b2 100644 --- a/microsite/data/plugins/gcp-projects.yaml +++ b/microsite/data/plugins/gcp-projects.yaml @@ -4,7 +4,7 @@ author: Trivago authorUrl: https://www.trivago.com category: Cloud description: Create, list and manage your Google Cloud Projects. -documentation: https://github.com/spotify/backstage/tree/master/plugins/gcp-projects +documentation: https://github.com/backstage/backstage/tree/master/plugins/gcp-projects iconUrl: https://avatars1.githubusercontent.com/u/2810941?s=280&v=4 npmPackageName: '@backstage/plugin-gcp-projects' tags: diff --git a/microsite/data/plugins/github-actions.yaml b/microsite/data/plugins/github-actions.yaml index 062d0fff61..aeccdc9b86 100644 --- a/microsite/data/plugins/github-actions.yaml +++ b/microsite/data/plugins/github-actions.yaml @@ -4,7 +4,7 @@ author: Spotify authorUrl: https://github.com/spotify category: CI description: GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. -documentation: https://github.com/spotify/backstage/tree/master/plugins/github-actions +documentation: https://github.com/backstage/backstage/tree/master/plugins/github-actions iconUrl: https://avatars2.githubusercontent.com/u/44036562?s=400&v=4 npmPackageName: '@backstage/plugin-github-actions' tags: diff --git a/microsite/data/plugins/gitops-cluster.yaml b/microsite/data/plugins/gitops-cluster.yaml index 6f8ab6b097..ad6e7979aa 100644 --- a/microsite/data/plugins/gitops-cluster.yaml +++ b/microsite/data/plugins/gitops-cluster.yaml @@ -4,7 +4,7 @@ author: Weaveworks authorUrl: https://www.weave.works/ category: Kubernetes description: Create GitOps-managed Kubernetes clusters. Currently, it supports provisioning EKS clusters on GitHub via GitHub Actions. -documentation: https://github.com/spotify/backstage/tree/master/plugins/gitops-profiles +documentation: https://github.com/backstage/backstage/tree/master/plugins/gitops-profiles iconUrl: https://res-5.cloudinary.com/crunchbase-production/image/upload/c_lpad,h_256,w_256,f_auto,q_auto:eco/v1462316670/i9d3delzvx1erzjhmcws.png npmPackageName: '@backstage/plugin-gitops-profiles' tags: diff --git a/microsite/data/plugins/graphiql.yaml b/microsite/data/plugins/graphiql.yaml index e997360b04..eda91206eb 100644 --- a/microsite/data/plugins/graphiql.yaml +++ b/microsite/data/plugins/graphiql.yaml @@ -4,7 +4,7 @@ author: Spotify authorUrl: https://github.com/spotify category: Debugging description: Integrates GraphiQL as a tool to browse GraphQL API endpoints inside Backstage. -documentation: https://github.com/spotify/backstage/tree/master/plugins/graphiql +documentation: https://github.com/backstage/backstage/tree/master/plugins/graphiql iconUrl: https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/GraphQL_Logo.svg/1024px-GraphQL_Logo.svg.png npmPackageName: '@backstage/plugin-graphiql' tags: diff --git a/microsite/data/plugins/jenkins.yaml b/microsite/data/plugins/jenkins.yaml index 78b3616595..638758d54d 100644 --- a/microsite/data/plugins/jenkins.yaml +++ b/microsite/data/plugins/jenkins.yaml @@ -4,7 +4,7 @@ author: '@timja' authorUrl: https://github.com/timja category: CI description: Jenkins offers a simple way to set up a continuous integration and continuous delivery environment. -documentation: https://github.com/spotify/backstage/tree/master/plugins/jenkins +documentation: https://github.com/backstage/backstage/tree/master/plugins/jenkins iconUrl: https://img.icons8.com/color/1600/jenkins.png npmPackageName: '@backstage/plugin-jenkins' tags: diff --git a/microsite/data/plugins/lighthouse.yaml b/microsite/data/plugins/lighthouse.yaml index 0819455ed2..88d444e0ef 100644 --- a/microsite/data/plugins/lighthouse.yaml +++ b/microsite/data/plugins/lighthouse.yaml @@ -4,7 +4,7 @@ author: Spotify authorUrl: https://github.com/spotify category: Accessibility description: Google's Lighthouse tool is a great resource for benchmarking and improving the accessibility, performance, SEO, and best practices of your website. -documentation: https://github.com/spotify/backstage/tree/master/plugins/lighthouse +documentation: https://github.com/backstage/backstage/tree/master/plugins/lighthouse iconUrl: https://seeklogo.com/images/G/google-lighthouse-logo-1C7FA08580-seeklogo.com.png npmPackageName: '@backstage/plugin-lighthouse' tags: diff --git a/microsite/data/plugins/new-relic.yaml b/microsite/data/plugins/new-relic.yaml index e3ddf18652..d728a9d1c7 100644 --- a/microsite/data/plugins/new-relic.yaml +++ b/microsite/data/plugins/new-relic.yaml @@ -4,7 +4,7 @@ author: '@timwheelercom' authorUrl: https://github.com/timwheelercom category: Monitoring description: Observability platform built to help engineers create and monitor their software. -documentation: https://github.com/spotify/backstage/tree/master/plugins/newrelic +documentation: https://github.com/backstage/backstage/tree/master/plugins/newrelic iconUrl: https://www.mulesoft.com/sites/default/files/2018-10/New_relic.png npmPackageName: '@backstage/plugin-newrelic' tags: diff --git a/microsite/data/plugins/rollbar.yaml b/microsite/data/plugins/rollbar.yaml index 8ef3d8d66a..05f0d4ef78 100644 --- a/microsite/data/plugins/rollbar.yaml +++ b/microsite/data/plugins/rollbar.yaml @@ -4,6 +4,6 @@ author: '@andrewthauer' authorUrl: https://github.com/andrewthauer category: Monitoring description: View Rollbar errors for your services in Backstage. -documentation: https://github.com/spotify/backstage/tree/master/plugins/rollbar +documentation: https://github.com/backstage/backstage/tree/master/plugins/rollbar iconUrl: https://rollbar.com/assets/media/rollbar-mark-color.png npmPackageName: '@backstage/plugin-rollbar' diff --git a/microsite/data/plugins/sentry.yaml b/microsite/data/plugins/sentry.yaml index 8da488f727..3445d6abb7 100644 --- a/microsite/data/plugins/sentry.yaml +++ b/microsite/data/plugins/sentry.yaml @@ -4,6 +4,6 @@ author: Spotify authorUrl: https://github.com/spotify category: Monitoring description: View Sentry issues in Backstage. -documentation: https://github.com/spotify/backstage/tree/master/plugins/sentry +documentation: https://github.com/backstage/backstage/tree/master/plugins/sentry iconUrl: https://sentry-brand.storage.googleapis.com/sentry-glyph-white.png npmPackageName: '@backstage/plugin-sentry' diff --git a/microsite/data/plugins/sonarqube.yaml b/microsite/data/plugins/sonarqube.yaml index a2982a4a58..e9e22d18a4 100644 --- a/microsite/data/plugins/sonarqube.yaml +++ b/microsite/data/plugins/sonarqube.yaml @@ -4,6 +4,6 @@ author: SDA SE authorUrl: https://sda.se/ category: Quality description: Components to display code quality metrics from SonarCloud and SonarQube. -documentation: https://github.com/spotify/backstage/blob/master/plugins/sonarqube/README.md +documentation: https://github.com/backstage/backstage/blob/master/plugins/sonarqube/README.md iconUrl: img/sonarqube-icon.svg npmPackageName: '@backstage/plugin-sonarqube' diff --git a/microsite/data/plugins/tech-radar.yaml b/microsite/data/plugins/tech-radar.yaml index b1d4f5cc17..f2d5b12663 100644 --- a/microsite/data/plugins/tech-radar.yaml +++ b/microsite/data/plugins/tech-radar.yaml @@ -4,6 +4,6 @@ author: Spotify authorUrl: https://github.com/spotify category: Discovery description: Visualize the your company's official guidelines of different areas of software development. -documentation: https://github.com/spotify/backstage/tree/master/plugins/tech-radar +documentation: https://github.com/backstage/backstage/tree/master/plugins/tech-radar iconUrl: https://www.materialui.co/materialIcons/action/track_changes_white_192x192.png npmPackageName: '@backstage/plugin-tech-radar' diff --git a/microsite/pages/en/index.js b/microsite/pages/en/index.js index 6e649aa574..0422bfab63 100644 --- a/microsite/pages/en/index.js +++ b/microsite/pages/en/index.js @@ -31,7 +31,7 @@ class Index extends React.Component { high-quality code quickly — without compromising autonomy. GitHub @@ -282,7 +282,7 @@ class Index extends React.Component { Build your own software templates Contribute diff --git a/microsite/pages/en/plugins.js b/microsite/pages/en/plugins.js index 36957c2b4e..b1854135dc 100644 --- a/microsite/pages/en/plugins.js +++ b/microsite/pages/en/plugins.js @@ -98,11 +98,11 @@ const Plugins = () => (

See what plugins are already{' '} - + in progress {' '} and 👍. Missing a plugin for your favorite tool? Please{' '} - + suggest {' '} a new one. diff --git a/microsite/siteConfig.js b/microsite/siteConfig.js index 06ae8453a0..6e8f8edddf 100644 --- a/microsite/siteConfig.js +++ b/microsite/siteConfig.js @@ -17,7 +17,7 @@ const siteConfig = { url: 'https://backstage.io', // Your website URL cname: 'backstage.io', baseUrl: '/', // Base URL for your project */ - editUrl: 'https://github.com/spotify/backstage/edit/master/docs/', + editUrl: 'https://github.com/backstage/backstage/edit/master/docs/', // Used for publishing and more projectName: 'backstage', @@ -30,7 +30,7 @@ const siteConfig = { // For no header links in the top nav bar -> headerLinks: [], headerLinks: [ { - href: 'https://github.com/spotify/backstage', + href: 'https://github.com/backstage/backstage', label: 'GitHub', }, { @@ -111,7 +111,7 @@ const siteConfig = { // You may provide arbitrary config keys to be used as needed by your // template. For example, if you need your repo's URL... - repoUrl: 'https://github.com/spotify/backstage', + repoUrl: 'https://github.com/backstage/backstage', twitterUsername: 'SpotifyEng', stylesheets: [ diff --git a/packages/backend-common/README.md b/packages/backend-common/README.md index 82db0454d2..dc08d89416 100644 --- a/packages/backend-common/README.md +++ b/packages/backend-common/README.md @@ -34,5 +34,5 @@ app.listen(PORT, () => { ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index 076e644afd..828db8538a 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -13,7 +13,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/backend-common" }, "keywords": [ diff --git a/packages/backend/README.md b/packages/backend/README.md index c45a0d28d9..d458268846 100644 --- a/packages/backend/README.md +++ b/packages/backend/README.md @@ -55,9 +55,9 @@ in `app-config.yaml` under `catalog.locations`. For local development you can ov We chose [Passport](http://www.passportjs.org/) as authentication platform due to its comprehensive set of supported authentication [strategies](http://www.passportjs.org/packages/). -Read more about the [auth-backend](https://github.com/spotify/backstage/blob/master/plugins/auth-backend/README.md) and [how to add a new provider](https://github.com/spotify/backstage/blob/master/docs/auth/add-auth-provider.md) +Read more about the [auth-backend](https://github.com/backstage/backstage/blob/master/plugins/auth-backend/README.md) and [how to add a new provider](https://github.com/backstage/backstage/blob/master/docs/auth/add-auth-provider.md) ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/catalog-model/README.md b/packages/catalog-model/README.md index 6dab6e7cae..8218508be9 100644 --- a/packages/catalog-model/README.md +++ b/packages/catalog-model/README.md @@ -7,6 +7,6 @@ as well as by others that want to consume catalog data. ## Links -- [Default frontend part of the catalog](https://github.com/spotify/backstage/tree/master/plugins/catalog) -- [Default backend part of the catalog](https://github.com/spotify/backstage/tree/master/plugins/catalog-backend) +- [Default frontend part of the catalog](https://github.com/backstage/backstage/tree/master/plugins/catalog) +- [Default backend part of the catalog](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend) - [The Backstage homepage](https://backstage.io) diff --git a/packages/catalog-model/examples/acme-corp.yaml b/packages/catalog-model/examples/acme-corp.yaml index 7e5c5ebc61..e8047fc143 100644 --- a/packages/catalog-model/examples/acme-corp.yaml +++ b/packages/catalog-model/examples/acme-corp.yaml @@ -6,4 +6,4 @@ metadata: spec: type: github targets: - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/org.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/org.yaml diff --git a/packages/catalog-model/examples/acme/org.yaml b/packages/catalog-model/examples/acme/org.yaml index 2d6a6a2666..8c562aaf89 100644 --- a/packages/catalog-model/examples/acme/org.yaml +++ b/packages/catalog-model/examples/acme/org.yaml @@ -18,10 +18,10 @@ metadata: spec: type: github targets: - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/infrastructure-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/boxoffice-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/backstage-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/team-a-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/team-b-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/team-c-group.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/acme/team-d-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/infrastructure-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/boxoffice-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/backstage-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/team-a-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/team-b-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/team-c-group.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme/team-d-group.yaml diff --git a/packages/catalog-model/examples/all-apis.yaml b/packages/catalog-model/examples/all-apis.yaml index 64586fdddd..0278fc3078 100644 --- a/packages/catalog-model/examples/all-apis.yaml +++ b/packages/catalog-model/examples/all-apis.yaml @@ -6,8 +6,8 @@ metadata: spec: type: github targets: - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/apis/hello-world-api.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/apis/petstore-api.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/apis/spotify-api.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/apis/streetlights-api.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/apis/swapi-graphql.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/apis/hello-world-api.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/apis/petstore-api.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/apis/spotify-api.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/apis/streetlights-api.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/apis/swapi-graphql.yaml diff --git a/packages/catalog-model/examples/all-components.yaml b/packages/catalog-model/examples/all-components.yaml index bef38df0b1..06c44b59d7 100644 --- a/packages/catalog-model/examples/all-components.yaml +++ b/packages/catalog-model/examples/all-components.yaml @@ -6,12 +6,12 @@ metadata: spec: type: github targets: - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/artist-lookup-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/petstore-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/playback-order-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/podcast-api-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/queue-proxy-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/searcher-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/playback-lib-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/www-artist-component.yaml - - https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/components/shuffle-api-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/artist-lookup-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/petstore-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/playback-order-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/podcast-api-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/queue-proxy-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/searcher-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/playback-lib-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/www-artist-component.yaml + - https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/components/shuffle-api-component.yaml diff --git a/packages/catalog-model/src/entity/policies/FieldFormatEntityPolicy.ts b/packages/catalog-model/src/entity/policies/FieldFormatEntityPolicy.ts index acd4469fcb..0aabbd9e48 100644 --- a/packages/catalog-model/src/entity/policies/FieldFormatEntityPolicy.ts +++ b/packages/catalog-model/src/entity/policies/FieldFormatEntityPolicy.ts @@ -94,7 +94,7 @@ export class FieldFormatEntityPolicy implements EntityPolicy { : ''; throw new Error( - `"${field}" is not valid;${message} To learn more about catalog file format, visit: https://github.com/spotify/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`, + `"${field}" is not valid;${message} To learn more about catalog file format, visit: https://github.com/backstage/backstage/blob/master/docs/architecture-decisions/adr002-default-catalog-file-format.md`, ); } } diff --git a/packages/catalog-model/src/kinds/LocationEntityV1alpha1.test.ts b/packages/catalog-model/src/kinds/LocationEntityV1alpha1.test.ts index daa18b00cc..d9c1e9185f 100644 --- a/packages/catalog-model/src/kinds/LocationEntityV1alpha1.test.ts +++ b/packages/catalog-model/src/kinds/LocationEntityV1alpha1.test.ts @@ -71,7 +71,7 @@ describe('LocationV1alpha1Validator', () => { it('accepts good target', async () => { (entity as any).spec.target = - 'https://github.com/spotify/backstage/blob/master/plugins/catalog-backend/examples/artist-lookup-component.yaml'; + 'https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/examples/artist-lookup-component.yaml'; await expect(validator.check(entity)).resolves.toBe(true); }); @@ -87,8 +87,8 @@ describe('LocationV1alpha1Validator', () => { it('accepts good targets', async () => { (entity as any).spec.targets = [ - 'https://github.com/spotify/backstage/blob/master/plugins/catalog-backend/examples/artist-lookup-component.yaml', - 'https://github.com/spotify/backstage/blob/master/plugins/catalog-backend/examples/playback-order-component.yaml', + 'https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/examples/artist-lookup-component.yaml', + 'https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/examples/playback-order-component.yaml', ]; await expect(validator.check(entity)).resolves.toBe(true); }); diff --git a/packages/cli-common/README.md b/packages/cli-common/README.md index 3488003a76..91b774145e 100644 --- a/packages/cli-common/README.md +++ b/packages/cli-common/README.md @@ -8,5 +8,5 @@ Do not install this package directly, it is an internal package used by [@backst ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/cli-common/package.json b/packages/cli-common/package.json index 56fb0d3417..29f5f436c3 100644 --- a/packages/cli-common/package.json +++ b/packages/cli-common/package.json @@ -13,7 +13,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/cli-common" }, "keywords": [ diff --git a/packages/cli/README.md b/packages/cli/README.md index 8868e699c8..9eac5cdfe4 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -30,5 +30,5 @@ To try out the command locally, you can execute the following from the parent di ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/cli/package.json b/packages/cli/package.json index fdc0acddbf..9f2a664e7f 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -9,7 +9,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/cli" }, "keywords": [ diff --git a/packages/config-loader/README.md b/packages/config-loader/README.md index 595241e0d5..261394a6a5 100644 --- a/packages/config-loader/README.md +++ b/packages/config-loader/README.md @@ -8,5 +8,5 @@ Do not install this package directly, it is an internal package used by [@backst ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 2eef7db027..caf3520a63 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -12,7 +12,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/config-loader" }, "keywords": [ diff --git a/packages/config/README.md b/packages/config/README.md index f532c682be..9866b1bce9 100644 --- a/packages/config/README.md +++ b/packages/config/README.md @@ -8,5 +8,5 @@ Do not install this package directly, it is an internal package used by [@backst ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/config/package.json b/packages/config/package.json index d8ee50e97c..3609839f68 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -12,7 +12,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/config" }, "keywords": [ diff --git a/packages/core-api/README.md b/packages/core-api/README.md index 5732b5ef23..f7b8b6c337 100644 --- a/packages/core-api/README.md +++ b/packages/core-api/README.md @@ -18,5 +18,5 @@ $ yarn add @backstage/core ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/core-api/package.json b/packages/core-api/package.json index 34949e4315..b03772184b 100644 --- a/packages/core-api/package.json +++ b/packages/core-api/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/core-api" }, "keywords": [ diff --git a/packages/core/README.md b/packages/core/README.md index a22f66ecd9..0d0063c9fd 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -18,5 +18,5 @@ $ yarn add @backstage/core ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/core/package.json b/packages/core/package.json index ec4411b390..5f574c5119 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/core" }, "keywords": [ diff --git a/packages/core/src/layout/ErrorPage/ErrorPage.tsx b/packages/core/src/layout/ErrorPage/ErrorPage.tsx index b41308dd6d..776ed41614 100644 --- a/packages/core/src/layout/ErrorPage/ErrorPage.tsx +++ b/packages/core/src/layout/ErrorPage/ErrorPage.tsx @@ -73,7 +73,7 @@ export const ErrorPage = ({ ... or if you think this is a bug, please file an{' '} issue. diff --git a/packages/create-app/README.md b/packages/create-app/README.md index b5f231a326..7533110372 100644 --- a/packages/create-app/README.md +++ b/packages/create-app/README.md @@ -13,5 +13,5 @@ $ npx @backstage/create-app ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/create-app/package.json b/packages/create-app/package.json index bb321dc504..2a2ed28e1c 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -9,7 +9,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/create-app" }, "keywords": [ diff --git a/packages/create-app/templates/default-app/app-config.yaml.hbs b/packages/create-app/templates/default-app/app-config.yaml.hbs index 3c7bc40c2b..595812dec3 100644 --- a/packages/create-app/templates/default-app/app-config.yaml.hbs +++ b/packages/create-app/templates/default-app/app-config.yaml.hbs @@ -81,23 +81,23 @@ catalog: locations: # Backstage example components - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-components.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-components.yaml # Backstage example APIs - type: url - target: https://github.com/spotify/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml + target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all-apis.yaml # Backstage example templates - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml rules: - allow: [Template] - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml rules: - allow: [Template] - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml rules: - allow: [Template] - type: github @@ -105,6 +105,6 @@ catalog: rules: - allow: [Template] - type: github - target: https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml + target: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml rules: - allow: [Template] diff --git a/packages/create-app/templates/default-app/catalog-info.yaml.hbs b/packages/create-app/templates/default-app/catalog-info.yaml.hbs index a370902020..b3fbbda5ce 100644 --- a/packages/create-app/templates/default-app/catalog-info.yaml.hbs +++ b/packages/create-app/templates/default-app/catalog-info.yaml.hbs @@ -1,13 +1,13 @@ -apiVersion: backstage.io/v1alpha1 +apiVersion: backstage.io/v1alpha1 kind: Component metadata: - name: {{name}} + name: {{name}} description: An example of a Backstage application. # Example for optional annotations - # annotations: + # annotations: # github.com/project-slug: spotify/backstage - # backstage.io/techdocs-ref: github:https://github.com/spotify/backstage.git + # backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git spec: type: website owner: john@example.com - lifecycle: experimental \ No newline at end of file + lifecycle: experimental diff --git a/packages/create-app/templates/default-app/packages/backend/README.md b/packages/create-app/templates/default-app/packages/backend/README.md index 5583bff625..81e0f80535 100644 --- a/packages/create-app/templates/default-app/packages/backend/README.md +++ b/packages/create-app/templates/default-app/packages/backend/README.md @@ -56,11 +56,11 @@ to its comprehensive set of supported authentication [strategies](http://www.passportjs.org/packages/). Read more about the -[auth-backend](https://github.com/spotify/backstage/blob/master/plugins/auth-backend/README.md) +[auth-backend](https://github.com/backstage/backstage/blob/master/plugins/auth-backend/README.md) and -[how to add a new provider](https://github.com/spotify/backstage/blob/master/docs/auth/add-auth-provider.md) +[how to add a new provider](https://github.com/backstage/backstage/blob/master/docs/auth/add-auth-provider.md) ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index 04f8404f64..1aa86ba51c 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -20,5 +20,5 @@ $ yarn add -D @backstage/dev-utils ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index d61336465f..4059516d14 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/dev-utils" }, "keywords": [ diff --git a/packages/docgen/package.json b/packages/docgen/package.json index 18f26d6941..a3ebc16ecb 100644 --- a/packages/docgen/package.json +++ b/packages/docgen/package.json @@ -6,7 +6,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/docgen" }, "keywords": [ diff --git a/packages/docgen/src/docgen/ApiDocsPrinter.ts b/packages/docgen/src/docgen/ApiDocsPrinter.ts index fdd53afc8e..6f6528ec12 100644 --- a/packages/docgen/src/docgen/ApiDocsPrinter.ts +++ b/packages/docgen/src/docgen/ApiDocsPrinter.ts @@ -40,7 +40,7 @@ export default class ApiDocPrinter { 'The following is a list of all Utility APIs defined by `@backstage/core`.', 'They are available to use by plugins and components, and can be accessed ', 'using the `useApi` hook, also provided by `@backstage/core`.', - 'For more information, see https://github.com/spotify/backstage/blob/master/docs/api/utility-apis.md.', + 'For more information, see https://github.com/backstage/backstage/blob/master/docs/api/utility-apis.md.', ); for (const api of apiDocs) { diff --git a/packages/docgen/src/docgen/GitHubMarkdownPrinter.ts b/packages/docgen/src/docgen/GitHubMarkdownPrinter.ts index 64d38d8b15..08e493600d 100644 --- a/packages/docgen/src/docgen/GitHubMarkdownPrinter.ts +++ b/packages/docgen/src/docgen/GitHubMarkdownPrinter.ts @@ -20,7 +20,7 @@ import { MarkdownPrinter, TypeLink } from './types'; import { execSync } from 'child_process'; // TODO(Rugvip): provide through options? -const GH_BASE_URL = 'https://github.com/spotify/backstage'; +const GH_BASE_URL = 'https://github.com/backstage/backstage'; const COMMIT_SHA = process.env.COMMIT_SHA || diff --git a/packages/docgen/src/docgen/TechdocsMarkdownPrinter.ts b/packages/docgen/src/docgen/TechdocsMarkdownPrinter.ts index f2453f314f..bd83699660 100644 --- a/packages/docgen/src/docgen/TechdocsMarkdownPrinter.ts +++ b/packages/docgen/src/docgen/TechdocsMarkdownPrinter.ts @@ -19,7 +19,7 @@ import { Highlighter, MarkdownPrinter, TypeLink } from './types'; import { execSync } from 'child_process'; // TODO(Rugvip): provide through options? -const GH_BASE_URL = 'https://github.com/spotify/backstage'; +const GH_BASE_URL = 'https://github.com/backstage/backstage'; const COMMIT_SHA = process.env.COMMIT_SHA || execSync('git rev-parse HEAD').toString('utf8'); diff --git a/packages/e2e-test/README.md b/packages/e2e-test/README.md index e3706b6131..139213c0c1 100644 --- a/packages/e2e-test/README.md +++ b/packages/e2e-test/README.md @@ -20,5 +20,5 @@ If you make changes to other packages you will need to rerun `yarn tsc && yarn b ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 9098b3cd07..13129782f2 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -6,7 +6,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/e2e-test" }, "keywords": [ diff --git a/packages/storybook/.storybook/webpack-plugin-fail-build-on-warning.js b/packages/storybook/.storybook/webpack-plugin-fail-build-on-warning.js index b812b6bac9..04b6d62e03 100644 --- a/packages/storybook/.storybook/webpack-plugin-fail-build-on-warning.js +++ b/packages/storybook/.storybook/webpack-plugin-fail-build-on-warning.js @@ -16,7 +16,7 @@ /** * When building storybook, we can have warnings which may cause issues in the future. One of the example case is - * https://github.com/spotify/backstage/issues/718. To make sure new warnings are not introduced with new PRs, we + * https://github.com/backstage/backstage/issues/718. To make sure new warnings are not introduced with new PRs, we * want to fail CI builds if there are warnings when building storybook. * * This webpack plugin makes sure the CI builds fail on Webpack warnings. We also have an allowlist of warnings here diff --git a/packages/techdocs-cli/README.md b/packages/techdocs-cli/README.md index 5d8a3869c7..031f26fd93 100644 --- a/packages/techdocs-cli/README.md +++ b/packages/techdocs-cli/README.md @@ -1,8 +1,8 @@ # TechDocs CLI -Check out the [TechDocs README](https://github.com/spotify/backstage/blob/master/plugins/techdocs/README.md) to learn more. +Check out the [TechDocs README](https://github.com/backstage/backstage/blob/master/plugins/techdocs/README.md) to learn more. -**WIP: This cli is a work in progress. It is not ready for use yet. Follow our progress on [the Backstage Discord](https://discord.gg/MUpMjP2) under #docs-like-code or on [our GitHub Milestone](https://github.com/spotify/backstage/milestone/15).** +**WIP: This cli is a work in progress. It is not ready for use yet. Follow our progress on [the Backstage Discord](https://discord.gg/MUpMjP2) under #docs-like-code or on [our GitHub Milestone](https://github.com/backstage/backstage/milestone/15).** ## Prerequisities diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index c111a2973a..5b751e97dc 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -8,7 +8,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/techdocs-cli" }, "keywords": [ diff --git a/packages/techdocs-container/README.md b/packages/techdocs-container/README.md index cc92071f5d..7f1350031b 100644 --- a/packages/techdocs-container/README.md +++ b/packages/techdocs-container/README.md @@ -1,6 +1,6 @@ # techdocs-container -This is the Docker container that powers the creation of static documentation sites that are supported by [TechDocs](https://github.com/spotify/backstage/blob/master/plugins/techdocs). +This is the Docker container that powers the creation of static documentation sites that are supported by [TechDocs](https://github.com/backstage/backstage/blob/master/plugins/techdocs). ## Getting Started @@ -26,6 +26,6 @@ This container is published on DockerHub - https://hub.docker.com/r/spotify/tech The publishing is configured by [Automated Builds](https://hub.docker.com/repository/docker/spotify/techdocs/builds/edit) feature on Docker Hub which is triggered from GitHub (on new commits and releases). @spotify/techdocs-core team has access to the settings. -The `latest` tag on Docker Hub points to the recent commits in the `master` branch. The [version tags](https://hub.docker.com/r/spotify/techdocs/tags) (e.g. v0.1.1-alpha.24) point to the GitHub tags created from [releases](https://github.com/spotify/backstage/releases) of this GitHub repository. +The `latest` tag on Docker Hub points to the recent commits in the `master` branch. The [version tags](https://hub.docker.com/r/spotify/techdocs/tags) (e.g. v0.1.1-alpha.24) point to the GitHub tags created from [releases](https://github.com/backstage/backstage/releases) of this GitHub repository. Note: We recommend using a specific version of the container instead of `latest` release for stability and avoiding unexpected changes. diff --git a/packages/techdocs-container/techdocs-core/setup.py b/packages/techdocs-container/techdocs-core/setup.py index 44ff653d72..4c016991a3 100644 --- a/packages/techdocs-container/techdocs-core/setup.py +++ b/packages/techdocs-container/techdocs-core/setup.py @@ -28,7 +28,7 @@ setup( long_description=long_description, long_description_content_type="text/markdown", keywords="mkdocs", - url="https://github.com/spotify/backstage", + url="https://github.com/backstage/backstage", author="TechDocs Core", author_email="pulp-fiction@spotify.com", license="Apache-2.0", diff --git a/packages/test-utils-core/README.md b/packages/test-utils-core/README.md index b99250857d..63b6ece0a6 100644 --- a/packages/test-utils-core/README.md +++ b/packages/test-utils-core/README.md @@ -11,5 +11,5 @@ The reason this package exists is to allow the Backstage core packages to use th ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/test-utils-core/package.json b/packages/test-utils-core/package.json index 1db8f6f023..32af4b880a 100644 --- a/packages/test-utils-core/package.json +++ b/packages/test-utils-core/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/test-utils-core" }, "keywords": [ diff --git a/packages/test-utils/README.md b/packages/test-utils/README.md index 46a2e2dab3..38bf1e83cf 100644 --- a/packages/test-utils/README.md +++ b/packages/test-utils/README.md @@ -18,5 +18,5 @@ $ yarn add -D @backstage/test-utils ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 74e0c8dcf7..5b08d3becc 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/test-utils" }, "keywords": [ diff --git a/packages/theme/README.md b/packages/theme/README.md index a1b6f81f92..4b29738193 100644 --- a/packages/theme/README.md +++ b/packages/theme/README.md @@ -18,5 +18,5 @@ $ yarn add @backstage/theme ## Documentation -- [Backstage Readme](https://github.com/spotify/backstage/blob/master/README.md) -- [Backstage Documentation](https://github.com/spotify/backstage/blob/master/docs/README.md) +- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) +- [Backstage Documentation](https://github.com/backstage/backstage/blob/master/docs/README.md) diff --git a/packages/theme/package.json b/packages/theme/package.json index ddec0e7981..46377cac19 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -11,7 +11,7 @@ "homepage": "https://backstage.io", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "packages/theme" }, "keywords": [ diff --git a/plugins/README.md b/plugins/README.md index d56758b8f0..6651ba079f 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -2,16 +2,16 @@ Backstage is a single-page application composed of a set of plugins. -Our goal for the plugin ecosystem is that the definition of a plugin is flexible enough to allow you to expose pretty much any kind of infrastructure or software development tool as a plugin in Backstage. By following strong [design guidelines](https://github.com/spotify/backstage/blob/master/docs/dls/design.md) we ensure the overall user experience stays consistent between plugins. +Our goal for the plugin ecosystem is that the definition of a plugin is flexible enough to allow you to expose pretty much any kind of infrastructure or software development tool as a plugin in Backstage. By following strong [design guidelines](https://github.com/backstage/backstage/blob/master/docs/dls/design.md) we ensure the overall user experience stays consistent between plugins. ![plugin](../docs/assets/my-plugin_screenshot.png) ## Creating a plugin -To create a plugin, follow the steps outlined [here](https://github.com/spotify/backstage/blob/master/docs/plugins/create-a-plugin.md). +To create a plugin, follow the steps outlined [here](https://github.com/backstage/backstage/blob/master/docs/plugins/create-a-plugin.md). ## Suggesting a plugin -If you start developing a plugin that you aim to release as open source, we suggest that you create a [new Issue](https://github.com/spotify/backstage/issues/new?template=plugin_template.md). This helps the community know what plugins are in development. +If you start developing a plugin that you aim to release as open source, we suggest that you create a [new Issue](https://github.com/backstage/backstage/issues/new?template=plugin_template.md). This helps the community know what plugins are in development. You can also use this process if you have an idea for a good plugin but you hope that someone else will pick up the work. diff --git a/plugins/auth-backend/README.md b/plugins/auth-backend/README.md index 355fcc1536..4fcd19ecb7 100644 --- a/plugins/auth-backend/README.md +++ b/plugins/auth-backend/README.md @@ -119,7 +119,7 @@ To try out SAML, you can use the mock identity provider: ## Authentication providers -[How to add an auth provider](https://github.com/spotify/backstage/blob/master/docs/auth/add-auth-provider.md) +[How to add an auth provider](https://github.com/backstage/backstage/blob/master/docs/auth/add-auth-provider.md) ## Links diff --git a/plugins/catalog-backend/README.md b/plugins/catalog-backend/README.md index 1b4a653f4a..2f06b9c062 100644 --- a/plugins/catalog-backend/README.md +++ b/plugins/catalog-backend/README.md @@ -27,5 +27,5 @@ This will launch the full example backend, populated some example entities. ## Links -- [Frontend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/catalog) +- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/catalog) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/catalog-backend/src/ingestion/processors/CodeOwnersProcessor.test.ts b/plugins/catalog-backend/src/ingestion/processors/CodeOwnersProcessor.test.ts index b0e857b2bb..e4ddb249d6 100644 --- a/plugins/catalog-backend/src/ingestion/processors/CodeOwnersProcessor.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/CodeOwnersProcessor.test.ts @@ -29,7 +29,7 @@ import { describe('CodeOwnersProcessor', () => { const mockUrl = ({ basePath = '' } = {}): string => - `https://github.com/spotify/backstage/blob/master/${basePath}catalog-info.yaml`; + `https://github.com/backstage/backstage/blob/master/${basePath}catalog-info.yaml`; const mockLocation = ({ basePath = '', type = 'github', @@ -39,12 +39,12 @@ describe('CodeOwnersProcessor', () => { }); const mockReadUrl = (basePath = '') => - `https://github.com/spotify/backstage/blob/master/${basePath}CODEOWNERS`; + `https://github.com/backstage/backstage/blob/master/${basePath}CODEOWNERS`; const mockGitUri = (codeOwnersPath: string = '') => { return { source: 'github.com', - owner: 'spotify', + owner: 'backstage', name: 'backstage', codeOwnersPath, }; @@ -94,7 +94,7 @@ describe('CodeOwnersProcessor', () => { codeOwnersPath: '/.github/CODEOWNERS', }), ).toBe( - 'https://github.com/spotify/backstage/blob/master/.github/CODEOWNERS', + 'https://github.com/backstage/backstage/blob/master/.github/CODEOWNERS', ); }); }); @@ -102,7 +102,7 @@ describe('CodeOwnersProcessor', () => { describe('buildCodeOwnerUrl', () => { it('should build a location spec to the codeowners', () => { expect(buildCodeOwnerUrl(mockUrl(), '/docs/CODEOWNERS')).toEqual( - 'https://github.com/spotify/backstage/blob/master/docs/CODEOWNERS', + 'https://github.com/backstage/backstage/blob/master/docs/CODEOWNERS', ); }); @@ -112,7 +112,9 @@ describe('CodeOwnersProcessor', () => { mockUrl({ basePath: 'packages/foo/' }), '/CODEOWNERS', ), - ).toEqual('https://github.com/spotify/backstage/blob/master/CODEOWNERS'); + ).toEqual( + 'https://github.com/backstage/backstage/blob/master/CODEOWNERS', + ); }); }); diff --git a/plugins/catalog-backend/src/ingestion/processors/PlaceholderProcessor.test.ts b/plugins/catalog-backend/src/ingestion/processors/PlaceholderProcessor.test.ts index 44f3163a97..48cd2dae01 100644 --- a/plugins/catalog-backend/src/ingestion/processors/PlaceholderProcessor.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/PlaceholderProcessor.test.ts @@ -152,7 +152,8 @@ describe('PlaceholderProcessor', () => { }, { type: 'github', - target: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + target: + 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', }, ), ).resolves.toEqual({ @@ -163,7 +164,7 @@ describe('PlaceholderProcessor', () => { }); expect(read).toBeCalledWith( - 'https://github.com/spotify/backstage/a/file.txt', + 'https://github.com/backstage/backstage/a/file.txt', ); }); @@ -186,7 +187,8 @@ describe('PlaceholderProcessor', () => { }, { type: 'github', - target: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + target: + 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', }, ), ).resolves.toEqual({ @@ -197,7 +199,7 @@ describe('PlaceholderProcessor', () => { }); expect(read).toBeCalledWith( - 'https://github.com/spotify/backstage/a/b/file.json', + 'https://github.com/backstage/backstage/a/b/file.json', ); }); @@ -218,7 +220,8 @@ describe('PlaceholderProcessor', () => { }, { type: 'github', - target: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + target: + 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', }, ), ).resolves.toEqual({ @@ -229,7 +232,7 @@ describe('PlaceholderProcessor', () => { }); expect(read).toBeCalledWith( - 'https://github.com/spotify/backstage/a/file.yaml', + 'https://github.com/backstage/backstage/a/file.yaml', ); }); @@ -248,13 +251,14 @@ describe('PlaceholderProcessor', () => { metadata: { name: 'n' }, spec: { data: { - $text: 'https://github.com/spotify/backstage/catalog-info.yaml', + $text: 'https://github.com/backstage/backstage/catalog-info.yaml', }, }, }, { type: 'github', - target: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + target: + 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', }, ), ).resolves.toEqual({ @@ -265,7 +269,7 @@ describe('PlaceholderProcessor', () => { }); expect(read).toBeCalledWith( - 'https://github.com/spotify/backstage/catalog-info.yaml', + 'https://github.com/backstage/backstage/catalog-info.yaml', ); }); @@ -284,7 +288,7 @@ describe('PlaceholderProcessor', () => { metadata: { name: 'n' }, spec: { data: { - $text: 'https://github.com/spotify/backstage/catalog-info.yaml', + $text: 'https://github.com/backstage/backstage/catalog-info.yaml', }, }, }, @@ -301,7 +305,7 @@ describe('PlaceholderProcessor', () => { }); expect(read).toBeCalledWith( - 'https://github.com/spotify/backstage/catalog-info.yaml', + 'https://github.com/backstage/backstage/catalog-info.yaml', ); }); @@ -345,7 +349,7 @@ describe('yamlPlaceholderResolver', () => { const params: ResolverParams = { key: 'a', value: './file.yaml', - baseUrl: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + baseUrl: 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', read, }; @@ -389,7 +393,7 @@ describe('jsonPlaceholderResolver', () => { const params: ResolverParams = { key: 'a', value: './file.json', - baseUrl: 'https://github.com/spotify/backstage/a/b/catalog-info.yaml', + baseUrl: 'https://github.com/backstage/backstage/a/b/catalog-info.yaml', read, }; diff --git a/plugins/catalog/README.md b/plugins/catalog/README.md index cff632cb24..e9405a41f5 100644 --- a/plugins/catalog/README.md +++ b/plugins/catalog/README.md @@ -9,5 +9,5 @@ supply the base views to show and manage them. ## Links -- [Backend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/catalog-backend) +- [Backend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx b/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx index bf69818995..2854af2f26 100644 --- a/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutCard.test.tsx @@ -27,7 +27,7 @@ describe('', () => { name: 'software', annotations: { 'backstage.io/managed-by-location': - 'github:https://github.com/spotify/backstage/blob/master/software.yaml', + 'github:https://github.com/backstage/backstage/blob/master/software.yaml', }, }, spec: { @@ -40,7 +40,7 @@ describe('', () => { expect(getByText('service')).toBeInTheDocument(); expect(getByText('View Source').closest('a')).toHaveAttribute( 'href', - 'https://github.com/spotify/backstage/blob/master/software.yaml', + 'https://github.com/backstage/backstage/blob/master/software.yaml', ); }); }); diff --git a/plugins/catalog/src/components/AboutCard/AboutCard.tsx b/plugins/catalog/src/components/AboutCard/AboutCard.tsx index fbbf5fa11c..74877b5a65 100644 --- a/plugins/catalog/src/components/AboutCard/AboutCard.tsx +++ b/plugins/catalog/src/components/AboutCard/AboutCard.tsx @@ -87,7 +87,7 @@ function getCodeLinkInfo(entity: Entity): CodeLinkInfo { if (location) { // split by first `:` - // e.g. "github:https://github.com/spotify/backstage/blob/master/software.yaml" + // e.g. "github:https://github.com/backstage/backstage/blob/master/software.yaml" const [type, target] = location.split(/:(.+)/); return { icon: iconMap[type], href: target }; diff --git a/plugins/cost-insights/README.md b/plugins/cost-insights/README.md index 3b6e1e4fd5..886efa8eb6 100644 --- a/plugins/cost-insights/README.md +++ b/plugins/cost-insights/README.md @@ -21,7 +21,7 @@ yarn add @backstage/plugin-cost-insights 1. Configure `app-config.yaml`. See [Configuration](#configuration). -2. Create a CostInsights client. Clients must implement the CostInsightsApi interface. See the [API file](https://github.com/spotify/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts) for required methods and documentation. +2. Create a CostInsights client. Clients must implement the CostInsightsApi interface. See the [API file](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/api/CostInsightsApi.ts) for required methods and documentation. ```ts // path/to/CostInsightsClient.ts @@ -58,7 +58,7 @@ export { plugin as CostInsights } from '@backstage/plugin-cost-insights'; Cost Insights has only two required configuration fields: a map of cloud `products` for showing cost breakdowns and `engineerCost` - the average yearly cost of an engineer including benefits. Products must be defined as keys on the `products` field. -You can optionally supply a product `icon` to display in Cost Insights navigation. See the [type file](https://github.com/spotify/backstage/blob/master/plugins/cost-insights/src/types/Icon.ts) for supported types and Material UI icon [mappings](https://github.com/spotify/backstage/blob/master/plugins/cost-insights/src/utils/navigation.tsx). +You can optionally supply a product `icon` to display in Cost Insights navigation. See the [type file](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Icon.ts) for supported types and Material UI icon [mappings](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/utils/navigation.tsx). **Note:** Product keys should be unique and camelCased. Backstage does not support underscores in configuration keys. @@ -106,7 +106,7 @@ costInsights: ## Alerts -The CostInsightsApi `getAlerts` method may return any type of alert or recommendation (called collectively "Action Items" in Cost Insights) that implements the [Alert type](https://github.com/spotify/backstage/blob/master/plugins/cost-insights/src/types/Alert.ts). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations. +The CostInsightsApi `getAlerts` method may return any type of alert or recommendation (called collectively "Action Items" in Cost Insights) that implements the [Alert type](https://github.com/backstage/backstage/blob/master/plugins/cost-insights/src/types/Alert.ts). This allows you to deliver any alerts or recommendations specific to your infrastructure or company migrations. The Alert type includes an `element` field to supply the JSX Element that will be rendered in the Cost Insights "Action Items" section; we recommend using Backstage's [InfoCard](https://backstage.io/storybook/?path=/story/layout-information-card--default) and [Recharts](http://recharts.org/en-US/) to show actionable visualizations. diff --git a/plugins/github-actions/examples/sample.yaml b/plugins/github-actions/examples/sample.yaml index 7d9de50463..af12b6bb04 100644 --- a/plugins/github-actions/examples/sample.yaml +++ b/plugins/github-actions/examples/sample.yaml @@ -5,7 +5,7 @@ metadata: description: backstage.io annotations: github.com/project-slug: 'spotify/backstage' - backstage.io/techdocs-ref: github:https://github.com/spotify/backstage.git + backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git spec: type: website lifecycle: production diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 9e1ffd5ef1..fe88c92ea7 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -8,10 +8,10 @@ "main": "dist/index.esm.js", "types": "dist/index.d.ts" }, - "homepage": "https://github.com/spotify/backstage/tree/master/plugins/graphiql#readme", + "homepage": "https://github.com/backstage/backstage/tree/master/plugins/graphiql#readme", "repository": { "type": "git", - "url": "https://github.com/spotify/backstage", + "url": "https://github.com/backstage/backstage", "directory": "plugins/graphiql" }, "keywords": [ diff --git a/plugins/lighthouse/README.md b/plugins/lighthouse/README.md index 19244f3cf0..cdcc2fe2c4 100644 --- a/plugins/lighthouse/README.md +++ b/plugins/lighthouse/README.md @@ -23,7 +23,7 @@ _It's likely you will need to enable CORS when running lighthouse-audit-service. with the environment variable `LAS_CORS` set to `true`._ When you have an instance running that Backstage can hook into, make sure to export the plugin in -your app's [`plugins.ts`](https://github.com/spotify/backstage/blob/master/packages/app/src/plugins.ts) +your app's [`plugins.ts`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) to enable the plugin: ```js @@ -32,7 +32,7 @@ export LighthousePlugin; ``` Then, you need to use the `lighthouseApiRef` exported from the plugin to initialize the Rest API in -your [`apis.ts`](https://github.com/spotify/backstage/blob/master/packages/app/src/apis.ts). +your [`apis.ts`](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts). ```js import { ApiHolder, ApiRegistry } from '@backstage/core'; @@ -51,7 +51,7 @@ export const apis = (config: ConfigApi) => { } ``` -Then configure the lighthouse service url in your [`app-config.yaml`](https://github.com/spotify/backstage/blob/master/app-config.yaml). +Then configure the lighthouse service url in your [`app-config.yaml`](https://github.com/backstage/backstage/blob/master/app-config.yaml). ```yaml lighthouse: diff --git a/plugins/lighthouse/src/components/Intro/index.tsx b/plugins/lighthouse/src/components/Intro/index.tsx index ee5d5d66af..dc2a8ea283 100644 --- a/plugins/lighthouse/src/components/Intro/index.tsx +++ b/plugins/lighthouse/src/components/Intro/index.tsx @@ -43,7 +43,7 @@ _It's likely you will need to enable CORS when running lighthouse-audit-service. with the environment variable \`LAS_CORS\` set to \`true\`._ When you have an instance running that Backstage can hook into, make sure to export the plugin in -your app's [\`plugins.ts\`](https://github.com/spotify/backstage/blob/master/packages/app/src/plugins.ts) +your app's [\`plugins.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts) to enable the plugin: \`\`\`js @@ -52,7 +52,7 @@ export LighthousePlugin; \`\`\` Then, you need to use the \`lighthouseApiRef\` exported from the plugin to initialize the Rest API in -your [\`apis.ts\`](https://github.com/spotify/backstage/blob/master/packages/app/src/apis.ts). +your [\`apis.ts\`](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts). \`\`\`js import { ApiHolder, ApiRegistry } from '@backstage/core'; diff --git a/plugins/rollbar-backend/README.md b/plugins/rollbar-backend/README.md index f441efa416..efa715a2d3 100644 --- a/plugins/rollbar-backend/README.md +++ b/plugins/rollbar-backend/README.md @@ -18,5 +18,5 @@ access account token._ ## Links -- [Frontend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/rollbar) +- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/rollbar/README.md b/plugins/rollbar/README.md index 98f2272508..0af117e07c 100644 --- a/plugins/rollbar/README.md +++ b/plugins/rollbar/README.md @@ -4,7 +4,7 @@ Website: [https://rollbar.com/](https://rollbar.com/) ## Setup -1. Configure the [rollbar backend plugin](https://github.com/spotify/backstage/tree/master/plugins/rollbar-backend/README.md) +1. Configure the [rollbar backend plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar-backend/README.md) 2. If you have standalone app (you didn't clone this repo), then do @@ -83,5 +83,5 @@ metadata: ## Links -- [Backend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/rollbar-backend) +- [Backend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/rollbar-backend) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/scaffolder-backend/sample-templates/all-templates.yaml b/plugins/scaffolder-backend/sample-templates/all-templates.yaml index 1eb619a072..6866543ab0 100644 --- a/plugins/scaffolder-backend/sample-templates/all-templates.yaml +++ b/plugins/scaffolder-backend/sample-templates/all-templates.yaml @@ -6,8 +6,8 @@ metadata: spec: type: github targets: - - https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml - - https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml - - https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml + - https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml + - https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/springboot-grpc-template/template.yaml + - https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/create-react-app/template.yaml - https://github.com/spotify/cookiecutter-golang/blob/master/template.yaml - - https://github.com/spotify/backstage/blob/master/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml + - https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml diff --git a/plugins/scaffolder/README.md b/plugins/scaffolder/README.md index a356cb8ec9..05a68dafdd 100644 --- a/plugins/scaffolder/README.md +++ b/plugins/scaffolder/README.md @@ -6,5 +6,5 @@ This is the frontend part of the default scaffolder plugin. ## Links -- [Backend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/scaffolder-backend) +- [Backend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/scaffolder-backend) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/techdocs-backend/README.md b/plugins/techdocs-backend/README.md index b7eca2c5cb..625f0910b5 100644 --- a/plugins/techdocs-backend/README.md +++ b/plugins/techdocs-backend/README.md @@ -33,7 +33,7 @@ Currently the build process of techdocs-backend is split up in these three stage - Generators - Publishers -Preparers read your entity data and creates a working directory with your documentation source code. For example if you have set your `backstage.io/techdocs-ref` to `github:https://github.com/spotify/backstage.git` it will clone that repository to a temp folder and pass that on to the generator. +Preparers read your entity data and creates a working directory with your documentation source code. For example if you have set your `backstage.io/techdocs-ref` to `github:https://github.com/backstage/backstage.git` it will clone that repository to a temp folder and pass that on to the generator. Generators takes the prepared source and runs the `techdocs-container` on it. It then passes on the output folder of that build to the publisher. @@ -43,5 +43,5 @@ Any of these can be extended. If we want to publish to a external static file se ## Links -- [Frontend part of the plugin](https://github.com/spotify/backstage/tree/master/plugins/techdocs) +- [Frontend part of the plugin](https://github.com/backstage/backstage/tree/master/plugins/techdocs) - [The Backstage homepage](https://backstage.io) diff --git a/plugins/techdocs-backend/examples/documented-component/documented-component.yaml b/plugins/techdocs-backend/examples/documented-component/documented-component.yaml index 045ff89013..800116344f 100644 --- a/plugins/techdocs-backend/examples/documented-component/documented-component.yaml +++ b/plugins/techdocs-backend/examples/documented-component/documented-component.yaml @@ -4,7 +4,7 @@ metadata: name: documented-component description: A Service with TechDocs documentation annotations: - backstage.io/techdocs-ref: 'github:https://github.com/spotify/backstage/blob/master/plugins/techdocs-backend/examples/documented-component' + backstage.io/techdocs-ref: 'github:https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend/examples/documented-component' spec: type: service lifecycle: experimental diff --git a/plugins/techdocs-backend/src/techdocs/stages/prepare/commonGit.test.ts b/plugins/techdocs-backend/src/techdocs/stages/prepare/commonGit.test.ts index cec1110f97..843df476e9 100644 --- a/plugins/techdocs-backend/src/techdocs/stages/prepare/commonGit.test.ts +++ b/plugins/techdocs-backend/src/techdocs/stages/prepare/commonGit.test.ts @@ -51,7 +51,7 @@ describe('commonGit preparer', () => { const mockEntity = createMockEntity({ 'backstage.io/techdocs-ref': - 'github:https://github.com/spotify/backstage/blob/master/plugins/techdocs-backend/examples/documented-component', + 'github:https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend/examples/documented-component', }); const tempDocsPath = await preparer.prepare(mockEntity); diff --git a/plugins/techdocs-backend/src/techdocs/stages/prepare/dir.test.ts b/plugins/techdocs-backend/src/techdocs/stages/prepare/dir.test.ts index 4412e6bf73..dc2b1d7d48 100644 --- a/plugins/techdocs-backend/src/techdocs/stages/prepare/dir.test.ts +++ b/plugins/techdocs-backend/src/techdocs/stages/prepare/dir.test.ts @@ -78,7 +78,7 @@ describe('directory preparer', () => { const mockEntity = createMockEntity({ 'backstage.io/managed-by-location': - 'github:https://github.com/spotify/backstage/blob/master/catalog-info.yaml', + 'github:https://github.com/backstage/backstage/blob/master/catalog-info.yaml', 'backstage.io/techdocs-ref': 'dir:./docs', }); diff --git a/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx b/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx index 7b94024948..4cd2c34ec1 100644 --- a/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx +++ b/plugins/welcome/src/components/WelcomePage/WelcomePage.tsx @@ -69,7 +69,7 @@ const WelcomePage = () => { of these phases. The best way to keep track of the progress is through the  Milestones @@ -116,7 +116,7 @@ const WelcomePage = () => { We suggest you either check out the documentation for{' '} creating a plugin @@ -127,7 +127,7 @@ const WelcomePage = () => { {' '} in the directory{' '} plugins/ @@ -144,7 +144,7 @@ const WelcomePage = () => { Create a plugin From 7450c5eabbe9c1c0349283a7a038275a8ca3d1d3 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 11:06:26 +0100 Subject: [PATCH 047/100] Release new version of techdocs-container (#3208) Includes upgrade of mkdocs-techdocs-core package from 0.0.10 to 0.0.11: --- packages/techdocs-container/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/techdocs-container/Dockerfile b/packages/techdocs-container/Dockerfile index 1c1ca264db..c30db043cd 100644 --- a/packages/techdocs-container/Dockerfile +++ b/packages/techdocs-container/Dockerfile @@ -18,7 +18,7 @@ FROM python:3.8-alpine RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig RUN curl -o plantuml.jar -L http://sourceforge.net/projects/plantuml/files/plantuml.1.2020.16.jar/download && echo "c789ace48347c43073232b1458badc5810c01fe8 plantuml.jar" | sha1sum -c - && mv plantuml.jar /opt/plantuml.jar -RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.10 +RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.11 # Create script to call plantuml.jar from a location in path From 474bb5b57f31eaf5868fb5efcae275ea64d9182e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 11:39:12 +0100 Subject: [PATCH 048/100] rewrite other references to spotify/backstage and sorrounding things --- README.md | 2 +- catalog-info.yaml | 4 ++-- contrib/chart/backstage/Chart.yaml | 2 +- contrib/chart/backstage/values.yaml | 4 ++-- .../backstage/Chart.yaml | 2 +- docs/conf/writing.md | 2 +- docs/dls/design.md | 12 ++++++------ .../software-catalog/well-known-annotations.md | 6 +++--- .../extending/create-your-own-preparer.md | 2 +- .../extending/create-your-own-publisher.md | 2 +- .../extending/create-your-own-templater.md | 2 +- .../running-backstage-locally.md | 2 +- docs/overview/architecture-overview.md | 4 ++-- .../blog/2020-09-30-backstage-design-system.md | 2 +- microsite/core/Footer.js | 2 +- packages/cli/src/lib/codeowners/codeowners.ts | 2 +- .../default-app/catalog-info.yaml.hbs | 2 +- packages/techdocs-container/README.md | 2 +- .../processors/GithubOrgReaderProcessor.ts | 2 +- .../ingestion/processors/util/parse.test.ts | 4 ++-- plugins/github-actions/README.md | 3 +-- plugins/github-actions/examples/sample.yaml | 2 +- plugins/rollbar-backend/README.md | 2 +- plugins/rollbar/README.md | 2 +- .../docs-template/template.yaml | 7 +++---- .../src/scaffolder/jobs/processor.test.ts | 2 +- .../stages/prepare/preparers.test.ts | 2 +- .../stages/templater/cookiecutter.test.ts | 18 +++++++++--------- .../stages/templater/templaters.test.ts | 2 +- plugins/sonarqube/README.md | 2 +- scripts/verify-links.js | 4 ++-- 31 files changed, 53 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index b1926f070e..d2ed3c6e96 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ [![Main CI Build](https://github.com/backstage/backstage/workflows/Main%20Master%20Build/badge.svg)](https://github.com/backstage/backstage/actions?query=workflow%3A%22Main+Master+Build%22) [![Discord](https://img.shields.io/discord/687207715902193673)](https://discord.gg/EBHEGzX) ![Code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg) -[![Codecov](https://img.shields.io/codecov/c/github/spotify/backstage)](https://codecov.io/gh/spotify/backstage) +[![Codecov](https://img.shields.io/codecov/c/github/backstage/backstage)](https://codecov.io/gh/backstage/backstage) [![](https://img.shields.io/npm/v/@backstage/core?label=Version)](https://github.com/backstage/backstage/releases) ## What is Backstage? diff --git a/catalog-info.yaml b/catalog-info.yaml index 9c7e5309dd..617d01093e 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -5,10 +5,10 @@ metadata: description: | Backstage is an open-source developer portal that puts the developer experience first. annotations: - github.com/project-slug: spotify/backstage + github.com/project-slug: backstage/backstage backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git lighthouse.com/website-url: https://backstage.io spec: type: library - owner: Spotify + owner: CNCF lifecycle: experimental diff --git a/contrib/chart/backstage/Chart.yaml b/contrib/chart/backstage/Chart.yaml index be5c20af82..8aeab9be3e 100644 --- a/contrib/chart/backstage/Chart.yaml +++ b/contrib/chart/backstage/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: backstage -description: A Helm chart for Spotify Backstage +description: A Helm chart for Backstage type: application # This is the chart version. This version number should be incremented each time you make changes diff --git a/contrib/chart/backstage/values.yaml b/contrib/chart/backstage/values.yaml index eb06422d34..a4a0fadcc2 100644 --- a/contrib/chart/backstage/values.yaml +++ b/contrib/chart/backstage/values.yaml @@ -105,14 +105,14 @@ appConfig: rejectUnauthorized: false ca: sentry: - organization: spotify + organization: example-org-name techdocs: storageUrl: https://demo.example.com/api/techdocs/static/docs requestUrl: https://demo.example.com/api/techdocs lighthouse: baseUrl: https://demo.example.com/lighthouse-api rollbar: - organization: roadie + organization: example-org-name # Auth config has recently moved into the app config file in upstream Backstage. However, # most of this config simply mandates that items like the client id and client secret should diff --git a/contrib/kubernetes/basic_kubernetes_example_with_helm/backstage/Chart.yaml b/contrib/kubernetes/basic_kubernetes_example_with_helm/backstage/Chart.yaml index efc3635a7f..6cbb7ea3cb 100644 --- a/contrib/kubernetes/basic_kubernetes_example_with_helm/backstage/Chart.yaml +++ b/contrib/kubernetes/basic_kubernetes_example_with_helm/backstage/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 appVersion: '1.0' -description: A Helm chart for Spotify Backstage +description: A Helm chart for Backstage name: backstage version: 0.1.1-alpha.12 diff --git a/docs/conf/writing.md b/docs/conf/writing.md index 06d4b52f3f..4eb92bb2ff 100644 --- a/docs/conf/writing.md +++ b/docs/conf/writing.md @@ -19,7 +19,7 @@ backend: baseUrl: http://localhost:7000 organization: - name: Spotify + name: CNCF proxy: /my/api: diff --git a/docs/dls/design.md b/docs/dls/design.md index fa3a0c159e..a108343a42 100644 --- a/docs/dls/design.md +++ b/docs/dls/design.md @@ -46,9 +46,9 @@ referencing Figma documents to share specs and prototypes with the community. ### Creating a New Design Component -| Step 1 | Step 2 | Step 3 | Step 4 | Step 5 | Step 6 | -| :------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | -| Platform design team submits an issue to **spotify/Backstage GitHub** with a potential component. | Backstage community offers feedback or approval on **spotify/Backstage GitHub**. | Platform design team adjusts accordingly (as they see fit) and update the Figma DLS document. | Designed component is added to **spotify/Backstage GitHub** as an issue. | External or internal Backstage open source contributors build the component. | External or internal contributors add the component to the **Backstage Storybook**. 🎉 | +| Step 1 | Step 2 | Step 3 | Step 4 | Step 5 | Step 6 | +| :-------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :--------------------------------------------------------------------------- | :------------------------------------------------------------------------------------- | +| Platform design team submits an issue to **backstage/backstage GitHub** with a potential component. | Backstage community offers feedback or approval on **backstage/backstage GitHub**. | Platform design team adjusts accordingly (as they see fit) and update the Figma DLS document. | Designed component is added to **backstage/backstage GitHub** as an issue. | External or internal Backstage open source contributors build the component. | External or internal contributors add the component to the **Backstage Storybook**. 🎉 | ### Building for Backstage @@ -56,9 +56,9 @@ referencing Figma documents to share specs and prototypes with the community. | :------------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------- | | External or internal contributors use Backstage and come up with an idea of an entity to build for Backstage. | External or internal contributors refer to the Backstage Open Source design system documentation in the Figma DLS document. | External or internal contributors leverage the components and tokens from the Backstage Storybook. | External or internal contributors build their Backstage entity. | -| Step 5 | Step 6 | Step 7 | Step 8 | -| :------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ | -| External or internal contributors make a pull request for their entity on spotify/Backstage GitHub for review. | Platform designers and devs review the entity and submit feedback or approval on spotify/Backstage GitHub. | External or internal contributors make the changes, pull request is approved and the entity is merged. It’s live on Backstage! 🎉 | If the entity happens to be or include a UX component, it’s added to Backstage Storybook as well. | +| Step 5 | Step 6 | Step 7 | Step 8 | +| :--------------------------------------------------------------------------------------------------------------- | :----------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------ | +| External or internal contributors make a pull request for their entity on backstage/backstage GitHub for review. | Platform designers and devs review the entity and submit feedback or approval on backstage/backstage GitHub. | External or internal contributors make the changes, pull request is approved and the entity is merged. It’s live on Backstage! 🎉 | If the entity happens to be or include a UX component, it’s added to Backstage Storybook as well. | The following diagram shows the relationship between the Backstage Design System and our foundation, which comprises of [Material UI](https://material-ui.com/) diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index f1ea9347a7..25489b89d9 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -75,7 +75,7 @@ that entity. # Example: metadata: annotations: - github.com/project-slug: spotify/backstage + github.com/project-slug: backstage/backstage ``` The value of this annotation is the so-called slug that identifies a project on @@ -93,7 +93,7 @@ that entity. # Example: metadata: annotations: - github.com/team-slug: spotify/backstage-core + github.com/team-slug: backstage/maintainers ``` The value of this annotation is the so-called slug that identifies a team on @@ -146,7 +146,7 @@ that entity. # Example: metadata: annotations: - rollbar.com/project-slug: spotify/pump-station + rollbar.com/project-slug: backstage/pump-station ``` The value of this annotation is the so-called slug (or alternatively, the ID) of diff --git a/docs/features/software-templates/extending/create-your-own-preparer.md b/docs/features/software-templates/extending/create-your-own-preparer.md index 186b2a3c0a..5419748c3a 100644 --- a/docs/features/software-templates/extending/create-your-own-preparer.md +++ b/docs/features/software-templates/extending/create-your-own-preparer.md @@ -15,7 +15,7 @@ location protocols: - `github://` These two are added to the `PreparersBuilder` and then passed into the -`createRouter` function of the `@spotify/plugin-scaffolder-backend`. +`createRouter` function of the `@backstage/plugin-scaffolder-backend`. A full example backend can be found in [`scaffolder.ts`](https://github.com/backstage/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), diff --git a/docs/features/software-templates/extending/create-your-own-publisher.md b/docs/features/software-templates/extending/create-your-own-publisher.md index f076640ebe..97854c999a 100644 --- a/docs/features/software-templates/extending/create-your-own-publisher.md +++ b/docs/features/software-templates/extending/create-your-own-publisher.md @@ -18,7 +18,7 @@ Currently we provide the following `publishers`: - `github` This publisher is passed through to the `createRouter` function of the -`@spotify/plugin-scaffolder-backend`. Currently, only one publisher is +`@backstage/plugin-scaffolder-backend`. Currently, only one publisher is supported, but PR's are always welcome. An full example backend can be found diff --git a/docs/features/software-templates/extending/create-your-own-templater.md b/docs/features/software-templates/extending/create-your-own-templater.md index 26e01e2782..63acd38286 100644 --- a/docs/features/software-templates/extending/create-your-own-templater.md +++ b/docs/features/software-templates/extending/create-your-own-templater.md @@ -17,7 +17,7 @@ Currently we provide the following templaters: - `cookiecutter` This templater is added to the `TemplaterBuilder` and then passed into the -`createRouter` function of the `@spotify/plugin-scaffolder-backend` +`createRouter` function of the `@backstage/plugin-scaffolder-backend` An full example backend can be found [here](https://github.com/backstage/backstage/blob/d91c10f654475a60829fa33a5c81018e517a319a/packages/backend/src/plugins/scaffolder.ts), diff --git a/docs/getting-started/running-backstage-locally.md b/docs/getting-started/running-backstage-locally.md index de3dbe93b5..a30a918fd0 100644 --- a/docs/getting-started/running-backstage-locally.md +++ b/docs/getting-started/running-backstage-locally.md @@ -42,7 +42,7 @@ of GitHub and run an initial build. ```bash # Start from your local development folder -git clone --depth 1 git@github.com:spotify/backstage.git +git clone --depth 1 git@github.com:backstage/backstage.git cd backstage # Fetch our dependencies and run an initial build diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md index ddf7980cbc..2d65e9e430 100644 --- a/docs/overview/architecture-overview.md +++ b/docs/overview/architecture-overview.md @@ -169,8 +169,8 @@ in the future. To learn more about the future of databases and Backstage, see the following GitHub issues. -- [Knex + Plugins (Multiple vs Single Database) · Issue #1598 · spotify/backstage](https://github.com/backstage/backstage/issues/1598) -- [Update migrations to support postgres by dariddler · Pull Request #1527 · spotify/backstage](https://github.com/backstage/backstage/pull/1527#discussion_r450374145) +- [Knex + Plugins (Multiple vs Single Database) · Issue #1598 · backstage/backstage](https://github.com/backstage/backstage/issues/1598) +- [Update migrations to support postgres by dariddler · Pull Request #1527 · backstage/backstage](https://github.com/backstage/backstage/pull/1527#discussion_r450374145) ## Containerization diff --git a/microsite/blog/2020-09-30-backstage-design-system.md b/microsite/blog/2020-09-30-backstage-design-system.md index bb12a26100..a1d087f755 100644 --- a/microsite/blog/2020-09-30-backstage-design-system.md +++ b/microsite/blog/2020-09-30-backstage-design-system.md @@ -70,7 +70,7 @@ To keep up with our latest design guidelines, go to [Designing for Backstage](ht ### [GitHub](https://github.com/backstage/backstage) -Join in on the action [at spotify/backstage on GitHub](https://github.com/backstage/backstage) by submitting issues and opening pull requests for all things related to components and patterns in Backstage. +Join in on the action [at backstage/backstage on GitHub](https://github.com/backstage/backstage) by submitting issues and opening pull requests for all things related to components and patterns in Backstage. ![img](assets/backstage-discord-DS.png) diff --git a/microsite/core/Footer.js b/microsite/core/Footer.js index e48c86acce..6ce3c3dd84 100644 --- a/microsite/core/Footer.js +++ b/microsite/core/Footer.js @@ -59,7 +59,7 @@ class Footer extends React.Component { className="github-button" href={this.props.config.repoUrl} data-icon="octicon-star" - data-count-href="/spotify/backstage/stargazers" + data-count-href="/backstage/backstage/stargazers" data-show-count="true" data-count-aria-label="# stargazers on GitHub" aria-label="Star this project on GitHub" diff --git a/packages/cli/src/lib/codeowners/codeowners.ts b/packages/cli/src/lib/codeowners/codeowners.ts index 91b0e19782..aa24f91aac 100644 --- a/packages/cli/src/lib/codeowners/codeowners.ts +++ b/packages/cli/src/lib/codeowners/codeowners.ts @@ -20,7 +20,7 @@ import path from 'path'; const TEAM_ID_RE = /^@[-\w]+\/[-\w]+$/; const USER_ID_RE = /^@[-\w]+$/; const EMAIL_RE = /^[^@]+@[-.\w]+\.[-\w]+$/i; -const DEFAULT_OWNER = '@spotify/backstage-core'; +const DEFAULT_OWNER = '@backstage/maintainers'; type CodeownersEntry = { ownedPath: string; diff --git a/packages/create-app/templates/default-app/catalog-info.yaml.hbs b/packages/create-app/templates/default-app/catalog-info.yaml.hbs index b3fbbda5ce..0f8e4f5aeb 100644 --- a/packages/create-app/templates/default-app/catalog-info.yaml.hbs +++ b/packages/create-app/templates/default-app/catalog-info.yaml.hbs @@ -5,7 +5,7 @@ metadata: description: An example of a Backstage application. # Example for optional annotations # annotations: - # github.com/project-slug: spotify/backstage + # github.com/project-slug: backstage/backstage # backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git spec: type: website diff --git a/packages/techdocs-container/README.md b/packages/techdocs-container/README.md index 7f1350031b..53a518fa97 100644 --- a/packages/techdocs-container/README.md +++ b/packages/techdocs-container/README.md @@ -24,7 +24,7 @@ Then open up `http://localhost:8000` on your local machine. This container is published on DockerHub - https://hub.docker.com/r/spotify/techdocs -The publishing is configured by [Automated Builds](https://hub.docker.com/repository/docker/spotify/techdocs/builds/edit) feature on Docker Hub which is triggered from GitHub (on new commits and releases). @spotify/techdocs-core team has access to the settings. +The publishing is configured by [Automated Builds](https://hub.docker.com/repository/docker/spotify/techdocs/builds/edit) feature on Docker Hub which is triggered from GitHub (on new commits and releases). @backstage/techdocs-core team has access to the settings. The `latest` tag on Docker Hub points to the recent commits in the `master` branch. The [version tags](https://hub.docker.com/r/spotify/techdocs/tags) (e.g. v0.1.1-alpha.24) point to the GitHub tags created from [releases](https://github.com/backstage/backstage/releases) of this GitHub repository. diff --git a/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts b/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts index bef57a6e5c..9aecb8b86e 100644 --- a/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts +++ b/plugins/catalog-backend/src/ingestion/processors/GithubOrgReaderProcessor.ts @@ -182,7 +182,7 @@ export function readConfig(config: Config): ProviderConfig[] { export function parseUrl(urlString: string): { org: string } { const path = new URL(urlString).pathname.substr(1).split('/'); - // /spotify + // /backstage if (path.length === 1 && path[0].length) { return { org: decodeURIComponent(path[0]) }; } diff --git a/plugins/catalog-backend/src/ingestion/processors/util/parse.test.ts b/plugins/catalog-backend/src/ingestion/processors/util/parse.test.ts index 1400a066cd..8cb91fb2ce 100644 --- a/plugins/catalog-backend/src/ingestion/processors/util/parse.test.ts +++ b/plugins/catalog-backend/src/ingestion/processors/util/parse.test.ts @@ -34,7 +34,7 @@ describe('parseEntityYaml', () => { name: backstage description: backstage.io annotations: - github.com/project-slug: 'spotify/backstage' + github.com/project-slug: 'backstage/backstage' spec: type: website lifecycle: production @@ -54,7 +54,7 @@ describe('parseEntityYaml', () => { name: 'backstage', description: 'backstage.io', annotations: { - 'github.com/project-slug': 'spotify/backstage', + 'github.com/project-slug': 'backstage/backstage', }, }, spec: { diff --git a/plugins/github-actions/README.md b/plugins/github-actions/README.md index 07a69cdfad..1a46022c58 100644 --- a/plugins/github-actions/README.md +++ b/plugins/github-actions/README.md @@ -26,8 +26,7 @@ TBD name: backstage description: backstage.io annotations: - github.com/project-slug: 'spotify/backstage' - + github.com/project-slug: 'backstage/backstage' spec: type: website lifecycle: production diff --git a/plugins/github-actions/examples/sample.yaml b/plugins/github-actions/examples/sample.yaml index af12b6bb04..beda3c58ed 100644 --- a/plugins/github-actions/examples/sample.yaml +++ b/plugins/github-actions/examples/sample.yaml @@ -4,7 +4,7 @@ metadata: name: backstage description: backstage.io annotations: - github.com/project-slug: 'spotify/backstage' + github.com/project-slug: 'backstage/backstage' backstage.io/techdocs-ref: github:https://github.com/backstage/backstage.git spec: type: website diff --git a/plugins/rollbar-backend/README.md b/plugins/rollbar-backend/README.md index efa715a2d3..8f13eb5f26 100644 --- a/plugins/rollbar-backend/README.md +++ b/plugins/rollbar-backend/README.md @@ -8,7 +8,7 @@ The following values are read from the configuration file. ```yaml rollbar: - organization: spotify + organization: organization-name accountToken: $env: ROLLBAR_ACCOUNT_TOKEN ``` diff --git a/plugins/rollbar/README.md b/plugins/rollbar/README.md index 0af117e07c..a232462dde 100644 --- a/plugins/rollbar/README.md +++ b/plugins/rollbar/README.md @@ -53,7 +53,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => ( ```yaml # app.config.yaml rollbar: - organization: spotify + organization: organization-name accountToken: $env: ROLLBAR_ACCOUNT_TOKEN ``` diff --git a/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml b/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml index 31b57135ad..36404f088c 100644 --- a/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml +++ b/plugins/scaffolder-backend/sample-templates/docs-template/template.yaml @@ -9,13 +9,13 @@ metadata: - techdocs - mkdocs spec: - owner: spotify/techdocs-core + owner: backstage/techdocs-core templater: cookiecutter type: documentation path: '.' - + schema: - required: + required: - component_id - description properties: @@ -27,4 +27,3 @@ spec: title: Description type: string description: Help others understand what these docs are about. - diff --git a/plugins/scaffolder-backend/src/scaffolder/jobs/processor.test.ts b/plugins/scaffolder-backend/src/scaffolder/jobs/processor.test.ts index 8a875e4e2b..d23db937bb 100644 --- a/plugins/scaffolder-backend/src/scaffolder/jobs/processor.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/jobs/processor.test.ts @@ -61,7 +61,7 @@ describe('JobProcessor', () => { const mockValues: RequiredTemplateValues = { owner: 'blobby', - storePath: 'spotify/mock-repo', + storePath: 'backstage/mock-repo', }; describe('create', () => { diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.test.ts b/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.test.ts index 0aaef2633d..7c2d7e0a47 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/prepare/preparers.test.ts @@ -24,7 +24,7 @@ describe('Preparers', () => { metadata: { annotations: { 'backstage.io/managed-by-location': - 'file:/Users/bingo/spotify/backstage/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml', + 'file:/Users/bingo/backstage/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml', }, name: 'react-ssr-template', title: 'React SSR Template', diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.test.ts b/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.test.ts index 106a448d7c..568c95a073 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/templater/cookiecutter.test.ts @@ -51,12 +51,12 @@ describe('CookieCutter Templater', () => { return await fs.promises.mkdtemp(path.join(tempDir, 'temp')); }; - it('should write a cookiecutter.json file with the values from the entitiy', async () => { + it('should write a cookiecutter.json file with the values from the entity', async () => { const tempdir = await mkTemp(); const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', description: 'description', component_id: 'newthing', }; @@ -78,7 +78,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', component_id: 'something', }; @@ -96,7 +96,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', }; await expect( @@ -109,7 +109,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', component_id: 'newthing', }; @@ -137,7 +137,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', component_id: 'newthing', }; @@ -157,7 +157,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', component_id: 'newthing', }; @@ -203,7 +203,7 @@ describe('CookieCutter Templater', () => { const values = { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', component_id: 'newthing', }; @@ -243,7 +243,7 @@ describe('CookieCutter Templater', () => { directory: tempdir, values: { owner: 'blobby', - storePath: 'spotify/end-repo', + storePath: 'backstage/end-repo', }, logStream: stream, dockerClient: mockDocker, diff --git a/plugins/scaffolder-backend/src/scaffolder/stages/templater/templaters.test.ts b/plugins/scaffolder-backend/src/scaffolder/stages/templater/templaters.test.ts index 1c4fe90207..9ef20b7740 100644 --- a/plugins/scaffolder-backend/src/scaffolder/stages/templater/templaters.test.ts +++ b/plugins/scaffolder-backend/src/scaffolder/stages/templater/templaters.test.ts @@ -24,7 +24,7 @@ describe('Templaters', () => { metadata: { annotations: { 'backstage.io/managed-by-location': - 'file:/Users/bingo/spotify/backstage/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml', + 'file:/Users/bingo/backstage/plugins/scaffolder-backend/sample-templates/react-ssr-template/template.yaml', }, name: 'react-ssr-template', title: 'React SSR Template', diff --git a/plugins/sonarqube/README.md b/plugins/sonarqube/README.md index 3d3c1f725b..af18017359 100644 --- a/plugins/sonarqube/README.md +++ b/plugins/sonarqube/README.md @@ -90,6 +90,6 @@ metadata: sonarqube.org/project-key: YOUR_PROJECT_KEY spec: type: library - owner: Spotify + owner: CNCF lifecycle: experimental ``` diff --git a/scripts/verify-links.js b/scripts/verify-links.js index 6126f693e4..0422352d4e 100755 --- a/scripts/verify-links.js +++ b/scripts/verify-links.js @@ -27,7 +27,7 @@ async function verifyUrl(basePath, absUrl, docPages) { // Avoid having absolute URL links within docs/, so that links work on the site if ( absUrl.match( - /https:\/\/github.com\/spotify\/backstage\/(tree|blob)\/master\/docs\//, + /https:\/\/github.com\/backstage\/backstage\/(tree|blob)\/master\/docs\//, ) && basePath.match(/^(?:docs|microsite)\//) ) { @@ -37,7 +37,7 @@ async function verifyUrl(basePath, absUrl, docPages) { const url = absUrl .replace(/#.*$/, '') .replace( - /https:\/\/github.com\/spotify\/backstage\/(tree|blob)\/master/, + /https:\/\/github.com\/backstage\/backstage\/(tree|blob)\/master/, '', ); if (!url) { From c840f49c7e17cb8090fbd2c82f3cb28bea3b676c Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 11:43:59 +0100 Subject: [PATCH 049/100] README: add notice to update git remote --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index b1926f070e..cd33a0a6de 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ [![Codecov](https://img.shields.io/codecov/c/github/spotify/backstage)](https://codecov.io/gh/spotify/backstage) [![](https://img.shields.io/npm/v/@backstage/core?label=Version)](https://github.com/backstage/backstage/releases) +> We recently moved from `spotify/backstage`, update your remotes! +> +> `git remote set-url origin git@github.com:backstage/backstage.git` + ## What is Backstage? [Backstage](https://backstage.io/) is an open platform for building developer portals. Powered by a centralized service catalog, Backstage restores order to your microservices and infrastructure. So your product teams can ship high-quality code quickly — without compromising autonomy. From b8e67816c95ce10b13d55cfa562545f8c5294a5a Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 11:45:43 +0100 Subject: [PATCH 050/100] Remove mkdocs-techdocs-core from backstage mono-repo New home: https://github.com/backstage/mkdocs-techdocs-core --- docs/features/techdocs/concepts.md | 2 +- .../techdocs-core/.gitignore | 2 - .../techdocs-core/README.md | 149 ------------------ .../techdocs-core/requirements.txt | 16 -- .../techdocs-container/techdocs-core/setup.py | 57 ------- .../techdocs-core/src/__init__.py | 0 .../techdocs-core/src/core.py | 105 ------------ .../techdocs-core/src/test_core.py | 41 ----- 8 files changed, 1 insertion(+), 371 deletions(-) delete mode 100644 packages/techdocs-container/techdocs-core/.gitignore delete mode 100644 packages/techdocs-container/techdocs-core/README.md delete mode 100644 packages/techdocs-container/techdocs-core/requirements.txt delete mode 100644 packages/techdocs-container/techdocs-core/setup.py delete mode 100644 packages/techdocs-container/techdocs-core/src/__init__.py delete mode 100644 packages/techdocs-container/techdocs-core/src/core.py delete mode 100644 packages/techdocs-container/techdocs-core/src/test_core.py diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md index 13b780524b..ed1fc2220c 100644 --- a/docs/features/techdocs/concepts.md +++ b/docs/features/techdocs/concepts.md @@ -14,7 +14,7 @@ The TechDocs Core Plugin is an [MkDocs](https://www.mkdocs.org/) plugin created as a wrapper around multiple MkDocs plugins and Python Markdown extensions to standardize the configuration of MkDocs used for TechDocs. -[TechDocs Core](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) +[TechDocs Core](https://github.com/backstage/mkdocs-techdocs-core) ### TechDocs container diff --git a/packages/techdocs-container/techdocs-core/.gitignore b/packages/techdocs-container/techdocs-core/.gitignore deleted file mode 100644 index cd5c4a44f3..0000000000 --- a/packages/techdocs-container/techdocs-core/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.tox -*.egg-info diff --git a/packages/techdocs-container/techdocs-core/README.md b/packages/techdocs-container/techdocs-core/README.md deleted file mode 100644 index 7bd6fe4187..0000000000 --- a/packages/techdocs-container/techdocs-core/README.md +++ /dev/null @@ -1,149 +0,0 @@ -# techdocs-core - -This is the base [Mkdocs](https://mkdocs.org) plugin used when using Mkdocs with Spotify's TechDocs. It is written in Python and packages all of our Mkdocs defaults, such as theming, plugins, etc in a single plugin. - -[Python Package](https://pypi.org/project/mkdocs-techdocs-core/) - -## Usage - -```bash -$ pip install mkdocs-techdocs-core -``` - -Once you have installed the `mkdocs-techdocs-core` plugin, you'll need to add it to your `mkdocs.yml`. - -```yaml -site_name: Backstage Docs - -nav: - - Home: index.md - - Developing a Plugin: developing-a-plugin.md - -plugins: - - techdocs-core -``` - -## Running Locally - -You can install this package locally using `pip` and the `--editable` flag used for making developing Python packages. - -```bash -pip install --editable . -``` - -You'll then have the `techdocs-core` package available to use in Mkdocs and `pip` will point the dependency to this folder. - -## Running with Docker - -In the parent `Dockerfile` we add this folder to the build and install the package locally in the container. In the future, we'll probably move away from this approach and have it download directly from a Python registry (and this folder will publish to one). - -See the `README.md` located in the `techdocs-container/` folder for more details on how to build and run the Docker container. - -## Linting - -```bash -pip install -r requirements.txt -python -m black src/ -``` - -**Note:** This will write to all Python files in `src/` with the formatted code. If you would like to only check to see if it passes, simply append the `--check` flag. - -## MkDocs plugins and extensions - -The TechDocs Core MkDocs plugin comes with a set of extensions and plugins that mkdocs supports. Below you can find a list of all extensions and plugins that are included in the -TechDocs Core plugin: - -Plugins: - -- [search](https://www.mkdocs.org/user-guide/configuration/#search) -- [mkdocs-monorepo-plugin](https://github.com/spotify/mkdocs-monorepo-plugin) - -Extensions: - -- [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#admonitions) -- [toc](https://python-markdown.github.io/extensions/toc/) -- [pymdown](https://facelessuser.github.io/pymdown-extensions/) - - caret - - critic - - details - - emoji - - superfences - - inlinehilite - - magiclink - - mark - - smartsymobls - - highlight - - extra - - tabbed - - tasklist - - tilde -- [markdown_inline_graphviz](https://pypi.org/project/markdown-inline-graphviz/) -- [plantuml_markdown](https://pypi.org/project/plantuml-markdown/) - -## Changelog - -### 0.0.11 - -- Any MkDocs plugin configurations from mkdocs.yml will now work and override the default configuration. See https://github.com/spotify/backstage/issues/3017 - -### 0.0.10 - -- Pin Markdown version to fix issue with Graphviz - -### 0.0.9 - -- Change development status to 3 - Alpha - -### 0.0.8 - -- Superfences and Codehilite doesn't work very well together (squidfunk/mkdocs-material#1604) so therefore the codehilite extension is replaced by pymdownx.highlight - -* Uses pymdownx extensions v.7.1 instead of 8.0.0 to allow legacy_tab_classes config. This makes the techdocs core plugin compatible with the usage of tabs for grouping markdown with the following syntax: - -```` - ```java tab="java 2" - public void function() { - .... - } - ``` -```` - -as well as the new - -```` - === "Java" - - ```java - public void function() { - .... - } - ``` -```` - -The pymdownx extension will be bumped too 8.0.0 in the near future. - -- pymdownx.tabbed is added to support tabs to group markdown content, such as codeblocks. - -- "PyMdown Extensions includes three extensions that are meant to replace their counterpart in the default Python Markdown extensions." Therefore some extensions has been taken away in this version that comes by default from pymdownx.extra which is added now (https://facelessuser.github.io/pymdown-extensions/usage_notes/#incompatible-extensions) - -### 0.0.7 - -- Fix an issue with configuration of emoji support - -### 0.0.6 - -- Further adjustments to versions to find ones that are compatible - -### 0.0.5 - -- Downgrade some versions of markdown extensions to versions that are more stable - -### 0.0.4 - -- Added support for more mkdocs extensions - - mkdocs-material - - mkdocs-monorepo-plugin - - plantuml-markdown - - markdown_inline_graphviz_extension - - pygments - - pymdown-extensions diff --git a/packages/techdocs-container/techdocs-core/requirements.txt b/packages/techdocs-container/techdocs-core/requirements.txt deleted file mode 100644 index fc56ae6aee..0000000000 --- a/packages/techdocs-container/techdocs-core/requirements.txt +++ /dev/null @@ -1,16 +0,0 @@ -# The "base" version of the Mkdocs project. -# Note: if you update this, also update `install_requires` in setup.py -# https://github.com/mkdocs/mkdocs -mkdocs==1.1.2 -mkdocs-material==5.3.2 -mkdocs-monorepo-plugin==0.4.5 -plantuml-markdown==3.1.2 -markdown_inline_graphviz_extension==1.1 -pygments==2.6.1 -pymdown-extensions==7.1 -Markdown==3.2.2 - -# The linter using for Python -# Note: This requires Python 3.6+ to run, but can format Python 2 code too. -# https://github.com/psf/black -black==19.10b0 diff --git a/packages/techdocs-container/techdocs-core/setup.py b/packages/techdocs-container/techdocs-core/setup.py deleted file mode 100644 index bc3e6c7082..0000000000 --- a/packages/techdocs-container/techdocs-core/setup.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -Copyright 2020 Spotify AB - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -""" -from setuptools import setup, find_packages -from os import path - -# read the contents of the README file in the current directory -this_dir = path.abspath(path.dirname(__file__)) -with open(path.join(this_dir, "README.md"), encoding="utf-8") as file: - long_description = file.read() - -setup( - name="mkdocs-techdocs-core", - version="0.0.11", - description="A Mkdocs package that contains TechDocs defaults", - long_description=long_description, - long_description_content_type="text/markdown", - keywords="mkdocs", - url="https://github.com/backstage/backstage", - author="TechDocs Core", - author_email="pulp-fiction@spotify.com", - license="Apache-2.0", - python_requires=">=3.7", - install_requires=[ - "mkdocs>=1.1.2", - "mkdocs-material==5.3.2", - "mkdocs-monorepo-plugin==0.4.5", - "plantuml-markdown==3.1.2", - "markdown_inline_graphviz_extension==1.1", - "pygments==2.6.1", - "pymdown-extensions==7.1", - "Markdown==3.2.2", - ], - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Intended Audience :: Information Technology", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", - ], - packages=find_packages(), - entry_points={"mkdocs.plugins": ["techdocs-core = src.core:TechDocsCore"]}, -) diff --git a/packages/techdocs-container/techdocs-core/src/__init__.py b/packages/techdocs-container/techdocs-core/src/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/techdocs-container/techdocs-core/src/core.py b/packages/techdocs-container/techdocs-core/src/core.py deleted file mode 100644 index 7d32b69ad8..0000000000 --- a/packages/techdocs-container/techdocs-core/src/core.py +++ /dev/null @@ -1,105 +0,0 @@ -""" - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. -""" - -from mkdocs.plugins import BasePlugin -from mkdocs.theme import Theme -from mkdocs.contrib.search import SearchPlugin -from mkdocs_monorepo_plugin.plugin import MonorepoPlugin -from pymdownx.emoji import to_svg -import tempfile -import os - - -class TechDocsCore(BasePlugin): - def on_config(self, config): - fp = open(os.path.join(tempfile.gettempdir(), "techdocs_metadata.json"), "w+") - fp.write( - '{\n "site_name": "{{ config.site_name }}",\n "site_description": "{{ config.site_description }}"\n}' - ) - - mdx_configs_override = {} - if "mdx_configs" in config: - mdx_configs_override = config["mdx_configs"].copy() - - # Theme - config["theme"] = Theme( - name="material", static_templates=["techdocs_metadata.json",], - ) - config["theme"].dirs.append(tempfile.gettempdir()) - - # Plugins - del config["plugins"]["techdocs-core"] - - search_plugin = SearchPlugin() - search_plugin.load_config({}) - - monorepo_plugin = MonorepoPlugin() - monorepo_plugin.load_config({}) - config["plugins"]["search"] = search_plugin - config["plugins"]["monorepo"] = monorepo_plugin - - # Markdown Extensions - if "markdown_extensions" not in config: - config["markdown_extensions"] = [] - - if "mdx_configs" not in config: - config["mdx_configs"] = {} - - config["markdown_extensions"].append("admonition") - config["markdown_extensions"].append("toc") - config["mdx_configs"]["toc"] = { - "permalink": True, - } - - config["markdown_extensions"].append("pymdownx.caret") - config["markdown_extensions"].append("pymdownx.critic") - config["markdown_extensions"].append("pymdownx.details") - config["markdown_extensions"].append("pymdownx.emoji") - config["mdx_configs"]["pymdownx.emoji"] = {"emoji_generator": to_svg} - config["markdown_extensions"].append("pymdownx.inlinehilite") - config["markdown_extensions"].append("pymdownx.magiclink") - config["markdown_extensions"].append("pymdownx.mark") - config["markdown_extensions"].append("pymdownx.smartsymbols") - config["markdown_extensions"].append("pymdownx.superfences") - config["mdx_configs"]["pymdownx.superfences"] = { - "legacy_tab_classes": True, - } - config["markdown_extensions"].append("pymdownx.highlight") - config["mdx_configs"]["pymdownx.highlight"] = { - "linenums": True, - } - config["markdown_extensions"].append("pymdownx.extra") - config["mdx_configs"]["pymdownx.betterem"] = { - "smart_enable": "all", - } - config["markdown_extensions"].append("pymdownx.tabbed") - config["markdown_extensions"].append("pymdownx.tasklist") - config["mdx_configs"]["pymdownx.tasklist"] = { - "custom_checkbox": True, - } - config["markdown_extensions"].append("pymdownx.tilde") - - config["markdown_extensions"].append("markdown_inline_graphviz") - config["markdown_extensions"].append("plantuml_markdown") - - # merge config supplied by user in the mkdocs.yml - for key in mdx_configs_override: - if key in config["mdx_configs"]: - default_config = config["mdx_configs"][key] - override_config = mdx_configs_override[key] - default_config.update(override_config) - - return config diff --git a/packages/techdocs-container/techdocs-core/src/test_core.py b/packages/techdocs-container/techdocs-core/src/test_core.py deleted file mode 100644 index 621570356c..0000000000 --- a/packages/techdocs-container/techdocs-core/src/test_core.py +++ /dev/null @@ -1,41 +0,0 @@ -import unittest -import mkdocs.config as config -import mkdocs.plugins as plugins -from .core import TechDocsCore - - -class DummyTechDocsCorePlugin(plugins.BasePlugin): - pass - - -class TestTechDocsCoreConfig(unittest.TestCase): - def setUp(self): - self.techdocscore = TechDocsCore() - self.plugin_collection = plugins.PluginCollection() - plugin = DummyTechDocsCorePlugin() - self.plugin_collection["techdocs-core"] = plugin - self.mkdocs_yaml_config = {"plugins": self.plugin_collection} - - def test_removes_techdocs_core_plugin_from_config(self): - final_config = self.techdocscore.on_config(self.mkdocs_yaml_config) - self.assertTrue("techdocs-core" not in final_config["plugins"]) - - def test_merge_default_config_and_user_config(self): - self.mkdocs_yaml_config["markdown_extension"] = [] - self.mkdocs_yaml_config["mdx_configs"] = {} - self.mkdocs_yaml_config["markdown_extension"].append(["toc"]) - self.mkdocs_yaml_config["mdx_configs"]["toc"] = {"toc_depth": 3} - final_config = self.techdocscore.on_config(self.mkdocs_yaml_config) - self.assertTrue("toc" in final_config["mdx_configs"]) - self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) - self.assertTrue("toc_depth" in final_config["mdx_configs"]["toc"]) - - def test_override_default_config_with_user_config(self): - self.mkdocs_yaml_config["markdown_extension"] = [] - self.mkdocs_yaml_config["mdx_configs"] = {} - self.mkdocs_yaml_config["markdown_extension"].append(["toc"]) - self.mkdocs_yaml_config["mdx_configs"]["toc"] = {"permalink": False} - final_config = self.techdocscore.on_config(self.mkdocs_yaml_config) - self.assertTrue("toc" in final_config["mdx_configs"]) - self.assertTrue("permalink" in final_config["mdx_configs"]["toc"]) - self.assertFalse(final_config["mdx_configs"]["toc"]["permalink"]) From 9d800c49ccfb7ed8044d609c193f64122d824e27 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 11:47:35 +0100 Subject: [PATCH 051/100] TechDocs: Remove unnecessary GitHub workflow steps --- .github/workflows/techdocs-pypi.yml | 37 ----------------------------- .github/workflows/techdocs.yml | 11 --------- 2 files changed, 48 deletions(-) delete mode 100644 .github/workflows/techdocs-pypi.yml diff --git a/.github/workflows/techdocs-pypi.yml b/.github/workflows/techdocs-pypi.yml deleted file mode 100644 index 7680cb98b0..0000000000 --- a/.github/workflows/techdocs-pypi.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Master Build TechDocs PyPI Publish - -on: - push: - branches: [master] - paths: - - '.github/workflows/techdocs-pypi.yml' - - 'packages/techdocs-container/**' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.7] - - steps: - # Publish techdocs-core to PyPI - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@master - with: - python-version: 3.7 - - name: Build Python distribution - working-directory: ./packages/techdocs-container/techdocs-core - run: | - pip install wheel - rm -rf dist - python setup.py bdist_wheel sdist --formats gztar - - name: Publish a Python distribution to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.PYPI_API_KEY }} - packages_dir: ./packages/techdocs-container/techdocs-core/dist diff --git a/.github/workflows/techdocs.yml b/.github/workflows/techdocs.yml index 95b68c9376..9b5ea50217 100644 --- a/.github/workflows/techdocs.yml +++ b/.github/workflows/techdocs.yml @@ -31,14 +31,3 @@ jobs: with: path: packages/techdocs-container push: false - - # Lint Python code for techdocs-core package - - name: Prepare Python environment - run: | - python3 -m pip install --index-url https://pypi.org/simple/ setuptools - python3 -m pip install --upgrade pip - python3 -m pip install --index-url https://pypi.org/simple/ -r $TECHDOCS_CORE_PATH/requirements.txt - - - name: Lint techdocs-core package - run: | - python3 -m black --check $TECHDOCS_CORE_PATH/src From 878eb6095895797c3207be79d466b5a19a3c58c1 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 11:49:01 +0100 Subject: [PATCH 052/100] TechDocs: Update repo URL in documentation: --- docs/features/techdocs/FAQ.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/features/techdocs/FAQ.md b/docs/features/techdocs/FAQ.md index 080346b9d0..257d6e6f7a 100644 --- a/docs/features/techdocs/FAQ.md +++ b/docs/features/techdocs/FAQ.md @@ -23,8 +23,7 @@ is using the MkDocs #### What is the mkdocs-techdocs-core plugin? -The -[mkdocs-techdocs-core](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/techdocs-core/README.md) +The [mkdocs-techdocs-core](https://github.com/backstage/mkdocs-techdocs-core) package is a MkDocs Plugin that works like a wrapper around multiple MkDocs plugins (e.g. [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin)) as From 0672a3ecb16e9479ab1dcd41e64692595e8dd88c Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Tue, 3 Nov 2020 12:36:42 +0100 Subject: [PATCH 053/100] TechDocs: Remove unnecessary CODEOWNERS config --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7cce08798a..cf28c55cb3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -13,5 +13,4 @@ /packages/techdocs-cli @backstage/techdocs-core /packages/techdocs-container @backstage/techdocs-core /.github/workflows/techdocs.yml @backstage/techdocs-core -/.github/workflows/techdocs-pypi.yml @backstage/techdocs-core /.changeset/cost-insights-* @backstage/silver-lining From cf87e35e7fab42de3ce80fcdcb48caac9583a798 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 14:11:10 +0100 Subject: [PATCH 054/100] plugins/sonarqube: bump to 0.1.1 --- plugins/sonarqube/package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index fc14805c06..b3d90b2ca7 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube", - "version": "0.1.1-alpha.26", + "version": "0.1.1", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1-alpha.26", - "@backstage/core": "^0.1.1-alpha.26", - "@backstage/theme": "^0.1.1-alpha.26", + "@backstage/catalog-model": "^0.1.1", + "@backstage/core": "^0.1.1", + "@backstage/theme": "^0.1.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1-alpha.26", - "@backstage/dev-utils": "^0.1.1-alpha.26", - "@backstage/test-utils": "^0.1.1-alpha.26", + "@backstage/cli": "^0.1.1", + "@backstage/dev-utils": "^0.1.1", + "@backstage/test-utils": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", From 1914a3e88b100c4593e2c75228569366d434409b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 13:56:26 +0100 Subject: [PATCH 055/100] workflows: run prettier as part of changeset versioning --- .github/workflows/changeset.yml | 3 +++ package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index ac7872ea93..592a7421aa 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -15,5 +15,8 @@ jobs: run: yarn --frozen-lockfile - name: Create Release Pull Request uses: changesets/action@master + with: + # Calls out to `changeset version`, but also runs prettier + version: yarn version env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index 96e02e33f9..e49d7438c0 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,8 @@ "prettier:check": "prettier --check .", "lerna": "lerna", "storybook": "yarn workspace storybook start", - "build-storybook": "yarn workspace storybook build-storybook" + "build-storybook": "yarn workspace storybook build-storybook", + "version": "changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}'" }, "workspaces": { "packages": [ From a963b59b0441960d23244788f1e520c27086b3f8 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Tue, 3 Nov 2020 14:39:39 +0100 Subject: [PATCH 056/100] refactor: use markdown dialects (gfm as default) --- .changeset/3157.md | 11 ++++++----- .../MarkdownContent.stories.tsx | 4 ++-- .../MarkdownContent/MarkdownContent.test.tsx | 19 ++++++++++++++----- .../MarkdownContent/MarkdownContent.tsx | 15 +++++++++------ 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.changeset/3157.md b/.changeset/3157.md index ba6eb8314f..f15d05c46a 100644 --- a/.changeset/3157.md +++ b/.changeset/3157.md @@ -1,15 +1,16 @@ --- -'@backstage/core': minor +'@backstage/core': patch --- -Adds the MarkdownContent component to render and display markdown input. +Adds the MarkdownContent component to render and display Markdown content with the default +[GFM](https://github.github.com/gfm/) (Github flavored Markdown) dialect. ``` - + ``` -Render and display the github flavored markdown [GFM](https://github.github.com/gfm/) input: +To render the Markdown content with plain [CommonMark](https://commonmark.org/), set the dialect to `common-mark` ``` - + ( - + ); export const MarkdownContentGithubFlavoredCommonMark = () => ( - + ); diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx index 2fb40d2f4f..dcbe421dcb 100644 --- a/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.test.tsx @@ -19,7 +19,7 @@ import { renderWithEffects, wrapInTestApp } from '@backstage/test-utils'; import { MarkdownContent } from './MarkdownContent'; describe('', () => { - it('render MarkdownContent component with common mark', async () => { + it('render MarkdownContent component', async () => { const rendered = await renderWithEffects( wrapInTestApp( , @@ -30,17 +30,26 @@ describe('', () => { expect(rendered.getByText('H3', { selector: 'h3' })).toBeInTheDocument(); }); - it('render MarkdownContent component with common mark github flavored', async () => { + it('render MarkdownContent component with GitHub flavored Markdown dialect', async () => { const rendered = await renderWithEffects( - wrapInTestApp( - , - ), + wrapInTestApp(), ); expect( rendered.getByText('https://example.com', { selector: 'a' }), ).toBeInTheDocument(); }); + it('Render MarkdownContent component with common mark dialect', async () => { + const rendered = await renderWithEffects( + wrapInTestApp( + , + ), + ); + expect( + rendered.getByText('https://example.com', { selector: 'p' }), + ).toBeInTheDocument(); + }); + it('render MarkdownContent component with CodeSnippet for code blocks', async () => { const rendered = await renderWithEffects( wrapInTestApp(), diff --git a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx index 4f234565d2..0000e54a5f 100644 --- a/packages/core/src/components/MarkdownContent/MarkdownContent.tsx +++ b/packages/core/src/components/MarkdownContent/MarkdownContent.tsx @@ -59,12 +59,9 @@ const useStyles = makeStyles(theme => ({ }, })); -/** - * MarkdownContent. Renders markdown (CommonMark, optionally with [GFM](https://github.com/remarkjs/remark-gfm)) to formatted HTML. - */ type Props = { content: string; - enableGfm?: boolean; + dialect?: 'gfm' | 'common-mark'; }; const renderers = { @@ -73,11 +70,17 @@ const renderers = { }, }; -export const MarkdownContent = ({ content, enableGfm = false }: Props) => { +/** + * MarkdownContent + * -- + * Renders markdown with the default dialect [gfm - GitHub flavored Markdown](https://github.github.com/gfm/) to backstage theme styled HTML. + * If you just want to render to plain [CommonMark](https://commonmark.org/), set the dialect to `'common-mark'` + */ +export const MarkdownContent = ({ content, dialect = 'gfm' }: Props) => { const classes = useStyles(); return ( Date: Tue, 3 Nov 2020 15:22:49 +0100 Subject: [PATCH 057/100] workflows: fix changeset release script naming --- .github/workflows/changeset.yml | 2 +- package.json | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 592a7421aa..a557b4921b 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -17,6 +17,6 @@ jobs: uses: changesets/action@master with: # Calls out to `changeset version`, but also runs prettier - version: yarn version + version: yarn release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/package.json b/package.json index e49d7438c0..505ee0caad 100644 --- a/package.json +++ b/package.json @@ -24,12 +24,11 @@ "docker-build": "yarn tsc && yarn workspace example-backend build-image", "create-plugin": "backstage-cli create-plugin --scope backstage --no-private", "remove-plugin": "backstage-cli remove-plugin", - "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push --force-publish; fi", + "release": "changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}'", "prettier:check": "prettier --check .", "lerna": "lerna", "storybook": "yarn workspace storybook start", - "build-storybook": "yarn workspace storybook build-storybook", - "version": "changeset version && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}'" + "build-storybook": "yarn workspace storybook build-storybook" }, "workspaces": { "packages": [ From 9bf610b109757d68c0714bcd49e648ed9e410c2b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 17:41:03 +0100 Subject: [PATCH 058/100] docs/api: fix link in utility APIs --- docs/api/utility-apis.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api/utility-apis.md b/docs/api/utility-apis.md index 1ebf2ae88b..0adafc020a 100644 --- a/docs/api/utility-apis.md +++ b/docs/api/utility-apis.md @@ -160,7 +160,8 @@ const app = createApp({ ``` A common pattern is to export a list of all APIs from `apis.ts`, next to -`App.tsx`. See the [example app in this repo](../../packages/app/src/apis.ts) +`App.tsx`. See the +[example app in this repo](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts) for an example. ## Custom implementations of Utility APIs From cff0a558e5f0cee605963a32892e3adad5f9cea6 Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Tue, 3 Nov 2020 13:52:39 -0500 Subject: [PATCH 059/100] Expose alerts for internal use --- plugins/cost-insights/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/cost-insights/src/index.ts b/plugins/cost-insights/src/index.ts index 1e6172d568..cefdefb9c9 100644 --- a/plugins/cost-insights/src/index.ts +++ b/plugins/cost-insights/src/index.ts @@ -18,7 +18,8 @@ export { plugin } from './plugin'; export * from './client'; export * from './api'; export * from './components'; -export { useCurrency } from './hooks'; +export { useCurrency, CurrencyContext } from './hooks'; export * from './types'; export * from './utils/tests'; export * from './utils/duration'; +export * from './utils/alerts'; From 02f3e571ade91ce49aca0def49df3b70e5b3a2d7 Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Tue, 3 Nov 2020 13:52:57 -0500 Subject: [PATCH 060/100] Make lastBillingDate a param for product insights --- plugins/cost-insights/src/api/CostInsightsApi.ts | 2 ++ plugins/cost-insights/src/client.ts | 3 ++- .../src/components/ProductInsightsCard/ProductInsightsCard.tsx | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/cost-insights/src/api/CostInsightsApi.ts b/plugins/cost-insights/src/api/CostInsightsApi.ts index be5cd54fdb..a9048dedb8 100644 --- a/plugins/cost-insights/src/api/CostInsightsApi.ts +++ b/plugins/cost-insights/src/api/CostInsightsApi.ts @@ -112,12 +112,14 @@ export type CostInsightsApi = { * @param group * @param duration A time duration, such as P1M. See the Duration type for a detailed explanation * of how the durations are interpreted in Cost Insights. + * @param lastBillingDate The most current date for which billing data is complete, in YYYY-MM-DD format. * @param project (optional) The project id from getGroupProjects or query parameters */ getProductInsights( product: string, group: string, duration: Duration, + lastBillingDate: string, project: Maybe, ): Promise; diff --git a/plugins/cost-insights/src/client.ts b/plugins/cost-insights/src/client.ts index f7671bcce0..69822d7a63 100644 --- a/plugins/cost-insights/src/client.ts +++ b/plugins/cost-insights/src/client.ts @@ -197,10 +197,11 @@ export class ExampleCostInsightsClient implements CostInsightsApi { product: string, group: string, duration: Duration, + lastBillingDate: string, project: Maybe, ): Promise { const projectProductInsights = await this.request( - { product, group, duration, project }, + { product, group, duration, lastBillingDate, project }, { aggregation: [80_000, 110_000], change: { diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx index 840c99522a..abf56d91db 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx @@ -86,6 +86,7 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { product.kind, group!, productFilter!.duration, + lastCompleteBillingDate, project, ); setResource(p); @@ -107,6 +108,7 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { group, product.kind, project, + lastCompleteBillingDate, ]); const onPeriodSelect = (duration: Duration) => { From 522132e5e8a9c2d9b0aaef9634cc9cac8cb945e9 Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Tue, 3 Nov 2020 13:53:05 -0500 Subject: [PATCH 061/100] Add changeset --- .changeset/rich-dodos-smell.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rich-dodos-smell.md diff --git a/.changeset/rich-dodos-smell.md b/.changeset/rich-dodos-smell.md new file mode 100644 index 0000000000..a579797437 --- /dev/null +++ b/.changeset/rich-dodos-smell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +expose alerts utilities for export From db3d03228350f97cde1925ca7add53f2ddd1eeab Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Tue, 3 Nov 2020 15:25:01 -0500 Subject: [PATCH 062/100] Update getProductInsights to accept a single object with fields --- .../cost-insights/src/api/CostInsightsApi.ts | 44 +++++++++---- plugins/cost-insights/src/client.ts | 66 +++++++++---------- .../ProductInsightsCard.tsx | 10 +-- plugins/cost-insights/src/index.ts | 2 +- 4 files changed, 66 insertions(+), 56 deletions(-) diff --git a/plugins/cost-insights/src/api/CostInsightsApi.ts b/plugins/cost-insights/src/api/CostInsightsApi.ts index a9048dedb8..bedbf8319d 100644 --- a/plugins/cost-insights/src/api/CostInsightsApi.ts +++ b/plugins/cost-insights/src/api/CostInsightsApi.ts @@ -26,6 +26,34 @@ import { MetricData, } from '../types'; +export type ProductInsightsOptions = { + /** + * The product from the cost-insights configuration in app-config.yaml + */ + product: string; + + /** + * The group id from getUserGroups or query parameters + */ + group: string; + + /** + * A time duration, such as P1M. See the Duration type for a detailed explanation + * of how the durations are interpreted in Cost Insights. + */ + duration: Duration; + + /** + * The most current date for which billing data is complete, in YYYY-MM-DD format. + */ + lastCompleteBillingDate: string; + + /** + * (optional) The project id from getGroupProjects or query parameters + */ + project: Maybe; +}; + export type CostInsightsApi = { /** * Get the most current date for which billing data is complete, in YYYY-MM-DD format. This helps @@ -108,21 +136,9 @@ export type CostInsightsApi = { * The time period is supplied as a Duration rather than intervals, since this is always expected * to return data for two bucketed time period (e.g. month vs month, or quarter vs quarter). * - * @param product The product from the cost-insights configuration in app-config.yaml - * @param group - * @param duration A time duration, such as P1M. See the Duration type for a detailed explanation - * of how the durations are interpreted in Cost Insights. - * @param lastBillingDate The most current date for which billing data is complete, in YYYY-MM-DD format. - * @param project (optional) The project id from getGroupProjects or query parameters + * @param options Options to use when fetching insights for a particular cloud product and interval timeframe. */ - getProductInsights( - product: string, - group: string, - duration: Duration, - lastBillingDate: string, - project: Maybe, - ): Promise; - + getProductInsights(options: ProductInsightsOptions): Promise; /** * Get current cost alerts for a given group. These show up as Action Items for the group on the * Cost Insights page. Alerts may include cost-saving recommendations, such as infrastructure diff --git a/plugins/cost-insights/src/client.ts b/plugins/cost-insights/src/client.ts index 69822d7a63..1fa57c624a 100644 --- a/plugins/cost-insights/src/client.ts +++ b/plugins/cost-insights/src/client.ts @@ -17,7 +17,7 @@ import dayjs from 'dayjs'; import regression, { DataPoint } from 'regression'; -import { CostInsightsApi } from '../src/api'; +import { CostInsightsApi, ProductInsightsOptions } from '../src/api'; import { Alert, ChangeStatistic, @@ -26,7 +26,6 @@ import { DEFAULT_DATE_FORMAT, Duration, Group, - Maybe, MetricData, ProductCost, Project, @@ -194,42 +193,35 @@ export class ExampleCostInsightsClient implements CostInsightsApi { } async getProductInsights( - product: string, - group: string, - duration: Duration, - lastBillingDate: string, - project: Maybe, + productInsightsOptions: ProductInsightsOptions, ): Promise { - const projectProductInsights = await this.request( - { product, group, duration, lastBillingDate, project }, - { - aggregation: [80_000, 110_000], - change: { - ratio: 0.375, - amount: 30_000, - }, - entities: [ - { - id: null, // entities with null ids will be appear as "Unlabeled" in product panels - aggregation: [45_000, 50_000], - }, - { - id: 'entity-a', - aggregation: [15_000, 20_000], - }, - { - id: 'entity-b', - aggregation: [20_000, 30_000], - }, - { - id: 'entity-e', - aggregation: [0, 10_000], - }, - ], + const projectProductInsights = await this.request(productInsightsOptions, { + aggregation: [80_000, 110_000], + change: { + ratio: 0.375, + amount: 30_000, }, - ); + entities: [ + { + id: null, // entities with null ids will be appear as "Unlabeled" in product panels + aggregation: [45_000, 50_000], + }, + { + id: 'entity-a', + aggregation: [15_000, 20_000], + }, + { + id: 'entity-b', + aggregation: [20_000, 30_000], + }, + { + id: 'entity-e', + aggregation: [0, 10_000], + }, + ], + }); const productInsights: ProductCost = await this.request( - { product, group, duration, project }, + productInsightsOptions, { aggregation: [200_000, 250_000], change: { @@ -277,7 +269,9 @@ export class ExampleCostInsightsClient implements CostInsightsApi { }, ); - return project ? projectProductInsights : productInsights; + return productInsightsOptions.project + ? projectProductInsights + : productInsights; } async getAlerts(group: string): Promise { diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx index abf56d91db..17b1624c05 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx @@ -82,13 +82,13 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { async function load() { if (loadingProduct) { try { - const p: ProductCost = await client.getProductInsights( - product.kind, - group!, - productFilter!.duration, + const p: ProductCost = await client.getProductInsights({ + product: product.kind, + group: group!, + duration: productFilter!.duration, lastCompleteBillingDate, project, - ); + }); setResource(p); } catch (e) { setError(e); diff --git a/plugins/cost-insights/src/index.ts b/plugins/cost-insights/src/index.ts index cefdefb9c9..28bdb1a8b3 100644 --- a/plugins/cost-insights/src/index.ts +++ b/plugins/cost-insights/src/index.ts @@ -18,7 +18,7 @@ export { plugin } from './plugin'; export * from './client'; export * from './api'; export * from './components'; -export { useCurrency, CurrencyContext } from './hooks'; +export { useCurrency } from './hooks'; export * from './types'; export * from './utils/tests'; export * from './utils/duration'; From 5c70f3d353be1e848a277cddcef19293753ceecb Mon Sep 17 00:00:00 2001 From: Brenda Sukh Date: Tue, 3 Nov 2020 15:25:24 -0500 Subject: [PATCH 063/100] Update changeset filename --- .../{rich-dodos-smell.md => cost-insights-rich-dodos-smell.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .changeset/{rich-dodos-smell.md => cost-insights-rich-dodos-smell.md} (100%) diff --git a/.changeset/rich-dodos-smell.md b/.changeset/cost-insights-rich-dodos-smell.md similarity index 100% rename from .changeset/rich-dodos-smell.md rename to .changeset/cost-insights-rich-dodos-smell.md From 715bb76fb545063109f630ff64b7f579c655af55 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 3 Nov 2020 20:50:42 +0000 Subject: [PATCH 064/100] Version Packages --- .changeset/1724.md | 27 --- .changeset/2284.md | 11 -- .changeset/2515.md | 5 - .changeset/2532.md | 5 - .changeset/2535.md | 14 -- .changeset/2541.md | 5 - .changeset/2543.md | 9 - .changeset/2562.md | 7 - .changeset/2563.md | 5 - .changeset/2565.md | 59 ------- .changeset/2575.md | 5 - .changeset/2586.md | 6 - .changeset/2587.md | 9 - .changeset/2597.md | 6 - .changeset/2598.md | 11 -- .changeset/2600.md | 19 --- .changeset/2603.md | 8 - .changeset/2606.md | 5 - .changeset/2609.md | 5 - .changeset/2610.md | 5 - .changeset/2611.md | 5 - .changeset/2612.md | 5 - .changeset/2613.md | 12 -- .changeset/2614.md | 5 - .changeset/2615.md | 5 - .changeset/2616.md | 7 - .changeset/2623.md | 7 - .changeset/2624.md | 17 -- .changeset/2625-catalog-backend.md | 9 - .changeset/2625-cli.md | 7 - .changeset/2628.md | 22 --- .changeset/2630.md | 9 - .changeset/2637.md | 21 --- .changeset/2639.md | 5 - .changeset/2641.md | 5 - .changeset/2656.md | 5 - .changeset/2657.md | 5 - .changeset/2660.md | 5 - .changeset/2661.md | 5 - .changeset/2669-catalog-backend.md | 7 - .changeset/2669-catalog-model.md | 5 - .changeset/2669-create-app.md | 7 - .changeset/2674.md | 12 -- .changeset/2686.md | 5 - .changeset/2689.md | 5 - .changeset/2722.md | 11 -- .changeset/2798.md | 7 - .changeset/2800.md | 15 -- .changeset/2803.md | 26 --- .changeset/2804.md | 15 -- .changeset/2826.md | 20 --- .changeset/2874.md | 12 -- .changeset/3030.md | 5 - .changeset/3066.md | 12 -- .changeset/3113.md | 11 -- .changeset/3130.md | 5 - .changeset/alchemists-on-ice.md | 11 -- .changeset/angry-crabs-relate.md | 9 - .changeset/beige-apes-serve.md | 5 - .changeset/beige-pandas-thank.md | 5 - .changeset/blue-donkeys-exercise.md | 5 - .changeset/carpal-tunnel-driver.md | 13 -- .changeset/chilly-emus-fetch.md | 5 - .changeset/clean-phones-vanish.md | 5 - .changeset/cli-parallel-build-options.md | 12 -- .changeset/codeowner-processor-url-reader.md | 5 - .changeset/cost-insights-kind-trees-occur.md | 5 - .changeset/cost-insights-rich-dodos-smell.md | 5 - .changeset/cost-insights-sparkle.md | 5 - .../cost-insights-swift-carrots-bake.md | 5 - .changeset/create-app-url-reader-update.md | 6 - .changeset/cyan-plants-dress.md | 5 - .changeset/dull-icons-share.md | 21 --- .changeset/eighty-lamps-smell.md | 5 - .changeset/eighty-stingrays-type.md | 5 - .changeset/flat-bugs-do.md | 8 - .changeset/flat-yaks-march.md | 5 - .changeset/fresh-maps-complain.md | 6 - .changeset/funny-readers-breathe.md | 5 - .changeset/fuzzy-falcons-happen.md | 5 - .changeset/good-islands-cheer.md | 5 - .changeset/great-apples-flash.md | 5 - .changeset/happy-ads-behave.md | 5 - .changeset/heavy-berries-hear.md | 5 - .changeset/hungry-parrots-work.md | 5 - .changeset/little-wasps-pull.md | 5 - .changeset/long-ways-count.md | 57 ------- .changeset/loud-lamps-visit.md | 5 - .changeset/lovely-suits-flash.md | 5 - .changeset/metal-fishes-learn.md | 5 - .changeset/mighty-starfishes-taste.md | 5 - .changeset/nervous-drinks-notice.md | 8 - .changeset/new-url-reader.md | 12 -- .changeset/nice-candles-argue.md | 5 - .changeset/ninety-ads-dance.md | 5 - .changeset/ninety-pens-poke.md | 5 - .changeset/old-eagles-admire.md | 6 - .changeset/old-falcons-jump.md | 25 --- .changeset/old-jeans-dance.md | 5 - .changeset/olive-bikes-jog.md | 5 - .changeset/pink-spies-rule.md | 5 - .changeset/polite-laws-think.md | 5 - .changeset/polite-moose-cough.md | 5 - .changeset/popular-ghosts-remain.md | 5 - .changeset/popular-jars-serve.md | 5 - .changeset/pretty-cups-joke.md | 5 - .changeset/proud-eagles-grow.md | 5 - .changeset/raghu-is-great.md | 10 -- .changeset/red-games-float.md | 10 -- .changeset/remove-location-processor-read.md | 6 - .changeset/rocket-lizards-congregate.md | 10 -- .changeset/selfish-bats-perform.md | 6 - .changeset/selfish-mugs-itch.md | 5 - .changeset/seven-humans-check.md | 9 - .changeset/short-secrets.md | 5 - .changeset/slimy-garlics-eat.md | 5 - .changeset/slow-experts-peel.md | 5 - .changeset/spicy-moles-yell.md | 5 - .changeset/spicy-rockets-ring.md | 10 -- .changeset/spotty-apples-visit.md | 5 - .changeset/sweet-bikes-battle.md | 5 - .changeset/swift-emus-mate.md | 5 - .changeset/swift-peas-argue.md | 5 - .changeset/ten-bees-wash.md | 5 - .changeset/three-horses-juggle.md | 5 - .changeset/tough-weeks-pull.md | 5 - .changeset/url-reader-processor.md | 5 - .changeset/weak-ducks-tan.md | 8 - packages/app/CHANGELOG.md | 121 ++++++++++++++ packages/app/package.json | 56 +++---- packages/backend-common/CHANGELOG.md | 64 ++++++++ packages/backend-common/package.json | 8 +- packages/backend/CHANGELOG.md | 97 +++++++++++ packages/backend/package.json | 30 ++-- packages/catalog-model/CHANGELOG.md | 28 ++++ packages/catalog-model/package.json | 4 +- packages/cli/CHANGELOG.md | 46 ++++++ packages/cli/package.json | 14 +- packages/config-loader/CHANGELOG.md | 21 +++ packages/config-loader/package.json | 2 +- packages/core-api/CHANGELOG.md | 90 ++++++++++ packages/core-api/package.json | 8 +- packages/core/CHANGELOG.md | 70 ++++++++ packages/core/package.json | 10 +- packages/create-app/CHANGELOG.md | 132 +++++++++++++++ packages/create-app/package.json | 48 +++--- packages/dev-utils/CHANGELOG.md | 40 +++++ packages/dev-utils/package.json | 10 +- packages/e2e-test/CHANGELOG.md | 7 + packages/e2e-test/package.json | 2 +- packages/storybook/CHANGELOG.md | 9 + packages/storybook/package.json | 4 +- packages/techdocs-cli/CHANGELOG.md | 17 ++ packages/techdocs-cli/package.json | 4 +- packages/test-utils/CHANGELOG.md | 26 +++ packages/test-utils/package.json | 8 +- packages/theme/CHANGELOG.md | 19 +++ packages/theme/package.json | 4 +- plugins/api-docs/CHANGELOG.md | 59 +++++++ plugins/api-docs/package.json | 16 +- plugins/app-backend/CHANGELOG.md | 22 +++ plugins/app-backend/package.json | 8 +- plugins/auth-backend/CHANGELOG.md | 61 +++++++ plugins/auth-backend/package.json | 8 +- plugins/catalog-backend/CHANGELOG.md | 155 ++++++++++++++++++ plugins/catalog-backend/package.json | 10 +- plugins/catalog-graphql/CHANGELOG.md | 29 ++++ plugins/catalog-graphql/package.json | 10 +- plugins/catalog/CHANGELOG.md | 79 +++++++++ plugins/catalog/package.json | 18 +- plugins/circleci/CHANGELOG.md | 52 ++++++ plugins/circleci/package.json | 16 +- plugins/cloudbuild/CHANGELOG.md | 51 ++++++ plugins/cloudbuild/package.json | 16 +- plugins/cost-insights/CHANGELOG.md | 65 ++++++++ plugins/cost-insights/package.json | 14 +- plugins/explore/CHANGELOG.md | 48 ++++++ plugins/explore/package.json | 12 +- plugins/gcp-projects/CHANGELOG.md | 32 ++++ plugins/gcp-projects/package.json | 12 +- plugins/github-actions/CHANGELOG.md | 66 ++++++++ plugins/github-actions/package.json | 18 +- plugins/gitops-profiles/CHANGELOG.md | 32 ++++ plugins/gitops-profiles/package.json | 12 +- plugins/graphiql/CHANGELOG.md | 33 ++++ plugins/graphiql/package.json | 12 +- plugins/graphql/CHANGELOG.md | 18 ++ plugins/graphql/package.json | 8 +- plugins/jenkins/CHANGELOG.md | 62 +++++++ plugins/jenkins/package.json | 16 +- plugins/kubernetes-backend/CHANGELOG.md | 16 ++ plugins/kubernetes-backend/package.json | 6 +- plugins/kubernetes/CHANGELOG.md | 42 +++++ plugins/kubernetes/package.json | 16 +- plugins/lighthouse/CHANGELOG.md | 65 ++++++++ plugins/lighthouse/package.json | 18 +- plugins/newrelic/CHANGELOG.md | 53 ++++++ plugins/newrelic/package.json | 12 +- plugins/proxy-backend/CHANGELOG.md | 42 +++++ plugins/proxy-backend/package.json | 6 +- plugins/register-component/CHANGELOG.md | 55 +++++++ plugins/register-component/package.json | 16 +- plugins/rollbar-backend/CHANGELOG.md | 16 ++ plugins/rollbar-backend/package.json | 6 +- plugins/rollbar/CHANGELOG.md | 51 ++++++ plugins/rollbar/package.json | 16 +- plugins/scaffolder-backend/CHANGELOG.md | 46 ++++++ plugins/scaffolder-backend/package.json | 8 +- plugins/scaffolder/CHANGELOG.md | 67 ++++++++ plugins/scaffolder/package.json | 16 +- plugins/sentry-backend/CHANGELOG.md | 16 ++ plugins/sentry-backend/package.json | 6 +- plugins/sentry/CHANGELOG.md | 41 +++++ plugins/sentry/package.json | 14 +- plugins/sonarqube/CHANGELOG.md | 37 +++++ plugins/sonarqube/package.json | 14 +- plugins/tech-radar/CHANGELOG.md | 35 ++++ plugins/tech-radar/package.json | 14 +- plugins/techdocs-backend/CHANGELOG.md | 94 +++++++++++ plugins/techdocs-backend/package.json | 8 +- plugins/techdocs/CHANGELOG.md | 65 ++++++++ plugins/techdocs/package.json | 20 +-- plugins/user-settings/CHANGELOG.md | 32 ++++ plugins/user-settings/package.json | 12 +- plugins/welcome/CHANGELOG.md | 32 ++++ plugins/welcome/package.json | 12 +- 226 files changed, 2775 insertions(+), 1404 deletions(-) delete mode 100644 .changeset/1724.md delete mode 100644 .changeset/2284.md delete mode 100644 .changeset/2515.md delete mode 100644 .changeset/2532.md delete mode 100644 .changeset/2535.md delete mode 100644 .changeset/2541.md delete mode 100644 .changeset/2543.md delete mode 100644 .changeset/2562.md delete mode 100644 .changeset/2563.md delete mode 100644 .changeset/2565.md delete mode 100644 .changeset/2575.md delete mode 100644 .changeset/2586.md delete mode 100644 .changeset/2587.md delete mode 100644 .changeset/2597.md delete mode 100644 .changeset/2598.md delete mode 100644 .changeset/2600.md delete mode 100644 .changeset/2603.md delete mode 100644 .changeset/2606.md delete mode 100644 .changeset/2609.md delete mode 100644 .changeset/2610.md delete mode 100644 .changeset/2611.md delete mode 100644 .changeset/2612.md delete mode 100644 .changeset/2613.md delete mode 100644 .changeset/2614.md delete mode 100644 .changeset/2615.md delete mode 100644 .changeset/2616.md delete mode 100644 .changeset/2623.md delete mode 100644 .changeset/2624.md delete mode 100644 .changeset/2625-catalog-backend.md delete mode 100644 .changeset/2625-cli.md delete mode 100644 .changeset/2628.md delete mode 100644 .changeset/2630.md delete mode 100644 .changeset/2637.md delete mode 100644 .changeset/2639.md delete mode 100644 .changeset/2641.md delete mode 100644 .changeset/2656.md delete mode 100644 .changeset/2657.md delete mode 100644 .changeset/2660.md delete mode 100644 .changeset/2661.md delete mode 100644 .changeset/2669-catalog-backend.md delete mode 100644 .changeset/2669-catalog-model.md delete mode 100644 .changeset/2669-create-app.md delete mode 100644 .changeset/2674.md delete mode 100644 .changeset/2686.md delete mode 100644 .changeset/2689.md delete mode 100644 .changeset/2722.md delete mode 100644 .changeset/2798.md delete mode 100644 .changeset/2800.md delete mode 100644 .changeset/2803.md delete mode 100644 .changeset/2804.md delete mode 100644 .changeset/2826.md delete mode 100644 .changeset/2874.md delete mode 100644 .changeset/3030.md delete mode 100644 .changeset/3066.md delete mode 100644 .changeset/3113.md delete mode 100644 .changeset/3130.md delete mode 100644 .changeset/alchemists-on-ice.md delete mode 100644 .changeset/angry-crabs-relate.md delete mode 100644 .changeset/beige-apes-serve.md delete mode 100644 .changeset/beige-pandas-thank.md delete mode 100644 .changeset/blue-donkeys-exercise.md delete mode 100644 .changeset/carpal-tunnel-driver.md delete mode 100644 .changeset/chilly-emus-fetch.md delete mode 100644 .changeset/clean-phones-vanish.md delete mode 100644 .changeset/cli-parallel-build-options.md delete mode 100644 .changeset/codeowner-processor-url-reader.md delete mode 100644 .changeset/cost-insights-kind-trees-occur.md delete mode 100644 .changeset/cost-insights-rich-dodos-smell.md delete mode 100644 .changeset/cost-insights-sparkle.md delete mode 100644 .changeset/cost-insights-swift-carrots-bake.md delete mode 100644 .changeset/create-app-url-reader-update.md delete mode 100644 .changeset/cyan-plants-dress.md delete mode 100644 .changeset/dull-icons-share.md delete mode 100644 .changeset/eighty-lamps-smell.md delete mode 100644 .changeset/eighty-stingrays-type.md delete mode 100644 .changeset/flat-bugs-do.md delete mode 100644 .changeset/flat-yaks-march.md delete mode 100644 .changeset/fresh-maps-complain.md delete mode 100644 .changeset/funny-readers-breathe.md delete mode 100644 .changeset/fuzzy-falcons-happen.md delete mode 100644 .changeset/good-islands-cheer.md delete mode 100644 .changeset/great-apples-flash.md delete mode 100644 .changeset/happy-ads-behave.md delete mode 100644 .changeset/heavy-berries-hear.md delete mode 100644 .changeset/hungry-parrots-work.md delete mode 100644 .changeset/little-wasps-pull.md delete mode 100644 .changeset/long-ways-count.md delete mode 100644 .changeset/loud-lamps-visit.md delete mode 100644 .changeset/lovely-suits-flash.md delete mode 100644 .changeset/metal-fishes-learn.md delete mode 100644 .changeset/mighty-starfishes-taste.md delete mode 100644 .changeset/nervous-drinks-notice.md delete mode 100644 .changeset/new-url-reader.md delete mode 100644 .changeset/nice-candles-argue.md delete mode 100644 .changeset/ninety-ads-dance.md delete mode 100644 .changeset/ninety-pens-poke.md delete mode 100644 .changeset/old-eagles-admire.md delete mode 100644 .changeset/old-falcons-jump.md delete mode 100644 .changeset/old-jeans-dance.md delete mode 100644 .changeset/olive-bikes-jog.md delete mode 100644 .changeset/pink-spies-rule.md delete mode 100644 .changeset/polite-laws-think.md delete mode 100644 .changeset/polite-moose-cough.md delete mode 100644 .changeset/popular-ghosts-remain.md delete mode 100644 .changeset/popular-jars-serve.md delete mode 100644 .changeset/pretty-cups-joke.md delete mode 100644 .changeset/proud-eagles-grow.md delete mode 100644 .changeset/raghu-is-great.md delete mode 100644 .changeset/red-games-float.md delete mode 100644 .changeset/remove-location-processor-read.md delete mode 100644 .changeset/rocket-lizards-congregate.md delete mode 100644 .changeset/selfish-bats-perform.md delete mode 100644 .changeset/selfish-mugs-itch.md delete mode 100644 .changeset/seven-humans-check.md delete mode 100644 .changeset/short-secrets.md delete mode 100644 .changeset/slimy-garlics-eat.md delete mode 100644 .changeset/slow-experts-peel.md delete mode 100644 .changeset/spicy-moles-yell.md delete mode 100644 .changeset/spicy-rockets-ring.md delete mode 100644 .changeset/spotty-apples-visit.md delete mode 100644 .changeset/sweet-bikes-battle.md delete mode 100644 .changeset/swift-emus-mate.md delete mode 100644 .changeset/swift-peas-argue.md delete mode 100644 .changeset/ten-bees-wash.md delete mode 100644 .changeset/three-horses-juggle.md delete mode 100644 .changeset/tough-weeks-pull.md delete mode 100644 .changeset/url-reader-processor.md delete mode 100644 .changeset/weak-ducks-tan.md create mode 100644 packages/app/CHANGELOG.md create mode 100644 packages/backend-common/CHANGELOG.md create mode 100644 packages/backend/CHANGELOG.md create mode 100644 packages/catalog-model/CHANGELOG.md create mode 100644 packages/cli/CHANGELOG.md create mode 100644 packages/config-loader/CHANGELOG.md create mode 100644 packages/core-api/CHANGELOG.md create mode 100644 packages/core/CHANGELOG.md create mode 100644 packages/create-app/CHANGELOG.md create mode 100644 packages/dev-utils/CHANGELOG.md create mode 100644 packages/e2e-test/CHANGELOG.md create mode 100644 packages/storybook/CHANGELOG.md create mode 100644 packages/techdocs-cli/CHANGELOG.md create mode 100644 packages/test-utils/CHANGELOG.md create mode 100644 packages/theme/CHANGELOG.md create mode 100644 plugins/api-docs/CHANGELOG.md create mode 100644 plugins/app-backend/CHANGELOG.md create mode 100644 plugins/auth-backend/CHANGELOG.md create mode 100644 plugins/catalog-backend/CHANGELOG.md create mode 100644 plugins/catalog-graphql/CHANGELOG.md create mode 100644 plugins/catalog/CHANGELOG.md create mode 100644 plugins/circleci/CHANGELOG.md create mode 100644 plugins/cloudbuild/CHANGELOG.md create mode 100644 plugins/cost-insights/CHANGELOG.md create mode 100644 plugins/explore/CHANGELOG.md create mode 100644 plugins/gcp-projects/CHANGELOG.md create mode 100644 plugins/github-actions/CHANGELOG.md create mode 100644 plugins/gitops-profiles/CHANGELOG.md create mode 100644 plugins/graphiql/CHANGELOG.md create mode 100644 plugins/graphql/CHANGELOG.md create mode 100644 plugins/jenkins/CHANGELOG.md create mode 100644 plugins/kubernetes-backend/CHANGELOG.md create mode 100644 plugins/kubernetes/CHANGELOG.md create mode 100644 plugins/lighthouse/CHANGELOG.md create mode 100644 plugins/newrelic/CHANGELOG.md create mode 100644 plugins/proxy-backend/CHANGELOG.md create mode 100644 plugins/register-component/CHANGELOG.md create mode 100644 plugins/rollbar-backend/CHANGELOG.md create mode 100644 plugins/rollbar/CHANGELOG.md create mode 100644 plugins/scaffolder-backend/CHANGELOG.md create mode 100644 plugins/scaffolder/CHANGELOG.md create mode 100644 plugins/sentry-backend/CHANGELOG.md create mode 100644 plugins/sentry/CHANGELOG.md create mode 100644 plugins/sonarqube/CHANGELOG.md create mode 100644 plugins/tech-radar/CHANGELOG.md create mode 100644 plugins/techdocs-backend/CHANGELOG.md create mode 100644 plugins/techdocs/CHANGELOG.md create mode 100644 plugins/user-settings/CHANGELOG.md create mode 100644 plugins/welcome/CHANGELOG.md diff --git a/.changeset/1724.md b/.changeset/1724.md deleted file mode 100644 index 2ac03f94e9..0000000000 --- a/.changeset/1724.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -'@backstage/cli': minor -'@backstage/plugin-api-docs': minor -'@backstage/plugin-app-backend': minor -'@backstage/plugin-auth-backend': minor -'@backstage/plugin-catalog-graphql': minor -'@backstage/plugin-catalog': minor -'@backstage/plugin-circleci': minor -'@backstage/plugin-explore': minor -'@backstage/plugin-gcp-projects': minor -'@backstage/plugin-github-actions': minor -'@backstage/plugin-gitops-profiles': minor -'@backstage/plugin-graphiql': minor -'@backstage/plugin-jenkins': minor -'@backstage/plugin-kubernetes': minor -'@backstage/plugin-lighthouse': minor -'@backstage/plugin-newrelic': minor -'@backstage/plugin-register-component': minor -'@backstage/plugin-rollbar': minor -'@backstage/plugin-scaffolder': minor -'@backstage/plugin-sentry': minor -'@backstage/plugin-tech-radar': minor -'@backstage/plugin-techdocs': minor -'@backstage/plugin-welcome': minor ---- - -Create backend plugin through CLI diff --git a/.changeset/2284.md b/.changeset/2284.md deleted file mode 100644 index 655cc5a3e8..0000000000 --- a/.changeset/2284.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/core-api': minor -'@backstage/core': minor -'@backstage/plugin-auth-backend': minor ---- - -Add SAML login to backstage - -![](https://user-images.githubusercontent.com/872486/92251660-bb9e3400-eeff-11ea-86fe-1f2a0262cd31.png) - -![](https://user-images.githubusercontent.com/872486/93851658-1a76f200-fce3-11ea-990b-26ca1a327a15.png) diff --git a/.changeset/2515.md b/.changeset/2515.md deleted file mode 100644 index 32f5edd6b7..0000000000 --- a/.changeset/2515.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cloudbuild': minor ---- - -Releasing Google Cloud Build Plugin diff --git a/.changeset/2532.md b/.changeset/2532.md deleted file mode 100644 index 14307f6c08..0000000000 --- a/.changeset/2532.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/catalog-model': minor ---- - -Add handling and docs for entity references diff --git a/.changeset/2535.md b/.changeset/2535.md deleted file mode 100644 index bd28f3ce03..0000000000 --- a/.changeset/2535.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@backstage/core': patch -'@backstage/theme': patch ---- - -Fix banner position and color - -This PR closes: #2245 - -The "fixed" props added to control the position of the banner. When it is set to true the banner will be shown in bottom of that page and the width will be based on the content of the message. - -![](https://user-images.githubusercontent.com/15106494/93765685-999df480-fc15-11ea-8fa5-11cac5836cf1.png) - -![](https://user-images.githubusercontent.com/15106494/93765697-9e62a880-fc15-11ea-92af-b6a7fee4bb21.png) diff --git a/.changeset/2541.md b/.changeset/2541.md deleted file mode 100644 index 1ba29da040..0000000000 --- a/.changeset/2541.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/theme': minor ---- - -Tweak dark mode colors diff --git a/.changeset/2543.md b/.changeset/2543.md deleted file mode 100644 index 00311ade45..0000000000 --- a/.changeset/2543.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': minor ---- - -Add Azure DevOps support to the scaffolder backend - -This adds support for Azure DevOps to the scaffolder (preparer & publisher). I thought I should get this in there now since #2426 has been merged. I had a previous PR with only the preparer but I closed that in favor of this one. - -I stayed with the 'azure/api' structure but I guess we should try and go the same way as with GitHub here #2501 diff --git a/.changeset/2562.md b/.changeset/2562.md deleted file mode 100644 index 716f370ad9..0000000000 --- a/.changeset/2562.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/create-app': minor -'@backstage/plugin-auth-backend': minor -'@backstage/plugin-techdocs-backend': minor ---- - -Change the default backend plugin mount point to /api diff --git a/.changeset/2563.md b/.changeset/2563.md deleted file mode 100644 index 318d5cf5ef..0000000000 --- a/.changeset/2563.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-github-actions': minor ---- - -Adds a widget to show recent git workflow runs to the github actions plugin. The default setting is the last 5 runs across all branches but both branch and the number of runs are configurable. diff --git a/.changeset/2565.md b/.changeset/2565.md deleted file mode 100644 index 92253101ee..0000000000 --- a/.changeset/2565.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -'@backstage/core-api': patch ---- - -Add initial RouteRefRegistry - -Starting out some work to bring routing back and working as part of the work towards finalizing #1536 - -This is some of the groundwork of an experiment we're working on to enable routing via RouteRefs, while letting the app itself look something like this: - -```jsx -const App = () => ( - - - - {' '} - // catalogRouteRef - - - - - - - // statusRouteRef - - - - - - - - - - // sentryRouteRef - - - - - - - - - - - - - - - -); -``` - -As part of inverting the composition of the app, route refs and routing in general was somewhat broken, intentionally. Right now it's not really possible to easily route to different parts of the app from a plugin, or even different parts of the plugin that are not within the same router. - -The core part of the experiment is to construct a map of ApiRef[] -> path overrides. Each key in the map is the list of route refs to traversed to reach a leaf in the routing tree, and the value is the path override at that point. For example, the above tree would add entries like [techDocsRouteRef] -> '/docs', and [entityRouteRef, apiDocsRouteRef] -> '/api'. By mapping out the entire app in this structure, the idea is that we can navigate to any point in the app using RouteRefs. - -The RouteRefRegistry is an implementation of such a map, and the idea is to add it in master to make it a bit easier to experiment and iterate. This is not an exposed API at this point. - -We've explored a couple of alternatives for how to enable routing, but it's boiled down to either a solution centred around the route map mentioned above, or treating all routes as static and globally unique, with no room for flexibility, customization or conflicts between different plugins. We're starting out pursuing this options 😁. We also expect that a the app-wide routing table will make things like dynamic loading a lot cleaner, as there would be a much more clear handoff between the main chunk and dynamic chunks. diff --git a/.changeset/2575.md b/.changeset/2575.md deleted file mode 100644 index b08f50ed13..0000000000 --- a/.changeset/2575.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': minor ---- - -Fix dense in Structured Metadata Table diff --git a/.changeset/2586.md b/.changeset/2586.md deleted file mode 100644 index 568adb8a3e..0000000000 --- a/.changeset/2586.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/catalog-model': minor -'@backstage/plugin-catalog-backend': minor ---- - -Entirely case insensitive read path of entities diff --git a/.changeset/2587.md b/.changeset/2587.md deleted file mode 100644 index 910de1ca04..0000000000 --- a/.changeset/2587.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/catalog-model': minor ---- - -Add the User & Group entities - -A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. - -A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User. diff --git a/.changeset/2597.md b/.changeset/2597.md deleted file mode 100644 index 9db25e8d0e..0000000000 --- a/.changeset/2597.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/catalog-model': minor -'@backstage/plugin-catalog-backend': minor ---- - -Add ApiDefinitionAtLocationProcessor that allows to load a API definition from another location diff --git a/.changeset/2598.md b/.changeset/2598.md deleted file mode 100644 index 03e10e7db8..0000000000 --- a/.changeset/2598.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-techdocs': minor ---- - -Add a message if techdocs takes long time to load - -Fixes #2416. - -The UI after the change should look like this: - -![techdocs-progress-bar](https://user-images.githubusercontent.com/33940798/94189286-296ac980-fec8-11ea-9051-1b3db938d12f.gif) diff --git a/.changeset/2600.md b/.changeset/2600.md deleted file mode 100644 index 6fc9775fa1..0000000000 --- a/.changeset/2600.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': minor -'@backstage/plugin-proxy-backend': minor -'@backstage/plugin-auth-backend': minor -'@backstage/create-app': minor -'@backstage/backend-common': minor ---- - -Add service discovery interface and implement for single host deployments - -Fixes #1847, #2596 - -Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. - -Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. - -This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. - -Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. diff --git a/.changeset/2603.md b/.changeset/2603.md deleted file mode 100644 index c24d2ea033..0000000000 --- a/.changeset/2603.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/create-app': minor ---- - -Make CSP configurable to fix app-backend served app not being able to fetch - -See discussion [here on discord](https://discordapp.com/channels/687207715902193673/687235481154617364/758721460163575850) diff --git a/.changeset/2606.md b/.changeset/2606.md deleted file mode 100644 index f6059e7705..0000000000 --- a/.changeset/2606.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Move auth provider router creation to router diff --git a/.changeset/2609.md b/.changeset/2609.md deleted file mode 100644 index 6bb8ab7a40..0000000000 --- a/.changeset/2609.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Sync scaffolded backend with example diff --git a/.changeset/2610.md b/.changeset/2610.md deleted file mode 100644 index 92ec8dcc0c..0000000000 --- a/.changeset/2610.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-circleci': minor ---- - -Refactor to use DiscoveryApi diff --git a/.changeset/2611.md b/.changeset/2611.md deleted file mode 100644 index cbf3129038..0000000000 --- a/.changeset/2611.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Remove discovery api override diff --git a/.changeset/2612.md b/.changeset/2612.md deleted file mode 100644 index bf093d8f77..0000000000 --- a/.changeset/2612.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-jenkins': patch ---- - -Refactor to use DiscoveryApi diff --git a/.changeset/2613.md b/.changeset/2613.md deleted file mode 100644 index cf8c1a155a..0000000000 --- a/.changeset/2613.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-auth-backend': minor ---- - -Initial implementation of catalog user lookup - -This adds a basic catalog client + method for the Google provider to look up users in the catalog. It expects to find a single user entity in the catalog with a google.com/email annotation that matches the email of the Google profile. - -Right now it falls back to the old behavior of splitting the email, since I don't wanna break the sign-in flow for existing apps, not yet anyway x). - -- Added "@backstage/catalog-model@^0.1.1-alpha.23" as a dependency -- Added "node-fetch@^2.6.1" as a dependency diff --git a/.changeset/2614.md b/.changeset/2614.md deleted file mode 100644 index 7e2660bc80..0000000000 --- a/.changeset/2614.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': minor ---- - -Default to using internal scope for new plugins diff --git a/.changeset/2615.md b/.changeset/2615.md deleted file mode 100644 index 412b8127c4..0000000000 --- a/.changeset/2615.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': minor ---- - -Use localhost to fall back to IPv4 if IPv6 isn't available diff --git a/.changeset/2616.md b/.changeset/2616.md deleted file mode 100644 index 9a70c0e79f..0000000000 --- a/.changeset/2616.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/create-app': minor ---- - -Remove identity-backend - -Not used, and we're heading down the route of identities in the catalog diff --git a/.changeset/2623.md b/.changeset/2623.md deleted file mode 100644 index abd5ce7a4c..0000000000 --- a/.changeset/2623.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -Created EntityNotFound component for catalog which displays the 404 page when entity is not found. - -Fixes #2266 diff --git a/.changeset/2624.md b/.changeset/2624.md deleted file mode 100644 index dcfc800713..0000000000 --- a/.changeset/2624.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -Make title meaningful after component creation - -Fixes #2458. - -After the change, the UX should look like this: - -### If the component creation was successful: - -![successfully-created-component](https://user-images.githubusercontent.com/33940798/94339294-8bd1e000-0016-11eb-885b-7936fcc23b63.gif) - -### If the component creation failed: - -![failed-to-create-component](https://user-images.githubusercontent.com/33940798/94339296-90969400-0016-11eb-9a74-ce16b3dd8d88.gif) diff --git a/.changeset/2625-catalog-backend.md b/.changeset/2625-catalog-backend.md deleted file mode 100644 index bcd49dddb2..0000000000 --- a/.changeset/2625-catalog-backend.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Add codeowners processor - -- Add `codeowners-utils@^1.0.2` as a dependency -- Add `core-js@^3.6.5` as a dependency -- Added new CodeOwnersProcessor diff --git a/.changeset/2625-cli.md b/.changeset/2625-cli.md deleted file mode 100644 index c5a5437b69..0000000000 --- a/.changeset/2625-cli.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Add codeowners processor - -- Include ESNext.Promise in TypeScript compilation diff --git a/.changeset/2628.md b/.changeset/2628.md deleted file mode 100644 index 0ac36d456a..0000000000 --- a/.changeset/2628.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -This feature works the same as \$secret does in config - it allows programmatic substitution of values into a document. - -This is particularly useful e.g. for API type entities where you do not want to repeat your entire API spec document inside the catalog-info.yaml file. For those cases, you can instead do something like - -``` -apiVersion: backstage.io/v1alpha1 -kind: API -metadata: - name: my-federated-service -spec: - type: graphql - definition: - $text: ./schema.graphql -``` - -The textual content of that file will be injected as the value of definition, during each refresh loop. Both relative and absolute paths are supported, as well as any HTTP/HTTPS URL pointing to a service that returns the relevant data. - -The initial version supports injection of text file data, and structured data from JSON and YAML files. You can add any handler of your own in addition to these. diff --git a/.changeset/2630.md b/.changeset/2630.md deleted file mode 100644 index 933204e292..0000000000 --- a/.changeset/2630.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/create-app': minor -'@backstage/plugin-catalog-backend': minor ---- - -Allow node v14 and add to master build matrix - -- Upgrade sqlite3@^5.0.0 in @backstage/plugin-catalog-backend -- Add Node 14 to engines in @backstage/create-app diff --git a/.changeset/2637.md b/.changeset/2637.md deleted file mode 100644 index 9d368634b6..0000000000 --- a/.changeset/2637.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@backstage/plugin-cost-insights': minor -'@backstage/plugin-explore': minor ---- - -This PR adds Spotify's Cost Insights Tool. Cost Insights explains costs from cloud services in an understandable way, using software terms familiar to your engineers. This tool helps you and your team make trade-offs between cost optimization efforts and your other priorities. - -Cost Insights features: - -Daily cost graph by team or billing account -Cost comparison against configurable business metrics -Insights panels for configurable cloud products your company uses -Cost alerts and recommendations -Selectable time periods for month over month, or quarter over quarter cost comparison -Conversion of cost growth into average engineer cost (configurable) to help optimization trade-off decisions - -![plugin-cost-insights](https://user-images.githubusercontent.com/3030003/94430416-e166d380-0161-11eb-891c-9ce10187683e.gif) - -This PR adds the Cost Insights frontend React plugin with a defined CostInsightsApi. We include an example client with static data in the expected format. This API should talk with a cloud billing backend that aggregates billing data from your cloud provider. - -Fixes #688 💵 diff --git a/.changeset/2639.md b/.changeset/2639.md deleted file mode 100644 index e6a623088e..0000000000 --- a/.changeset/2639.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': minor ---- - -Upgrade dependency `esbuild@0.7.7` diff --git a/.changeset/2641.md b/.changeset/2641.md deleted file mode 100644 index 3b06358e81..0000000000 --- a/.changeset/2641.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Simplify the read function in processors diff --git a/.changeset/2656.md b/.changeset/2656.md deleted file mode 100644 index e253b6b1f6..0000000000 --- a/.changeset/2656.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': minor ---- - -Lookup user in Google Auth Provider diff --git a/.changeset/2657.md b/.changeset/2657.md deleted file mode 100644 index 9aa645d65f..0000000000 --- a/.changeset/2657.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': minor ---- - -Added EmptyState component diff --git a/.changeset/2660.md b/.changeset/2660.md deleted file mode 100644 index 758d523f07..0000000000 --- a/.changeset/2660.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-api-docs': patch ---- - -Resolve some dark mode styling issues in asyncAPI specs diff --git a/.changeset/2661.md b/.changeset/2661.md deleted file mode 100644 index e73b0abf26..0000000000 --- a/.changeset/2661.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -Fixed banner component position in DismissableBanner component diff --git a/.changeset/2669-catalog-backend.md b/.changeset/2669-catalog-backend.md deleted file mode 100644 index 32ee5c0f4d..0000000000 --- a/.changeset/2669-catalog-backend.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Add the ability to import users from GitHub Organization into the catalog. - -The token needs to have the scopes `user:email`, `read:user`, and `read:org`. diff --git a/.changeset/2669-catalog-model.md b/.changeset/2669-catalog-model.md deleted file mode 100644 index b9a2841a1b..0000000000 --- a/.changeset/2669-catalog-model.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/catalog-model': minor ---- - -Add the ability to import users from GitHub Organization into the catalog. diff --git a/.changeset/2669-create-app.md b/.changeset/2669-create-app.md deleted file mode 100644 index e7075ffeb8..0000000000 --- a/.changeset/2669-create-app.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/create-app': minor ---- - -Add the ability to import users from GitHub Organization into the catalog. - -The token needs to have the scopes `user:email`, `read:user`, and `read:org`. diff --git a/.changeset/2674.md b/.changeset/2674.md deleted file mode 100644 index 15a7a0e849..0000000000 --- a/.changeset/2674.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/create-app': minor ---- - -Auto-create plugin databases - -Relates to #1598. - -This creates databases for plugins before handing off control to plugins. - -The list of plugins currently need to be hard-coded depending on the installed plugins. A later PR will properly refactor the code to provide a factory pattern where plugins specify what they need, and Knex instances will be provided based on the input. diff --git a/.changeset/2686.md b/.changeset/2686.md deleted file mode 100644 index 8831c1309b..0000000000 --- a/.changeset/2686.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Update SSR template to pass CI diff --git a/.changeset/2689.md b/.changeset/2689.md deleted file mode 100644 index be75dd261b..0000000000 --- a/.changeset/2689.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Upgrade dependency rollup-plugin-typescript2 to ^0.27.3 diff --git a/.changeset/2722.md b/.changeset/2722.md deleted file mode 100644 index 69642b5797..0000000000 --- a/.changeset/2722.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-api-docs': minor ---- - -There were some missing features and markdown was not rendered properly, but this is fixed now. - -Details: - -- [`asyncapi/asyncapi-react#149`](https://github.com/asyncapi/asyncapi-react/pull/149) - fix: improve markdown rendering of nested fields -- [`asyncapi/asyncapi-react#150`](https://github.com/asyncapi/asyncapi-react/pull/150) - feat: display the description of channels and operations -- [`asyncapi/asyncapi-react#153`](https://github.com/asyncapi/asyncapi-react/pull/153) - fix: let the list of `enums` break into multiple lines diff --git a/.changeset/2798.md b/.changeset/2798.md deleted file mode 100644 index 2b202142ef..0000000000 --- a/.changeset/2798.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Use the new `UrlReader` in `PlaceholderProcessor`. -This allows to use the placeholder processor to include API definitions in API entities. -Previously it was only possible to do this if the definition comes from the same location type as the entity itself. diff --git a/.changeset/2800.md b/.changeset/2800.md deleted file mode 100644 index 0e051b0557..0000000000 --- a/.changeset/2800.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/core': minor -'@backstage/core-api': minor ---- - -Updated the `GithubAuth.create` method to configure the default scope of the Github Auth Api. As a result the -default scope is configurable when overwriting the Core Api in the app. - -``` -GithubAuth.create({ - discoveryApi, - oauthRequestApi, - defaultScopes: ['read:user', 'repo'], -}), -``` diff --git a/.changeset/2803.md b/.changeset/2803.md deleted file mode 100644 index 3a4773757f..0000000000 --- a/.changeset/2803.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Remove the backstage.io/definition-at-location annotation. -The annotation was superseded by the placeholder processor. - -```yaml -apiVersion: backstage.io/v1alpha1 -kind: API -metadata: - name: spotify - description: The Spotify web API - tags: - - spotify - - rest - annotations: - # Don't use this annotation, but the placeholder $text instead (see below). - backstage.io/definition-at-location: 'url:https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/APIs/spotify.com/v1/swagger.yaml' -spec: - type: openapi - lifecycle: production - owner: spotify@example.com - definition: - $text: https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/APIs/spotify.com/v1/swagger.yaml -``` diff --git a/.changeset/2804.md b/.changeset/2804.md deleted file mode 100644 index 5223a24791..0000000000 --- a/.changeset/2804.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@backstage/plugin-proxy-backend': minor ---- - -Limit the http headers that are forwarded from the request to a safe set of defaults. -A user can configure additional headers that should be forwarded if the specific applications needs that. - -```yaml -proxy: - '/my-api': - target: 'https://my-api.com/get' - allowedHeaders: - # We need to forward the Authorization header that was provided by the caller - - Authorization -``` diff --git a/.changeset/2826.md b/.changeset/2826.md deleted file mode 100644 index fb2dbb6877..0000000000 --- a/.changeset/2826.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'example-app': minor -'@backstage/core': minor -'@backstage/create-app': minor -'@backstage/plugin-catalog': minor -'@backstage/plugin-github-actions': minor -'@backstage/plugin-jenkins': minor -'@backstage/plugin-lighthouse': minor ---- - -The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. - -When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. -Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: -`...` - -Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' -to pass an optional variant to the corresponding card of the plugin. - -As a result the overview content of the EntityPage shows cards with full height suitable for Grid. diff --git a/.changeset/2874.md b/.changeset/2874.md deleted file mode 100644 index 693962314f..0000000000 --- a/.changeset/2874.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -The way that wiring together a catalog happens, has changed drastically. Now -there is a new class `CatalogBuilder` that does almost all of the heavy lifting -of how to augment/replace pieces of catalog functionality, such as adding -support for custom entities or adding additional processors. - -As the builder was added, a lot of the static methods and builders for default -setups have been removed from classes deep in the hierarchy. Instead, the -builder contains the knowledge of what the defaults are. diff --git a/.changeset/3030.md b/.changeset/3030.md deleted file mode 100644 index 89730dc14c..0000000000 --- a/.changeset/3030.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/backend-common': minor ---- - -Add the ability to import components from Bitbucket Server to the service catalog diff --git a/.changeset/3066.md b/.changeset/3066.md deleted file mode 100644 index 7c157c94c3..0000000000 --- a/.changeset/3066.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Filters passed to the `/entities` endpoint of the catalog has changed format. - -The old way was to pass things on the form `?a=b&c=d`; the new way is to pass -things on the form `?filter=a=b,c=d`. See discussion in -[#2910](https://github.com/backstage/backstage/issues/2910) for details. - -The comma separated items within a single filter have an AND between them. If -multiple such filters are passed, they have an OR between those item groups. diff --git a/.changeset/3113.md b/.changeset/3113.md deleted file mode 100644 index 7c53d01c16..0000000000 --- a/.changeset/3113.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/catalog-model': minor -'@backstage/plugin-catalog-backend': minor ---- - -Changes the various kind policies into a new type `KindValidator`. - -Adds `CatalogProcessor#validateEntityKind` that makes use of the above -validators. This moves entity schema validity checking away from entity -policies and into processors, centralizing the extension points into the -processor chain. diff --git a/.changeset/3130.md b/.changeset/3130.md deleted file mode 100644 index 6edac9372b..0000000000 --- a/.changeset/3130.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Fix `CatalogBuilder#addProcessor`. diff --git a/.changeset/alchemists-on-ice.md b/.changeset/alchemists-on-ice.md deleted file mode 100644 index 24f41730d1..0000000000 --- a/.changeset/alchemists-on-ice.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Add support for `fields` sub-selection of just parts of an entity when listing -entities in the catalog backend. - -Example: `.../entities?fields=metadata.name,spec.type` will return partial -entity objects with only those exact fields present and the rest cut out. -Fields do not have to be simple scalars - you can for example do -`fields=metadata`. diff --git a/.changeset/angry-crabs-relate.md b/.changeset/angry-crabs-relate.md deleted file mode 100644 index 678093c1ac..0000000000 --- a/.changeset/angry-crabs-relate.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Add ability to dry run adding a new location to the catalog API. - -The location is now added in a transaction and afterwards rolled back. -This allows users to dry run this operation to see if there entity has issues. -This is probably done by automated tools in the CI/CD pipeline. diff --git a/.changeset/beige-apes-serve.md b/.changeset/beige-apes-serve.md deleted file mode 100644 index 54ee39a85e..0000000000 --- a/.changeset/beige-apes-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'example-app': patch ---- - -Add Pull Request tab to components view. diff --git a/.changeset/beige-pandas-thank.md b/.changeset/beige-pandas-thank.md deleted file mode 100644 index b2c52842fc..0000000000 --- a/.changeset/beige-pandas-thank.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Add OneLogin Identity Provider to Auth Backend diff --git a/.changeset/blue-donkeys-exercise.md b/.changeset/blue-donkeys-exercise.md deleted file mode 100644 index 4f714e3c97..0000000000 --- a/.changeset/blue-donkeys-exercise.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -Add client side paging for catalog table diff --git a/.changeset/carpal-tunnel-driver.md b/.changeset/carpal-tunnel-driver.md deleted file mode 100644 index 2e6a814533..0000000000 --- a/.changeset/carpal-tunnel-driver.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -- The `CatalogProcessor` API was updated to have `preProcessEntity` and - `postProcessEntity` methods, instead of just one `processEntity`. This makes - it easier to make processors that have several stages in one, and to make - different processors more position independent in the list of processors. -- The `EntityPolicy` is now given directly to the `LocationReaders`, instead of - being enforced inside a policy. We have decided to separate out the act of - validating an entity to be outside of the processing flow, to make it - possible to apply more liberally and to evolve it as a separate concept. -- Because of the above, the `EntityPolicyProcessor` has been removed. diff --git a/.changeset/chilly-emus-fetch.md b/.changeset/chilly-emus-fetch.md deleted file mode 100644 index ad77c90f4e..0000000000 --- a/.changeset/chilly-emus-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Added .fromConfig static factories for Preparers and Publishers + read integrations config to support url location types diff --git a/.changeset/clean-phones-vanish.md b/.changeset/clean-phones-vanish.md deleted file mode 100644 index 4c80b82f24..0000000000 --- a/.changeset/clean-phones-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -export test utilities for mocking context diff --git a/.changeset/cli-parallel-build-options.md b/.changeset/cli-parallel-build-options.md deleted file mode 100644 index 95f9360738..0000000000 --- a/.changeset/cli-parallel-build-options.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/cli': minor ---- - -Adds a new `BACKSTAGE_CLI_BUILD_PARELLEL` environment variable to control -parallelism for some build steps. - -This is useful in CI to help avoid out of memory issues when using `terser`. The -`BACKSTAGE_CLI_BUILD_PARELLEL` environment variable can be set to -`true | false | [integer]` to override the default behaviour. See -[terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin#parallel) -for more details. diff --git a/.changeset/codeowner-processor-url-reader.md b/.changeset/codeowner-processor-url-reader.md deleted file mode 100644 index af4eb0997f..0000000000 --- a/.changeset/codeowner-processor-url-reader.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Use the new `UrlReader` in the `CodeOwnersProcessor`. diff --git a/.changeset/cost-insights-kind-trees-occur.md b/.changeset/cost-insights-kind-trees-occur.md deleted file mode 100644 index 600cc3b3b4..0000000000 --- a/.changeset/cost-insights-kind-trees-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -migrate type utilities out of type definition files diff --git a/.changeset/cost-insights-rich-dodos-smell.md b/.changeset/cost-insights-rich-dodos-smell.md deleted file mode 100644 index a579797437..0000000000 --- a/.changeset/cost-insights-rich-dodos-smell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -expose alerts utilities for export diff --git a/.changeset/cost-insights-sparkle.md b/.changeset/cost-insights-sparkle.md deleted file mode 100644 index c332502476..0000000000 --- a/.changeset/cost-insights-sparkle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': minor ---- - -Added getLastCompleteBillingDate to the CostInsightsApi to reason about completeness of billing data diff --git a/.changeset/cost-insights-swift-carrots-bake.md b/.changeset/cost-insights-swift-carrots-bake.md deleted file mode 100644 index bc378ad247..0000000000 --- a/.changeset/cost-insights-swift-carrots-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': patch ---- - -prefer named exports diff --git a/.changeset/create-app-url-reader-update.md b/.changeset/create-app-url-reader-update.md deleted file mode 100644 index eb2e538b77..0000000000 --- a/.changeset/create-app-url-reader-update.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'example-backend': patch -'@backstage/create-app': patch ---- - -Bump @backstage/catalog-backend and pass the now required UrlReader interface to the plugin diff --git a/.changeset/cyan-plants-dress.md b/.changeset/cyan-plants-dress.md deleted file mode 100644 index 19ebc63e53..0000000000 --- a/.changeset/cyan-plants-dress.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'example-backend': patch ---- - -Pass GitHub token into Scaffolder GitHub Preparer diff --git a/.changeset/dull-icons-share.md b/.changeset/dull-icons-share.md deleted file mode 100644 index aa4c01e422..0000000000 --- a/.changeset/dull-icons-share.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/cli': minor -'@backstage/config-loader': minor -'example-backend': patch -'@backstage/create-app': patch ---- - -**BREAKING CHANGE** - -The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. -Instead, the CLI and backend process now accept one or more `--config` flags to load config files. - -Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. -If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. - -The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: - -```bash ---config ../../app-config.yaml --config ../../app-config.development.yaml -``` diff --git a/.changeset/eighty-lamps-smell.md b/.changeset/eighty-lamps-smell.md deleted file mode 100644 index 85dfba4f82..0000000000 --- a/.changeset/eighty-lamps-smell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -handle the case where no entities are available to show diff --git a/.changeset/eighty-stingrays-type.md b/.changeset/eighty-stingrays-type.md deleted file mode 100644 index 731c401b77..0000000000 --- a/.changeset/eighty-stingrays-type.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -Add forwardRef to the SidebarItem diff --git a/.changeset/flat-bugs-do.md b/.changeset/flat-bugs-do.md deleted file mode 100644 index 672daf657d..0000000000 --- a/.changeset/flat-bugs-do.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/core': patch -'@backstage/plugin-graphiql': patch -'@backstage/plugin-tech-radar': patch -'@backstage/plugin-techdocs': patch ---- - -add test case for Progress component diff --git a/.changeset/flat-yaks-march.md b/.changeset/flat-yaks-march.md deleted file mode 100644 index 6b26206eb8..0000000000 --- a/.changeset/flat-yaks-march.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch ---- - -fix the accordion details design when job stage fail diff --git a/.changeset/fresh-maps-complain.md b/.changeset/fresh-maps-complain.md deleted file mode 100644 index ef2021df37..0000000000 --- a/.changeset/fresh-maps-complain.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-catalog': minor -'@backstage/plugin-register-component': patch ---- - -Locations registered through the catalog client now default to the 'url' type. The type selection dropdown in the register-component form has been removed. diff --git a/.changeset/funny-readers-breathe.md b/.changeset/funny-readers-breathe.md deleted file mode 100644 index 8897b24cf6..0000000000 --- a/.changeset/funny-readers-breathe.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -fix the warning of all the core components test cases diff --git a/.changeset/fuzzy-falcons-happen.md b/.changeset/fuzzy-falcons-happen.md deleted file mode 100644 index 461ac195d9..0000000000 --- a/.changeset/fuzzy-falcons-happen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'e2e-test': minor ---- - -Converted into a CLI, use `yarn e2e-test run` to run diff --git a/.changeset/good-islands-cheer.md b/.changeset/good-islands-cheer.md deleted file mode 100644 index 2e7109b312..0000000000 --- a/.changeset/good-islands-cheer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': minor ---- - -Enable custom alert types in Cost Insights diff --git a/.changeset/great-apples-flash.md b/.changeset/great-apples-flash.md deleted file mode 100644 index 78ad89dee0..0000000000 --- a/.changeset/great-apples-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -Fix CodeOwnersProcessor to handle non team users diff --git a/.changeset/happy-ads-behave.md b/.changeset/happy-ads-behave.md deleted file mode 100644 index f8b889f85c..0000000000 --- a/.changeset/happy-ads-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Allow templates to be located on non-default branch diff --git a/.changeset/heavy-berries-hear.md b/.changeset/heavy-berries-hear.md deleted file mode 100644 index 66aa6d93e1..0000000000 --- a/.changeset/heavy-berries-hear.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -Update ItemCard headers to pass color contrast standards. diff --git a/.changeset/hungry-parrots-work.md b/.changeset/hungry-parrots-work.md deleted file mode 100644 index a18218b542..0000000000 --- a/.changeset/hungry-parrots-work.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -rename stories folder top Chip diff --git a/.changeset/little-wasps-pull.md b/.changeset/little-wasps-pull.md deleted file mode 100644 index 732c7506b0..0000000000 --- a/.changeset/little-wasps-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -Remove "in default" in component name diff --git a/.changeset/long-ways-count.md b/.changeset/long-ways-count.md deleted file mode 100644 index e04c1225cc..0000000000 --- a/.changeset/long-ways-count.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': minor -'@backstage/create-app': patch ---- - -Updated naming of environment variables. New pattern [NAME]\_TOKEN for Github, Gitlab, Azure & Github enterprise access tokens. - -### Detail: - -- Previously we have to export same token for both, catalog & scaffolder - -```bash -export GITHUB_ACCESS_TOKEN=foo -export GITHUB_PRIVATE_TOKEN=foo -``` - -with latest changes, only single export is sufficient. - -```bash -export GITHUB_TOKEN=foo -export GITLAB_TOKEN=foo -export GHE_TOKEN=foo -export AZURE_TOKEN=foo -``` - -### list: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Old nameNew name
GITHUB_ACCESS_TOKENGITHUB_TOKEN
GITHUB_PRIVATE_TOKENGITHUB_TOKEN
GITLAB_ACCESS_TOKENGITLAB_TOKEN
GITLAB_PRIVATE_TOKENGITLAB_TOKEN
AZURE_PRIVATE_TOKENAZURE_TOKEN
GHE_PRIVATE_TOKENGHE_TOKEN
diff --git a/.changeset/loud-lamps-visit.md b/.changeset/loud-lamps-visit.md deleted file mode 100644 index 9023061643..0000000000 --- a/.changeset/loud-lamps-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Including source maps with all packages diff --git a/.changeset/lovely-suits-flash.md b/.changeset/lovely-suits-flash.md deleted file mode 100644 index f093290c85..0000000000 --- a/.changeset/lovely-suits-flash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -update the test cases of CodeSnippet component diff --git a/.changeset/metal-fishes-learn.md b/.changeset/metal-fishes-learn.md deleted file mode 100644 index d22af83ca0..0000000000 --- a/.changeset/metal-fishes-learn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': minor ---- - -The default mount point for backend plugins have been changed to /api. These changes are done in the backend package itself, so it is recommended that you sync up existing backend packages with this new pattern. diff --git a/.changeset/mighty-starfishes-taste.md b/.changeset/mighty-starfishes-taste.md deleted file mode 100644 index eb43ce69b8..0000000000 --- a/.changeset/mighty-starfishes-taste.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Removed the parseData step from catalog processors. Locations readers should emit full entities instead. diff --git a/.changeset/nervous-drinks-notice.md b/.changeset/nervous-drinks-notice.md deleted file mode 100644 index 7c6af21f64..0000000000 --- a/.changeset/nervous-drinks-notice.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/plugin-catalog': minor -'@backstage/plugin-register-component': minor ---- - -Add a validate button to the register-component page - -This allows the user to validate his location before adding it. diff --git a/.changeset/new-url-reader.md b/.changeset/new-url-reader.md deleted file mode 100644 index 94758c5bc1..0000000000 --- a/.changeset/new-url-reader.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@backstage/backend-common': patch ---- - -Added new UrlReader interface for reading opaque data from URLs with different providers. - -This new URL reading system is intended as a replacement for the various integrations towards -external systems in the catalog, scaffolder, and techdocs. It is configured via a new top-level -config section called 'integrations'. - -Along with the UrlReader interface is a new UrlReaders class, which exposes static factory -methods for instantiating readers that can read from many different integrations simultaneously. diff --git a/.changeset/nice-candles-argue.md b/.changeset/nice-candles-argue.md deleted file mode 100644 index 971000410a..0000000000 --- a/.changeset/nice-candles-argue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-user-settings': minor ---- - -Add settings button to sidebar diff --git a/.changeset/ninety-ads-dance.md b/.changeset/ninety-ads-dance.md deleted file mode 100644 index a03298fd7f..0000000000 --- a/.changeset/ninety-ads-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/catalog-model': patch ---- - -Fix documentation and validation message for tags diff --git a/.changeset/ninety-pens-poke.md b/.changeset/ninety-pens-poke.md deleted file mode 100644 index 94bcb06749..0000000000 --- a/.changeset/ninety-pens-poke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/create-app': patch ---- - -Fix for configured templates using 'url' locations even though it's not supported yet diff --git a/.changeset/old-eagles-admire.md b/.changeset/old-eagles-admire.md deleted file mode 100644 index 0729b6439d..0000000000 --- a/.changeset/old-eagles-admire.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/backend-common': minor -'@backstage/cli': minor ---- - -Use APP_ENV before NODE_ENV for determining what config to load diff --git a/.changeset/old-falcons-jump.md b/.changeset/old-falcons-jump.md deleted file mode 100644 index 107d75ff88..0000000000 --- a/.changeset/old-falcons-jump.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@backstage/plugin-newrelic': minor ---- - -The New Relic plugin now uses the Backstage proxy to communicate with New Relic's API. - -Please update your `app-config.yaml` as follows: - -```yaml -# Old Config -newrelic: - api: - baseUrl: 'https://api.newrelic.com/v2' - key: NEW_RELIC_REST_API_KEY -``` - -```yaml -# New Config -proxy: - '/newrelic/apm/api': - target: https://api.newrelic.com/v2 - headers: - X-Api-Key: - $env: NEW_RELIC_REST_API_KEY -``` diff --git a/.changeset/old-jeans-dance.md b/.changeset/old-jeans-dance.md deleted file mode 100644 index 1bd4a3136a..0000000000 --- a/.changeset/old-jeans-dance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': patch ---- - -The CodeOwnersProcessor now handles 'url' locations diff --git a/.changeset/olive-bikes-jog.md b/.changeset/olive-bikes-jog.md deleted file mode 100644 index fdbf1e0d9f..0000000000 --- a/.changeset/olive-bikes-jog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -add test cases for Status components diff --git a/.changeset/pink-spies-rule.md b/.changeset/pink-spies-rule.md deleted file mode 100644 index 71653a1841..0000000000 --- a/.changeset/pink-spies-rule.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs-backend': patch ---- - -Replacing the hard coded `baseApiUrl` by reading the value from configuration to enable private GitHub setup for TechDocs. diff --git a/.changeset/polite-laws-think.md b/.changeset/polite-laws-think.md deleted file mode 100644 index a5eb7f9883..0000000000 --- a/.changeset/polite-laws-think.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Removed support for deprecated `catalog.providers` config that have been moved to `integrations` diff --git a/.changeset/polite-moose-cough.md b/.changeset/polite-moose-cough.md deleted file mode 100644 index b66227bb24..0000000000 --- a/.changeset/polite-moose-cough.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -update ItemCard component and it's story diff --git a/.changeset/popular-ghosts-remain.md b/.changeset/popular-ghosts-remain.md deleted file mode 100644 index 4a170c7618..0000000000 --- a/.changeset/popular-ghosts-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -Proper render boolean values on StructuredMetadataTable component diff --git a/.changeset/popular-jars-serve.md b/.changeset/popular-jars-serve.md deleted file mode 100644 index 6ee40195fc..0000000000 --- a/.changeset/popular-jars-serve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/catalog-model': minor ---- - -Enable adding locations for config files that does not yet exist by adding a flag to api request diff --git a/.changeset/pretty-cups-joke.md b/.changeset/pretty-cups-joke.md deleted file mode 100644 index 49a1db2a75..0000000000 --- a/.changeset/pretty-cups-joke.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Add authentication token to Scaffolder GitHub Preparer diff --git a/.changeset/proud-eagles-grow.md b/.changeset/proud-eagles-grow.md deleted file mode 100644 index ef83a4ad26..0000000000 --- a/.changeset/proud-eagles-grow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/cli': patch ---- - -Fixed duplicate help output, and print help on invalid command diff --git a/.changeset/raghu-is-great.md b/.changeset/raghu-is-great.md deleted file mode 100644 index 805e49f3e8..0000000000 --- a/.changeset/raghu-is-great.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Renamed the `LocationProcessor` class to `CatalogProcessor`. - -Likewise, renamed `LocationProcessorResult`, `LocationProcessorLocationResult`, -`LocationProcessorDataResult`, `LocationProcessorEntityResult`, -`LocationProcessorErrorResult`, and `LocationProcessorEmit` to their `Catalog*` -counterparts. diff --git a/.changeset/red-games-float.md b/.changeset/red-games-float.md deleted file mode 100644 index 6eabba26a4..0000000000 --- a/.changeset/red-games-float.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-cost-insights': minor ---- - -- getProjectDailyCost and getGroupDailyCost no longer accept a metric as a parameter -- getDailyMetricData added to API for fetching daily metric data for given interval -- dailyCost removed as configurable metric -- default field added to metric configuration for displaying comparison metric data in top panel -- Metric.kind can no longer be null -- MetricData type added diff --git a/.changeset/remove-location-processor-read.md b/.changeset/remove-location-processor-read.md deleted file mode 100644 index 78aea6d820..0000000000 --- a/.changeset/remove-location-processor-read.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -Remove the `read` argument of `LocationProcessor.processEntity`. -Instead, pass the `UrlReader` into the constructor of your `LocationProcessor`. diff --git a/.changeset/rocket-lizards-congregate.md b/.changeset/rocket-lizards-congregate.md deleted file mode 100644 index f4cd50aa36..0000000000 --- a/.changeset/rocket-lizards-congregate.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-catalog': minor ---- - -The URL path for a catalog entity has changed, - -- from: `/catalog/:kind/:optionalNamespaceAndName` -- to: `/catalog/:namespace/:kind/:name` - -Redirects are in place, so disruptions for users should not happen. diff --git a/.changeset/selfish-bats-perform.md b/.changeset/selfish-bats-perform.md deleted file mode 100644 index e4d05c088c..0000000000 --- a/.changeset/selfish-bats-perform.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@backstage/plugin-scaffolder': patch -'@backstage/plugin-scaffolder-backend': patch ---- - -The new `scaffolder.github.baseUrl` config property allows to specify a custom base url for GitHub enterprise instances diff --git a/.changeset/selfish-mugs-itch.md b/.changeset/selfish-mugs-itch.md deleted file mode 100644 index 39ed236352..0000000000 --- a/.changeset/selfish-mugs-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-cost-insights': minor ---- - -Remove product filters from query parameters diff --git a/.changeset/seven-humans-check.md b/.changeset/seven-humans-check.md deleted file mode 100644 index f2fb784cc0..0000000000 --- a/.changeset/seven-humans-check.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'example-app': patch -'@backstage/core-api': patch -'@backstage/plugin-cost-insights': patch ---- - -Remove cost insights example client from demo app and export from plugin -Create cost insights dev plugin using example client -Make PluginConfig and dependent types public diff --git a/.changeset/short-secrets.md b/.changeset/short-secrets.md deleted file mode 100644 index 72cb059979..0000000000 --- a/.changeset/short-secrets.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/config-loader': minor ---- - -Added support for new shorthand when defining secrets, where `$env: ENV` can be used instead of `$secret: { env: ENV }` etc. diff --git a/.changeset/slimy-garlics-eat.md b/.changeset/slimy-garlics-eat.md deleted file mode 100644 index 3ecc0ce495..0000000000 --- a/.changeset/slimy-garlics-eat.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog': patch ---- - -update the EntityNotFound component diff --git a/.changeset/slow-experts-peel.md b/.changeset/slow-experts-peel.md deleted file mode 100644 index ed9c7af21e..0000000000 --- a/.changeset/slow-experts-peel.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-tech-radar': patch ---- - -fix the horizontal scrolling issue in the RadarPage component diff --git a/.changeset/spicy-moles-yell.md b/.changeset/spicy-moles-yell.md deleted file mode 100644 index 72b648b30b..0000000000 --- a/.changeset/spicy-moles-yell.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -make ErrorPage responsive + fix the test case diff --git a/.changeset/spicy-rockets-ring.md b/.changeset/spicy-rockets-ring.md deleted file mode 100644 index b39b433c1b..0000000000 --- a/.changeset/spicy-rockets-ring.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Added support for configuring the working directory of the Scaffolder: - -```yaml -backend: - workingDirectory: /some-dir # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir -``` diff --git a/.changeset/spotty-apples-visit.md b/.changeset/spotty-apples-visit.md deleted file mode 100644 index ba481fa052..0000000000 --- a/.changeset/spotty-apples-visit.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-auth-backend': patch ---- - -Better presentation of authentication errors diff --git a/.changeset/sweet-bikes-battle.md b/.changeset/sweet-bikes-battle.md deleted file mode 100644 index 68ed8caeeb..0000000000 --- a/.changeset/sweet-bikes-battle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'example-app': patch ---- - -cleaning up because external plugins have already implemented new api for creating diff --git a/.changeset/swift-emus-mate.md b/.changeset/swift-emus-mate.md deleted file mode 100644 index 1903742115..0000000000 --- a/.changeset/swift-emus-mate.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core-api': minor ---- - -Refactored the FeatureFlagsApi to make it easier to re-implement. Existing usage of particularly getUserFlags can be replaced with isActive() or save(). diff --git a/.changeset/swift-peas-argue.md b/.changeset/swift-peas-argue.md deleted file mode 100644 index d78d844d45..0000000000 --- a/.changeset/swift-peas-argue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -give aria-label attribute to Status Ok, Warning and Error diff --git a/.changeset/ten-bees-wash.md b/.changeset/ten-bees-wash.md deleted file mode 100644 index 179dbf87f4..0000000000 --- a/.changeset/ten-bees-wash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-techdocs': patch ---- - -While techdocs fetches site name and metadata for the component, the page title was displayed as '[object Object] | Backstage'. This has now been fixed to display the component ID if site name is not present or being fetched. diff --git a/.changeset/three-horses-juggle.md b/.changeset/three-horses-juggle.md deleted file mode 100644 index bebcf77e43..0000000000 --- a/.changeset/three-horses-juggle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-scaffolder-backend': patch ---- - -Introduce PreparerOptions for PreparerBase diff --git a/.changeset/tough-weeks-pull.md b/.changeset/tough-weeks-pull.md deleted file mode 100644 index e79355de90..0000000000 --- a/.changeset/tough-weeks-pull.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/core': patch ---- - -fix the responsive of page story diff --git a/.changeset/url-reader-processor.md b/.changeset/url-reader-processor.md deleted file mode 100644 index 40fef3c106..0000000000 --- a/.changeset/url-reader-processor.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@backstage/plugin-catalog-backend': minor ---- - -The catalog backend UrlReaderProcessor now uses a UrlReader from @backstage/backend-common, which must now be supplied to the constructor. diff --git a/.changeset/weak-ducks-tan.md b/.changeset/weak-ducks-tan.md deleted file mode 100644 index 64b1c3f117..0000000000 --- a/.changeset/weak-ducks-tan.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@backstage/backend-common': minor -'example-backend': patch -'@backstage/cli': patch -'@backstage/create-app': patch ---- - -Change loadBackendConfig to return the config directly diff --git a/packages/app/CHANGELOG.md b/packages/app/CHANGELOG.md new file mode 100644 index 0000000000..458f5a5e5c --- /dev/null +++ b/packages/app/CHANGELOG.md @@ -0,0 +1,121 @@ +# example-app + +## 0.2.0 + +### Minor Changes + +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +### Patch Changes + +- 65d722455: Add Pull Request tab to components view. +- 26e69ab1a: Remove cost insights example client from demo app and export from plugin + Create cost insights dev plugin using example client + Make PluginConfig and dependent types public +- e7f5471fd: cleaning up because external plugins have already implemented new api for creating +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [2846ef95c] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [d67c529ab] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [8351ad79b] +- Updated dependencies [30dd11122] +- Updated dependencies [1297dcb3a] +- Updated dependencies [368fd8243] +- Updated dependencies [fb74f1db6] +- Updated dependencies [3472c8be7] +- Updated dependencies [cab473771] +- Updated dependencies [1d0aec70f] +- Updated dependencies [1c60f716e] +- Updated dependencies [a73979d45] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [a3840bed2] +- Updated dependencies [339668995] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [8d1360aa9] +- Updated dependencies [72f6cda35] +- Updated dependencies [0ee9e9f66] +- Updated dependencies [5c70f3d35] +- Updated dependencies [bb48b9833] +- Updated dependencies [fd8384d7e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [c5ef12926] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [6a84cb072] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [cba4e4d97] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [4fc1d440e] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [4512b9967] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [9a3b3dbf1] +- Updated dependencies [e7d4ac7ce] +- Updated dependencies [0b956f21b] +- Updated dependencies [1c8c43756] +- Updated dependencies [0e67c6b40] +- Updated dependencies [26e69ab1a] +- Updated dependencies [97c2cb19b] +- Updated dependencies [02c60b5f8] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [57b54c8ed] +- Updated dependencies [1611c6dbc] +- Updated dependencies [7bbeb049f] + - @backstage/cli@0.2.0 + - @backstage/plugin-api-docs@0.2.0 + - @backstage/plugin-catalog@0.2.0 + - @backstage/plugin-circleci@0.2.0 + - @backstage/plugin-explore@0.2.0 + - @backstage/plugin-gcp-projects@0.2.0 + - @backstage/plugin-github-actions@0.2.0 + - @backstage/plugin-gitops-profiles@0.2.0 + - @backstage/plugin-graphiql@0.2.0 + - @backstage/plugin-jenkins@0.2.0 + - @backstage/plugin-kubernetes@0.2.0 + - @backstage/plugin-lighthouse@0.2.0 + - @backstage/plugin-newrelic@0.2.0 + - @backstage/plugin-register-component@0.2.0 + - @backstage/plugin-rollbar@0.2.0 + - @backstage/plugin-scaffolder@0.2.0 + - @backstage/plugin-sentry@0.2.0 + - @backstage/plugin-tech-radar@0.2.0 + - @backstage/plugin-techdocs@0.2.0 + - @backstage/plugin-welcome@0.2.0 + - @backstage/core@0.2.0 + - @backstage/plugin-cloudbuild@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/plugin-cost-insights@0.2.0 + - @backstage/plugin-user-settings@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/packages/app/package.json b/packages/app/package.json index 2e7b15cf23..bd497857ab 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -1,36 +1,36 @@ { "name": "example-app", - "version": "0.1.1", + "version": "0.2.0", "private": true, "bundled": true, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/cli": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-api-docs": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/plugin-circleci": "^0.1.1", - "@backstage/plugin-cloudbuild": "^0.1.1", - "@backstage/plugin-cost-insights": "^0.1.1", - "@backstage/plugin-explore": "^0.1.1", - "@backstage/plugin-gcp-projects": "^0.1.1", - "@backstage/plugin-github-actions": "^0.1.1", - "@backstage/plugin-gitops-profiles": "^0.1.1", - "@backstage/plugin-graphiql": "^0.1.1", - "@backstage/plugin-jenkins": "^0.1.1", - "@backstage/plugin-kubernetes": "^0.1.1", - "@backstage/plugin-lighthouse": "^0.1.1", - "@backstage/plugin-newrelic": "^0.1.1", - "@backstage/plugin-register-component": "^0.1.1", - "@backstage/plugin-rollbar": "^0.1.1", - "@backstage/plugin-scaffolder": "^0.1.1", - "@backstage/plugin-sentry": "^0.1.1", - "@backstage/plugin-tech-radar": "^0.1.1", - "@backstage/plugin-techdocs": "^0.1.1", - "@backstage/plugin-user-settings": "^0.1.1", - "@backstage/plugin-welcome": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/cli": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-api-docs": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/plugin-circleci": "^0.2.0", + "@backstage/plugin-cloudbuild": "^0.2.0", + "@backstage/plugin-cost-insights": "^0.2.0", + "@backstage/plugin-explore": "^0.2.0", + "@backstage/plugin-gcp-projects": "^0.2.0", + "@backstage/plugin-github-actions": "^0.2.0", + "@backstage/plugin-gitops-profiles": "^0.2.0", + "@backstage/plugin-graphiql": "^0.2.0", + "@backstage/plugin-jenkins": "^0.2.0", + "@backstage/plugin-kubernetes": "^0.2.0", + "@backstage/plugin-lighthouse": "^0.2.0", + "@backstage/plugin-newrelic": "^0.2.0", + "@backstage/plugin-register-component": "^0.2.0", + "@backstage/plugin-rollbar": "^0.2.0", + "@backstage/plugin-scaffolder": "^0.2.0", + "@backstage/plugin-sentry": "^0.2.0", + "@backstage/plugin-tech-radar": "^0.2.0", + "@backstage/plugin-techdocs": "^0.2.0", + "@backstage/plugin-user-settings": "^0.2.0", + "@backstage/plugin-welcome": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@octokit/rest": "^18.0.0", diff --git a/packages/backend-common/CHANGELOG.md b/packages/backend-common/CHANGELOG.md new file mode 100644 index 0000000000..2b8b38b9b0 --- /dev/null +++ b/packages/backend-common/CHANGELOG.md @@ -0,0 +1,64 @@ +# @backstage/backend-common + +## 0.2.0 + +### Minor Changes + +- 5249594c5: Add service discovery interface and implement for single host deployments + + Fixes #1847, #2596 + + Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + + Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + + This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + + Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. + +- 56e4eb589: Make CSP configurable to fix app-backend served app not being able to fetch + + See discussion [here on discord](https://discordapp.com/channels/687207715902193673/687235481154617364/758721460163575850) + +- e37c0a005: Use localhost to fall back to IPv4 if IPv6 isn't available +- f00ca3cb8: Auto-create plugin databases + + Relates to #1598. + + This creates databases for plugins before handing off control to plugins. + + The list of plugins currently need to be hard-coded depending on the installed plugins. A later PR will properly refactor the code to provide a factory pattern where plugins specify what they need, and Knex instances will be provided based on the input. + +- 6579769df: Add the ability to import components from Bitbucket Server to the service catalog +- 8c2b76e45: **BREAKING CHANGE** + + The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. + Instead, the CLI and backend process now accept one or more `--config` flags to load config files. + + Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. + If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. + + The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: + + ```bash + --config ../../app-config.yaml --config ../../app-config.development.yaml + ``` + +- 8afce088a: Use APP_ENV before NODE_ENV for determining what config to load +- 7bbeb049f: Change loadBackendConfig to return the config directly + +### Patch Changes + +- 440a17b39: Added new UrlReader interface for reading opaque data from URLs with different providers. + + This new URL reading system is intended as a replacement for the various integrations towards + external systems in the catalog, scaffolder, and techdocs. It is configured via a new top-level + config section called 'integrations'. + + Along with the UrlReader interface is a new UrlReaders class, which exposes static factory + methods for instantiating readers that can read from many different integrations simultaneously. + +- Updated dependencies [8c2b76e45] +- Updated dependencies [ce5512bc0] + - @backstage/config-loader@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/packages/backend-common/package.json b/packages/backend-common/package.json index fb213a476d..c004eaac28 100644 --- a/packages/backend-common/package.json +++ b/packages/backend-common/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/backend-common", "description": "Common functionality library for Backstage backends", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -31,8 +31,8 @@ "dependencies": { "@backstage/cli-common": "^0.1.1", "@backstage/config": "^0.1.1", - "@backstage/config-loader": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/config-loader": "^0.2.0", + "@backstage/test-utils": "^0.1.2", "@types/cors": "^2.8.6", "@types/express": "^4.17.6", "compression": "^1.7.4", @@ -62,7 +62,7 @@ } }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/compression": "^1.7.0", "@types/http-errors": "^1.6.3", "@types/minimist": "^1.2.0", diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md new file mode 100644 index 0000000000..a3e5535e40 --- /dev/null +++ b/packages/backend/CHANGELOG.md @@ -0,0 +1,97 @@ +# example-backend + +## 0.2.0 + +### Patch Changes + +- 440a17b39: Bump @backstage/catalog-backend and pass the now required UrlReader interface to the plugin +- 6840a68df: Pass GitHub token into Scaffolder GitHub Preparer +- 8c2b76e45: **BREAKING CHANGE** + + The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. + Instead, the CLI and backend process now accept one or more `--config` flags to load config files. + + Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. + If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. + + The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: + + ```bash + --config ../../app-config.yaml --config ../../app-config.development.yaml + ``` + +- 7bbeb049f: Change loadBackendConfig to return the config directly +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [3e254503d] +- Updated dependencies [6d29605db] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [b4e5466e1] +- Updated dependencies [6f1768c0f] +- Updated dependencies [e37c0a005] +- Updated dependencies [3472c8be7] +- Updated dependencies [57d555eb2] +- Updated dependencies [61db1ddc6] +- Updated dependencies [81cb94379] +- Updated dependencies [1687b8fbb] +- Updated dependencies [a768a07fb] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [0c370c979] +- Updated dependencies [ce1f55398] +- Updated dependencies [e6b00e3af] +- Updated dependencies [9226c2aaa] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [99710b102] +- Updated dependencies [6579769df] +- Updated dependencies [002860e7a] +- Updated dependencies [5adfc005e] +- Updated dependencies [33454c0f2] +- Updated dependencies [183e2a30d] +- Updated dependencies [948052cbb] +- Updated dependencies [65d722455] +- Updated dependencies [b652bf2cc] +- Updated dependencies [4036ff59d] +- Updated dependencies [991a950e0] +- Updated dependencies [512d70973] +- Updated dependencies [8c2b76e45] +- Updated dependencies [8bdf0bcf5] +- Updated dependencies [c926765a2] +- Updated dependencies [5a920c6e4] +- Updated dependencies [2f62e1804] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [4c4eab81b] +- Updated dependencies [22ff8fba5] +- Updated dependencies [36a71d278] +- Updated dependencies [b3d57961c] +- Updated dependencies [6840a68df] +- Updated dependencies [a5cb46bac] +- Updated dependencies [49d70ccab] +- Updated dependencies [1c8c43756] +- Updated dependencies [26e69ab1a] +- Updated dependencies [5e4551e3a] +- Updated dependencies [e142a2767] +- Updated dependencies [e7f5471fd] +- Updated dependencies [e3d063ffa] +- Updated dependencies [440a17b39] +- Updated dependencies [7bbeb049f] + - @backstage/plugin-app-backend@0.2.0 + - @backstage/plugin-auth-backend@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/plugin-scaffolder-backend@0.2.0 + - @backstage/plugin-techdocs-backend@0.2.0 + - @backstage/plugin-catalog-backend@0.2.0 + - @backstage/plugin-proxy-backend@0.2.0 + - @backstage/backend-common@0.2.0 + - example-app@0.2.0 + - @backstage/plugin-graphql-backend@0.1.2 + - @backstage/plugin-kubernetes-backend@0.1.2 + - @backstage/plugin-rollbar-backend@0.1.2 + - @backstage/plugin-sentry-backend@0.1.2 diff --git a/packages/backend/package.json b/packages/backend/package.json index cdc938331a..67b2a42fee 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "example-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "dist/index.cjs.js", "types": "src/index.ts", "private": true, @@ -18,24 +18,24 @@ "migrate:create": "knex migrate:make -x ts" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/plugin-app-backend": "^0.1.1", - "@backstage/plugin-auth-backend": "^0.1.1", - "@backstage/plugin-catalog-backend": "^0.1.1", - "@backstage/plugin-graphql-backend": "^0.1.1", - "@backstage/plugin-kubernetes-backend": "^0.1.1", - "@backstage/plugin-proxy-backend": "^0.1.1", - "@backstage/plugin-rollbar-backend": "^0.1.1", - "@backstage/plugin-scaffolder-backend": "^0.1.1", - "@backstage/plugin-sentry-backend": "^0.1.1", - "@backstage/plugin-techdocs-backend": "^0.1.1", + "@backstage/plugin-app-backend": "^0.2.0", + "@backstage/plugin-auth-backend": "^0.2.0", + "@backstage/plugin-catalog-backend": "^0.2.0", + "@backstage/plugin-graphql-backend": "^0.1.2", + "@backstage/plugin-kubernetes-backend": "^0.1.2", + "@backstage/plugin-proxy-backend": "^0.2.0", + "@backstage/plugin-rollbar-backend": "^0.1.2", + "@backstage/plugin-scaffolder-backend": "^0.2.0", + "@backstage/plugin-sentry-backend": "^0.1.2", + "@backstage/plugin-techdocs-backend": "^0.2.0", "@gitbeaker/node": "^23.5.0", "@octokit/rest": "^18.0.0", "azure-devops-node-api": "^10.1.1", "dockerode": "^3.2.0", - "example-app": "^0.1.1", + "example-app": "^0.2.0", "express": "^4.17.1", "express-promise-router": "^3.0.3", "knex": "^0.21.6", @@ -45,7 +45,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/dockerode": "^2.5.32", "@types/express": "^4.17.6", "@types/express-serve-static-core": "^4.17.5", diff --git a/packages/catalog-model/CHANGELOG.md b/packages/catalog-model/CHANGELOG.md new file mode 100644 index 0000000000..051aa82c80 --- /dev/null +++ b/packages/catalog-model/CHANGELOG.md @@ -0,0 +1,28 @@ +# @backstage/catalog-model + +## 0.2.0 + +### Minor Changes + +- 3a4236570: Add handling and docs for entity references +- e0be86b6f: Entirely case insensitive read path of entities +- f70a52868: Add the User & Group entities + + A user describes a person, such as an employee, a contractor, or similar. Users belong to Group entities in the catalog. + + A group describes an organizational entity, such as for example a team, a business unit, or a loose collection of people in an interest group. Members of these groups are modeled in the catalog as kind User. + +- 12b5fe940: Add ApiDefinitionAtLocationProcessor that allows to load a API definition from another location +- a768a07fb: Add the ability to import users from GitHub Organization into the catalog. +- 5adfc005e: Changes the various kind policies into a new type `KindValidator`. + + Adds `CatalogProcessor#validateEntityKind` that makes use of the above + validators. This moves entity schema validity checking away from entity + policies and into processors, centralizing the extension points into the + processor chain. + +- b3d57961c: Enable adding locations for config files that does not yet exist by adding a flag to api request + +### Patch Changes + +- fa56f4615: Fix documentation and validation message for tags diff --git a/packages/catalog-model/package.json b/packages/catalog-model/package.json index 0d555ef5d2..47d047fe9a 100644 --- a/packages/catalog-model/package.json +++ b/packages/catalog-model/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/catalog-model", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -29,7 +29,7 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/express": "^4.17.6", "@types/jest": "^26.0.7", "@types/lodash": "^4.14.151", diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md new file mode 100644 index 0000000000..387f5e416f --- /dev/null +++ b/packages/cli/CHANGELOG.md @@ -0,0 +1,46 @@ +# @backstage/cli + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 1d0aec70f: Upgrade dependency `esbuild@0.7.7` +- 72f6cda35: Adds a new `BACKSTAGE_CLI_BUILD_PARELLEL` environment variable to control + parallelism for some build steps. + + This is useful in CI to help avoid out of memory issues when using `terser`. The + `BACKSTAGE_CLI_BUILD_PARELLEL` environment variable can be set to + `true | false | [integer]` to override the default behaviour. See + [terser-webpack-plugin](https://github.com/webpack-contrib/terser-webpack-plugin#parallel) + for more details. + +- 8c2b76e45: **BREAKING CHANGE** + + The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. + Instead, the CLI and backend process now accept one or more `--config` flags to load config files. + + Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. + If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. + + The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: + + ```bash + --config ../../app-config.yaml --config ../../app-config.development.yaml + ``` + +- 8afce088a: Use APP_ENV before NODE_ENV for determining what config to load + +### Patch Changes + +- 3472c8be7: Add codeowners processor + + - Include ESNext.Promise in TypeScript compilation + +- a3840bed2: Upgrade dependency rollup-plugin-typescript2 to ^0.27.3 +- cba4e4d97: Including source maps with all packages +- 9a3b3dbf1: Fixed duplicate help output, and print help on invalid command +- 7bbeb049f: Change loadBackendConfig to return the config directly +- Updated dependencies [8c2b76e45] +- Updated dependencies [ce5512bc0] + - @backstage/config-loader@0.2.0 diff --git a/packages/cli/package.json b/packages/cli/package.json index 0e10b1d3d0..7ae244866d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/cli", "description": "CLI for developing Backstage plugins and apps", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public" @@ -30,7 +30,7 @@ "dependencies": { "@backstage/cli-common": "^0.1.1", "@backstage/config": "^0.1.1", - "@backstage/config-loader": "^0.1.1", + "@backstage/config-loader": "^0.2.0", "@hot-loader/react-dom": "^16.13.0", "@lerna/package-graph": "^3.18.5", "@lerna/project": "^3.18.0", @@ -108,12 +108,12 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@types/diff": "^4.0.2", "@types/fs-extra": "^9.0.1", "@types/html-webpack-plugin": "^3.2.2", diff --git a/packages/config-loader/CHANGELOG.md b/packages/config-loader/CHANGELOG.md new file mode 100644 index 0000000000..9c6bee077f --- /dev/null +++ b/packages/config-loader/CHANGELOG.md @@ -0,0 +1,21 @@ +# @backstage/config-loader + +## 0.2.0 + +### Minor Changes + +- 8c2b76e45: **BREAKING CHANGE** + + The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. + Instead, the CLI and backend process now accept one or more `--config` flags to load config files. + + Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. + If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. + + The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: + + ```bash + --config ../../app-config.yaml --config ../../app-config.development.yaml + ``` + +- ce5512bc0: Added support for new shorthand when defining secrets, where `$env: ENV` can be used instead of `$secret: { env: ENV }` etc. diff --git a/packages/config-loader/package.json b/packages/config-loader/package.json index 4444366658..2d3474f3af 100644 --- a/packages/config-loader/package.json +++ b/packages/config-loader/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/config-loader", "description": "Config loading functionality used by Backstage backend, and CLI", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public", diff --git a/packages/core-api/CHANGELOG.md b/packages/core-api/CHANGELOG.md new file mode 100644 index 0000000000..0e84d14aea --- /dev/null +++ b/packages/core-api/CHANGELOG.md @@ -0,0 +1,90 @@ +# @backstage/core-api + +## 0.2.0 + +### Minor Changes + +- 819a70229: Add SAML login to backstage + + ![](https://user-images.githubusercontent.com/872486/92251660-bb9e3400-eeff-11ea-86fe-1f2a0262cd31.png) + + ![](https://user-images.githubusercontent.com/872486/93851658-1a76f200-fce3-11ea-990b-26ca1a327a15.png) + +- b79017fd3: Updated the `GithubAuth.create` method to configure the default scope of the Github Auth Api. As a result the + default scope is configurable when overwriting the Core Api in the app. + + ``` + GithubAuth.create({ + discoveryApi, + oauthRequestApi, + defaultScopes: ['read:user', 'repo'], + }), + ``` + +- cbab5bbf8: Refactored the FeatureFlagsApi to make it easier to re-implement. Existing usage of particularly getUserFlags can be replaced with isActive() or save(). + +### Patch Changes + +- cbbd271c4: Add initial RouteRefRegistry + + Starting out some work to bring routing back and working as part of the work towards finalizing #1536 + + This is some of the groundwork of an experiment we're working on to enable routing via RouteRefs, while letting the app itself look something like this: + + ```jsx + const App = () => ( + + + + {' '} + // catalogRouteRef + + + + + + + // statusRouteRef + + + + + + + + + + // sentryRouteRef + + + + + + + + + + + + + + + + ); + ``` + + As part of inverting the composition of the app, route refs and routing in general was somewhat broken, intentionally. Right now it's not really possible to easily route to different parts of the app from a plugin, or even different parts of the plugin that are not within the same router. + + The core part of the experiment is to construct a map of ApiRef[] -> path overrides. Each key in the map is the list of route refs to traversed to reach a leaf in the routing tree, and the value is the path override at that point. For example, the above tree would add entries like [techDocsRouteRef] -> '/docs', and [entityRouteRef, apiDocsRouteRef] -> '/api'. By mapping out the entire app in this structure, the idea is that we can navigate to any point in the app using RouteRefs. + + The RouteRefRegistry is an implementation of such a map, and the idea is to add it in master to make it a bit easier to experiment and iterate. This is not an exposed API at this point. + + We've explored a couple of alternatives for how to enable routing, but it's boiled down to either a solution centred around the route map mentioned above, or treating all routes as static and globally unique, with no room for flexibility, customization or conflicts between different plugins. We're starting out pursuing this options 😁. We also expect that a the app-wide routing table will make things like dynamic loading a lot cleaner, as there would be a much more clear handoff between the main chunk and dynamic chunks. + +- 26e69ab1a: Remove cost insights example client from demo app and export from plugin + Create cost insights dev plugin using example client + Make PluginConfig and dependent types public +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] + - @backstage/theme@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/packages/core-api/package.json b/packages/core-api/package.json index 4c09f30113..42ba1c2080 100644 --- a/packages/core-api/package.json +++ b/packages/core-api/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core-api", "description": "Internal Core API used by Backstage plugins and apps", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public", @@ -30,8 +30,8 @@ }, "dependencies": { "@backstage/config": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@types/react": "^16.9", @@ -42,7 +42,7 @@ "zen-observable": "^0.8.15" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@backstage/test-utils-core": "^0.1.1", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md new file mode 100644 index 0000000000..10110a7b24 --- /dev/null +++ b/packages/core/CHANGELOG.md @@ -0,0 +1,70 @@ +# @backstage/core + +## 0.2.0 + +### Minor Changes + +- 819a70229: Add SAML login to backstage + + ![](https://user-images.githubusercontent.com/872486/92251660-bb9e3400-eeff-11ea-86fe-1f2a0262cd31.png) + + ![](https://user-images.githubusercontent.com/872486/93851658-1a76f200-fce3-11ea-990b-26ca1a327a15.png) + +- 482b6313d: Fix dense in Structured Metadata Table +- 1c60f716e: Added EmptyState component +- b79017fd3: Updated the `GithubAuth.create` method to configure the default scope of the Github Auth Api. As a result the + default scope is configurable when overwriting the Core Api in the app. + + ``` + GithubAuth.create({ + discoveryApi, + oauthRequestApi, + defaultScopes: ['read:user', 'repo'], + }), + ``` + +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +### Patch Changes + +- ae5983387: Fix banner position and color + + This PR closes: #2245 + + The "fixed" props added to control the position of the banner. When it is set to true the banner will be shown in bottom of that page and the width will be based on the content of the message. + + ![](https://user-images.githubusercontent.com/15106494/93765685-999df480-fc15-11ea-8fa5-11cac5836cf1.png) + + ![](https://user-images.githubusercontent.com/15106494/93765697-9e62a880-fc15-11ea-92af-b6a7fee4bb21.png) + +- 144c66d50: Fixed banner component position in DismissableBanner component +- 93a3fa3ae: Add forwardRef to the SidebarItem +- 782f3b354: add test case for Progress component +- 2713f28f4: fix the warning of all the core components test cases +- 406015b0d: Update ItemCard headers to pass color contrast standards. +- 82759d3e4: rename stories folder top Chip +- ac8d5d5c7: update the test cases of CodeSnippet component +- ebca83d48: add test cases for Status components +- aca79334f: update ItemCard component and it's story +- c0d5242a0: Proper render boolean values on StructuredMetadataTable component +- 3beb5c9fc: make ErrorPage responsive + fix the test case +- 754e31db5: give aria-label attribute to Status Ok, Warning and Error +- 1611c6dbc: fix the responsive of page story +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [cbbd271c4] +- Updated dependencies [b79017fd3] +- Updated dependencies [26e69ab1a] +- Updated dependencies [cbab5bbf8] + - @backstage/core-api@0.2.0 + - @backstage/theme@0.2.0 diff --git a/packages/core/package.json b/packages/core/package.json index 59e9c4d6fc..76db8834ad 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/core", "description": "Core API used by Backstage plugins and apps", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public", @@ -30,8 +30,8 @@ }, "dependencies": { "@backstage/config": "^0.1.1", - "@backstage/core-api": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core-api": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -55,8 +55,8 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/packages/create-app/CHANGELOG.md b/packages/create-app/CHANGELOG.md new file mode 100644 index 0000000000..fa0d8f817b --- /dev/null +++ b/packages/create-app/CHANGELOG.md @@ -0,0 +1,132 @@ +# @backstage/create-app + +## 0.2.0 + +### Minor Changes + +- 6d29605db: Change the default backend plugin mount point to /api +- 5249594c5: Add service discovery interface and implement for single host deployments + + Fixes #1847, #2596 + + Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + + Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + + This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + + Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. + +- 56e4eb589: Make CSP configurable to fix app-backend served app not being able to fetch + + See discussion [here on discord](https://discordapp.com/channels/687207715902193673/687235481154617364/758721460163575850) + +- d7873e1aa: Default to using internal scope for new plugins +- 6f447b3fc: Remove identity-backend + + Not used, and we're heading down the route of identities in the catalog + +- 61db1ddc6: Allow node v14 and add to master build matrix + + - Upgrade sqlite3@^5.0.0 in @backstage/plugin-catalog-backend + - Add Node 14 to engines in @backstage/create-app + +- a768a07fb: Add the ability to import users from GitHub Organization into the catalog. + + The token needs to have the scopes `user:email`, `read:user`, and `read:org`. + +- f00ca3cb8: Auto-create plugin databases + + Relates to #1598. + + This creates databases for plugins before handing off control to plugins. + + The list of plugins currently need to be hard-coded depending on the installed plugins. A later PR will properly refactor the code to provide a factory pattern where plugins specify what they need, and Knex instances will be provided based on the input. + +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +- 7aff112af: The default mount point for backend plugins have been changed to /api. These changes are done in the backend package itself, so it is recommended that you sync up existing backend packages with this new pattern. + +### Patch Changes + +- e67d49bf5: Sync scaffolded backend with example +- 961414d55: Remove discovery api override +- 440a17b39: Bump @backstage/catalog-backend and pass the now required UrlReader interface to the plugin +- 8c2b76e45: **BREAKING CHANGE** + + The existing loading of additional config files like `app-config.development.yaml` using APP_ENV or NODE_ENV has been removed. + Instead, the CLI and backend process now accept one or more `--config` flags to load config files. + + Without passing any flags, `app-config.yaml` and, if it exists, `app-config.local.yaml` will be loaded. + If passing any `--config ` flags, only those files will be loaded, **NOT** the default `app-config.yaml` one. + + The old behaviour of for example `APP_ENV=development` can be replicated using the following flags: + + ```bash + --config ../../app-config.yaml --config ../../app-config.development.yaml + ``` + +- 5a920c6e4: Updated naming of environment variables. New pattern [NAME]\_TOKEN for Github, Gitlab, Azure & Github enterprise access tokens. + + ### Detail: + + - Previously we have to export same token for both, catalog & scaffolder + + ```bash + export GITHUB_ACCESS_TOKEN=foo + export GITHUB_PRIVATE_TOKEN=foo + ``` + + with latest changes, only single export is sufficient. + + ```bash + export GITHUB_TOKEN=foo + export GITLAB_TOKEN=foo + export GHE_TOKEN=foo + export AZURE_TOKEN=foo + ``` + + ### list: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old nameNew name
GITHUB_ACCESS_TOKENGITHUB_TOKEN
GITHUB_PRIVATE_TOKENGITHUB_TOKEN
GITLAB_ACCESS_TOKENGITLAB_TOKEN
GITLAB_PRIVATE_TOKENGITLAB_TOKEN
AZURE_PRIVATE_TOKENAZURE_TOKEN
GHE_PRIVATE_TOKENGHE_TOKEN
+ +- 67d76b419: Fix for configured templates using 'url' locations even though it's not supported yet +- 7bbeb049f: Change loadBackendConfig to return the config directly diff --git a/packages/create-app/package.json b/packages/create-app/package.json index adb2cba8f7..2653185c32 100644 --- a/packages/create-app/package.json +++ b/packages/create-app/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/create-app", "description": "Create app package for Backstage", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public" @@ -37,30 +37,30 @@ "recursive-readdir": "^2.2.2" }, "devDependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", - "@backstage/cli": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", + "@backstage/cli": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-api-docs": "^0.1.1", - "@backstage/plugin-auth-backend": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/plugin-catalog-backend": "^0.1.1", - "@backstage/plugin-circleci": "^0.1.1", - "@backstage/plugin-explore": "^0.1.1", - "@backstage/plugin-github-actions": "^0.1.1", - "@backstage/plugin-lighthouse": "^0.1.1", - "@backstage/plugin-proxy-backend": "^0.1.1", - "@backstage/plugin-register-component": "^0.1.1", - "@backstage/plugin-rollbar-backend": "^0.1.1", - "@backstage/plugin-scaffolder": "^0.1.1", - "@backstage/plugin-scaffolder-backend": "^0.1.1", - "@backstage/plugin-tech-radar": "^0.1.1", - "@backstage/plugin-techdocs": "^0.1.1", - "@backstage/plugin-techdocs-backend": "^0.1.1", - "@backstage/plugin-user-settings": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/plugin-api-docs": "^0.2.0", + "@backstage/plugin-auth-backend": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/plugin-catalog-backend": "^0.2.0", + "@backstage/plugin-circleci": "^0.2.0", + "@backstage/plugin-explore": "^0.2.0", + "@backstage/plugin-github-actions": "^0.2.0", + "@backstage/plugin-lighthouse": "^0.2.0", + "@backstage/plugin-proxy-backend": "^0.2.0", + "@backstage/plugin-register-component": "^0.2.0", + "@backstage/plugin-rollbar-backend": "^0.1.2", + "@backstage/plugin-scaffolder": "^0.2.0", + "@backstage/plugin-scaffolder-backend": "^0.2.0", + "@backstage/plugin-tech-radar": "^0.2.0", + "@backstage/plugin-techdocs": "^0.2.0", + "@backstage/plugin-techdocs-backend": "^0.2.0", + "@backstage/plugin-user-settings": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@types/fs-extra": "^9.0.1", "@types/inquirer": "^7.3.1", "@types/ora": "^3.2.0", diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md new file mode 100644 index 0000000000..20152c16ef --- /dev/null +++ b/packages/dev-utils/CHANGELOG.md @@ -0,0 +1,40 @@ +# @backstage/dev-utils + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [3472c8be7] +- Updated dependencies [1d0aec70f] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a3840bed2] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [72f6cda35] +- Updated dependencies [8c2b76e45] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [cba4e4d97] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [8afce088a] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [9a3b3dbf1] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] +- Updated dependencies [7bbeb049f] + - @backstage/cli@0.2.0 + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index a2f3bb24a0..60cb5adfd5 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/dev-utils", "description": "Utilities for developing Backstage plugins.", - "version": "0.1.1", + "version": "0.1.2", "private": false, "publishConfig": { "access": "public", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@testing-library/jest-dom": "^5.10.1", diff --git a/packages/e2e-test/CHANGELOG.md b/packages/e2e-test/CHANGELOG.md new file mode 100644 index 0000000000..d872d34664 --- /dev/null +++ b/packages/e2e-test/CHANGELOG.md @@ -0,0 +1,7 @@ +# e2e-test + +## 0.2.0 + +### Minor Changes + +- 7de1004f0: Converted into a CLI, use `yarn e2e-test run` to run diff --git a/packages/e2e-test/package.json b/packages/e2e-test/package.json index 28c59a79c9..ea1dcc8ea2 100644 --- a/packages/e2e-test/package.json +++ b/packages/e2e-test/package.json @@ -1,7 +1,7 @@ { "name": "e2e-test", "description": "E2E test for verifying Backstage packages", - "version": "0.1.1", + "version": "0.2.0", "private": true, "homepage": "https://backstage.io", "repository": { diff --git a/packages/storybook/CHANGELOG.md b/packages/storybook/CHANGELOG.md new file mode 100644 index 0000000000..f5e44f780c --- /dev/null +++ b/packages/storybook/CHANGELOG.md @@ -0,0 +1,9 @@ +# storybook + +## 0.2.0 + +### Patch Changes + +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] + - @backstage/theme@0.2.0 diff --git a/packages/storybook/package.json b/packages/storybook/package.json index 4c9cc88dd0..f143596a9a 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -1,6 +1,6 @@ { "name": "storybook", - "version": "0.1.1", + "version": "0.2.0", "description": "Storybook build for core package", "private": true, "scripts": { @@ -14,7 +14,7 @@ ] }, "dependencies": { - "@backstage/theme": "^0.1.1" + "@backstage/theme": "^0.2.0" }, "devDependencies": { "@storybook/addon-actions": "^6.0.21", diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md new file mode 100644 index 0000000000..9add3bb173 --- /dev/null +++ b/packages/techdocs-cli/CHANGELOG.md @@ -0,0 +1,17 @@ +# @techdocs/cli + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [3472c8be7] +- Updated dependencies [1d0aec70f] +- Updated dependencies [a3840bed2] +- Updated dependencies [72f6cda35] +- Updated dependencies [8c2b76e45] +- Updated dependencies [cba4e4d97] +- Updated dependencies [8afce088a] +- Updated dependencies [9a3b3dbf1] +- Updated dependencies [7bbeb049f] + - @backstage/cli@0.2.0 diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json index 9772483923..ee3785b0cc 100644 --- a/packages/techdocs-cli/package.json +++ b/packages/techdocs-cli/package.json @@ -1,7 +1,7 @@ { "name": "@techdocs/cli", "description": "CLI for running TechDocs locally.", - "version": "0.1.1", + "version": "0.1.2", "private": false, "publishConfig": { "access": "public" @@ -40,7 +40,7 @@ "ext": "ts" }, "dependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "commander": "^6.1.0", "fs-extra": "^9.0.1", "http-proxy": "^1.18.1", diff --git a/packages/test-utils/CHANGELOG.md b/packages/test-utils/CHANGELOG.md new file mode 100644 index 0000000000..0d71e2ddd3 --- /dev/null +++ b/packages/test-utils/CHANGELOG.md @@ -0,0 +1,26 @@ +# @backstage/test-utils + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [cbbd271c4] +- Updated dependencies [3472c8be7] +- Updated dependencies [1d0aec70f] +- Updated dependencies [a3840bed2] +- Updated dependencies [b79017fd3] +- Updated dependencies [72f6cda35] +- Updated dependencies [8c2b76e45] +- Updated dependencies [cba4e4d97] +- Updated dependencies [8afce088a] +- Updated dependencies [9a3b3dbf1] +- Updated dependencies [26e69ab1a] +- Updated dependencies [cbab5bbf8] +- Updated dependencies [7bbeb049f] + - @backstage/cli@0.2.0 + - @backstage/core-api@0.2.0 + - @backstage/theme@0.2.0 diff --git a/packages/test-utils/package.json b/packages/test-utils/package.json index 8245848567..9a7682c76b 100644 --- a/packages/test-utils/package.json +++ b/packages/test-utils/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/test-utils", "description": "Utilities to test Backstage plugins and apps.", - "version": "0.1.1", + "version": "0.1.2", "private": false, "publishConfig": { "access": "public", @@ -29,10 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/core-api": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/core-api": "^0.2.0", "@backstage/test-utils-core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", diff --git a/packages/theme/CHANGELOG.md b/packages/theme/CHANGELOG.md new file mode 100644 index 0000000000..d8ba8deeba --- /dev/null +++ b/packages/theme/CHANGELOG.md @@ -0,0 +1,19 @@ +# @backstage/theme + +## 0.2.0 + +### Minor Changes + +- 0d4459c08: Tweak dark mode colors + +### Patch Changes + +- ae5983387: Fix banner position and color + + This PR closes: #2245 + + The "fixed" props added to control the position of the banner. When it is set to true the banner will be shown in bottom of that page and the width will be based on the content of the message. + + ![](https://user-images.githubusercontent.com/15106494/93765685-999df480-fc15-11ea-8fa5-11cac5836cf1.png) + + ![](https://user-images.githubusercontent.com/15106494/93765697-9e62a880-fc15-11ea-92af-b6a7fee4bb21.png) diff --git a/packages/theme/package.json b/packages/theme/package.json index 7033d9e1a5..378bd9db57 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/theme", "description": "material-ui theme for use with Backstage.", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public", @@ -31,7 +31,7 @@ "@material-ui/core": "^4.11.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1" + "@backstage/cli": "^0.2.0" }, "files": [ "dist" diff --git a/plugins/api-docs/CHANGELOG.md b/plugins/api-docs/CHANGELOG.md new file mode 100644 index 0000000000..73e6d6a941 --- /dev/null +++ b/plugins/api-docs/CHANGELOG.md @@ -0,0 +1,59 @@ +# @backstage/plugin-api-docs + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 339668995: There were some missing features and markdown was not rendered properly, but this is fixed now. + + Details: + + - [`asyncapi/asyncapi-react#149`](https://github.com/asyncapi/asyncapi-react/pull/149) - fix: improve markdown rendering of nested fields + - [`asyncapi/asyncapi-react#150`](https://github.com/asyncapi/asyncapi-react/pull/150) - feat: display the description of channels and operations + - [`asyncapi/asyncapi-react#153`](https://github.com/asyncapi/asyncapi-react/pull/153) - fix: let the list of `enums` break into multiple lines + +### Patch Changes + +- a73979d45: Resolve some dark mode styling issues in asyncAPI specs +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 23c072201e..3e949bd5cc 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-api-docs", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@kyma-project/asyncapi-react": "^0.13.1", "@material-icons/font": "^1.0.2", "@material-ui/core": "^4.11.0", @@ -39,9 +39,9 @@ "swagger-ui-react": "^3.31.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/app-backend/CHANGELOG.md b/plugins/app-backend/CHANGELOG.md new file mode 100644 index 0000000000..03ecafd574 --- /dev/null +++ b/plugins/app-backend/CHANGELOG.md @@ -0,0 +1,22 @@ +# @backstage/plugin-app-backend + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [ce5512bc0] +- Updated dependencies [7bbeb049f] + - @backstage/backend-common@0.2.0 + - @backstage/config-loader@0.2.0 diff --git a/plugins/app-backend/package.json b/plugins/app-backend/package.json index 4e91bf2161..c9b82cf6f1 100644 --- a/plugins/app-backend/package.json +++ b/plugins/app-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-app-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/config-loader": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/config-loader": "^0.2.0", "@types/express": "^4.17.6", "express": "^4.17.1", "express-promise-router": "^3.0.3", @@ -30,7 +30,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/supertest": "^2.0.8", "msw": "^0.20.5", "supertest": "^4.0.2" diff --git a/plugins/auth-backend/CHANGELOG.md b/plugins/auth-backend/CHANGELOG.md new file mode 100644 index 0000000000..344ccd8312 --- /dev/null +++ b/plugins/auth-backend/CHANGELOG.md @@ -0,0 +1,61 @@ +# @backstage/plugin-auth-backend + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 819a70229: Add SAML login to backstage + + ![](https://user-images.githubusercontent.com/872486/92251660-bb9e3400-eeff-11ea-86fe-1f2a0262cd31.png) + + ![](https://user-images.githubusercontent.com/872486/93851658-1a76f200-fce3-11ea-990b-26ca1a327a15.png) + +- 6d29605db: Change the default backend plugin mount point to /api +- 5249594c5: Add service discovery interface and implement for single host deployments + + Fixes #1847, #2596 + + Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + + Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + + This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + + Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. + +- 6f1768c0f: Initial implementation of catalog user lookup + + This adds a basic catalog client + method for the Google provider to look up users in the catalog. It expects to find a single user entity in the catalog with a google.com/email annotation that matches the email of the Google profile. + + Right now it falls back to the old behavior of splitting the email, since I don't wanna break the sign-in flow for existing apps, not yet anyway x). + + - Added "@backstage/catalog-model@^0.1.1-alpha.23" as a dependency + - Added "node-fetch@^2.6.1" as a dependency + +- 1687b8fbb: Lookup user in Google Auth Provider + +### Patch Changes + +- b4e5466e1: Move auth provider router creation to router +- b652bf2cc: Add OneLogin Identity Provider to Auth Backend +- e142a2767: Better presentation of authentication errors +- Updated dependencies [3a4236570] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [5adfc005e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [b3d57961c] +- Updated dependencies [7bbeb049f] + - @backstage/catalog-model@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/auth-backend/package.json b/plugins/auth-backend/package.json index e7ff0289d7..bfeacdf74b 100644 --- a/plugins/auth-backend/package.json +++ b/plugins/auth-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-auth-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "compression": "^1.7.4", @@ -52,7 +52,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/body-parser": "^1.19.0", "@types/cookie-parser": "^1.4.2", "@types/jwt-decode": "2.2.1", diff --git a/plugins/catalog-backend/CHANGELOG.md b/plugins/catalog-backend/CHANGELOG.md new file mode 100644 index 0000000000..e45da37691 --- /dev/null +++ b/plugins/catalog-backend/CHANGELOG.md @@ -0,0 +1,155 @@ +# @backstage/plugin-catalog-backend + +## 0.2.0 + +### Minor Changes + +- e0be86b6f: Entirely case insensitive read path of entities +- 12b5fe940: Add ApiDefinitionAtLocationProcessor that allows to load a API definition from another location +- 57d555eb2: This feature works the same as \$secret does in config - it allows programmatic substitution of values into a document. + + This is particularly useful e.g. for API type entities where you do not want to repeat your entire API spec document inside the catalog-info.yaml file. For those cases, you can instead do something like + + ``` + apiVersion: backstage.io/v1alpha1 + kind: API + metadata: + name: my-federated-service + spec: + type: graphql + definition: + $text: ./schema.graphql + ``` + + The textual content of that file will be injected as the value of definition, during each refresh loop. Both relative and absolute paths are supported, as well as any HTTP/HTTPS URL pointing to a service that returns the relevant data. + + The initial version supports injection of text file data, and structured data from JSON and YAML files. You can add any handler of your own in addition to these. + +- 61db1ddc6: Allow node v14 and add to master build matrix + + - Upgrade sqlite3@^5.0.0 in @backstage/plugin-catalog-backend + - Add Node 14 to engines in @backstage/create-app + +- 81cb94379: Simplify the read function in processors +- a768a07fb: Add the ability to import users from GitHub Organization into the catalog. + + The token needs to have the scopes `user:email`, `read:user`, and `read:org`. + +- ce1f55398: Use the new `UrlReader` in `PlaceholderProcessor`. + This allows to use the placeholder processor to include API definitions in API entities. + Previously it was only possible to do this if the definition comes from the same location type as the entity itself. +- e6b00e3af: Remove the backstage.io/definition-at-location annotation. + The annotation was superseded by the placeholder processor. + + ```yaml + apiVersion: backstage.io/v1alpha1 + kind: API + metadata: + name: spotify + description: The Spotify web API + tags: + - spotify + - rest + annotations: + # Don't use this annotation, but the placeholder $text instead (see below). + backstage.io/definition-at-location: 'url:https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/APIs/spotify.com/v1/swagger.yaml' + spec: + type: openapi + lifecycle: production + owner: spotify@example.com + definition: + $text: https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/APIs/spotify.com/v1/swagger.yaml + ``` + +- 99710b102: The way that wiring together a catalog happens, has changed drastically. Now + there is a new class `CatalogBuilder` that does almost all of the heavy lifting + of how to augment/replace pieces of catalog functionality, such as adding + support for custom entities or adding additional processors. + + As the builder was added, a lot of the static methods and builders for default + setups have been removed from classes deep in the hierarchy. Instead, the + builder contains the knowledge of what the defaults are. + +- 002860e7a: Filters passed to the `/entities` endpoint of the catalog has changed format. + + The old way was to pass things on the form `?a=b&c=d`; the new way is to pass + things on the form `?filter=a=b,c=d`. See discussion in + [#2910](https://github.com/backstage/backstage/issues/2910) for details. + + The comma separated items within a single filter have an AND between them. If + multiple such filters are passed, they have an OR between those item groups. + +- 5adfc005e: Changes the various kind policies into a new type `KindValidator`. + + Adds `CatalogProcessor#validateEntityKind` that makes use of the above + validators. This moves entity schema validity checking away from entity + policies and into processors, centralizing the extension points into the + processor chain. + +- 948052cbb: Add ability to dry run adding a new location to the catalog API. + + The location is now added in a transaction and afterwards rolled back. + This allows users to dry run this operation to see if there entity has issues. + This is probably done by automated tools in the CI/CD pipeline. + +- 4036ff59d: - The `CatalogProcessor` API was updated to have `preProcessEntity` and + `postProcessEntity` methods, instead of just one `processEntity`. This makes + it easier to make processors that have several stages in one, and to make + different processors more position independent in the list of processors. + - The `EntityPolicy` is now given directly to the `LocationReaders`, instead of + being enforced inside a policy. We have decided to separate out the act of + validating an entity to be outside of the processing flow, to make it + possible to apply more liberally and to evolve it as a separate concept. + - Because of the above, the `EntityPolicyProcessor` has been removed. +- 512d70973: Use the new `UrlReader` in the `CodeOwnersProcessor`. +- 2f62e1804: Removed the parseData step from catalog processors. Locations readers should emit full entities instead. +- 36a71d278: Removed support for deprecated `catalog.providers` config that have been moved to `integrations` +- a5cb46bac: Renamed the `LocationProcessor` class to `CatalogProcessor`. + + Likewise, renamed `LocationProcessorResult`, `LocationProcessorLocationResult`, + `LocationProcessorDataResult`, `LocationProcessorEntityResult`, + `LocationProcessorErrorResult`, and `LocationProcessorEmit` to their `Catalog*` + counterparts. + +- 49d70ccab: Remove the `read` argument of `LocationProcessor.processEntity`. + Instead, pass the `UrlReader` into the constructor of your `LocationProcessor`. +- 440a17b39: The catalog backend UrlReaderProcessor now uses a UrlReader from @backstage/backend-common, which must now be supplied to the constructor. + +### Patch Changes + +- 3472c8be7: Add codeowners processor + + - Add `codeowners-utils@^1.0.2` as a dependency + - Add `core-js@^3.6.5` as a dependency + - Added new CodeOwnersProcessor + +- 33454c0f2: Fix `CatalogBuilder#addProcessor`. +- 183e2a30d: Add support for `fields` sub-selection of just parts of an entity when listing + entities in the catalog backend. + + Example: `.../entities?fields=metadata.name,spec.type` will return partial + entity objects with only those exact fields present and the rest cut out. + Fields do not have to be simple scalars - you can for example do + `fields=metadata`. + +- 8bdf0bcf5: Fix CodeOwnersProcessor to handle non team users +- 4c4eab81b: The CodeOwnersProcessor now handles 'url' locations +- Updated dependencies [3a4236570] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [5adfc005e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [b3d57961c] +- Updated dependencies [7bbeb049f] + - @backstage/catalog-model@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/catalog-backend/package.json b/plugins/catalog-backend/package.json index 0d18d860d5..390c91551f 100644 --- a/plugins/catalog-backend/package.json +++ b/plugins/catalog-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", "@octokit/graphql": "^4.5.6", "@types/express": "^4.17.6", @@ -45,8 +45,8 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/test-utils": "^0.1.2", "@types/core-js": "^2.5.4", "@types/git-url-parse": "^9.0.0", "@types/ldapjs": "^1.0.9", diff --git a/plugins/catalog-graphql/CHANGELOG.md b/plugins/catalog-graphql/CHANGELOG.md new file mode 100644 index 0000000000..30414d6998 --- /dev/null +++ b/plugins/catalog-graphql/CHANGELOG.md @@ -0,0 +1,29 @@ +# @backstage/plugin-catalog-graphql + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [3a4236570] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [5adfc005e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [b3d57961c] +- Updated dependencies [7bbeb049f] + - @backstage/catalog-model@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/catalog-graphql/package.json b/plugins/catalog-graphql/package.json index a43f512856..aaa5faac36 100644 --- a/plugins/catalog-graphql/package.json +++ b/plugins/catalog-graphql/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog-graphql", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", "@graphql-modules/core": "^0.7.17", "apollo-server": "^2.16.1", @@ -32,8 +32,8 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/test-utils": "^0.1.2", "@graphql-codegen/cli": "^1.17.7", "@graphql-codegen/typescript": "^1.17.7", "@graphql-codegen/typescript-resolvers": "^1.17.7", diff --git a/plugins/catalog/CHANGELOG.md b/plugins/catalog/CHANGELOG.md new file mode 100644 index 0000000000..7fe67ffba4 --- /dev/null +++ b/plugins/catalog/CHANGELOG.md @@ -0,0 +1,79 @@ +# @backstage/plugin-catalog + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 368fd8243: Created EntityNotFound component for catalog which displays the 404 page when entity is not found. + + Fixes #2266 + +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +- f0aa01bcc: Add client side paging for catalog table +- 8b9c8196f: Locations registered through the catalog client now default to the 'url' type. The type selection dropdown in the register-component form has been removed. +- 2ebcfac8d: Add a validate button to the register-component page + + This allows the user to validate his location before adding it. + +- 0b956f21b: The URL path for a catalog entity has changed, + + - from: `/catalog/:kind/:optionalNamespaceAndName` + - to: `/catalog/:namespace/:kind/:name` + + Redirects are in place, so disruptions for users should not happen. + +### Patch Changes + +- 0aecfded0: handle the case where no entities are available to show +- 60d40892c: Remove "in default" in component name +- 97c2cb19b: update the EntityNotFound component +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [8351ad79b] +- Updated dependencies [fb74f1db6] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [c5ef12926] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [1c8c43756] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [57b54c8ed] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-scaffolder@0.2.0 + - @backstage/plugin-techdocs@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index da03d1a584..66f7a681c5 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-catalog", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-scaffolder": "^0.1.1", - "@backstage/plugin-techdocs": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-scaffolder": "^0.2.0", + "@backstage/plugin-techdocs": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -41,9 +41,9 @@ "swr": "^0.3.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/react-hooks": "^3.3.0", diff --git a/plugins/circleci/CHANGELOG.md b/plugins/circleci/CHANGELOG.md new file mode 100644 index 0000000000..065d2e6526 --- /dev/null +++ b/plugins/circleci/CHANGELOG.md @@ -0,0 +1,52 @@ +# @backstage/plugin-circleci + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 30dd11122: Refactor to use DiscoveryApi + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/circleci/package.json b/plugins/circleci/package.json index dc09713024..cd849cbd31 100644 --- a/plugins/circleci/package.json +++ b/plugins/circleci/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-circleci", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "postpack": "backstage-cli postpack" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -38,9 +38,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/cloudbuild/CHANGELOG.md b/plugins/cloudbuild/CHANGELOG.md new file mode 100644 index 0000000000..a9df03e8e2 --- /dev/null +++ b/plugins/cloudbuild/CHANGELOG.md @@ -0,0 +1,51 @@ +# @backstage/plugin-cloudbuild + +## 0.2.0 + +### Minor Changes + +- 2846ef95c: Releasing Google Cloud Build Plugin + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/cloudbuild/package.json b/plugins/cloudbuild/package.json index f29f30f255..14a7c5091c 100644 --- a/plugins/cloudbuild/package.json +++ b/plugins/cloudbuild/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-cloudbuild", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,10 +20,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -39,9 +39,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/cost-insights/CHANGELOG.md b/plugins/cost-insights/CHANGELOG.md new file mode 100644 index 0000000000..2d478c5717 --- /dev/null +++ b/plugins/cost-insights/CHANGELOG.md @@ -0,0 +1,65 @@ +# @backstage/plugin-cost-insights + +## 0.2.0 + +### Minor Changes + +- cab473771: This PR adds Spotify's Cost Insights Tool. Cost Insights explains costs from cloud services in an understandable way, using software terms familiar to your engineers. This tool helps you and your team make trade-offs between cost optimization efforts and your other priorities. + + Cost Insights features: + + Daily cost graph by team or billing account + Cost comparison against configurable business metrics + Insights panels for configurable cloud products your company uses + Cost alerts and recommendations + Selectable time periods for month over month, or quarter over quarter cost comparison + Conversion of cost growth into average engineer cost (configurable) to help optimization trade-off decisions + + ![plugin-cost-insights](https://user-images.githubusercontent.com/3030003/94430416-e166d380-0161-11eb-891c-9ce10187683e.gif) + + This PR adds the Cost Insights frontend React plugin with a defined CostInsightsApi. We include an example client with static data in the expected format. This API should talk with a cloud billing backend that aggregates billing data from your cloud provider. + + Fixes #688 💵 + +- bb48b9833: Added getLastCompleteBillingDate to the CostInsightsApi to reason about completeness of billing data +- 6a84cb072: Enable custom alert types in Cost Insights +- e7d4ac7ce: - getProjectDailyCost and getGroupDailyCost no longer accept a metric as a parameter + - getDailyMetricData added to API for fetching daily metric data for given interval + - dailyCost removed as configurable metric + - default field added to metric configuration for displaying comparison metric data in top panel + - Metric.kind can no longer be null + - MetricData type added +- 0e67c6b40: Remove product filters from query parameters + +### Patch Changes + +- 8d1360aa9: export test utilities for mocking context +- 0ee9e9f66: migrate type utilities out of type definition files +- 5c70f3d35: expose alerts utilities for export +- fd8384d7e: prefer named exports +- 26e69ab1a: Remove cost insights example client from demo app and export from plugin + Create cost insights dev plugin using example client + Make PluginConfig and dependent types public +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/plugins/cost-insights/package.json b/plugins/cost-insights/package.json index f978e13a8c..944dbf587f 100644 --- a/plugins/cost-insights/package.json +++ b/plugins/cost-insights/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-cost-insights", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,9 +22,9 @@ }, "dependencies": { "@backstage/config": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -46,9 +46,9 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/explore/CHANGELOG.md b/plugins/explore/CHANGELOG.md new file mode 100644 index 0000000000..dfa428b62a --- /dev/null +++ b/plugins/explore/CHANGELOG.md @@ -0,0 +1,48 @@ +# @backstage/plugin-explore + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- cab473771: This PR adds Spotify's Cost Insights Tool. Cost Insights explains costs from cloud services in an understandable way, using software terms familiar to your engineers. This tool helps you and your team make trade-offs between cost optimization efforts and your other priorities. + + Cost Insights features: + + Daily cost graph by team or billing account + Cost comparison against configurable business metrics + Insights panels for configurable cloud products your company uses + Cost alerts and recommendations + Selectable time periods for month over month, or quarter over quarter cost comparison + Conversion of cost growth into average engineer cost (configurable) to help optimization trade-off decisions + + ![plugin-cost-insights](https://user-images.githubusercontent.com/3030003/94430416-e166d380-0161-11eb-891c-9ce10187683e.gif) + + This PR adds the Cost Insights frontend React plugin with a defined CostInsightsApi. We include an example client with static data in the expected format. This API should talk with a cloud billing backend that aggregates billing data from your cloud provider. + + Fixes #688 💵 + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/explore/package.json b/plugins/explore/package.json index fa682e8dde..a1f71de6a2 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-explore", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -33,9 +33,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/gcp-projects/CHANGELOG.md b/plugins/gcp-projects/CHANGELOG.md new file mode 100644 index 0000000000..08e1962f3c --- /dev/null +++ b/plugins/gcp-projects/CHANGELOG.md @@ -0,0 +1,32 @@ +# @backstage/plugin-gcp-projects + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/gcp-projects/package.json b/plugins/gcp-projects/package.json index 86b525f1c9..812c3b1051 100644 --- a/plugins/gcp-projects/package.json +++ b/plugins/gcp-projects/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gcp-projects", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -31,9 +31,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/github-actions/CHANGELOG.md b/plugins/github-actions/CHANGELOG.md new file mode 100644 index 0000000000..a4b69a07d4 --- /dev/null +++ b/plugins/github-actions/CHANGELOG.md @@ -0,0 +1,66 @@ +# @backstage/plugin-github-actions + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- d67c529ab: Adds a widget to show recent git workflow runs to the github actions plugin. The default setting is the last 5 runs across all branches but both branch and the number of runs are configurable. +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [cbbd271c4] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [26e69ab1a] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [cbab5bbf8] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core-api@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/github-actions/package.json b/plugins/github-actions/package.json index ea5d8c4278..8d10760843 100644 --- a/plugins/github-actions/package.json +++ b/plugins/github-actions/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-github-actions", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,11 +21,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/core-api": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/core-api": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -40,9 +40,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/gitops-profiles/CHANGELOG.md b/plugins/gitops-profiles/CHANGELOG.md new file mode 100644 index 0000000000..a5d5249737 --- /dev/null +++ b/plugins/gitops-profiles/CHANGELOG.md @@ -0,0 +1,32 @@ +# @backstage/plugin-gitops-profiles + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/gitops-profiles/package.json b/plugins/gitops-profiles/package.json index 714c63da20..b61c2f6620 100644 --- a/plugins/gitops-profiles/package.json +++ b/plugins/gitops-profiles/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-gitops-profiles", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/graphiql/CHANGELOG.md b/plugins/graphiql/CHANGELOG.md new file mode 100644 index 0000000000..db59e7d369 --- /dev/null +++ b/plugins/graphiql/CHANGELOG.md @@ -0,0 +1,33 @@ +# @backstage/plugin-graphiql + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- 782f3b354: add test case for Progress component +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 0c23b5e6d0..e346133e3d 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -1,7 +1,7 @@ { "name": "@backstage/plugin-graphiql", "description": "Backstage plugin for browsing GraphQL APIs", - "version": "0.1.1", + "version": "0.2.0", "private": false, "publishConfig": { "access": "public", @@ -31,8 +31,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -43,9 +43,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/graphql/CHANGELOG.md b/plugins/graphql/CHANGELOG.md new file mode 100644 index 0000000000..f9a626d543 --- /dev/null +++ b/plugins/graphql/CHANGELOG.md @@ -0,0 +1,18 @@ +# @backstage/plugin-graphql-backend + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [7bbeb049f] + - @backstage/plugin-catalog-graphql@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/graphql/package.json b/plugins/graphql/package.json index 16c3572251..f62fecc648 100644 --- a/plugins/graphql/package.json +++ b/plugins/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-graphql-backend", - "version": "0.1.1", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,9 +19,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/plugin-catalog-graphql": "^0.1.1", + "@backstage/plugin-catalog-graphql": "^0.2.0", "@graphql-modules/core": "^0.7.17", "@types/express": "^4.17.6", "apollo-server": "^2.16.1", @@ -35,7 +35,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/supertest": "^2.0.8", "eslint-plugin-graphql": "^4.0.0", "msw": "^0.20.5", diff --git a/plugins/jenkins/CHANGELOG.md b/plugins/jenkins/CHANGELOG.md new file mode 100644 index 0000000000..010471d9b2 --- /dev/null +++ b/plugins/jenkins/CHANGELOG.md @@ -0,0 +1,62 @@ +# @backstage/plugin-jenkins + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +### Patch Changes + +- 1297dcb3a: Refactor to use DiscoveryApi +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/jenkins/package.json b/plugins/jenkins/package.json index cbf9791809..d0304376fd 100644 --- a/plugins/jenkins/package.json +++ b/plugins/jenkins/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-jenkins", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/kubernetes-backend/CHANGELOG.md b/plugins/kubernetes-backend/CHANGELOG.md new file mode 100644 index 0000000000..2834082657 --- /dev/null +++ b/plugins/kubernetes-backend/CHANGELOG.md @@ -0,0 +1,16 @@ +# @backstage/plugin-kubernetes-backend + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [7bbeb049f] + - @backstage/backend-common@0.2.0 diff --git a/plugins/kubernetes-backend/package.json b/plugins/kubernetes-backend/package.json index c66c364871..7ac5f99f4c 100644 --- a/plugins/kubernetes-backend/package.json +++ b/plugins/kubernetes-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes-backend", - "version": "0.1.1", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@backstage/config": "^0.1.1", "@kubernetes/client-node": "^0.12.1", "@types/express": "^4.17.6", @@ -37,7 +37,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "supertest": "^4.0.2" }, "files": [ diff --git a/plugins/kubernetes/CHANGELOG.md b/plugins/kubernetes/CHANGELOG.md new file mode 100644 index 0000000000..0ec2c5dbaf --- /dev/null +++ b/plugins/kubernetes/CHANGELOG.md @@ -0,0 +1,42 @@ +# @backstage/plugin-kubernetes + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/plugin-kubernetes-backend@0.1.2 diff --git a/plugins/kubernetes/package.json b/plugins/kubernetes/package.json index 850dd4cada..29193e27ed 100644 --- a/plugins/kubernetes/package.json +++ b/plugins/kubernetes/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-kubernetes", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,11 +20,11 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-kubernetes-backend": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/plugin-kubernetes-backend": "^0.1.2", + "@backstage/theme": "^0.2.0", "@kubernetes/client-node": "^0.12.1", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/lighthouse/CHANGELOG.md b/plugins/lighthouse/CHANGELOG.md new file mode 100644 index 0000000000..9a68b78a92 --- /dev/null +++ b/plugins/lighthouse/CHANGELOG.md @@ -0,0 +1,65 @@ +# @backstage/plugin-lighthouse + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 6d97d2d6f: The InfoCard variant `'height100'` is deprecated. Use variant `'gridItem'` instead. + + When the InfoCard is displayed as a grid item within a grid, you may want items to have the same height for all items. + Set to the `'gridItem'` variant to display the InfoCard with full height suitable for Grid: + `...` + + Changed the InfoCards in '@backstage/plugin-github-actions', '@backstage/plugin-jenkins', '@backstage/plugin-lighthouse' + to pass an optional variant to the corresponding card of the plugin. + + As a result the overview content of the EntityPage shows cards with full height suitable for Grid. + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [cbbd271c4] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [26e69ab1a] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [cbab5bbf8] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core-api@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 587d826d9d..27b6a21066 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-lighthouse", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,12 +21,12 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/core-api": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/core-api": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -39,9 +39,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/newrelic/CHANGELOG.md b/plugins/newrelic/CHANGELOG.md new file mode 100644 index 0000000000..d007328180 --- /dev/null +++ b/plugins/newrelic/CHANGELOG.md @@ -0,0 +1,53 @@ +# @backstage/plugin-newrelic + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 4512b9967: The New Relic plugin now uses the Backstage proxy to communicate with New Relic's API. + + Please update your `app-config.yaml` as follows: + + ```yaml + # Old Config + newrelic: + api: + baseUrl: 'https://api.newrelic.com/v2' + key: NEW_RELIC_REST_API_KEY + ``` + + ```yaml + # New Config + proxy: + '/newrelic/apm/api': + target: https://api.newrelic.com/v2 + headers: + X-Api-Key: + $env: NEW_RELIC_REST_API_KEY + ``` + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/newrelic/package.json b/plugins/newrelic/package.json index 0b52220239..e7d000abc5 100644 --- a/plugins/newrelic/package.json +++ b/plugins/newrelic/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-newrelic", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -31,9 +31,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/proxy-backend/CHANGELOG.md b/plugins/proxy-backend/CHANGELOG.md new file mode 100644 index 0000000000..dcbe7eb7e8 --- /dev/null +++ b/plugins/proxy-backend/CHANGELOG.md @@ -0,0 +1,42 @@ +# @backstage/plugin-proxy-backend + +## 0.2.0 + +### Minor Changes + +- 5249594c5: Add service discovery interface and implement for single host deployments + + Fixes #1847, #2596 + + Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + + Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + + This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + + Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. + +- 9226c2aaa: Limit the http headers that are forwarded from the request to a safe set of defaults. + A user can configure additional headers that should be forwarded if the specific applications needs that. + + ```yaml + proxy: + '/my-api': + target: 'https://my-api.com/get' + allowedHeaders: + # We need to forward the Authorization header that was provided by the caller + - Authorization + ``` + +### Patch Changes + +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [7bbeb049f] + - @backstage/backend-common@0.2.0 diff --git a/plugins/proxy-backend/package.json b/plugins/proxy-backend/package.json index 57594cfe3f..f147e400e4 100644 --- a/plugins/proxy-backend/package.json +++ b/plugins/proxy-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-proxy-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -19,7 +19,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "express": "^4.17.1", @@ -33,7 +33,7 @@ "yup": "^0.29.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/http-proxy-middleware": "^0.19.3", "@types/supertest": "^2.0.8", "@types/uuid": "^8.0.0", diff --git a/plugins/register-component/CHANGELOG.md b/plugins/register-component/CHANGELOG.md new file mode 100644 index 0000000000..cb1a24d131 --- /dev/null +++ b/plugins/register-component/CHANGELOG.md @@ -0,0 +1,55 @@ +# @backstage/plugin-register-component + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 2ebcfac8d: Add a validate button to the register-component page + + This allows the user to validate his location before adding it. + +### Patch Changes + +- 8b9c8196f: Locations registered through the catalog client now default to the 'url' type. The type selection dropdown in the register-component form has been removed. +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/register-component/package.json b/plugins/register-component/package.json index 58d3b122ca..095469f6b4 100644 --- a/plugins/register-component/package.json +++ b/plugins/register-component/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-register-component", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/rollbar-backend/CHANGELOG.md b/plugins/rollbar-backend/CHANGELOG.md new file mode 100644 index 0000000000..21f9ce8090 --- /dev/null +++ b/plugins/rollbar-backend/CHANGELOG.md @@ -0,0 +1,16 @@ +# @backstage/plugin-rollbar-backend + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [7bbeb049f] + - @backstage/backend-common@0.2.0 diff --git a/plugins/rollbar-backend/package.json b/plugins/rollbar-backend/package.json index 91e0000d6c..b1764f238f 100644 --- a/plugins/rollbar-backend/package.json +++ b/plugins/rollbar-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar-backend", - "version": "0.1.1", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@backstage/config": "^0.1.1", "@types/express": "^4.17.6", "axios": "^0.20.0", @@ -37,7 +37,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@types/supertest": "^2.0.8", "supertest": "^4.0.2" }, diff --git a/plugins/rollbar/CHANGELOG.md b/plugins/rollbar/CHANGELOG.md new file mode 100644 index 0000000000..ee25fb10d9 --- /dev/null +++ b/plugins/rollbar/CHANGELOG.md @@ -0,0 +1,51 @@ +# @backstage/plugin-rollbar + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/rollbar/package.json b/plugins/rollbar/package.json index a3b11ace55..03e393aa1b 100644 --- a/plugins/rollbar/package.json +++ b/plugins/rollbar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-rollbar", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -37,9 +37,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/react-hooks": "^3.3.0", diff --git a/plugins/scaffolder-backend/CHANGELOG.md b/plugins/scaffolder-backend/CHANGELOG.md new file mode 100644 index 0000000000..78a6d9527b --- /dev/null +++ b/plugins/scaffolder-backend/CHANGELOG.md @@ -0,0 +1,46 @@ +# @backstage/plugin-scaffolder-backend + +## 0.2.0 + +### Minor Changes + +- 3e254503d: Add Azure DevOps support to the scaffolder backend + + This adds support for Azure DevOps to the scaffolder (preparer & publisher). I thought I should get this in there now since #2426 has been merged. I had a previous PR with only the preparer but I closed that in favor of this one. + + I stayed with the 'azure/api' structure but I guess we should try and go the same way as with GitHub here #2501 + +### Patch Changes + +- 0c370c979: Update SSR template to pass CI +- 991a950e0: Added .fromConfig static factories for Preparers and Publishers + read integrations config to support url location types +- c926765a2: Allow templates to be located on non-default branch +- 6840a68df: Add authentication token to Scaffolder GitHub Preparer +- 1c8c43756: The new `scaffolder.github.baseUrl` config property allows to specify a custom base url for GitHub enterprise instances +- 5e4551e3a: Added support for configuring the working directory of the Scaffolder: + + ```yaml + backend: + workingDirectory: /some-dir # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir + ``` + +- e3d063ffa: Introduce PreparerOptions for PreparerBase +- Updated dependencies [3a4236570] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [5adfc005e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [b3d57961c] +- Updated dependencies [7bbeb049f] + - @backstage/catalog-model@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index 676ddc9b8a..09cacb28eb 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", "@gitbeaker/core": "^23.5.0", "@gitbeaker/node": "^23.5.0", @@ -47,7 +47,7 @@ "yaml": "^1.10.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "@octokit/types": "^5.4.1", "@types/fs-extra": "^9.0.1", "@types/git-url-parse": "^9.0.0", diff --git a/plugins/scaffolder/CHANGELOG.md b/plugins/scaffolder/CHANGELOG.md new file mode 100644 index 0000000000..9c09366174 --- /dev/null +++ b/plugins/scaffolder/CHANGELOG.md @@ -0,0 +1,67 @@ +# @backstage/plugin-scaffolder + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- fb74f1db6: Make title meaningful after component creation + + Fixes #2458. + + After the change, the UX should look like this: + + ### If the component creation was successful: + + ![successfully-created-component](https://user-images.githubusercontent.com/33940798/94339294-8bd1e000-0016-11eb-885b-7936fcc23b63.gif) + + ### If the component creation failed: + + ![failed-to-create-component](https://user-images.githubusercontent.com/33940798/94339296-90969400-0016-11eb-9a74-ce16b3dd8d88.gif) + +- c5ef12926: fix the accordion details design when job stage fail +- 1c8c43756: The new `scaffolder.github.baseUrl` config property allows to specify a custom base url for GitHub enterprise instances +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 4f7dbdae20..738734ceb7 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-scaffolder", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,10 +21,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -41,9 +41,9 @@ "swr": "^0.3.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/sentry-backend/CHANGELOG.md b/plugins/sentry-backend/CHANGELOG.md new file mode 100644 index 0000000000..93361e05ff --- /dev/null +++ b/plugins/sentry-backend/CHANGELOG.md @@ -0,0 +1,16 @@ +# @backstage/plugin-sentry-backend + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [8afce088a] +- Updated dependencies [7bbeb049f] + - @backstage/backend-common@0.2.0 diff --git a/plugins/sentry-backend/package.json b/plugins/sentry-backend/package.json index cf9bf7886f..a1e1531b8b 100644 --- a/plugins/sentry-backend/package.json +++ b/plugins/sentry-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sentry-backend", - "version": "0.1.1", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,7 +20,7 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", + "@backstage/backend-common": "^0.2.0", "@types/express": "^4.17.6", "axios": "^0.20.0", "compression": "^1.7.4", @@ -34,7 +34,7 @@ "yn": "^4.0.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1" + "@backstage/cli": "^0.2.0" }, "files": [ "dist" diff --git a/plugins/sentry/CHANGELOG.md b/plugins/sentry/CHANGELOG.md new file mode 100644 index 0000000000..06380c39d9 --- /dev/null +++ b/plugins/sentry/CHANGELOG.md @@ -0,0 +1,41 @@ +# @backstage/plugin-sentry + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/sentry/package.json b/plugins/sentry/package.json index 69c6f130eb..2ede8fd709 100644 --- a/plugins/sentry/package.json +++ b/plugins/sentry/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sentry", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -36,9 +36,9 @@ "timeago.js": "^4.0.2" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/sonarqube/CHANGELOG.md b/plugins/sonarqube/CHANGELOG.md new file mode 100644 index 0000000000..62f88596e7 --- /dev/null +++ b/plugins/sonarqube/CHANGELOG.md @@ -0,0 +1,37 @@ +# @backstage/plugin-sonarqube + +## 0.1.2 + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/sonarqube/package.json b/plugins/sonarqube/package.json index b3d90b2ca7..bc41213ad8 100644 --- a/plugins/sonarqube/package.json +++ b/plugins/sonarqube/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-sonarqube", - "version": "0.1.1", + "version": "0.1.2", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/tech-radar/CHANGELOG.md b/plugins/tech-radar/CHANGELOG.md new file mode 100644 index 0000000000..7f9f11a702 --- /dev/null +++ b/plugins/tech-radar/CHANGELOG.md @@ -0,0 +1,35 @@ +# @backstage/plugin-tech-radar + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- 782f3b354: add test case for Progress component +- 02c60b5f8: fix the horizontal scrolling issue in the RadarPage component +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index c7163cc918..875d6d161b 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-tech-radar", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,9 +21,9 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -35,9 +35,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/techdocs-backend/CHANGELOG.md b/plugins/techdocs-backend/CHANGELOG.md new file mode 100644 index 0000000000..4191361a33 --- /dev/null +++ b/plugins/techdocs-backend/CHANGELOG.md @@ -0,0 +1,94 @@ +# @backstage/plugin-techdocs-backend + +## 0.2.0 + +### Minor Changes + +- 6d29605db: Change the default backend plugin mount point to /api +- 5249594c5: Add service discovery interface and implement for single host deployments + + Fixes #1847, #2596 + + Went with an interface similar to the frontend DiscoveryApi, since it's dead simple but still provides a lot of flexibility in the implementation. + + Also ended up with two different methods, one for internal endpoint discovery and one for external. The two use-cases are explained a bit more in the docs, but basically it's service-to-service vs callback URLs. + + This did get me thinking about uniqueness and that we're heading towards a global namespace for backend plugin IDs. That's probably fine, but if we're happy with that we should leverage it a bit more to simplify the backend setup. For example we'd have each plugin provide its own ID and not manually mount on paths in the backend. + + Draft until we're happy with the implementation, then I can add more docs and changelog entry. Also didn't go on a thorough hunt for places where discovery can be used, but I don't think there are many since it's been pretty awkward to do service-to-service communication. + +- 5a920c6e4: Updated naming of environment variables. New pattern [NAME]\_TOKEN for Github, Gitlab, Azure & Github enterprise access tokens. + + ### Detail: + + - Previously we have to export same token for both, catalog & scaffolder + + ```bash + export GITHUB_ACCESS_TOKEN=foo + export GITHUB_PRIVATE_TOKEN=foo + ``` + + with latest changes, only single export is sufficient. + + ```bash + export GITHUB_TOKEN=foo + export GITLAB_TOKEN=foo + export GHE_TOKEN=foo + export AZURE_TOKEN=foo + ``` + + ### list: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Old nameNew name
GITHUB_ACCESS_TOKENGITHUB_TOKEN
GITHUB_PRIVATE_TOKENGITHUB_TOKEN
GITLAB_ACCESS_TOKENGITLAB_TOKEN
GITLAB_PRIVATE_TOKENGITLAB_TOKEN
AZURE_PRIVATE_TOKENAZURE_TOKEN
GHE_PRIVATE_TOKENGHE_TOKEN
+ +### Patch Changes + +- 22ff8fba5: Replacing the hard coded `baseApiUrl` by reading the value from configuration to enable private GitHub setup for TechDocs. +- Updated dependencies [3a4236570] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [5249594c5] +- Updated dependencies [56e4eb589] +- Updated dependencies [e37c0a005] +- Updated dependencies [a768a07fb] +- Updated dependencies [f00ca3cb8] +- Updated dependencies [6579769df] +- Updated dependencies [5adfc005e] +- Updated dependencies [8c2b76e45] +- Updated dependencies [440a17b39] +- Updated dependencies [fa56f4615] +- Updated dependencies [8afce088a] +- Updated dependencies [b3d57961c] +- Updated dependencies [7bbeb049f] + - @backstage/catalog-model@0.2.0 + - @backstage/backend-common@0.2.0 diff --git a/plugins/techdocs-backend/package.json b/plugins/techdocs-backend/package.json index 3c99ee227a..c1d1f6ad27 100644 --- a/plugins/techdocs-backend/package.json +++ b/plugins/techdocs-backend/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs-backend", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -20,8 +20,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/backend-common": "^0.1.1", - "@backstage/catalog-model": "^0.1.1", + "@backstage/backend-common": "^0.2.0", + "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", "@types/dockerode": "^2.5.34", "@types/express": "^4.17.6", @@ -37,7 +37,7 @@ "winston": "^3.2.1" }, "devDependencies": { - "@backstage/cli": "^0.1.1", + "@backstage/cli": "^0.2.0", "supertest": "^4.0.2" }, "files": [ diff --git a/plugins/techdocs/CHANGELOG.md b/plugins/techdocs/CHANGELOG.md new file mode 100644 index 0000000000..387e4a8d90 --- /dev/null +++ b/plugins/techdocs/CHANGELOG.md @@ -0,0 +1,65 @@ +# @backstage/plugin-techdocs + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI +- 8351ad79b: Add a message if techdocs takes long time to load + + Fixes #2416. + + The UI after the change should look like this: + + ![techdocs-progress-bar](https://user-images.githubusercontent.com/33940798/94189286-296ac980-fec8-11ea-9051-1b3db938d12f.gif) + +### Patch Changes + +- 782f3b354: add test case for Progress component +- 57b54c8ed: While techdocs fetches site name and metadata for the component, the page title was displayed as '[object Object] | Backstage'. This has now been fixed to display the component ID if site name is not present or being fetched. +- Updated dependencies [28edd7d29] +- Updated dependencies [819a70229] +- Updated dependencies [3a4236570] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [cbbd271c4] +- Updated dependencies [482b6313d] +- Updated dependencies [e0be86b6f] +- Updated dependencies [f70a52868] +- Updated dependencies [12b5fe940] +- Updated dependencies [368fd8243] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [a768a07fb] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [5adfc005e] +- Updated dependencies [f0aa01bcc] +- Updated dependencies [0aecfded0] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [8b9c8196f] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [60d40892c] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [2ebcfac8d] +- Updated dependencies [fa56f4615] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [b3d57961c] +- Updated dependencies [0b956f21b] +- Updated dependencies [26e69ab1a] +- Updated dependencies [97c2cb19b] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [cbab5bbf8] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/plugin-catalog@0.2.0 + - @backstage/core-api@0.2.0 + - @backstage/core@0.2.0 + - @backstage/catalog-model@0.2.0 + - @backstage/theme@0.2.0 + - @backstage/test-utils@0.1.2 diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 551932369c..ce0700c1a8 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-techdocs", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -22,12 +22,12 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/catalog-model": "^0.1.1", - "@backstage/core": "^0.1.1", - "@backstage/core-api": "^0.1.1", - "@backstage/plugin-catalog": "^0.1.1", - "@backstage/test-utils": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/catalog-model": "^0.2.0", + "@backstage/core": "^0.2.0", + "@backstage/core-api": "^0.2.0", + "@backstage/plugin-catalog": "^0.2.0", + "@backstage/test-utils": "^0.1.2", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -40,9 +40,9 @@ "sanitize-html": "^1.27.0" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/user-settings/CHANGELOG.md b/plugins/user-settings/CHANGELOG.md new file mode 100644 index 0000000000..2522a3af03 --- /dev/null +++ b/plugins/user-settings/CHANGELOG.md @@ -0,0 +1,32 @@ +# @backstage/plugin-user-settings + +## 0.2.0 + +### Minor Changes + +- 4fc1d440e: Add settings button to sidebar + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/user-settings/package.json b/plugins/user-settings/package.json index 3e67c8cae6..2f098eae2e 100644 --- a/plugins/user-settings/package.json +++ b/plugins/user-settings/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-user-settings", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", @@ -21,8 +21,8 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", diff --git a/plugins/welcome/CHANGELOG.md b/plugins/welcome/CHANGELOG.md new file mode 100644 index 0000000000..2932d41d75 --- /dev/null +++ b/plugins/welcome/CHANGELOG.md @@ -0,0 +1,32 @@ +# @backstage/plugin-welcome + +## 0.2.0 + +### Minor Changes + +- 28edd7d29: Create backend plugin through CLI + +### Patch Changes + +- Updated dependencies [819a70229] +- Updated dependencies [ae5983387] +- Updated dependencies [0d4459c08] +- Updated dependencies [482b6313d] +- Updated dependencies [1c60f716e] +- Updated dependencies [144c66d50] +- Updated dependencies [b79017fd3] +- Updated dependencies [6d97d2d6f] +- Updated dependencies [93a3fa3ae] +- Updated dependencies [782f3b354] +- Updated dependencies [2713f28f4] +- Updated dependencies [406015b0d] +- Updated dependencies [82759d3e4] +- Updated dependencies [ac8d5d5c7] +- Updated dependencies [ebca83d48] +- Updated dependencies [aca79334f] +- Updated dependencies [c0d5242a0] +- Updated dependencies [3beb5c9fc] +- Updated dependencies [754e31db5] +- Updated dependencies [1611c6dbc] + - @backstage/core@0.2.0 + - @backstage/theme@0.2.0 diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 846388eaec..148b5734ee 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -1,6 +1,6 @@ { "name": "@backstage/plugin-welcome", - "version": "0.1.1", + "version": "0.2.0", "main": "src/index.ts", "types": "src/index.ts", "private": false, @@ -21,8 +21,8 @@ "start": "backstage-cli plugin:serve" }, "dependencies": { - "@backstage/core": "^0.1.1", - "@backstage/theme": "^0.1.1", + "@backstage/core": "^0.2.0", + "@backstage/theme": "^0.2.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", @@ -32,9 +32,9 @@ "react-use": "^15.3.3" }, "devDependencies": { - "@backstage/cli": "^0.1.1", - "@backstage/dev-utils": "^0.1.1", - "@backstage/test-utils": "^0.1.1", + "@backstage/cli": "^0.2.0", + "@backstage/dev-utils": "^0.1.2", + "@backstage/test-utils": "^0.1.2", "@testing-library/jest-dom": "^5.10.1", "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", From 4dcdb8badf688a73b07e1ca72b1128c59b91510e Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 3 Nov 2020 22:02:32 -0500 Subject: [PATCH 065/100] Fix k8s contrib folder typo --- .../README.md | 2 +- .../deployment.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) rename contrib/kubernetes/{plain_single_backend_deplyoment => plain_single_backend_deployment}/README.md (97%) rename contrib/kubernetes/{plain_single_backend_deplyoment => plain_single_backend_deployment}/deployment.yaml (84%) diff --git a/contrib/kubernetes/plain_single_backend_deplyoment/README.md b/contrib/kubernetes/plain_single_backend_deployment/README.md similarity index 97% rename from contrib/kubernetes/plain_single_backend_deplyoment/README.md rename to contrib/kubernetes/plain_single_backend_deployment/README.md index 685bed92a5..48c3490f81 100644 --- a/contrib/kubernetes/plain_single_backend_deplyoment/README.md +++ b/contrib/kubernetes/plain_single_backend_deployment/README.md @@ -13,7 +13,7 @@ yarn install yarn docker-build -kubectl apply -f contrib/kubernetes/plain_single_backend_deplyoment/deployment.yaml +kubectl apply -f contrib/kubernetes/plain_single_backend_deployment/deployment.yaml ``` You can use the following commands to monitor the deployment: diff --git a/contrib/kubernetes/plain_single_backend_deplyoment/deployment.yaml b/contrib/kubernetes/plain_single_backend_deployment/deployment.yaml similarity index 84% rename from contrib/kubernetes/plain_single_backend_deplyoment/deployment.yaml rename to contrib/kubernetes/plain_single_backend_deployment/deployment.yaml index a20c47229d..25c9207438 100644 --- a/contrib/kubernetes/plain_single_backend_deplyoment/deployment.yaml +++ b/contrib/kubernetes/plain_single_backend_deployment/deployment.yaml @@ -38,12 +38,12 @@ spec: - name: NODE_ENV value: development - # This makes it possible for the app to reach the backend when serving through `kubectl proxy` - # If you expose the service using for example an ingress controller, you should - # switch this out or remove it. - # - # Note that we're not setting app.baseUrl here, as setting the base path is not working at the moment. - # Further work is needed around the routing in the frontend or react-router before we can support that. + # This makes it possible for the app to reach the backend when serving through `kubectl proxy` + # If you expose the service using for example an ingress controller, you should + # switch this out or remove it. + # + # Note that we're not setting app.baseUrl here, as setting the base path is not working at the moment. + # Further work is needed around the routing in the frontend or react-router before we can support that. - name: APP_CONFIG_backend_baseUrl value: http://localhost:8001/api/v1/namespaces/backstage/services/backstage-backend:http/proxy From 1fddc733226eeab479cc972f0756882feda45e5c Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 3 Nov 2020 22:03:53 -0500 Subject: [PATCH 066/100] Additional folder rename fix --- docs/getting-started/deployment-k8s.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/deployment-k8s.md b/docs/getting-started/deployment-k8s.md index 5b7ce80051..bc24894ed1 100644 --- a/docs/getting-started/deployment-k8s.md +++ b/docs/getting-started/deployment-k8s.md @@ -9,5 +9,5 @@ Beyond that point we do not have an opinionated way to deploy Backstage within Kubernetes, as each cluster has its own unique set of tooling and patterns. We do provide examples to help you get started though. Check out -[this example](https://github.com/backstage/backstage/tree/master/contrib/kubernetes/plain_single_backend_deplyoment/) +[this example](https://github.com/backstage/backstage/tree/master/contrib/kubernetes/plain_single_backend_deployment/) for a basic single-deployment setup. From b061bfd75620457812ecbde32b5d417e0dad4383 Mon Sep 17 00:00:00 2001 From: Marek Calus Date: Wed, 4 Nov 2020 08:44:48 +0100 Subject: [PATCH 067/100] Bump yarn.lock --- yarn.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yarn.lock b/yarn.lock index 38a37b8ab3..da531fe135 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3703,10 +3703,10 @@ react-router "6.0.0-beta.0" react-use "^15.3.3" -"@roadiehq/backstage-plugin-travis-ci@^0.2.5": - version "0.2.5" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-0.2.5.tgz#588cd8b4a4dd4bd426c0012f8d35eae4504b55f4" - integrity sha512-4aJizmvIeunpl8D/YDvzagNzikPU51DSZFz1tN0XCwRR+buTPknV141qsKP+yxUbs6nx3Xuh+T/vNkb9lk6FlA== +"@roadiehq/backstage-plugin-travis-ci@^0.2.6": + version "0.2.6" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-0.2.6.tgz#c253d4009b7150faa285786df7104f04cf99d4c2" + integrity sha512-Zs7mPmJifz08vNsS4zDzupexCEKAxPtqT4Vh8DhFJrphsiYwSIdPjW5JWif/XQIx0025Ew/RwuyMtwz2V/iWZg== dependencies: "@backstage/catalog-model" "^0.1.1-alpha.24" "@backstage/core" "^0.1.1-alpha.24" From 60a0e7d020f678b64db84e5534c4b5b474a72620 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 3 Nov 2020 20:33:13 +0100 Subject: [PATCH 068/100] package.json: temporary override of @roadiehq dependencies --- package.json | 7 +++ yarn.lock | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+) diff --git a/package.json b/package.json index 505ee0caad..da1d4de154 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,13 @@ "plugins/*" ] }, + "resolutions": { + "**/@roadiehq/backstage-plugin-*/@backstage/catalog-model": "0.2.0", + "**/@roadiehq/backstage-plugin-*/@backstage/core": "0.2.0", + "**/@roadiehq/backstage-plugin-*/@backstage/core-api": "0.2.0", + "**/@roadiehq/backstage-plugin-*/@backstage/plugin-catalog": "0.2.0", + "**/@roadiehq/backstage-plugin-*/@backstage/theme": "0.2.0" + }, "version": "1.0.0", "devDependencies": { "@changesets/cli": "^2.11.0", diff --git a/yarn.lock b/yarn.lock index 90d2657f0f..5db78343b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1297,6 +1297,153 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" +"@backstage/catalog-model@^0.1.1-alpha.24": + version "0.2.0" + dependencies: + "@backstage/config" "^0.1.1" + "@types/json-schema" "^7.0.5" + "@types/yup" "^0.29.8" + json-schema "^0.2.5" + lodash "^4.17.15" + uuid "^8.0.0" + yup "^0.29.3" + +"@backstage/catalog-model@^0.1.1-alpha.25": + version "0.2.0" + dependencies: + "@backstage/config" "^0.1.1" + "@types/json-schema" "^7.0.5" + "@types/yup" "^0.29.8" + json-schema "^0.2.5" + lodash "^4.17.15" + uuid "^8.0.0" + yup "^0.29.3" + +"@backstage/core-api@^0.1.1-alpha.24": + version "0.2.0" + dependencies: + "@backstage/config" "^0.1.1" + "@backstage/test-utils" "^0.1.2" + "@backstage/theme" "^0.2.0" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@types/react" "^16.9" + prop-types "^15.7.2" + react "^16.12.0" + react-router-dom "6.0.0-beta.0" + react-use "^15.3.3" + zen-observable "^0.8.15" + +"@backstage/core@^0.1.1-alpha.24": + version "0.2.0" + dependencies: + "@backstage/config" "^0.1.1" + "@backstage/core-api" "^0.2.0" + "@backstage/theme" "^0.2.0" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.45" + "@types/react" "^16.9" + "@types/react-sparklines" "^1.7.0" + classnames "^2.2.6" + clsx "^1.1.0" + immer "^7.0.9" + lodash "^4.17.15" + material-table "^1.69.1" + prop-types "^15.7.2" + rc-progress "^3.0.0" + react "^16.12.0" + react-dom "^16.12.0" + react-helmet "6.1.0" + react-hook-form "^6.6.0" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-sparklines "^1.7.0" + react-syntax-highlighter "^13.5.1" + react-use "^15.3.3" + +"@backstage/core@^0.1.1-alpha.25": + version "0.2.0" + dependencies: + "@backstage/config" "^0.1.1" + "@backstage/core-api" "^0.2.0" + "@backstage/theme" "^0.2.0" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.45" + "@types/react" "^16.9" + "@types/react-sparklines" "^1.7.0" + classnames "^2.2.6" + clsx "^1.1.0" + immer "^7.0.9" + lodash "^4.17.15" + material-table "^1.69.1" + prop-types "^15.7.2" + rc-progress "^3.0.0" + react "^16.12.0" + react-dom "^16.12.0" + react-helmet "6.1.0" + react-hook-form "^6.6.0" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-sparklines "^1.7.0" + react-syntax-highlighter "^13.5.1" + react-use "^15.3.3" + +"@backstage/plugin-catalog@^0.1.1-alpha.24": + version "0.2.0" + dependencies: + "@backstage/catalog-model" "^0.2.0" + "@backstage/core" "^0.2.0" + "@backstage/plugin-scaffolder" "^0.2.0" + "@backstage/plugin-techdocs" "^0.2.0" + "@backstage/theme" "^0.2.0" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.45" + "@types/react" "^16.9" + classnames "^2.2.6" + moment "^2.26.0" + react "^16.13.1" + react-dom "^16.13.1" + react-helmet "6.1.0" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^15.3.3" + swr "^0.3.0" + +"@backstage/plugin-catalog@^0.1.1-alpha.25": + version "0.2.0" + dependencies: + "@backstage/catalog-model" "^0.2.0" + "@backstage/core" "^0.2.0" + "@backstage/plugin-scaffolder" "^0.2.0" + "@backstage/plugin-techdocs" "^0.2.0" + "@backstage/theme" "^0.2.0" + "@material-ui/core" "^4.11.0" + "@material-ui/icons" "^4.9.1" + "@material-ui/lab" "4.0.0-alpha.45" + "@types/react" "^16.9" + classnames "^2.2.6" + moment "^2.26.0" + react "^16.13.1" + react-dom "^16.13.1" + react-helmet "6.1.0" + react-router "6.0.0-beta.0" + react-router-dom "6.0.0-beta.0" + react-use "^15.3.3" + swr "^0.3.0" + +"@backstage/theme@^0.1.1-alpha.24": + version "0.2.0" + dependencies: + "@material-ui/core" "^4.11.0" + +"@backstage/theme@^0.1.1-alpha.25": + version "0.2.0" + dependencies: + "@material-ui/core" "^4.11.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" From c5bab94aba8e5161622b9f06c2c1315b4c6f58df Mon Sep 17 00:00:00 2001 From: Jesko Steinberg Date: Mon, 12 Oct 2020 15:26:31 +0200 Subject: [PATCH 069/100] refactor: use OAuthApiCreateOptions --- .changeset/2863.md | 29 +++++++++++++++++++ .../implementations/auth/auth0/Auth0Auth.ts | 17 ++--------- .../implementations/auth/github/GithubAuth.ts | 17 ++--------- .../implementations/auth/gitlab/GitlabAuth.ts | 17 ++--------- .../implementations/auth/google/GoogleAuth.ts | 17 ++--------- .../auth/microsoft/MicrosoftAuth.ts | 18 ++---------- .../implementations/auth/oauth2/OAuth2.ts | 14 ++------- .../implementations/auth/okta/OktaAuth.ts | 17 ++--------- .../implementations/auth/saml/SamlAuth.ts | 10 ++----- .../src/apis/implementations/auth/types.ts | 28 ++++++++++++++++++ 10 files changed, 73 insertions(+), 111 deletions(-) create mode 100644 .changeset/2863.md create mode 100644 packages/core-api/src/apis/implementations/auth/types.ts diff --git a/.changeset/2863.md b/.changeset/2863.md new file mode 100644 index 0000000000..729e3aab7b --- /dev/null +++ b/.changeset/2863.md @@ -0,0 +1,29 @@ +--- +'@backstage/core-api': patch +--- + +Updated the AuthApi `.create` methods to configure the default scope of the corresponding Auth Api. As a result the +default scope is configurable when overwriting the Core Api in the app. + +``` +GithubAuth.create({ + discoveryApi, + oauthRequestApi, + defaultScopes: ['read:user', 'repo'], +}), +``` + +Replaced redundant CreateOptions of each Auth Api with the OAuthApiCreateOptions type. + +``` +export type OAuthApiCreateOptions = AuthApiCreateOptions & { + oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; +}; + +export type AuthApiCreateOptions = { + discoveryApi: DiscoveryApi; + environment?: string; + provider?: AuthProvider & { id: string }; +}; +``` diff --git a/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts b/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts index 793d9f90d3..b41e705726 100644 --- a/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts +++ b/packages/core-api/src/apis/implementations/auth/auth0/Auth0Auth.ts @@ -16,21 +16,8 @@ import Auth0Icon from '@material-ui/icons/AcUnit'; import { auth0AuthApiRef } from '../../../definitions/auth'; -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { OAuth2 } from '../oauth2'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; const DEFAULT_PROVIDER = { id: 'auth0', @@ -45,7 +32,7 @@ class Auth0Auth { provider = DEFAULT_PROVIDER, oauthRequestApi, defaultScopes = ['openid', `email`, `profile`], - }: CreateOptions): typeof auth0AuthApiRef.T { + }: OAuthApiCreateOptions): typeof auth0AuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, diff --git a/packages/core-api/src/apis/implementations/auth/github/GithubAuth.ts b/packages/core-api/src/apis/implementations/auth/github/GithubAuth.ts index eb2f375ab0..532bff3480 100644 --- a/packages/core-api/src/apis/implementations/auth/github/GithubAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/github/GithubAuth.ts @@ -25,26 +25,13 @@ import { BackstageIdentity, AuthRequestOptions, } from '../../../definitions/auth'; -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { SessionManager } from '../../../../lib/AuthSessionManager/types'; import { AuthSessionStore, StaticAuthSessionManager, } from '../../../../lib/AuthSessionManager'; import { Observable } from '../../../../types'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; export type GithubAuthResponse = { providerInfo: { @@ -69,7 +56,7 @@ class GithubAuth implements OAuthApi, SessionApi { provider = DEFAULT_PROVIDER, oauthRequestApi, defaultScopes = ['read:user'], - }: CreateOptions) { + }: OAuthApiCreateOptions) { const connector = new DefaultAuthConnector({ discoveryApi, environment, diff --git a/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts b/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts index b6a2757143..8669dff022 100644 --- a/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/gitlab/GitlabAuth.ts @@ -16,21 +16,8 @@ import GitlabIcon from '@material-ui/icons/AcUnit'; import { gitlabAuthApiRef } from '../../../definitions/auth'; -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { OAuth2 } from '../oauth2'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; const DEFAULT_PROVIDER = { id: 'gitlab', @@ -45,7 +32,7 @@ class GitlabAuth { provider = DEFAULT_PROVIDER, oauthRequestApi, defaultScopes = ['read_user'], - }: CreateOptions): typeof gitlabAuthApiRef.T { + }: OAuthApiCreateOptions): typeof gitlabAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, diff --git a/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts b/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts index 2d2ff3ede7..fbc902cdd8 100644 --- a/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/google/GoogleAuth.ts @@ -16,21 +16,8 @@ import GoogleIcon from '@material-ui/icons/AcUnit'; import { googleAuthApiRef } from '../../../definitions/auth'; -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { OAuth2 } from '../oauth2'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; const DEFAULT_PROVIDER = { id: 'google', @@ -51,7 +38,7 @@ class GoogleAuth { `${SCOPE_PREFIX}userinfo.email`, `${SCOPE_PREFIX}userinfo.profile`, ], - }: CreateOptions): typeof googleAuthApiRef.T { + }: OAuthApiCreateOptions): typeof googleAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, diff --git a/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts b/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts index db9180b31c..3e2711db3b 100644 --- a/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/microsoft/MicrosoftAuth.ts @@ -16,22 +16,8 @@ import MicrosoftIcon from '@material-ui/icons/AcUnit'; import { microsoftAuthApiRef } from '../../../definitions/auth'; - -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { OAuth2 } from '../oauth2'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; const DEFAULT_PROVIDER = { id: 'microsoft', @@ -52,7 +38,7 @@ class MicrosoftAuth { 'email', 'User.Read', ], - }: CreateOptions): typeof microsoftAuthApiRef.T { + }: OAuthApiCreateOptions): typeof microsoftAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, diff --git a/packages/core-api/src/apis/implementations/auth/oauth2/OAuth2.ts b/packages/core-api/src/apis/implementations/auth/oauth2/OAuth2.ts index d088ca9798..73ad3dcf14 100644 --- a/packages/core-api/src/apis/implementations/auth/oauth2/OAuth2.ts +++ b/packages/core-api/src/apis/implementations/auth/oauth2/OAuth2.ts @@ -19,11 +19,6 @@ import { DefaultAuthConnector } from '../../../../lib/AuthConnector'; import { RefreshingAuthSessionManager } from '../../../../lib/AuthSessionManager'; import { SessionManager } from '../../../../lib/AuthSessionManager/types'; import { Observable } from '../../../../types'; -import { - AuthProvider, - OAuthRequestApi, - DiscoveryApi, -} from '../../../definitions'; import { AuthRequestOptions, BackstageIdentity, @@ -36,19 +31,14 @@ import { BackstageIdentityApi, } from '../../../definitions/auth'; import { OAuth2Session } from './types'; +import { OAuthApiCreateOptions } from '../types'; type Options = { sessionManager: SessionManager; scopeTransform: (scopes: string[]) => string[]; }; -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - environment?: string; - provider?: AuthProvider & { id: string }; - defaultScopes?: string[]; +type CreateOptions = OAuthApiCreateOptions & { scopeTransform?: (scopes: string[]) => string[]; }; diff --git a/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts b/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts index 7382d24d62..2df908e9fb 100644 --- a/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/okta/OktaAuth.ts @@ -16,21 +16,8 @@ import OktaIcon from '@material-ui/icons/AcUnit'; import { oktaAuthApiRef } from '../../../definitions/auth'; -import { - OAuthRequestApi, - AuthProvider, - DiscoveryApi, -} from '../../../definitions'; import { OAuth2 } from '../oauth2'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - oauthRequestApi: OAuthRequestApi; - - defaultScopes?: string[]; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { OAuthApiCreateOptions } from '../types'; const DEFAULT_PROVIDER = { id: 'okta', @@ -57,7 +44,7 @@ class OktaAuth { provider = DEFAULT_PROVIDER, oauthRequestApi, defaultScopes = ['openid', 'email', 'profile', 'offline_access'], - }: CreateOptions): typeof oktaAuthApiRef.T { + }: OAuthApiCreateOptions): typeof oktaAuthApiRef.T { return OAuth2.create({ discoveryApi, oauthRequestApi, diff --git a/packages/core-api/src/apis/implementations/auth/saml/SamlAuth.ts b/packages/core-api/src/apis/implementations/auth/saml/SamlAuth.ts index 973b402756..da5f082c9b 100644 --- a/packages/core-api/src/apis/implementations/auth/saml/SamlAuth.ts +++ b/packages/core-api/src/apis/implementations/auth/saml/SamlAuth.ts @@ -27,18 +27,12 @@ import { BackstageIdentityApi, SessionApi, } from '../../../definitions/auth'; -import { AuthProvider, DiscoveryApi } from '../../../definitions'; import { SamlSession } from './types'; import { AuthSessionStore, StaticAuthSessionManager, } from '../../../../lib/AuthSessionManager'; - -type CreateOptions = { - discoveryApi: DiscoveryApi; - environment?: string; - provider?: AuthProvider & { id: string }; -}; +import { AuthApiCreateOptions } from '../types'; export type SamlAuthResponse = { profile: ProfileInfo; @@ -56,7 +50,7 @@ class SamlAuth implements ProfileInfoApi, BackstageIdentityApi, SessionApi { discoveryApi, environment = 'development', provider = DEFAULT_PROVIDER, - }: CreateOptions) { + }: AuthApiCreateOptions) { const connector = new DirectAuthConnector({ discoveryApi, environment, diff --git a/packages/core-api/src/apis/implementations/auth/types.ts b/packages/core-api/src/apis/implementations/auth/types.ts new file mode 100644 index 0000000000..db3b718d25 --- /dev/null +++ b/packages/core-api/src/apis/implementations/auth/types.ts @@ -0,0 +1,28 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AuthProvider, DiscoveryApi, OAuthRequestApi } from '../../definitions'; + +export type OAuthApiCreateOptions = AuthApiCreateOptions & { + oauthRequestApi: OAuthRequestApi; + defaultScopes?: string[]; +}; + +export type AuthApiCreateOptions = { + discoveryApi: DiscoveryApi; + environment?: string; + provider?: AuthProvider & { id: string }; +}; From 42b0dbddcb1a3fbe6f2e9eb8bb6ec325b2925feb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 4 Nov 2020 13:18:03 +0100 Subject: [PATCH 070/100] feat(catalog-client): create a basic catalog client (#3166) --- app-config.yaml | 2 +- packages/catalog-client/.eslintrc.js | 3 ++ packages/catalog-client/README.md | 17 +++++++++ packages/catalog-client/package.json | 35 +++++++++++++++++++ .../catalog-client/src}/CatalogClient.test.ts | 15 +++++--- .../catalog-client/src}/CatalogClient.ts | 9 +++-- packages/catalog-client/src/index.ts | 18 ++++++++++ packages/catalog-client/src/setupTests.ts | 17 +++++++++ .../catalog-client/src}/types.ts | 26 +++++--------- plugins/catalog/package.json | 1 + .../CatalogFilter/AllServicesCount.tsx | 8 ++--- .../CatalogFilter/CatalogFilter.test.tsx | 3 +- .../CatalogPage/CatalogPage.test.tsx | 6 ++-- .../components/CatalogPage/CatalogPage.tsx | 2 +- .../ResultsFilter/ResultsFilter.test.tsx | 3 +- .../UnregisterEntityDialog.tsx | 4 +-- .../src/filter/EntityFilterGroupsProvider.tsx | 2 +- .../src/filter/useEntityFilterGroup.test.tsx | 6 ++-- plugins/catalog/src/hooks/useEntity.ts | 2 +- plugins/catalog/src/index.ts | 13 ++++--- plugins/catalog/src/plugin.ts | 12 +++++-- .../reader/components/TechDocsHome.test.tsx | 12 +++---- 22 files changed, 155 insertions(+), 61 deletions(-) create mode 100644 packages/catalog-client/.eslintrc.js create mode 100644 packages/catalog-client/README.md create mode 100644 packages/catalog-client/package.json rename {plugins/catalog/src/api => packages/catalog-client/src}/CatalogClient.test.ts (87%) rename {plugins/catalog/src/api => packages/catalog-client/src}/CatalogClient.ts (96%) create mode 100644 packages/catalog-client/src/index.ts create mode 100644 packages/catalog-client/src/setupTests.ts rename {plugins/catalog/src/api => packages/catalog-client/src}/types.ts (70%) diff --git a/app-config.yaml b/app-config.yaml index bc25b7d71e..bec048ce33 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -16,7 +16,7 @@ backend: credentials: true csp: connect-src: ["'self'", 'http:', 'https:'] - # workingDirectory: /tmp # Use this to configure a working direcotry for the scaffolder, defaults to the OS temp-dir + # workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir # See README.md in the proxy-backend plugin for information on the configuration format proxy: diff --git a/packages/catalog-client/.eslintrc.js b/packages/catalog-client/.eslintrc.js new file mode 100644 index 0000000000..13573efa9c --- /dev/null +++ b/packages/catalog-client/.eslintrc.js @@ -0,0 +1,3 @@ +module.exports = { + extends: [require.resolve('@backstage/cli/config/eslint')], +}; diff --git a/packages/catalog-client/README.md b/packages/catalog-client/README.md new file mode 100644 index 0000000000..574e23cf62 --- /dev/null +++ b/packages/catalog-client/README.md @@ -0,0 +1,17 @@ +# Catalog Client + +Contains a frontend and backend compatible client for communicating with the +Backstage Catalog. + +Backend code may import and use this package directly. + +However, frontend code will not want to import this package directly - use the +`@backstage/plugin-catalog` package instead, which re-exports all of the types +and classes from this package. Thereby, you will also gain access to its +`catalogApiRef`. + +## Links + +- [Default frontend part of the catalog](https://github.com/spotify/backstage/tree/master/plugins/catalog) +- [Default backend part of the catalog](https://github.com/spotify/backstage/tree/master/plugins/catalog-backend) +- [The Backstage homepage](https://backstage.io) diff --git a/packages/catalog-client/package.json b/packages/catalog-client/package.json new file mode 100644 index 0000000000..c4aa632ca9 --- /dev/null +++ b/packages/catalog-client/package.json @@ -0,0 +1,35 @@ +{ + "name": "@backstage/catalog-client", + "version": "0.2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "private": false, + "publishConfig": { + "access": "public", + "main": "dist/index.cjs.js", + "module": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "scripts": { + "build": "backstage-cli build", + "lint": "backstage-cli lint", + "test": "backstage-cli test", + "prepack": "backstage-cli prepack", + "postpack": "backstage-cli postpack", + "clean": "backstage-cli clean" + }, + "dependencies": { + "@backstage/catalog-model": "^0.2.0", + "@backstage/config": "^0.1.1", + "cross-fetch": "^3.0.6" + }, + "devDependencies": { + "@backstage/cli": "^0.2.0", + "@types/jest": "^26.0.7", + "msw": "^0.21.2" + }, + "files": [ + "dist" + ] +} diff --git a/plugins/catalog/src/api/CatalogClient.test.ts b/packages/catalog-client/src/CatalogClient.test.ts similarity index 87% rename from plugins/catalog/src/api/CatalogClient.test.ts rename to packages/catalog-client/src/CatalogClient.test.ts index 927e8dd52c..65625c11b8 100644 --- a/plugins/catalog/src/api/CatalogClient.test.ts +++ b/packages/catalog-client/src/CatalogClient.test.ts @@ -18,17 +18,22 @@ import { rest } from 'msw'; import { setupServer } from 'msw/node'; import { CatalogClient } from './CatalogClient'; import { Entity } from '@backstage/catalog-model'; -import { UrlPatternDiscovery } from '@backstage/core'; -import { msw } from '@backstage/test-utils'; +import { DiscoveryApi } from './types'; const server = setupServer(); const mockBaseUrl = 'http://backstage:9191/i-am-a-mock-base'; -const discoveryApi = UrlPatternDiscovery.compile(mockBaseUrl); +const discoveryApi: DiscoveryApi = { + async getBaseUrl(_pluginId) { + return mockBaseUrl; + }, +}; describe('CatalogClient', () => { - let client = new CatalogClient({ discoveryApi }); + let client: CatalogClient; - msw.setupDefaultHandlers(server); + beforeAll(() => server.listen({ onUnhandledRequest: 'error' })); + afterAll(() => server.close()); + afterEach(() => server.resetHandlers()); beforeEach(() => { client = new CatalogClient({ discoveryApi }); diff --git a/plugins/catalog/src/api/CatalogClient.ts b/packages/catalog-client/src/CatalogClient.ts similarity index 96% rename from plugins/catalog/src/api/CatalogClient.ts rename to packages/catalog-client/src/CatalogClient.ts index 85fd44cf01..e39759a88d 100644 --- a/plugins/catalog/src/api/CatalogClient.ts +++ b/packages/catalog-client/src/CatalogClient.ts @@ -16,16 +16,17 @@ import { Entity, + EntityName, Location, LOCATION_ANNOTATION, } from '@backstage/catalog-model'; +import fetch from 'cross-fetch'; import { AddLocationRequest, AddLocationResponse, CatalogApi, - EntityCompoundName, + DiscoveryApi, } from './types'; -import { DiscoveryApi } from '@backstage/core'; export class CatalogClient implements CatalogApi { private readonly discoveryApi: DiscoveryApi; @@ -85,9 +86,7 @@ export class CatalogClient implements CatalogApi { return await this.getRequired(path); } - async getEntityByName( - compoundName: EntityCompoundName, - ): Promise { + async getEntityByName(compoundName: EntityName): Promise { const { kind, namespace = 'default', name } = compoundName; return this.getOptional(`/entities/by-name/${kind}/${namespace}/${name}`); } diff --git a/packages/catalog-client/src/index.ts b/packages/catalog-client/src/index.ts new file mode 100644 index 0000000000..9bd13f9b7c --- /dev/null +++ b/packages/catalog-client/src/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { CatalogClient } from './CatalogClient'; +export type { CatalogApi } from './types'; diff --git a/packages/catalog-client/src/setupTests.ts b/packages/catalog-client/src/setupTests.ts new file mode 100644 index 0000000000..ba33cf996b --- /dev/null +++ b/packages/catalog-client/src/setupTests.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {}; diff --git a/plugins/catalog/src/api/types.ts b/packages/catalog-client/src/types.ts similarity index 70% rename from plugins/catalog/src/api/types.ts rename to packages/catalog-client/src/types.ts index 06030e6ac5..575b8d6ca2 100644 --- a/plugins/catalog/src/api/types.ts +++ b/packages/catalog-client/src/types.ts @@ -14,26 +14,11 @@ * limitations under the License. */ -import { createApiRef } from '@backstage/core'; -import { Entity, Location } from '@backstage/catalog-model'; - -export const catalogApiRef = createApiRef({ - id: 'plugin.catalog.service', - description: - 'Used by the Catalog plugin to make requests to accompanying backend', -}); - -export type EntityCompoundName = { - kind: string; - namespace?: string; - name: string; -}; +import { Entity, EntityName, Location } from '@backstage/catalog-model'; export interface CatalogApi { getLocationById(id: String): Promise; - getEntityByName( - compoundName: EntityCompoundName, - ): Promise; + getEntityByName(name: EntityName): Promise; getEntities(filter?: Record): Promise; addLocation(location: AddLocationRequest): Promise; getLocationByEntity(entity: Entity): Promise; @@ -50,3 +35,10 @@ export type AddLocationResponse = { location: Location; entities: Entity[]; }; + +/** + * This is a copy of the core DiscoveryApi, to avoid importing core. + */ +export type DiscoveryApi = { + getBaseUrl(pluginId: string): Promise; +}; diff --git a/plugins/catalog/package.json b/plugins/catalog/package.json index 66f7a681c5..6d52c4722f 100644 --- a/plugins/catalog/package.json +++ b/plugins/catalog/package.json @@ -21,6 +21,7 @@ "clean": "backstage-cli clean" }, "dependencies": { + "@backstage/catalog-client": "^0.2.0", "@backstage/catalog-model": "^0.2.0", "@backstage/core": "^0.2.0", "@backstage/plugin-scaffolder": "^0.2.0", diff --git a/plugins/catalog/src/components/CatalogFilter/AllServicesCount.tsx b/plugins/catalog/src/components/CatalogFilter/AllServicesCount.tsx index b4d90c249a..e78cedbe2d 100644 --- a/plugins/catalog/src/components/CatalogFilter/AllServicesCount.tsx +++ b/plugins/catalog/src/components/CatalogFilter/AllServicesCount.tsx @@ -14,13 +14,13 @@ * limitations under the License. */ -import React, { FC } from 'react'; import { useApi } from '@backstage/core'; -import { catalogApiRef } from '../../api/types'; -import { useAsync } from 'react-use'; import { CircularProgress, useTheme } from '@material-ui/core'; +import React from 'react'; +import { useAsync } from 'react-use'; +import { catalogApiRef } from '../../plugin'; -export const AllServicesCount: FC<{}> = () => { +export const AllServicesCount = () => { const theme = useTheme(); const catalogApi = useApi(catalogApiRef); const { value, loading } = useAsync(() => catalogApi.getEntities()); diff --git a/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx b/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx index bc23d61d9c..a4ede7c2f2 100644 --- a/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx +++ b/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { CatalogApi } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; import { ApiProvider, @@ -25,8 +26,8 @@ import { import { MockStorageApi, wrapInTestApp } from '@backstage/test-utils'; import { fireEvent, render, waitFor } from '@testing-library/react'; import React from 'react'; -import { CatalogApi, catalogApiRef } from '../../api/types'; import { EntityFilterGroupsProvider } from '../../filter'; +import { catalogApiRef } from '../../plugin'; import { ButtonGroup, CatalogFilter } from './CatalogFilter'; describe('Catalog Filter', () => { diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx index 5752e58215..0d645f0f35 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.test.tsx @@ -14,21 +14,21 @@ * limitations under the License. */ +import { CatalogApi } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; import { ApiProvider, ApiRegistry, IdentityApi, identityApiRef, - storageApiRef, ProfileInfo, + storageApiRef, } from '@backstage/core'; import { MockStorageApi, wrapInTestApp } from '@backstage/test-utils'; import { fireEvent, render } from '@testing-library/react'; import React from 'react'; -import { catalogApiRef } from '../..'; -import { CatalogApi } from '../../api/types'; import { EntityFilterGroupsProvider } from '../../filter'; +import { catalogApiRef } from '../../plugin'; import { CatalogPage } from './CatalogPage'; describe('CatalogPage', () => { diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx index 1a9a723f16..e73a789380 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx @@ -29,9 +29,9 @@ import SettingsIcon from '@material-ui/icons/Settings'; import StarIcon from '@material-ui/icons/Star'; import React, { useCallback, useMemo, useState } from 'react'; import { Link as RouterLink } from 'react-router-dom'; -import { catalogApiRef } from '../../api/types'; import { EntityFilterGroupsProvider, useFilteredEntities } from '../../filter'; import { useStarredEntities } from '../../hooks/useStarredEntities'; +import { catalogApiRef } from '../../plugin'; import { ButtonGroup, CatalogFilter } from '../CatalogFilter/CatalogFilter'; import { CatalogTable } from '../CatalogTable/CatalogTable'; import { ResultsFilter } from '../ResultsFilter/ResultsFilter'; diff --git a/plugins/catalog/src/components/ResultsFilter/ResultsFilter.test.tsx b/plugins/catalog/src/components/ResultsFilter/ResultsFilter.test.tsx index 6f294c54ff..39837d2ca1 100644 --- a/plugins/catalog/src/components/ResultsFilter/ResultsFilter.test.tsx +++ b/plugins/catalog/src/components/ResultsFilter/ResultsFilter.test.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import { CatalogApi } from '@backstage/catalog-client'; import { Entity } from '@backstage/catalog-model'; import { ApiProvider, @@ -25,8 +26,8 @@ import { import { MockStorageApi, wrapInTestApp } from '@backstage/test-utils'; import { render } from '@testing-library/react'; import React from 'react'; -import { CatalogApi, catalogApiRef } from '../../api/types'; import { EntityFilterGroupsProvider } from '../../filter'; +import { catalogApiRef } from '../../plugin'; import { ResultsFilter } from './ResultsFilter'; describe('Results Filter', () => { diff --git a/plugins/catalog/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx b/plugins/catalog/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx index d860ba1ea4..218cc45e78 100644 --- a/plugins/catalog/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx +++ b/plugins/catalog/src/components/UnregisterEntityDialog/UnregisterEntityDialog.tsx @@ -15,7 +15,7 @@ */ import { Entity, LOCATION_ANNOTATION } from '@backstage/catalog-model'; -import { Progress, useApi, alertApiRef } from '@backstage/core'; +import { alertApiRef, Progress, useApi } from '@backstage/core'; import { Button, Dialog, @@ -31,7 +31,7 @@ import Alert from '@material-ui/lab/Alert'; import React, { FC } from 'react'; import { useAsync } from 'react-use'; import { AsyncState } from 'react-use/lib/useAsync'; -import { catalogApiRef } from '../../api/types'; +import { catalogApiRef } from '../../plugin'; type Props = { open: boolean; diff --git a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx index ceecc17953..36cc0c56df 100644 --- a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx +++ b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx @@ -18,7 +18,7 @@ import { Entity } from '@backstage/catalog-model'; import { useApi } from '@backstage/core'; import React, { useCallback, useEffect, useRef, useState } from 'react'; import { useAsyncFn } from 'react-use'; -import { catalogApiRef } from '../api/types'; +import { catalogApiRef } from '../plugin'; import { filterGroupsContext, FilterGroupsContext } from './context'; import { EntityFilterFn, diff --git a/plugins/catalog/src/filter/useEntityFilterGroup.test.tsx b/plugins/catalog/src/filter/useEntityFilterGroup.test.tsx index 3d11ffe7a9..6b573e3721 100644 --- a/plugins/catalog/src/filter/useEntityFilterGroup.test.tsx +++ b/plugins/catalog/src/filter/useEntityFilterGroup.test.tsx @@ -15,13 +15,13 @@ */ import { ApiProvider, ApiRegistry, storageApiRef } from '@backstage/core'; +import { MockStorageApi } from '@backstage/test-utils'; import { act, renderHook } from '@testing-library/react-hooks'; import React from 'react'; -import { catalogApiRef } from '../api/types'; +import { catalogApiRef } from '../plugin'; import { EntityFilterGroupsProvider } from './EntityFilterGroupsProvider'; -import { FilterGroupStatesReady, FilterGroup } from './types'; +import { FilterGroup, FilterGroupStatesReady } from './types'; import { useEntityFilterGroup } from './useEntityFilterGroup'; -import { MockStorageApi } from '@backstage/test-utils'; describe('useEntityFilterGroup', () => { let catalogApi: jest.Mocked; diff --git a/plugins/catalog/src/hooks/useEntity.ts b/plugins/catalog/src/hooks/useEntity.ts index 1c5b94b8c1..29ca63904d 100644 --- a/plugins/catalog/src/hooks/useEntity.ts +++ b/plugins/catalog/src/hooks/useEntity.ts @@ -18,8 +18,8 @@ import { errorApiRef, useApi } from '@backstage/core'; import { createContext, useContext, useEffect } from 'react'; import { useNavigate } from 'react-router'; import { useAsync } from 'react-use'; -import { catalogApiRef } from '../api/types'; import { useEntityCompoundName } from '../components/useEntityCompoundName'; +import { catalogApiRef } from '../plugin'; type EntityLoadingStatus = { entity?: Entity; diff --git a/plugins/catalog/src/index.ts b/plugins/catalog/src/index.ts index 762f4924c0..606ad9028d 100644 --- a/plugins/catalog/src/index.ts +++ b/plugins/catalog/src/index.ts @@ -14,12 +14,11 @@ * limitations under the License. */ -export { plugin } from './plugin'; -export * from './api/CatalogClient'; -export * from './api/types'; -export * from './routes'; -export { useEntityCompoundName } from './components/useEntityCompoundName'; -export { Router } from './components/Router'; -export { useEntity, EntityContext } from './hooks/useEntity'; +export * from '@backstage/catalog-client'; export { AboutCard } from './components/AboutCard'; export { EntityPageLayout } from './components/EntityPageLayout'; +export { Router } from './components/Router'; +export { useEntityCompoundName } from './components/useEntityCompoundName'; +export { EntityContext, useEntity } from './hooks/useEntity'; +export { catalogApiRef, plugin } from './plugin'; +export * from './routes'; diff --git a/plugins/catalog/src/plugin.ts b/plugins/catalog/src/plugin.ts index dfe12fd500..5f737ec12d 100644 --- a/plugins/catalog/src/plugin.ts +++ b/plugins/catalog/src/plugin.ts @@ -14,13 +14,19 @@ * limitations under the License. */ +import { CatalogApi, CatalogClient } from '@backstage/catalog-client'; import { - createPlugin, createApiFactory, + createApiRef, + createPlugin, discoveryApiRef, } from '@backstage/core'; -import { catalogApiRef } from './api/types'; -import { CatalogClient } from './api/CatalogClient'; + +export const catalogApiRef = createApiRef({ + id: 'plugin.catalog.service', + description: + 'Used by the Catalog plugin to make requests to accompanying backend', +}); export const plugin = createPlugin({ id: 'catalog', diff --git a/plugins/techdocs/src/reader/components/TechDocsHome.test.tsx b/plugins/techdocs/src/reader/components/TechDocsHome.test.tsx index 7754f227fc..d5d0e19e08 100644 --- a/plugins/techdocs/src/reader/components/TechDocsHome.test.tsx +++ b/plugins/techdocs/src/reader/components/TechDocsHome.test.tsx @@ -13,14 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { TechDocsHome } from './TechDocsHome'; -import React from 'react'; -import { render } from '@testing-library/react'; -import { wrapInTestApp } from '@backstage/test-utils'; -import { ApiRegistry, ApiProvider } from '@backstage/core-api'; -import { catalogApiRef, CatalogApi } from '@backstage/plugin-catalog'; import { Entity } from '@backstage/catalog-model'; +import { ApiProvider, ApiRegistry } from '@backstage/core-api'; +import { CatalogApi, catalogApiRef } from '@backstage/plugin-catalog'; +import { wrapInTestApp } from '@backstage/test-utils'; +import { render } from '@testing-library/react'; +import React from 'react'; +import { TechDocsHome } from './TechDocsHome'; describe('TechDocs Home', () => { const catalogApi: Partial = { From 9a294574c873baa5915b8d2daaf60a808009cf5b Mon Sep 17 00:00:00 2001 From: Tim Hansen Date: Wed, 4 Nov 2020 10:54:41 -0700 Subject: [PATCH 071/100] Fix styling issue on Cost Insights product panels with no cost --- .changeset/cost-insights-quick-suits-brake.md | 5 +++ app-config.yaml | 2 +- .../ProductInsightsCard.tsx | 43 ++++++++++--------- 3 files changed, 29 insertions(+), 21 deletions(-) create mode 100644 .changeset/cost-insights-quick-suits-brake.md diff --git a/.changeset/cost-insights-quick-suits-brake.md b/.changeset/cost-insights-quick-suits-brake.md new file mode 100644 index 0000000000..0fa4414c6b --- /dev/null +++ b/.changeset/cost-insights-quick-suits-brake.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-cost-insights': patch +--- + +Fix styling issue on Cost Insights product panels with no cost diff --git a/app-config.yaml b/app-config.yaml index bec048ce33..148627dc5a 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -253,7 +253,7 @@ costInsights: name: Cloud Storage icon: storage bigQuery: - name: Big Query + name: BigQuery icon: search metrics: DAU: diff --git a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx index 17b1624c05..b78053ab5b 100644 --- a/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx +++ b/plugins/cost-insights/src/components/ProductInsightsCard/ProductInsightsCard.tsx @@ -16,7 +16,7 @@ import React, { useCallback, useEffect, useState } from 'react'; import { InfoCard, useApi } from '@backstage/core'; -import { Box } from '@material-ui/core'; +import { Box, Typography } from '@material-ui/core'; import Alert from '@material-ui/lab/Alert'; import { costInsightsApiRef } from '../../api'; import { PeriodSelect } from '../PeriodSelect'; @@ -58,7 +58,7 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { const dispatchLoadingProduct = useCallback(dispatchLoading, [product.kind]); const amount = resource?.entities?.length || 0; - const hasCostsWithinTimeframe = resource?.change && !!amount; + const hasCostsWithinTimeframe = !!(resource?.change && amount); const previousName = formatPeriod( productFilter.duration, @@ -71,9 +71,9 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { true, ); - const subheader = amount + const subheader = hasCostsWithinTimeframe ? `${amount} ${pluralOf(amount, 'entity', 'entities')}, sorted by cost` - : `There are no ${product.name} costs within this timeframe for your team's projects.`; + : null; const costStart = resource?.aggregation[0] || 0; const costEnd = resource?.aggregation[1] || 0; @@ -144,26 +144,29 @@ export const ProductInsightsCard = ({ product }: ProductInsightsCardProps) => { return ( - {hasCostsWithinTimeframe && ( - <> - - - - - + + - + + + ) : ( + + There are no {product.name} costs within this timeframe for your + team's projects. + )} ); From 596a3b8d1488caa90e5346b0b337cc1fdc5012f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Wed, 4 Nov 2020 20:01:03 +0100 Subject: [PATCH 072/100] docs: features/software-catalog/external-integrations (#3231) --- .../software-catalog/external-integrations.md | 160 +++++++++++++++++- .../src/ingestion/processors/index.ts | 2 + 2 files changed, 157 insertions(+), 5 deletions(-) diff --git a/docs/features/software-catalog/external-integrations.md b/docs/features/software-catalog/external-integrations.md index 00a9d95fc2..325bed5e4a 100644 --- a/docs/features/software-catalog/external-integrations.md +++ b/docs/features/software-catalog/external-integrations.md @@ -5,9 +5,159 @@ description: Documentation on External integrations to integrate systems with Backstage --- -Backstage natively supports storing software components in -[metadata YAML files](descriptor-format.md). However, companies that already -have an existing system for keeping track of software and its owners can -integrate such systems with Backstage. +Backstage natively supports importing catalog data through the use of +[entity descriptor YAML files](descriptor-format.md). However, companies that +already have an existing system for keeping track of software and its owners can +leverage those systems by integrating them with Backstage. This article shows +the most common way of doing that integration: by adding a custom catalog +_processor_. -TODO: Describe the API contract. +## Background + +The catalog has a frontend plugin part, that communicates via a service API to +the backend plugin part. The backend has a processing loop that repeatedly +ingests data from the sources you specify, to store them in its database. + +As a Backstage adopter, you would be able to customize or extend the catalog in +several ways - by replacing the entire backend API, or by replacing entire +implementation classes at certain points in the backend, or by leveraging the +ingestion process to fetch data from your own authoritative source. Each method +has benefits and drawbacks, but this article will focus on the last one of the +above. It is the one that is the most straight forward and future proof, and +leverages a lot of benefits that come with the builtin catalog. + +## Processors and the Ingestion Loop + +The catalog holds a number of registered locations, that were added either by +site admins or by individual Backstage users. Their purpose is to reference some +sort of data that the catalog shall keep itself up to date with. Each location +has a `type`, and a `target` that are both strings. + +```yaml +# Example location +type: url +target: https://github.com/backstage/backstage/blob/master/catalog-info.yaml +``` + +The builtin catalog backend has an ingestion loop that periodically goes through +all of these registered locations, and pushes them and their resulting output +through the list of _processors_. + +Processors are classes that the site admin has registered with the catalog at +startup. They are at the heart of all catalog logic, and have the ability to +read the contents of locations, modify in-flight entities that were read out of +a location, perform validation, and more. The catalog comes with a set of +builtin processors, that have the ability to read from a list of well known +location types, to perform the basic processing needs, etc, but more can be +added by the organization that adopts Backstage. + +We will now show the process of creating a new processor and location type, +which enables the ingestion of catalog data from an existing external API. + +## Deciding on the New Locations + +The first step is to decide how we want to point at the system that holds our +data. Let's assume that it is internally named System-X and can be reached +through HTTP REST calls to its API. + +Let's decide that our locations shall take the following form: + +```yaml +type: system-x +target: http://systemx.services.example.net/api/v2 +``` + +It got its own made-up `type`, and the `target` conveniently points to the +actual API endpoint to talk to. + +So now we have to make the catalog aware of such a location so that it can start +feeding it into the ingestion loop. For this kind of an integration, you'd +typically want to add it to the list of statically always-available locations in +the config. + +```yaml +# In app-config.yaml +catalog: + locations: + - type: system-x + target: http://systemx.services.example.net/api/v2 +``` + +If you start up the backend now, it will start to periodically say that it could +not find a processor that supports that location. So let's make a processor that +does so! + +## Creating a Catalog Data Reader Processor + +The recommended way of instantiating the catalog backend classes is to use the +[`CatalogBuilder`](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/service/CatalogBuilder.ts), +as illustrated in the +[example backend here](https://github.com/backstage/backstage/blob/master/packages/backend/src/plugins/catalog.ts). +We will create a new +[`CatalogProcessor`](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/src/ingestion/types.ts) +subclass that can be added to this catalog builder. + +It is up to you where you put the code for this new processor class. For quick +experimentation you could place it in your backend package, but we recommend +putting all extensions like this in a backend plugin package of their own in the +`plugins` folder of your Backstage repo. + +The class will have this basic structure: + +```ts +import { UrlReader } from '@backstage/backend-common'; +import { LocationSpec } from '@backstage/catalog-model'; +import { + results, + CatalogProcessor, + CatalogProcessorEmit, +} from '@backstage/plugin-catalog-backend'; + +// A processor that reads from the fictional System-X +export class SystemXReaderProcessor implements CatalogProcessor { + constructor(private readonly reader: UrlReader) {} + + async readLocation( + location: LocationSpec, + _optional: boolean, + emit: CatalogProcessorEmit, + ): Promise { + // Pick a custom location type string. A location will be + // registered later with this type. + if (location.type !== 'system-x') { + return false; + } + + try { + // Use the builtin reader facility to grab data from the + // API. If you prefer, you can just use plain fetch here + // (from the cross-fetch package), or any other method of + // your choosing. + const data = await this.reader.read(location.target); + const json = JSON.parse(data.toString()); + // Repeatedly call emit(results.entity(location, )) + } catch (error) { + const message = `Unable to read ${location.type}, ${error}`; + emit(results.generalError(location, message)); + } + + return true; + } +} +``` + +The key points to note are: + +- Make a class that implements `CatalogProcessor` +- Only act on location types that you care about, and leave the rest alone by + returning `false` +- Read the data from the external system in any way you see fit. Use the + location `target` field if you designed it as mentioned above +- Call `emit` any number of times with the results of that process +- Finally return `true` + +You should now be able to instantiate this class in your backend, and add it to +the `CatalogBuilder` using the `addProcessors` method. + +Start up the backend - it should now start reading from the previously +registered location and you'll see your entities start to appear in Backstage. diff --git a/plugins/catalog-backend/src/ingestion/processors/index.ts b/plugins/catalog-backend/src/ingestion/processors/index.ts index d654f37dc7..ef9c6332cd 100644 --- a/plugins/catalog-backend/src/ingestion/processors/index.ts +++ b/plugins/catalog-backend/src/ingestion/processors/index.ts @@ -19,6 +19,8 @@ import * as results from './results'; export { results }; export * from './types'; +export { parseEntityYaml } from './util/parse'; + export { AnnotateLocationEntityProcessor } from './AnnotateLocationEntityProcessor'; export { CodeOwnersProcessor } from './CodeOwnersProcessor'; export { FileReaderProcessor } from './FileReaderProcessor'; From 803527bd3266d04910715e80d28290df1f14e09c Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Mon, 2 Nov 2020 16:40:29 +0100 Subject: [PATCH 073/100] Upgrade @kyma-project/asyncapi-react to 0.14.2 There is an intersting fix for displaying async messages in the docs. --- .changeset/spicy-bananas-help.md | 5 ++ plugins/api-docs/package.json | 2 +- yarn.lock | 148 +++++++++---------------------- 3 files changed, 48 insertions(+), 107 deletions(-) create mode 100644 .changeset/spicy-bananas-help.md diff --git a/.changeset/spicy-bananas-help.md b/.changeset/spicy-bananas-help.md new file mode 100644 index 0000000000..6d847f4bc3 --- /dev/null +++ b/.changeset/spicy-bananas-help.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-api-docs': patch +--- + +Upgrade @kyma-project/asyncapi-react to 0.14.2 diff --git a/plugins/api-docs/package.json b/plugins/api-docs/package.json index 3e949bd5cc..308a2abc27 100644 --- a/plugins/api-docs/package.json +++ b/plugins/api-docs/package.json @@ -24,7 +24,7 @@ "@backstage/core": "^0.2.0", "@backstage/plugin-catalog": "^0.2.0", "@backstage/theme": "^0.2.0", - "@kyma-project/asyncapi-react": "^0.13.1", + "@kyma-project/asyncapi-react": "^0.14.2", "@material-icons/font": "^1.0.2", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", diff --git a/yarn.lock b/yarn.lock index 123b9967be..ddfccf7fd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,7 +2,7 @@ # yarn lockfile v1 -"@apidevtools/json-schema-ref-parser@9.0.6", "@apidevtools/json-schema-ref-parser@^9.0.6": +"@apidevtools/json-schema-ref-parser@^9.0.6": version "9.0.6" resolved "https://registry.npmjs.org/@apidevtools/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz#5d9000a3ac1fd25404da886da6b266adcd99cf1c" integrity sha512-M3YgsLjI0lZxvrpeGVk9Ap032W6TPQkH6pRAZz81Ac3WUNF79VQooAFnp8umjvVzUmD93NkogxEwbSce7qMsUg== @@ -56,10 +56,10 @@ dependencies: tslib "~2.0.1" -"@asyncapi/avro-schema-parser@^0.1.2": - version "0.1.2" - resolved "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-0.1.2.tgz#f6c340ccaa24bc36399d3a0f1a6e02790a948453" - integrity sha512-K4GlakiE42J9AWwAu3BWn3Qbf+N8C6vE4eEm5LEx7HqAhHG+FA0U7/3vvXoj31rnS/8sgPQpc2msLWQlmCtZyw== +"@asyncapi/avro-schema-parser@^0.2.0": + version "0.2.0" + resolved "https://registry.npmjs.org/@asyncapi/avro-schema-parser/-/avro-schema-parser-0.2.0.tgz#c9da2bb2858aca5a3b9e9a0e600084afd3765551" + integrity sha512-/oPDPudF82RGFXz5uhF77PSDZkAR+yHpdxUEbJ5jwk/X3RB74VRk8dqSgTqhUO+pLh+/Hut3x3VFacA8C9L2QA== "@asyncapi/openapi-schema-parser@^2.0.0": version "2.0.0" @@ -68,13 +68,13 @@ dependencies: "@openapi-contrib/openapi-schema-to-json-schema" "^3.0.0" -"@asyncapi/parser@^1.0.0-rc.1": - version "1.0.0-rc.2" - resolved "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.0.0-rc.2.tgz#87d2e83c1d390e21d53f868e6209cbc584d35449" - integrity sha512-nZYJLnMiq48q7YHa+AI9ZaDc5UqoqKR7MDhTiIKsIJj6X5fF6hpwBrTP0bQn76Pc1oGBXRB69PcD/Y+Et1qFyw== +"@asyncapi/parser@^1.0.1": + version "1.1.0" + resolved "https://registry.npmjs.org/@asyncapi/parser/-/parser-1.1.0.tgz#b366c85a6322e182e040d60f36400a0b5c26393c" + integrity sha512-0+NeTiW5sPNYaFf4P2VCcy7Z7MLMP7H969cgOp3gvVTKroI5idkYnWo/C16tKAxs+2oOQ9WnPolsNgc+jb/qtg== dependencies: "@apidevtools/json-schema-ref-parser" "^9.0.6" - "@asyncapi/specs" "^2.7.4" + "@asyncapi/specs" "^2.7.5" "@fmvilas/pseudo-yaml-ast" "^0.3.1" ajv "^6.10.1" js-yaml "^3.13.1" @@ -82,18 +82,10 @@ node-fetch "^2.6.0" tiny-merge-patch "^0.1.2" -"@asyncapi/raml-dt-schema-parser@^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/@asyncapi/raml-dt-schema-parser/-/raml-dt-schema-parser-2.0.0.tgz#6e9eff89032aa7b82a963d8e72e320e493fc3835" - integrity sha512-ve41LIvbqDU8s0ZeDrWy+dyQZ/XSb7vKiJUHNgy8xcgxsz4YuttbEJbyGJvarw3qf2y+0y6cA1KUFiXoE+AIUg== - dependencies: - js-yaml "^3.13.1" - ramldt2jsonschema "^1.1.0" - -"@asyncapi/specs@^2.7.4": - version "2.7.4" - resolved "https://registry.npmjs.org/@asyncapi/specs/-/specs-2.7.4.tgz#5db4390b68aeb40d70c1723d8f46b0a091110afc" - integrity sha512-3Np9ip1Qn5AgnxTrbI0CMW2F/WUorpiAKz+GUfEy4a6GPk0eTSI6CIcbx2/jej5P91nhEyny9+D3oIzn2MreTA== +"@asyncapi/specs@^2.7.5": + version "2.7.5" + resolved "https://registry.npmjs.org/@asyncapi/specs/-/specs-2.7.5.tgz#3a516d198fc41a1103695bd889fdd4fbbebe7f5d" + integrity sha512-T1Ham9sqZKCtSowXRPaBCRy2oz3KHglqqrKiaO7lEudpP6lwH5SwXaq4qliyKzWaqd22srJHE4szdsorbFZKlw== "@babel/code-frame@7.0.0": version "7.0.0" @@ -2647,19 +2639,17 @@ dependencies: stream "^0.0.2" -"@kyma-project/asyncapi-react@^0.13.1": - version "0.13.1" - resolved "https://registry.npmjs.org/@kyma-project/asyncapi-react/-/asyncapi-react-0.13.1.tgz#8a92ee2df996540240c0afa17adfa566e4cee18d" - integrity sha512-d+52fzfBHpcC32WvrfB6sSyQFgzda/lHrKSn5klXP6tEiOU5uaLEIQzvZLCL8kXtuHiknozHO3h/BfviqEkwww== +"@kyma-project/asyncapi-react@^0.14.2": + version "0.14.2" + resolved "https://registry.npmjs.org/@kyma-project/asyncapi-react/-/asyncapi-react-0.14.2.tgz#6d99ef878f0481b05db0f3be7c94f4534176675f" + integrity sha512-lf3zcIuCTaVEIkCpF7Vwulrucgdfp1zXUIvkqjYPteOJjOuT6BAvnYwgvFUYibitmD/ADkvK8ybIeKdNJcyaPw== dependencies: - "@asyncapi/avro-schema-parser" "^0.1.2" + "@asyncapi/avro-schema-parser" "^0.2.0" "@asyncapi/openapi-schema-parser" "^2.0.0" - "@asyncapi/parser" "^1.0.0-rc.1" - "@asyncapi/raml-dt-schema-parser" "^2.0.0" + "@asyncapi/parser" "^1.0.1" constate "^1.2.0" - dompurify "^1.0.11" - json-schema-ref-parser "^9.0.6" - markdown-it "^9.1.0" + dompurify "^2.1.1" + markdown-it "^11.0.1" merge "^1.2.1" openapi-sampler "^1.0.0-beta.15" react-use "^12.2.0" @@ -6599,26 +6589,6 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@6.5.2: - version "6.5.2" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.5.2.tgz#678495f9b82f7cca6be248dd92f59bff5e1f4360" - integrity sha512-hOs7GfvI6tUI1LfZddH82ky6mOMyTuY0mk7kE2pWpmhhUSkumzaTO5vbVwij39MdwPQWCV4Zv57Eo06NtL/GVA== - dependencies: - fast-deep-equal "^2.0.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.1" - -ajv@^5.0.0: - version "5.5.2" - resolved "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" - integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= - dependencies: - co "^4.6.0" - fast-deep-equal "^1.0.0" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.3.0" - ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.1, ajv@^6.10.2, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.5.5, ajv@^6.7.0: version "6.12.5" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da" @@ -10511,11 +10481,6 @@ domhandler@^3.0, domhandler@^3.0.0: dependencies: domelementtype "^2.0.1" -dompurify@^1.0.11: - version "1.0.11" - resolved "https://registry.npmjs.org/dompurify/-/dompurify-1.0.11.tgz#fe0f4a40d147f7cebbe31a50a1357539cfc1eb4d" - integrity sha512-XywCTXZtc/qCX3iprD1pIklRVk/uhl8BKpkTxr+ZyMVUzSUg7wkQXRBp/euJ5J5moa1QvfpvaPQVP71z1O59dQ== - dompurify@^2.0.12: version "2.1.1" resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.1.1.tgz#b5aa988676b093a9c836d8b855680a8598af25fe" @@ -10526,6 +10491,11 @@ dompurify@^2.0.7: resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz#284a2b041e1c60b8e72d7b4d2fadad36141254ae" integrity sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg== +dompurify@^2.1.1: + version "2.2.0" + resolved "https://registry.npmjs.org/dompurify/-/dompurify-2.2.0.tgz#51d34e76faa38b5d6b4e83a0678530f27fe3965c" + integrity sha512-bqFOQ7XRmmozp0VsKdIEe8UwZYxj0yttz7l80GBtBqdVRY48cOpXH2J/CVO7AEkV51qY0EBVXfilec18mdmQ/w== + domutils@1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf" @@ -10781,7 +10751,7 @@ enquirer@^2.3.0, enquirer@^2.3.5: dependencies: ansi-colors "^4.1.1" -entities@^1.1.1, entities@^1.1.2, entities@~1.1.1: +entities@^1.1.1, entities@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" integrity sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== @@ -11589,11 +11559,6 @@ fast-deep-equal@2.0.1, fast-deep-equal@^2.0.1: resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= -fast-deep-equal@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" - integrity sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ= - fast-deep-equal@^3.0.0, fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -15027,25 +14992,6 @@ json-schema-merge-allof@^0.6.0: json-schema-compare "^0.2.2" lodash "^4.17.4" -json-schema-migrate@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-0.2.0.tgz#ba47a5b0072fc72396460e1bd60b44d52178bbc6" - integrity sha1-ukelsAcvxyOWRg4b1gtE1SF4u8Y= - dependencies: - ajv "^5.0.0" - -json-schema-ref-parser@^9.0.6: - version "9.0.6" - resolved "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-9.0.6.tgz#fc89a5e6b853f2abe8c0af30d3874196526adb60" - integrity sha512-z0JGv7rRD3CnJbZY/qCpscyArdtLJhr/wRBmFUdoZ8xMjsFyNdILSprG2degqRLjBjyhZHAEBpGOxniO9rKTxA== - dependencies: - "@apidevtools/json-schema-ref-parser" "9.0.6" - -json-schema-traverse@^0.3.0: - version "0.3.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" - integrity sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A= - json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" @@ -15541,6 +15487,13 @@ linkify-it@^2.0.0: dependencies: uc.micro "^1.0.1" +linkify-it@^3.0.1: + version "3.0.2" + resolved "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.2.tgz#f55eeb8bc1d3ae754049e124ab3bb56d97797fb8" + integrity sha512-gDBO4aHNZS6coiZCKVhSNh43F9ioIL4JwRjLZPkoLIY4yZFwg264Y5lu2x6rb1Js42Gh6Yqm2f6L2AJcnkzinQ== + dependencies: + uc.micro "^1.0.1" + lint-staged@^10.1.0: version "10.2.11" resolved "https://registry.npmjs.org/lint-staged/-/lint-staged-10.2.11.tgz#713c80877f2dc8b609b05bc59020234e766c9720" @@ -16160,14 +16113,14 @@ markdown-it@^10.0.0: mdurl "^1.0.1" uc.micro "^1.0.5" -markdown-it@^9.1.0: - version "9.1.0" - resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-9.1.0.tgz#df9601c168568704d554b1fff9af0c5b561168d9" - integrity sha512-xHKG4C8iPriyfu/jc2hsCC045fKrMQ0VexX2F1FGYiRxDxqMB2aAhF8WauJ3fltn2kb90moGBkiiEdooGIg55w== +markdown-it@^11.0.1: + version "11.0.1" + resolved "https://registry.npmjs.org/markdown-it/-/markdown-it-11.0.1.tgz#b54f15ec2a2193efa66dda1eb4173baea08993d6" + integrity sha512-aU1TzmBKcWNNYvH9pjq6u92BML+Hz3h5S/QpfTFwiQF852pLT+9qHsrhM9JYipkOXZxGn+sGH8oyJE9FD9WezQ== dependencies: argparse "^1.0.7" - entities "~1.1.1" - linkify-it "^2.0.0" + entities "~2.0.0" + linkify-it "^3.0.1" mdurl "^1.0.1" uc.micro "^1.0.5" @@ -19485,16 +19438,6 @@ ramda@^0.26, ramda@~0.26.1: resolved "https://registry.npmjs.org/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06" integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ== -ramldt2jsonschema@^1.1.0: - version "1.2.3" - resolved "https://registry.npmjs.org/ramldt2jsonschema/-/ramldt2jsonschema-1.2.3.tgz#8d45a7f306a1169a3bde91cab725d1d6d0ff7d55" - integrity sha512-+wLDAV2NNv9NkfEUOYStaDu/6RYgYXeC1zLtXE+dMU/jDfjpN4iJnBGycDwFTFaIQGosOQhxph7fEX6Mpwxdug== - dependencies: - commander "^5.0.0" - js-yaml "^3.14.0" - json-schema-migrate "^0.2.0" - webapi-parser "^0.5.0" - randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -23602,7 +23545,7 @@ upper-case@2.0.1, upper-case@^2.0.1: dependencies: tslib "^1.10.0" -uri-js@^4.2.1, uri-js@^4.2.2: +uri-js@^4.2.2: version "4.2.2" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0" integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ== @@ -23988,13 +23931,6 @@ wcwidth@^1.0.0, wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -webapi-parser@^0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/webapi-parser/-/webapi-parser-0.5.0.tgz#2632185c5d8f3e6addb2520857af89ea9844dc14" - integrity sha512-fPt6XuMqLSvBz8exwX4QE1UT+pROLHa00EMDCdO0ybICduwQ1V4f7AWX4pNOpCp+x+0FjczEsOxtQU0d8L3QKw== - dependencies: - ajv "6.5.2" - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" From 24b3c310002e72601f6ecfe5c40143e03d3238b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 5 Nov 2020 11:13:21 +0100 Subject: [PATCH 074/100] catalog: make the table denser (#3224) --- .../src/components/CatalogTable/CatalogTable.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 4d97ea4334..731a8dedc9 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -68,7 +68,13 @@ const columns: TableColumn[] = [ <> {entity.metadata.tags && entity.metadata.tags.map(t => ( - + ))} ), @@ -150,10 +156,12 @@ export const CatalogTable = ({ columns={columns} options={{ paging: true, - pageSize: 10, + pageSize: 20, actionsColumnIndex: -1, loadingType: 'linear', showEmptyDataSourceMessage: !loading, + padding: 'dense', + pageSizeOptions: [20, 50, 100], }} title={`${titlePreamble} (${(entities && entities.length) || 0})`} data={entities} From 6627b626f8a3051a42c3fee5d513947d0d48d56b Mon Sep 17 00:00:00 2001 From: Tim Date: Thu, 5 Nov 2020 04:11:00 -0700 Subject: [PATCH 075/100] Fix double divider on InfoCard (#3240) Changeset Co-authored-by: Tim Hansen --- .changeset/silent-dodos-repeat.md | 5 +++ .../core/src/layout/InfoCard/InfoCard.tsx | 33 +++++++++---------- 2 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 .changeset/silent-dodos-repeat.md diff --git a/.changeset/silent-dodos-repeat.md b/.changeset/silent-dodos-repeat.md new file mode 100644 index 0000000000..04978406f3 --- /dev/null +++ b/.changeset/silent-dodos-repeat.md @@ -0,0 +1,5 @@ +--- +'@backstage/core': patch +--- + +Fix divider prop not respected on InfoCard diff --git a/packages/core/src/layout/InfoCard/InfoCard.tsx b/packages/core/src/layout/InfoCard/InfoCard.tsx index d13a94375f..5d77f4f34a 100644 --- a/packages/core/src/layout/InfoCard/InfoCard.tsx +++ b/packages/core/src/layout/InfoCard/InfoCard.tsx @@ -143,7 +143,7 @@ type Props = { export const InfoCard = ({ title, subheader, - divider, + divider = true, deepLink, slackChannel = '#backstage', variant, @@ -190,23 +190,20 @@ export const InfoCard = ({ {title && ( - <> - - - + )} {actionsTopRight && ( {actionsTopRight} From b0cb451f5db14681812fdf80a530b19307beb1df Mon Sep 17 00:00:00 2001 From: Iain Billett Date: Thu, 5 Nov 2020 12:03:13 +0000 Subject: [PATCH 076/100] Chart updates (#3241) * Allow deployments to use private images The docker credentials secret can be created by: kubectl create secret docker-registry # args * Update db password secret on update too Support changing DB password on upgrade. * Update Readme * How to use private docker repos * Clear up some confusion around the ca configmap name --- contrib/chart/backstage/README.md | 24 ++++++++++++++++--- .../templates/backend-deployment.yaml | 4 ++++ .../templates/frontend-deployment.yaml | 4 ++++ .../templates/lighthouse-deployment.yaml | 4 ++++ .../templates/postgresql-password-secret.yaml | 4 ++-- 5 files changed, 35 insertions(+), 5 deletions(-) diff --git a/contrib/chart/backstage/README.md b/contrib/chart/backstage/README.md index 8b922a6b56..7b60062265 100644 --- a/contrib/chart/backstage/README.md +++ b/contrib/chart/backstage/README.md @@ -125,12 +125,14 @@ lighthouse: ``` -For the CA, create a `configMap` named `-postgres-ca` with a file called `ca.crt`: +For the CA, create a `configMap` named `--postgres-ca` with a file called `ca.crt`: ``` -kubectl create configmap my-backstage --from-file=ca.crt" +kubectl create configmap my-company-backstage-postgres-ca --from-file=ca.crt" ``` +> Where the release name contains the chart name "backstage" then only the release name will be used. + Now install the helm chart: ``` @@ -155,10 +157,26 @@ backend: lighthouse: image: - repository: tag: ``` +### Use a private docker repo + +Create a docker-registry secret + +``` +kubectl create secret docker-registry # args +``` + +> For private images on docker hub --docker-server can be set to docker.io + +Reference the secret in your chart values + +```yaml +dockerRegistrySecretName: +``` + ### Different namespace To install the charts a specific namespace use `--namespace `: diff --git a/contrib/chart/backstage/templates/backend-deployment.yaml b/contrib/chart/backstage/templates/backend-deployment.yaml index c57764db8e..99ec955242 100644 --- a/contrib/chart/backstage/templates/backend-deployment.yaml +++ b/contrib/chart/backstage/templates/backend-deployment.yaml @@ -20,6 +20,10 @@ spec: component: backend spec: + {{- if .Values.dockerRegistrySecretName }} + imagePullSecrets: + - name: {{ .Values.dockerRegistrySecretName }} + {{- end}} containers: - name: {{ .Chart.Name }}-backend image: {{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }} diff --git a/contrib/chart/backstage/templates/frontend-deployment.yaml b/contrib/chart/backstage/templates/frontend-deployment.yaml index a5d84be2b2..5430ef041f 100644 --- a/contrib/chart/backstage/templates/frontend-deployment.yaml +++ b/contrib/chart/backstage/templates/frontend-deployment.yaml @@ -20,6 +20,10 @@ spec: component: frontend spec: + {{- if .Values.dockerRegistrySecretName }} + imagePullSecrets: + - name: {{ .Values.dockerRegistrySecretName }} + {{- end}} containers: - name: {{ .Chart.Name }}-frontend image: {{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }} diff --git a/contrib/chart/backstage/templates/lighthouse-deployment.yaml b/contrib/chart/backstage/templates/lighthouse-deployment.yaml index 70341a2a22..13bb8eadbb 100644 --- a/contrib/chart/backstage/templates/lighthouse-deployment.yaml +++ b/contrib/chart/backstage/templates/lighthouse-deployment.yaml @@ -21,6 +21,10 @@ spec: component: lighthouse-audit-service spec: + {{- if .Values.dockerRegistrySecretName }} + imagePullSecrets: + - name: {{ .Values.dockerRegistrySecretName }} + {{- end}} containers: - name: lighthouse-audit-service image: {{ .Values.lighthouse.image.repository }}:{{ .Values.lighthouse.image.tag }} diff --git a/contrib/chart/backstage/templates/postgresql-password-secret.yaml b/contrib/chart/backstage/templates/postgresql-password-secret.yaml index 9685130a03..e53369adb9 100644 --- a/contrib/chart/backstage/templates/postgresql-password-secret.yaml +++ b/contrib/chart/backstage/templates/postgresql-password-secret.yaml @@ -8,7 +8,7 @@ metadata: labels: release: {{ .Release.Name }} annotations: - "helm.sh/hook": "pre-install" + "helm.sh/hook": "pre-install,pre-upgrade" "helm.sh/hook-delete-policy": "before-hook-creation" data: postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }} @@ -23,7 +23,7 @@ metadata: labels: release: {{ .Release.Name }} annotations: - "helm.sh/hook": "pre-install" + "helm.sh/hook": "pre-install,pre-upgrade" "helm.sh/hook-delete-policy": "before-hook-creation" data: postgresql-password: {{ .Values.lighthouse.database.connection.password | b64enc }} From 8683b1af3808f48e8402653cd826dcff7de2e7ad Mon Sep 17 00:00:00 2001 From: Abhishek Jakhar Date: Thu, 5 Nov 2020 17:34:42 +0530 Subject: [PATCH 077/100] fix: tutorials markdown (#3244) --- docs/tutorials/journey.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/tutorials/journey.md b/docs/tutorials/journey.md index 7627920a75..664d4b77d3 100644 --- a/docs/tutorials/journey.md +++ b/docs/tutorials/journey.md @@ -264,14 +264,9 @@ release of Sam's plugin specifies a dependency on Backstage with a minimum version set to the same release as the one were the annotation was added to the core schema. -

- - # 9. Revenge of the Sam Sam, now in full control of all theme tunes in Backstage, releases v2.0.1, which switches all tracks to 4uLU6hMCjMI75M1A2tKUQC. Sam wanted to do something more nefarious, but since Backstage sandboxes sensitive actions and is mostly read-only with strict CSP, Sam's hands were tied. - -
From 3f05616bf563e432586e3449d9e130b1eb47fcf0 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Thu, 5 Nov 2020 13:05:05 +0100 Subject: [PATCH 078/100] fix text color of tech-radar footer (#3245) --- .changeset/smooth-hairs-breathe.md | 5 +++++ .../tech-radar/src/components/RadarFooter/RadarFooter.tsx | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/smooth-hairs-breathe.md diff --git a/.changeset/smooth-hairs-breathe.md b/.changeset/smooth-hairs-breathe.md new file mode 100644 index 0000000000..2849a1d4b7 --- /dev/null +++ b/.changeset/smooth-hairs-breathe.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-tech-radar': patch +--- + +Make the footer color of the tech-radar work in both light and dark theme. diff --git a/plugins/tech-radar/src/components/RadarFooter/RadarFooter.tsx b/plugins/tech-radar/src/components/RadarFooter/RadarFooter.tsx index ced1ab8054..219db714af 100644 --- a/plugins/tech-radar/src/components/RadarFooter/RadarFooter.tsx +++ b/plugins/tech-radar/src/components/RadarFooter/RadarFooter.tsx @@ -15,19 +15,19 @@ */ import React from 'react'; -import { makeStyles, Theme } from '@material-ui/core'; +import { makeStyles } from '@material-ui/core'; export type Props = { x: number; y: number; }; -const useStyles = makeStyles(() => ({ +const useStyles = makeStyles(theme => ({ text: { pointerEvents: 'none', userSelect: 'none', fontSize: '10px', - fill: '#000', + fill: theme.palette.text.secondary, }, })); From e24e46b0b92703226d33a0d079e8d8a10688b370 Mon Sep 17 00:00:00 2001 From: Mateusz Lewtak Date: Thu, 5 Nov 2020 13:40:25 +0100 Subject: [PATCH 079/100] Feat: update plugins to new versions --- package.json | 7 -- packages/app/package.json | 6 +- yarn.lock | 195 +++++--------------------------------- 3 files changed, 27 insertions(+), 181 deletions(-) diff --git a/package.json b/package.json index da1d4de154..505ee0caad 100644 --- a/package.json +++ b/package.json @@ -36,13 +36,6 @@ "plugins/*" ] }, - "resolutions": { - "**/@roadiehq/backstage-plugin-*/@backstage/catalog-model": "0.2.0", - "**/@roadiehq/backstage-plugin-*/@backstage/core": "0.2.0", - "**/@roadiehq/backstage-plugin-*/@backstage/core-api": "0.2.0", - "**/@roadiehq/backstage-plugin-*/@backstage/plugin-catalog": "0.2.0", - "**/@roadiehq/backstage-plugin-*/@backstage/theme": "0.2.0" - }, "version": "1.0.0", "devDependencies": { "@changesets/cli": "^2.11.0", diff --git a/packages/app/package.json b/packages/app/package.json index 514f8867c9..5cf74b0fbb 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -34,9 +34,9 @@ "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@octokit/rest": "^18.0.0", - "@roadiehq/backstage-plugin-github-insights": "^0.2.10", - "@roadiehq/backstage-plugin-github-pull-requests": "^0.6.0", - "@roadiehq/backstage-plugin-travis-ci": "^0.2.6", + "@roadiehq/backstage-plugin-github-insights": "^0.2.12", + "@roadiehq/backstage-plugin-github-pull-requests": "^0.6.1", + "@roadiehq/backstage-plugin-travis-ci": "^0.2.7", "history": "^5.0.0", "prop-types": "^15.7.2", "react": "^16.12.0", diff --git a/yarn.lock b/yarn.lock index ddfccf7fd6..0f16311d80 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1289,153 +1289,6 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@backstage/catalog-model@^0.1.1-alpha.24": - version "0.2.0" - dependencies: - "@backstage/config" "^0.1.1" - "@types/json-schema" "^7.0.5" - "@types/yup" "^0.29.8" - json-schema "^0.2.5" - lodash "^4.17.15" - uuid "^8.0.0" - yup "^0.29.3" - -"@backstage/catalog-model@^0.1.1-alpha.25": - version "0.2.0" - dependencies: - "@backstage/config" "^0.1.1" - "@types/json-schema" "^7.0.5" - "@types/yup" "^0.29.8" - json-schema "^0.2.5" - lodash "^4.17.15" - uuid "^8.0.0" - yup "^0.29.3" - -"@backstage/core-api@^0.1.1-alpha.24": - version "0.2.0" - dependencies: - "@backstage/config" "^0.1.1" - "@backstage/test-utils" "^0.1.2" - "@backstage/theme" "^0.2.0" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - "@types/react" "^16.9" - prop-types "^15.7.2" - react "^16.12.0" - react-router-dom "6.0.0-beta.0" - react-use "^15.3.3" - zen-observable "^0.8.15" - -"@backstage/core@^0.1.1-alpha.24": - version "0.2.0" - dependencies: - "@backstage/config" "^0.1.1" - "@backstage/core-api" "^0.2.0" - "@backstage/theme" "^0.2.0" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.45" - "@types/react" "^16.9" - "@types/react-sparklines" "^1.7.0" - classnames "^2.2.6" - clsx "^1.1.0" - immer "^7.0.9" - lodash "^4.17.15" - material-table "^1.69.1" - prop-types "^15.7.2" - rc-progress "^3.0.0" - react "^16.12.0" - react-dom "^16.12.0" - react-helmet "6.1.0" - react-hook-form "^6.6.0" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-sparklines "^1.7.0" - react-syntax-highlighter "^13.5.1" - react-use "^15.3.3" - -"@backstage/core@^0.1.1-alpha.25": - version "0.2.0" - dependencies: - "@backstage/config" "^0.1.1" - "@backstage/core-api" "^0.2.0" - "@backstage/theme" "^0.2.0" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.45" - "@types/react" "^16.9" - "@types/react-sparklines" "^1.7.0" - classnames "^2.2.6" - clsx "^1.1.0" - immer "^7.0.9" - lodash "^4.17.15" - material-table "^1.69.1" - prop-types "^15.7.2" - rc-progress "^3.0.0" - react "^16.12.0" - react-dom "^16.12.0" - react-helmet "6.1.0" - react-hook-form "^6.6.0" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-sparklines "^1.7.0" - react-syntax-highlighter "^13.5.1" - react-use "^15.3.3" - -"@backstage/plugin-catalog@^0.1.1-alpha.24": - version "0.2.0" - dependencies: - "@backstage/catalog-model" "^0.2.0" - "@backstage/core" "^0.2.0" - "@backstage/plugin-scaffolder" "^0.2.0" - "@backstage/plugin-techdocs" "^0.2.0" - "@backstage/theme" "^0.2.0" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.45" - "@types/react" "^16.9" - classnames "^2.2.6" - moment "^2.26.0" - react "^16.13.1" - react-dom "^16.13.1" - react-helmet "6.1.0" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-use "^15.3.3" - swr "^0.3.0" - -"@backstage/plugin-catalog@^0.1.1-alpha.25": - version "0.2.0" - dependencies: - "@backstage/catalog-model" "^0.2.0" - "@backstage/core" "^0.2.0" - "@backstage/plugin-scaffolder" "^0.2.0" - "@backstage/plugin-techdocs" "^0.2.0" - "@backstage/theme" "^0.2.0" - "@material-ui/core" "^4.11.0" - "@material-ui/icons" "^4.9.1" - "@material-ui/lab" "4.0.0-alpha.45" - "@types/react" "^16.9" - classnames "^2.2.6" - moment "^2.26.0" - react "^16.13.1" - react-dom "^16.13.1" - react-helmet "6.1.0" - react-router "6.0.0-beta.0" - react-router-dom "6.0.0-beta.0" - react-use "^15.3.3" - swr "^0.3.0" - -"@backstage/theme@^0.1.1-alpha.24": - version "0.2.0" - dependencies: - "@material-ui/core" "^4.11.0" - -"@backstage/theme@^0.1.1-alpha.25": - version "0.2.0" - dependencies: - "@material-ui/core" "^4.11.0" - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -3797,14 +3650,14 @@ resolved "https://registry.npmjs.org/@rjsf/material-ui/-/material-ui-2.4.0.tgz#1b5859298bf3f61137d7b05084f058a775d6fd73" integrity sha512-U8F/suzg4MuV+8mK1/ufs0Y6c3O8hc1wnuD2IKoOVJvegGfz5JCafyoyGAW6iyuT1DZBMPzVWEqfiuYPmoE7pw== -"@roadiehq/backstage-plugin-github-insights@^0.2.10": - version "0.2.10" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-0.2.10.tgz#f58298486183e2af36b2c292d6145f2a35eb6fdb" - integrity sha512-vmIbjehJpoXjuLNX5cYbZTG6U0tHVQWrGUA5fYWQtAIVC0cmwbkuvW8WoNymAietGmlshm+0rV6MK0/vd2iu4A== +"@roadiehq/backstage-plugin-github-insights@^0.2.12": + version "0.2.12" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-insights/-/backstage-plugin-github-insights-0.2.12.tgz#aeda6306769f376cf6b5b9d74268b060a0f4e764" + integrity sha512-f9g5ajVWQkywoYo0zDUZV3g0SPxOTi3MvMuhUvgaZ/XKJr9mBZTe5qHnEYBSHOCB88l0Y2g0qHNdbjXhbFpokQ== dependencies: - "@backstage/catalog-model" "^0.1.1-alpha.25" - "@backstage/core" "^0.1.1-alpha.25" - "@backstage/theme" "^0.1.1-alpha.25" + "@backstage/catalog-model" "^0.2.0" + "@backstage/core" "^0.2.0" + "@backstage/theme" "^0.2.0" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" "@material-ui/lab" "4.0.0-alpha.45" @@ -3818,15 +3671,15 @@ react-use "^15.3.3" remark-gfm "^1.0.0" -"@roadiehq/backstage-plugin-github-pull-requests@^0.6.0": - version "0.6.0" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-0.6.0.tgz#5d39eb237aa39b76bb7e5e867355abeccac7e5ff" - integrity sha512-cwTofvhSzb3FyyJ/HRixPkn9Ayg3x4tv6FlHSswlMEDx8EJv0hmfNXVps2QAG/82JgACTxmXKNQRnPQ0+TLiOw== +"@roadiehq/backstage-plugin-github-pull-requests@^0.6.1": + version "0.6.1" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-github-pull-requests/-/backstage-plugin-github-pull-requests-0.6.1.tgz#bce3ce93af7b2f6c38d4665c8a0d8a6b2eaa4212" + integrity sha512-3r0BBV6kRlbrlfVA/G7Tc0xbw9A+9roihspCaV/yhhqXgk/ik5v6ftEautlx45+gKaFMp+jgmfKHqFgOdSyhZw== dependencies: - "@backstage/catalog-model" "^0.1.1-alpha.25" - "@backstage/core" "^0.1.1-alpha.25" - "@backstage/plugin-catalog" "^0.1.1-alpha.25" - "@backstage/theme" "^0.1.1-alpha.25" + "@backstage/catalog-model" "^0.2.0" + "@backstage/core" "^0.2.0" + "@backstage/plugin-catalog" "^0.2.0" + "@backstage/theme" "^0.2.0" "@material-ui/core" "^4.11.0" "@material-ui/icons" "^4.9.1" "@material-ui/lab" "^4.0.0-alpha.56" @@ -3840,16 +3693,16 @@ react-router "6.0.0-beta.0" react-use "^15.3.3" -"@roadiehq/backstage-plugin-travis-ci@^0.2.6": - version "0.2.6" - resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-0.2.6.tgz#c253d4009b7150faa285786df7104f04cf99d4c2" - integrity sha512-Zs7mPmJifz08vNsS4zDzupexCEKAxPtqT4Vh8DhFJrphsiYwSIdPjW5JWif/XQIx0025Ew/RwuyMtwz2V/iWZg== +"@roadiehq/backstage-plugin-travis-ci@^0.2.7": + version "0.2.7" + resolved "https://registry.npmjs.org/@roadiehq/backstage-plugin-travis-ci/-/backstage-plugin-travis-ci-0.2.7.tgz#bc7968b461016b2710794d10766266de9ab4f759" + integrity sha512-uXF5t2uZqd9TNGFSMYlyk6NAweVb5KLlM4GMiltattzxRWiqbCp5VumubrLTTsA8dvsWCrXWfhe95MStcUnl+A== dependencies: - "@backstage/catalog-model" "^0.1.1-alpha.24" - "@backstage/core" "^0.1.1-alpha.24" - "@backstage/core-api" "^0.1.1-alpha.24" - "@backstage/plugin-catalog" "^0.1.1-alpha.24" - "@backstage/theme" "^0.1.1-alpha.24" + "@backstage/catalog-model" "^0.2.0" + "@backstage/core" "^0.2.0" + "@backstage/core-api" "^0.2.0" + "@backstage/plugin-catalog" "^0.2.0" + "@backstage/theme" "^0.2.0" "@material-ui/core" "^4.9.1" "@material-ui/icons" "^4.9.1" "@material-ui/lab" "4.0.0-alpha.45" From 47a611f1155d2d994559513f15f23185cb5bd3f8 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Thu, 5 Nov 2020 14:58:48 +0100 Subject: [PATCH 080/100] TechDocs: Remove techdocs-container package from mono-repo (#3230) * Move techdocs-container package to backstage/techdocs-container * Clean up codeowners * Remove unnecessary GitHub CI workflow * Modify path in docs for techdocs-container * Fix techdocs-cli URL * Remove techdocs packages from docs/support/packages --- .github/CODEOWNERS | 1 - .github/workflows/techdocs.yml | 33 ------- docs/features/techdocs/FAQ.md | 5 +- docs/features/techdocs/README.md | 10 +- docs/features/techdocs/concepts.md | 2 +- docs/support/project-structure.md | 6 -- .../blog/2020-09-08-announcing-tech-docs.md | 2 +- packages/techdocs-container/Dockerfile | 28 ------ packages/techdocs-container/README.md | 31 ------ .../techdocs-container/bin/scripts/plantuml | 0 .../techdocs-container/mock-docs/.gitignore | 1 - .../mock-docs/docs/index.md | 99 ------------------- .../techdocs-container/mock-docs/mkdocs.yml | 9 -- .../mock-docs/sub-docs/docs/index.md | 1 - .../mock-docs/sub-docs/mkdocs.yml | 4 - 15 files changed, 8 insertions(+), 224 deletions(-) delete mode 100644 .github/workflows/techdocs.yml delete mode 100644 packages/techdocs-container/Dockerfile delete mode 100644 packages/techdocs-container/README.md delete mode 100644 packages/techdocs-container/bin/scripts/plantuml delete mode 100644 packages/techdocs-container/mock-docs/.gitignore delete mode 100644 packages/techdocs-container/mock-docs/docs/index.md delete mode 100644 packages/techdocs-container/mock-docs/mkdocs.yml delete mode 100644 packages/techdocs-container/mock-docs/sub-docs/docs/index.md delete mode 100644 packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index cf28c55cb3..7cef5afce0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -11,6 +11,5 @@ /plugins/techdocs @backstage/techdocs-core /plugins/techdocs-backend @backstage/techdocs-core /packages/techdocs-cli @backstage/techdocs-core -/packages/techdocs-container @backstage/techdocs-core /.github/workflows/techdocs.yml @backstage/techdocs-core /.changeset/cost-insights-* @backstage/silver-lining diff --git a/.github/workflows/techdocs.yml b/.github/workflows/techdocs.yml deleted file mode 100644 index 9b5ea50217..0000000000 --- a/.github/workflows/techdocs.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: TechDocs - -on: - pull_request: - paths: - - '.github/workflows/techdocs.yml' - - 'packages/techdocs-container/**' - - 'packages/techdocs-cli/**' - - 'plugins/techdocs/**' - - 'plugins/techdocs-backend/**' - -jobs: - build: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.7] - - env: - TECHDOCS_CORE_PATH: ./packages/techdocs-container/techdocs-core - - name: Python ${{ matrix.node-version }} on ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - - # Build Docker Image - - name: Build Docker image - uses: docker/build-push-action@v1.1.0 - with: - path: packages/techdocs-container - push: false diff --git a/docs/features/techdocs/FAQ.md b/docs/features/techdocs/FAQ.md index 257d6e6f7a..de424778cb 100644 --- a/docs/features/techdocs/FAQ.md +++ b/docs/features/techdocs/FAQ.md @@ -17,9 +17,8 @@ This page answers frequently asked questions about [TechDocs](README.md). TechDocs is using [MkDocs](https://www.mkdocs.org/) to build project documentation under the hood. Documentation built with the -[techdocs-container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) -is using the MkDocs -[Material Theme](https://github.com/squidfunk/mkdocs-material). +[techdocs-container](https://github.com/backstage/techdocs-container) is using +the MkDocs [Material Theme](https://github.com/squidfunk/mkdocs-material). #### What is the mkdocs-techdocs-core plugin? diff --git a/docs/features/techdocs/README.md b/docs/features/techdocs/README.md index a16776868a..f1cf637997 100644 --- a/docs/features/techdocs/README.md +++ b/docs/features/techdocs/README.md @@ -109,8 +109,8 @@ migrate Spotify's existing TechDocs features to open source. | ------------------------------------------- | -------------------------------------------------------- | | Frontend | [`@backstage/plugin-techdocs`][techdocs/frontend] | | Backend | [`@backstage/plugin-techdocs-backend`][techdocs/backend] | -| Docker Container (for generating doc sites) | [`packages/techdocs-container`][techdocs/container] | -| CLI (for local development) | [`packages/techdocs-cli`][techdocs/cli] | +| Docker Container (for generating doc sites) | [`techdocs-container`][techdocs/container] | +| CLI (for local development) | [`@techdocs/cli`][techdocs/cli] | [getting started]: getting-started.md [concepts]: concepts.md @@ -120,7 +120,5 @@ migrate Spotify's existing TechDocs features to open source. https://github.com/backstage/backstage/blob/master/plugins/techdocs [techdocs/backend]: https://github.com/backstage/backstage/blob/master/plugins/techdocs-backend -[techdocs/container]: - https://github.com/backstage/backstage/blob/master/packages/techdocs-container -[techdocs/cli]: - https://github.com/backstage/backstage/blob/master/packages/techdocs-cli +[techdocs/container]: https://github.com/backstage/techdocs-container +[techdocs/cli]: https://github.com/backstage/techdocs-cli diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md index ed1fc2220c..c614965ab9 100644 --- a/docs/features/techdocs/concepts.md +++ b/docs/features/techdocs/concepts.md @@ -23,7 +23,7 @@ The TechDocs container is a Docker container available at pages, including stylesheets and scripts from Python flavored Markdown, through MkDocs. -[TechDocs Container](https://github.com/backstage/backstage/blob/master/packages/techdocs-container/README.md) +[TechDocs Container](https://github.com/backstage/techdocs-container) ### TechDocs publisher diff --git a/docs/support/project-structure.md b/docs/support/project-structure.md index 9bf143e0f2..034fba4cb8 100644 --- a/docs/support/project-structure.md +++ b/docs/support/project-structure.md @@ -168,12 +168,6 @@ are separated out into their own folder, see further down. package. The Backstage Storybook is found [here](https://backstage.io/storybook) -- [`techdocs-cli/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) - - Used for verifying TechDocs locally. - -- [`techdocs-container/`](https://github.com/backstage/backstage/tree/master/packages/techdocs-container) - - Used by the `techdocs-cli` - - [`test-utils-core/`](https://github.com/backstage/backstage/tree/master/packages/test-utils-core) - [`test-utils/`](https://github.com/backstage/backstage/tree/master/packages/test-utils) diff --git a/microsite/blog/2020-09-08-announcing-tech-docs.md b/microsite/blog/2020-09-08-announcing-tech-docs.md index ecf678a5bd..ceab17d7be 100644 --- a/microsite/blog/2020-09-08-announcing-tech-docs.md +++ b/microsite/blog/2020-09-08-announcing-tech-docs.md @@ -23,7 +23,7 @@ But this is just one way to do it. Today we’re most excited for what the open If you go to [GitHub](https://github.com/backstage/backstage/tree/master/plugins) now, you’ll find everything you need to start collaborating with us to build out the docs-like-code Backstage plugin — we’ll call it TechDocs in the open as well. -You’ll find the code in [techdocs](https://github.com/backstage/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/backstage/backstage/tree/master/packages/techdocs-cli) and [techdocs-container](https://github.com/backstage/backstage/tree/master/packages/techdocs-container).) +You’ll find the code in [techdocs](https://github.com/backstage/backstage/tree/master/plugins/techdocs) (frontend) and [techdocs-backend](https://github.com/backstage/backstage/tree/master/plugins/techdocs-backend). (There are also two separate packages [techdocs-cli](https://github.com/backstage/techdocs-cli) and [techdocs-container](https://github.com/backstage/techdocs-container).) You’ll find issues to work on in the [issues queue](https://github.com/backstage/backstage/issues?q=is%3Aissue+is%3Aopen+label%3A%22docs-like-code%22+label%3A%22help+wanted%22), typically starting with TechDocs: and labeled with docs-like-code, some labeled good first issue. Feel free to add your own issues, of course. diff --git a/packages/techdocs-container/Dockerfile b/packages/techdocs-container/Dockerfile deleted file mode 100644 index c30db043cd..0000000000 --- a/packages/techdocs-container/Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2020 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM python:3.8-alpine - - -RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig - -RUN curl -o plantuml.jar -L http://sourceforge.net/projects/plantuml/files/plantuml.1.2020.16.jar/download && echo "c789ace48347c43073232b1458badc5810c01fe8 plantuml.jar" | sha1sum -c - && mv plantuml.jar /opt/plantuml.jar -RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.11 - -# Create script to call plantuml.jar from a location in path - -RUN echo $'#!/bin/sh\n\njava -jar '/opt/plantuml.jar' ${@}' >> /usr/local/bin/plantuml -RUN chmod 755 /usr/local/bin/plantuml - -ENTRYPOINT [ "mkdocs" ] diff --git a/packages/techdocs-container/README.md b/packages/techdocs-container/README.md deleted file mode 100644 index 53a518fa97..0000000000 --- a/packages/techdocs-container/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# techdocs-container - -This is the Docker container that powers the creation of static documentation sites that are supported by [TechDocs](https://github.com/backstage/backstage/blob/master/plugins/techdocs). - -## Getting Started - -Using the TechDocs CLI, we can invoke the latest version of `techdocs-container` via Docker Hub: - -```bash -npx techdocs-cli serve -``` - -## Local Development - -```bash -docker build . -t mkdocs:local-dev - -docker run -w /content -v $(pwd)/mock-docs:/content -p 8000:8000 -it mkdocs:local-dev serve -a 0.0.0.0:8000 -``` - -Then open up `http://localhost:8000` on your local machine. - -## Publishing - -This container is published on DockerHub - https://hub.docker.com/r/spotify/techdocs - -The publishing is configured by [Automated Builds](https://hub.docker.com/repository/docker/spotify/techdocs/builds/edit) feature on Docker Hub which is triggered from GitHub (on new commits and releases). @backstage/techdocs-core team has access to the settings. - -The `latest` tag on Docker Hub points to the recent commits in the `master` branch. The [version tags](https://hub.docker.com/r/spotify/techdocs/tags) (e.g. v0.1.1-alpha.24) point to the GitHub tags created from [releases](https://github.com/backstage/backstage/releases) of this GitHub repository. - -Note: We recommend using a specific version of the container instead of `latest` release for stability and avoiding unexpected changes. diff --git a/packages/techdocs-container/bin/scripts/plantuml b/packages/techdocs-container/bin/scripts/plantuml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/techdocs-container/mock-docs/.gitignore b/packages/techdocs-container/mock-docs/.gitignore deleted file mode 100644 index 45ddf0ae39..0000000000 --- a/packages/techdocs-container/mock-docs/.gitignore +++ /dev/null @@ -1 +0,0 @@ -site/ diff --git a/packages/techdocs-container/mock-docs/docs/index.md b/packages/techdocs-container/mock-docs/docs/index.md deleted file mode 100644 index 94a53acfa3..0000000000 --- a/packages/techdocs-container/mock-docs/docs/index.md +++ /dev/null @@ -1,99 +0,0 @@ -## hello mock docs - -!!! test -Testing something - -Abbreviations: -Some text about MOCDOC - -This is a paragraph. -{: #test_id .test_class } - -Apple -: Pomaceous fruit of plants of the genus Malus in -the family Rosaceae. - -```javascript -import { test } from 'something'; - -const addThingToThing = (a, b) a + b; -``` - -- [abc](#abc) -- [xyz](#xyz) - -## abc - -This is a b c. - -## xyz - -This is x y z. - -# The attack plan - -{% dot attack_plan.svg - digraph G { - rankdir=LR - Earth [peripheries=2] - Mars - Earth -> Mars - } -%} - -```graphviz dot attack_plan.svg -digraph G { - rankdir=LR - Earth [peripheries=2] - Mars - Earth -> Mars -} -``` - -# PlantUML Samples - -```plantuml classes="uml myDiagram" alt="Diagram placeholder" title="My diagram" -@startuml - Goofy -> MickeyMouse: calls - Goofy <-- MickeyMouse: responds -@enduml -``` - -:bulb: - -=== "JavaScript" - - ```javascript - import { test } from 'something'; - - const addThingToThing = (a, b) a + b; - ``` - -=== "Java" - - ```java - public void function() { - test(); - } - ``` - -```java tab="java" - public void function() { - test(); - } -``` - -```java tab="java 2" - public void function() { - test(); - } -``` - -```javascript -import { test } from 'something'; - -const addThingToThing = (a, b) a + b; -``` - - -*[MOCDOC]: Mock Documentation diff --git a/packages/techdocs-container/mock-docs/mkdocs.yml b/packages/techdocs-container/mock-docs/mkdocs.yml deleted file mode 100644 index d769fddfcf..0000000000 --- a/packages/techdocs-container/mock-docs/mkdocs.yml +++ /dev/null @@ -1,9 +0,0 @@ -site_name: 'mock-docs' -site_description: 'mock-docs site description' - -nav: - - Home: index.md - - SubDocs: '!include ./sub-docs/mkdocs.yml' - -plugins: - - techdocs-core diff --git a/packages/techdocs-container/mock-docs/sub-docs/docs/index.md b/packages/techdocs-container/mock-docs/sub-docs/docs/index.md deleted file mode 100644 index 65c6644ef8..0000000000 --- a/packages/techdocs-container/mock-docs/sub-docs/docs/index.md +++ /dev/null @@ -1 +0,0 @@ -### This is an md file in another docs folder using the [MkDocs Monorepo Plugin](https://github.com/spotify/mkdocs-monorepo-plugin) diff --git a/packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml b/packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml deleted file mode 100644 index 4490ddbefa..0000000000 --- a/packages/techdocs-container/mock-docs/sub-docs/mkdocs.yml +++ /dev/null @@ -1,4 +0,0 @@ -site_name: subdocs - -nav: - - Home 2: 'index.md' From 728f772d15fb93baac034af2032f3c1a4150ea34 Mon Sep 17 00:00:00 2001 From: Philipp Hugenroth Date: Thu, 5 Nov 2020 15:05:29 +0100 Subject: [PATCH 081/100] CLI: Bypass build error to complete plugin creation (#3242) * Bypass build error to complete plugin creation * Stop building and linting plugin if error occures --- .../src/commands/create-plugin/createPlugin.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index c9f8b3a81d..a2005c5580 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -140,15 +140,21 @@ async function buildPlugin(pluginFolder: string) { 'yarn build', ]; for (const command of commands) { - await Task.forItem('executing', command, async () => { - process.chdir(pluginFolder); - - await exec(command).catch(error => { + try { + await Task.forItem('executing', command, async () => { + process.chdir(pluginFolder); + await exec(command); + }).catch(error => { process.stdout.write(error.stderr); process.stdout.write(error.stdout); - throw new Error(`Could not execute command ${chalk.cyan(command)}`); + throw new Error( + `Warning: Could not execute command ${chalk.cyan(command)}`, + ); }); - }); + } catch (error) { + Task.error(error.message); + break; + } } } From e677dbd3c07ca40e8f676f4cf55c49679d8f85d9 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Wed, 4 Nov 2020 11:17:46 +0100 Subject: [PATCH 082/100] Move techdocs-cli to backstage/techdocs-cli repository --- packages/techdocs-cli/.eslintrc.js | 6 - packages/techdocs-cli/CHANGELOG.md | 17 --- packages/techdocs-cli/README.md | 48 -------- packages/techdocs-cli/bin/build.sh | 33 ----- packages/techdocs-cli/bin/techdocs-cli | 36 ------ packages/techdocs-cli/package.json | 50 -------- packages/techdocs-cli/src/index.ts | 126 -------------------- packages/techdocs-cli/src/lib/httpServer.ts | 79 ------------ 8 files changed, 395 deletions(-) delete mode 100644 packages/techdocs-cli/.eslintrc.js delete mode 100644 packages/techdocs-cli/CHANGELOG.md delete mode 100644 packages/techdocs-cli/README.md delete mode 100755 packages/techdocs-cli/bin/build.sh delete mode 100755 packages/techdocs-cli/bin/techdocs-cli delete mode 100644 packages/techdocs-cli/package.json delete mode 100644 packages/techdocs-cli/src/index.ts delete mode 100644 packages/techdocs-cli/src/lib/httpServer.ts diff --git a/packages/techdocs-cli/.eslintrc.js b/packages/techdocs-cli/.eslintrc.js deleted file mode 100644 index 503c048748..0000000000 --- a/packages/techdocs-cli/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - extends: [require.resolve('@backstage/cli/config/eslint.backend')], - rules: { - 'no-console': 0, - }, -}; diff --git a/packages/techdocs-cli/CHANGELOG.md b/packages/techdocs-cli/CHANGELOG.md deleted file mode 100644 index 9add3bb173..0000000000 --- a/packages/techdocs-cli/CHANGELOG.md +++ /dev/null @@ -1,17 +0,0 @@ -# @techdocs/cli - -## 0.1.2 - -### Patch Changes - -- Updated dependencies [28edd7d29] -- Updated dependencies [3472c8be7] -- Updated dependencies [1d0aec70f] -- Updated dependencies [a3840bed2] -- Updated dependencies [72f6cda35] -- Updated dependencies [8c2b76e45] -- Updated dependencies [cba4e4d97] -- Updated dependencies [8afce088a] -- Updated dependencies [9a3b3dbf1] -- Updated dependencies [7bbeb049f] - - @backstage/cli@0.2.0 diff --git a/packages/techdocs-cli/README.md b/packages/techdocs-cli/README.md deleted file mode 100644 index 031f26fd93..0000000000 --- a/packages/techdocs-cli/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# TechDocs CLI - -Check out the [TechDocs README](https://github.com/backstage/backstage/blob/master/plugins/techdocs/README.md) to learn more. - -**WIP: This cli is a work in progress. It is not ready for use yet. Follow our progress on [the Backstage Discord](https://discord.gg/MUpMjP2) under #docs-like-code or on [our GitHub Milestone](https://github.com/backstage/backstage/milestone/15).** - -## Prerequisities - -Run the following command from the project root: - -```bash -yarn install -``` - -## Run TechDocs CLI - -You'll need Docker installed and running to use this. - -```bash -cd packages/techdocs-container/mock-docs - -# To get a view of your docs in Backstage, use: -npx techdocs-cli serve - -# To view the raw mkdocs site (without Backstage), use: -npx techdocs-cli serve:mkdocs -``` - -If you run `npx techdocs-cli serve` you should have a `localhost:3000` serving TechDocs in Backstage, as well as `localhost:8000` serving Mkdocs (which won't open up and be exposed to the user). - -If running `npx techdocs-cli serve:mkdocs` you will have `localhost:8000` exposed, serving Mkdocs. - -Happy hacking! - -## Deploying a new version - -Deploying the Node packages to NPM happens automatically on merge to `master` through GitHub Actions. The deployment happens through Lerna which determines which packages throughout the Backstage project have changed. In our case, the package is called `techdocs-cli` in the repository but `@techdocs/cli` in the NPM registry. - -> Note: Once a package is published under a version, any subsequent changes will not override that version. You will need to bump up the version across the entire Backstage repository, which can be done through Lerna (see the command below). - -In order to bump up all packages, go to the root of the Backstage repository. To see the current version see the `lerna.json` under the `version` key. To then update all the versions (locally on your machine), run the following: - -```bash -git checkout -b bump-up-version -yarn lerna version --no-push --allow-branch --yes -``` - -Upon being merged to master, Lerna will then automatically publish these packages as configured by the Backstage core team. diff --git a/packages/techdocs-cli/bin/build.sh b/packages/techdocs-cli/bin/build.sh deleted file mode 100755 index 0a3dfeb96d..0000000000 --- a/packages/techdocs-cli/bin/build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Copyright 2020 Spotify AB -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -e - -TECHDOCS_PREVIEW_SOURCE=../../plugins/techdocs/dist -TECHDOCS_PREVIEW_DEST=../../packages/techdocs-cli/dist/techdocs-preview-bundle - -# Build the CLI -yarn run backstage-cli -- build --outputs cjs - -# Create export of the TechDocs plugin -APP_CONFIG_techdocs_storageUrl='"http://localhost:3000/api"' yarn workspace @backstage/plugin-techdocs export - -# Copy over export to techdocs-cli dist/ folder -cp -r $TECHDOCS_PREVIEW_SOURCE $TECHDOCS_PREVIEW_DEST - -# Write to console -echo "[techdocs-cli]: Built the dist/ folder" -echo "[techdocs-cli]: Imported @backstage/plugin-techdocs dist/ folder into techdocs-preview-bundle/" diff --git a/packages/techdocs-cli/bin/techdocs-cli b/packages/techdocs-cli/bin/techdocs-cli deleted file mode 100755 index 9818edf417..0000000000 --- a/packages/techdocs-cli/bin/techdocs-cli +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/* eslint-disable no-restricted-syntax */ -const path = require('path'); - -// Figure out whether we're running inside the backstage repo or as an installed dependency -const isLocal = require('fs').existsSync(path.resolve(__dirname, '../src')); - -if (!isLocal) { - require('..'); -} else { - require('ts-node').register({ - transpileOnly: true, - project: path.resolve(__dirname, '../../../tsconfig.json'), - compilerOptions: { - module: 'CommonJS', - }, - }); - - require('../src'); -} diff --git a/packages/techdocs-cli/package.json b/packages/techdocs-cli/package.json deleted file mode 100644 index ee3785b0cc..0000000000 --- a/packages/techdocs-cli/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "@techdocs/cli", - "description": "CLI for running TechDocs locally.", - "version": "0.1.2", - "private": false, - "publishConfig": { - "access": "public" - }, - "repository": { - "type": "git", - "url": "https://github.com/backstage/backstage", - "directory": "packages/techdocs-cli" - }, - "keywords": [ - "backstage", - "techdocs" - ], - "license": "Apache-2.0", - "main": "dist/index.cjs.js", - "scripts": { - "build": "./bin/build.sh", - "lint": "backstage-cli lint", - "test": "backstage-cli test --passWithNoTests", - "clean": "backstage-cli clean", - "start": "nodemon --" - }, - "bin": { - "techdocs-cli": "bin/techdocs-cli" - }, - "devDependencies": { - "@types/serve-handler": "^6.1.0" - }, - "files": [ - "bin", - "dist" - ], - "nodemonConfig": { - "watch": "./src", - "exec": "bin/build && bin/techdocs-cli", - "ext": "ts" - }, - "dependencies": { - "@backstage/cli": "^0.2.0", - "commander": "^6.1.0", - "fs-extra": "^9.0.1", - "http-proxy": "^1.18.1", - "react-dev-utils": "^10.2.1", - "serve-handler": "^6.1.3" - } -} diff --git a/packages/techdocs-cli/src/index.ts b/packages/techdocs-cli/src/index.ts deleted file mode 100644 index 824bdb84fc..0000000000 --- a/packages/techdocs-cli/src/index.ts +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import { spawn, ChildProcess } from 'child_process'; -import program from 'commander'; -import { version } from '../package.json'; -import path from 'path'; -import HTTPServer from './lib/httpServer'; -import openBrowser from 'react-dev-utils/openBrowser'; - -const run = (name: string, args: string[] = []): ChildProcess => { - const [stdin, stdout, stderr] = [ - 'inherit' as const, - 'pipe' as const, - 'inherit' as const, - ]; - - const childProcess = spawn(name, args, { - stdio: [stdin, stdout, stderr], - shell: true, - env: { - ...process.env, - FORCE_COLOR: 'true', - }, - }); - - childProcess.once('error', error => { - console.error(error); - childProcess.kill(); - }); - - childProcess.once('exit', () => { - process.exit(0); - }); - - return childProcess; -}; - -const runMkdocsServer = (options?: { - devAddr: string; -}): Promise => { - const devAddr = options?.devAddr ?? '0.0.0.0:8000'; - - return new Promise(resolve => { - const childProcess = run('docker', [ - 'run', - '-it', - '-w', - '/content', - '-v', - `${process.cwd()}:/content`, - '-p', - '8000:8000', - 'spotify/techdocs', - 'serve', - '-a', - devAddr, - ]); - - childProcess.stdout?.on('data', rawData => { - const data = rawData.toString().split('\n')[0]; - console.log('[mkdocs] ', data); - - if (data.includes(`Serving on http://${devAddr}`)) { - resolve(childProcess); - } - }); - }); -}; - -const main = (argv: string[]) => { - program.name('techdocs-cli').version(version); - - program - .command('serve:mkdocs') - .description('Serve a documentation project locally') - .action(() => { - runMkdocsServer().then(() => { - openBrowser('http://localhost:8000'); - }); - }); - - program - .command('serve') - .description('Serve a documentation project locally') - .action(() => { - // Mkdocs server - const mkdocsServer = runMkdocsServer(); - - // Local Backstage Preview - const techdocsPreviewBundlePath = path.join( - /* eslint-disable-next-line no-restricted-syntax */ - __dirname, - '..', - 'dist', - 'techdocs-preview-bundle', - ); - - const httpServer = new HTTPServer(techdocsPreviewBundlePath, 3000) - .serve() - .catch(err => { - console.error(err); - mkdocsServer.then(childProcess => childProcess.kill()); - }); - - Promise.all([mkdocsServer, httpServer]).then(() => { - openBrowser('http://localhost:3000/docs/local-dev/'); - }); - }); - - program.parse(argv); -}; - -main(process.argv); diff --git a/packages/techdocs-cli/src/lib/httpServer.ts b/packages/techdocs-cli/src/lib/httpServer.ts deleted file mode 100644 index 6e6578840e..0000000000 --- a/packages/techdocs-cli/src/lib/httpServer.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import serveHandler from 'serve-handler'; -import http from 'http'; -import httpProxy from 'http-proxy'; - -export default class HTTPServer { - proxyEndpoint: string; - - constructor(public dir: string, public port: number) { - this.proxyEndpoint = '/api/'; - } - - private createProxy() { - const proxy = httpProxy.createProxyServer({ - target: 'http://localhost:8000', - }); - - return (request: http.IncomingMessage): [httpProxy, string] => { - const [, ...pathChunks] = - request.url?.substring(this.proxyEndpoint.length).split('/') ?? []; - const forwardPath = pathChunks.join('/'); - - return [proxy, forwardPath]; - }; - } - - public async serve(): Promise { - return new Promise((resolve, reject) => { - const proxyHandler = this.createProxy(); - - const server = http.createServer( - (request: http.IncomingMessage, response: http.ServerResponse) => { - if (request.url?.startsWith(this.proxyEndpoint)) { - const [proxy, forwardPath] = proxyHandler(request); - - proxy.on('error', (error: Error) => { - reject(error); - }); - - request.url = forwardPath; - return proxy.web(request, response); - } - - return serveHandler(request, response, { - public: this.dir, - trailingSlash: true, - rewrites: [{ source: '**', destination: 'index.html' }], - }); - }, - ); - - server.listen(this.port, () => { - console.log( - '[techdocs-preview-bundle] Running local version of Backstage at http://localhost:3000', - ); - resolve(server); - }); - - server.on('error', (error: Error) => { - reject(error); - }); - }); - } -} From db9c13ff394e29a6bdff7f42182355f3eb09ec02 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Wed, 4 Nov 2020 11:19:22 +0100 Subject: [PATCH 083/100] Clean up codeowners --- .github/CODEOWNERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7cef5afce0..d818c0d6b5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,6 +10,4 @@ /plugins/cloudbuild @trivago/ebarrios /plugins/techdocs @backstage/techdocs-core /plugins/techdocs-backend @backstage/techdocs-core -/packages/techdocs-cli @backstage/techdocs-core -/.github/workflows/techdocs.yml @backstage/techdocs-core /.changeset/cost-insights-* @backstage/silver-lining From 5dd4a338dbc83eb25a6ef2baf380fcc68a4d416e Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Wed, 4 Nov 2020 11:23:02 +0100 Subject: [PATCH 084/100] Docs update of techdocs-cli URL --- docs/features/techdocs/concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/features/techdocs/concepts.md b/docs/features/techdocs/concepts.md index c614965ab9..1675c64288 100644 --- a/docs/features/techdocs/concepts.md +++ b/docs/features/techdocs/concepts.md @@ -41,7 +41,7 @@ documentation for publishing. Currently it mostly acts as a wrapper around the TechDocs container and provides an easy-to-use interface for our docker container. -[TechDocs CLI](https://github.com/backstage/backstage/blob/master/packages/techdocs-cli/README.md) +[TechDocs CLI](https://github.com/backstage/techdocs-cli) ### TechDocs Reader From 4aca74e089be29fc3b8495f1c8168daa092f3760 Mon Sep 17 00:00:00 2001 From: Iain Billett Date: Thu, 5 Nov 2020 15:05:06 +0000 Subject: [PATCH 085/100] Load config from window in default config loader (#3238) Support setting config through the window object. The config should be set in window.__APP_CONFIG__ which should be an object. --- .changeset/3194.md | 7 +++++++ .../core/src/api-wrappers/createApp.test.tsx | 18 ++++++++++++++++++ packages/core/src/api-wrappers/createApp.tsx | 7 +++++++ 3 files changed, 32 insertions(+) create mode 100644 .changeset/3194.md diff --git a/.changeset/3194.md b/.changeset/3194.md new file mode 100644 index 0000000000..2c15d27eed --- /dev/null +++ b/.changeset/3194.md @@ -0,0 +1,7 @@ +--- +'@backstage/core': patch +--- + +Extend default config loader to read config from the window object. + +Config will be read from `window.__APP_CONFIG__` which should be an object. diff --git a/packages/core/src/api-wrappers/createApp.test.tsx b/packages/core/src/api-wrappers/createApp.test.tsx index a1655b88dd..31f584b68c 100644 --- a/packages/core/src/api-wrappers/createApp.test.tsx +++ b/packages/core/src/api-wrappers/createApp.test.tsx @@ -18,10 +18,12 @@ import { defaultConfigLoader } from './createApp'; (process as any).env = { NODE_ENV: 'test' }; const anyEnv = process.env as any; +const anyWindow = window as any; describe('defaultConfigLoader', () => { afterEach(() => { delete anyEnv.APP_CONFIG; + delete anyWindow.__APP_CONFIG__; }); it('loads static config', async () => { @@ -73,4 +75,20 @@ describe('defaultConfigLoader', () => { 'Failed to load runtime configuration, SyntaxError: Unexpected token } in JSON at position 0', ); }); + + it('loads config from window.__APP_CONFIG__', async () => { + anyEnv.APP_CONFIG = [ + { data: { my: 'config' }, context: 'a' }, + { data: { my: 'override-config' }, context: 'b' }, + ]; + const windowConfig = { app: { configKey: 'config-value' } }; + anyWindow.__APP_CONFIG__ = windowConfig; + + const configs = await defaultConfigLoader(); + + expect(configs).toEqual([ + ...anyEnv.APP_CONFIG, + { context: 'window', data: windowConfig }, + ]); + }); }); diff --git a/packages/core/src/api-wrappers/createApp.tsx b/packages/core/src/api-wrappers/createApp.tsx index c7d0f5ce01..592a2417ca 100644 --- a/packages/core/src/api-wrappers/createApp.tsx +++ b/packages/core/src/api-wrappers/createApp.tsx @@ -67,6 +67,13 @@ export const defaultConfigLoader: AppConfigLoader = async ( } } + const windowAppConfig = (window as any).__APP_CONFIG__; + if (windowAppConfig) { + configs.push({ + context: 'window', + data: windowAppConfig, + }); + } return configs; }; From 4577e377bef3be699027a8df68b2bd8e82dc9eb7 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Thu, 5 Nov 2020 18:41:49 +0100 Subject: [PATCH 086/100] Improve styling of outlined chips in dark mode (#3252) --- .changeset/strong-moose-cough.md | 5 +++++ packages/core/src/components/Chip/Chip.stories.tsx | 2 ++ packages/theme/src/baseTheme.ts | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/strong-moose-cough.md diff --git a/.changeset/strong-moose-cough.md b/.changeset/strong-moose-cough.md new file mode 100644 index 0000000000..41a0da7cca --- /dev/null +++ b/.changeset/strong-moose-cough.md @@ -0,0 +1,5 @@ +--- +'@backstage/theme': patch +--- + +Improve styling of outlined chips in dark mode. diff --git a/packages/core/src/components/Chip/Chip.stories.tsx b/packages/core/src/components/Chip/Chip.stories.tsx index a605666482..87d904ad0e 100644 --- a/packages/core/src/components/Chip/Chip.stories.tsx +++ b/packages/core/src/components/Chip/Chip.stories.tsx @@ -39,3 +39,5 @@ export const SmallDeletable = () => ( export const SmallNotDeletable = () => ( ); + +export const Outline = () => ; diff --git a/packages/theme/src/baseTheme.ts b/packages/theme/src/baseTheme.ts index b0797c6506..193f6961d6 100644 --- a/packages/theme/src/baseTheme.ts +++ b/packages/theme/src/baseTheme.ts @@ -209,9 +209,12 @@ export function createThemeOverrides(theme: BackstageTheme): Overrides { // By default there's no margin, but it's usually wanted, so we add some trailing margin marginRight: theme.spacing(1), marginBottom: theme.spacing(1), + color: theme.palette.grey[900], + }, + outlined: { + color: theme.palette.text.primary, }, label: { - color: theme.palette.grey[900], lineHeight: `${theme.spacing(2.5)}px`, fontWeight: theme.typography.fontWeightMedium, fontSize: `${theme.spacing(1.75)}px`, From a16780d8332274e0d8a76ea78cf9abc7cd62d758 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Nov 2020 18:54:26 +0100 Subject: [PATCH 087/100] chore(deps): bump @gitbeaker/core from 23.5.0 to 25.2.0 (#3210) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): bump @gitbeaker/core from 23.5.0 to 25.2.0 Bumps [@gitbeaker/core](https://github.com/jdalrymple/gitbeaker) from 23.5.0 to 25.2.0. - [Release notes](https://github.com/jdalrymple/gitbeaker/releases) - [Changelog](https://github.com/jdalrymple/gitbeaker/blob/master/CHANGELOG.md) - [Commits](https://github.com/jdalrymple/gitbeaker/compare/23.5.0...25.2.0) Signed-off-by: dependabot[bot] * bump the other package too Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Fredrik Adelöw --- packages/backend/package.json | 2 +- .../packages/backend/package.json.hbs | 2 +- plugins/scaffolder-backend/package.json | 4 +- yarn.lock | 141 ++++++------------ 4 files changed, 50 insertions(+), 99 deletions(-) diff --git a/packages/backend/package.json b/packages/backend/package.json index 67b2a42fee..051b83a146 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -31,7 +31,7 @@ "@backstage/plugin-scaffolder-backend": "^0.2.0", "@backstage/plugin-sentry-backend": "^0.1.2", "@backstage/plugin-techdocs-backend": "^0.2.0", - "@gitbeaker/node": "^23.5.0", + "@gitbeaker/node": "^25.2.0", "@octokit/rest": "^18.0.0", "azure-devops-node-api": "^10.1.1", "dockerode": "^3.2.0", diff --git a/packages/create-app/templates/default-app/packages/backend/package.json.hbs b/packages/create-app/templates/default-app/packages/backend/package.json.hbs index bf887dc014..df9ac28739 100644 --- a/packages/create-app/templates/default-app/packages/backend/package.json.hbs +++ b/packages/create-app/templates/default-app/packages/backend/package.json.hbs @@ -27,7 +27,7 @@ "@backstage/plugin-scaffolder-backend": "^{{version '@backstage/plugin-scaffolder-backend'}}", "@backstage/plugin-techdocs-backend": "^{{version '@backstage/plugin-techdocs-backend'}}", "@octokit/rest": "^18.0.0", - "@gitbeaker/node": "^23.5.0", + "@gitbeaker/node": "^25.2.0", "dockerode": "^3.2.0", "express": "^4.17.1", "express-promise-router": "^3.0.3", diff --git a/plugins/scaffolder-backend/package.json b/plugins/scaffolder-backend/package.json index a245d2ed24..ac30e23828 100644 --- a/plugins/scaffolder-backend/package.json +++ b/plugins/scaffolder-backend/package.json @@ -23,8 +23,8 @@ "@backstage/backend-common": "^0.2.0", "@backstage/catalog-model": "^0.2.0", "@backstage/config": "^0.1.1", - "@gitbeaker/core": "^23.5.0", - "@gitbeaker/node": "^23.5.0", + "@gitbeaker/core": "^25.2.0", + "@gitbeaker/node": "^25.2.0", "@octokit/rest": "^18.0.0", "@types/dockerode": "^2.5.32", "@types/express": "^4.17.6", diff --git a/yarn.lock b/yarn.lock index 0f16311d80..8ee1728b30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1762,32 +1762,33 @@ dependencies: yaml-ast-parser "0.0.43" -"@gitbeaker/core@^23.5.0": - version "23.5.0" - resolved "https://registry.npmjs.org/@gitbeaker/core/-/core-23.5.0.tgz#e0be44eecd0d7bf5418c161997c36d45b0c1ba81" - integrity sha512-5geLk7SxAttABBJZxfuSp72lSYWRyRId583vGCpKB6ISkoDhP+vJxdE6ypmtOJPV4CaSRZhluAGAZd968pi9ng== +"@gitbeaker/core@^25.2.0": + version "25.2.0" + resolved "https://registry.npmjs.org/@gitbeaker/core/-/core-25.2.0.tgz#c2f46b65ed88aebfa69afd2e58dbf4ebe2efb2c7" + integrity sha512-dhCvZItI8FIzHtJ9EySQ43GmNg3j39MxDGMCpDHn+Qb1o54QS+J6XPVQrMRmJioZIyj+WZQPX/IP+/mRkx8vhg== dependencies: - "@gitbeaker/requester-utils" "^23.5.0" + "@gitbeaker/requester-utils" "^25.2.0" form-data "^3.0.0" li "^1.3.0" xcase "^2.0.1" -"@gitbeaker/node@^23.5.0": - version "23.5.0" - resolved "https://registry.npmjs.org/@gitbeaker/node/-/node-23.5.0.tgz#0243be78aad148e7d6b5d79b7acc340748b5fa94" - integrity sha512-GEyhcrF1Lm8YmsmwntfzuhXnq00TrG14wNZP2Hg+DGgexG25eBbbcyFXuFZlBFSaGMQlsc8aPeuEyfyGmgpwnw== +"@gitbeaker/node@^25.2.0": + version "25.2.0" + resolved "https://registry.npmjs.org/@gitbeaker/node/-/node-25.2.0.tgz#cc91e83328ec32de0b1a0dac23accd2385734a66" + integrity sha512-FWchXYJ5agn0ptAQxtkkSKSg1ObbP2xfMzHLECxINFRBHYhg0ms8Fp8Qb+71pxJz7IMlvajyEtZaPfHBmyuh9Q== dependencies: - "@gitbeaker/core" "^23.5.0" - "@gitbeaker/requester-utils" "^23.5.0" - got "^11.1.4" + "@gitbeaker/core" "^25.2.0" + "@gitbeaker/requester-utils" "^25.2.0" + got "^11.7.0" xcase "^2.0.1" -"@gitbeaker/requester-utils@^23.5.0": - version "23.5.0" - resolved "https://registry.npmjs.org/@gitbeaker/requester-utils/-/requester-utils-23.5.0.tgz#e6f5d0216cb978be95e6bf40adf606f23d426f14" - integrity sha512-MdmInOO4unkApvtbv6PnIpDYXosgZgClSOqbxF5S4aJRCZVTJ6oPjMoNP8luhyT9xQeknpKxn9Iv8psEh7IC1Q== +"@gitbeaker/requester-utils@^25.2.0": + version "25.2.0" + resolved "https://registry.npmjs.org/@gitbeaker/requester-utils/-/requester-utils-25.2.0.tgz#f71c44e0073617877f9875dd00c4ae0d74897b09" + integrity sha512-pjuFIVlbxSTPdN+zFT/LBP4ym8k0OBYwUpc5WkzoOtvdTGuDX05r8ufnV07kibLDJkwDmjwnH4Hsc66yevSQTw== dependencies: - query-string "^6.12.1" + form-data "^3.0.0" + query-string "^6.13.3" xcase "^2.0.1" "@graphql-codegen/cli@^1.17.7": @@ -3788,6 +3789,11 @@ resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-3.1.2.tgz#548650de521b344e3781fbdb0ece4aa6f729afb8" integrity sha512-JiX9vxoKMmu8Y3Zr2RVathBL1Cdu4Nt4MuNWemt1Nc06A0RAin9c5FArkhGsyMBWfCu4zj+9b+GxtjAnE4qqLQ== +"@sindresorhus/is@^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.0.0.tgz#2ff674e9611b45b528896d820d3d7a812de2f0e4" + integrity sha512-FyD2meJpDPjyNQejSjvnhpgI/azsQkA4lGbuu5BQZfjvJ9cbRZXzeWL2HceCekW4lixO9JPesIIQkSoLjeJHNQ== + "@sinonjs/commons@^1.7.0": version "1.7.1" resolved "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz#da5fd19a5f71177a53778073978873964f49acf1" @@ -5724,13 +5730,6 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-6.2.1.tgz#a236185670a7860f1597cf73bea2e16d001461ba" integrity sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA== -"@types/serve-handler@^6.1.0": - version "6.1.0" - resolved "https://registry.npmjs.org/@types/serve-handler/-/serve-handler-6.1.0.tgz#6952aaf864e542297ce8a2480b3e0d9ea59de7f6" - integrity sha512-F9BpWotLZrQvq1CdE3oCnVmQUb6dWq20HSB/qjF4mG7WkZjPQ6fye8veznMKoBPhFJve4yz9C1NOITdTcoLngQ== - dependencies: - "@types/node" "*" - "@types/serve-static@*": version "1.13.3" resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" @@ -8954,11 +8953,6 @@ contains-path@^0.1.0: resolved "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= -content-disposition@0.5.2: - version "0.5.2" - resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" - integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= - content-disposition@0.5.3: version "0.5.3" resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" @@ -11473,13 +11467,6 @@ fast-shallow-equal@^1.0.0: resolved "https://registry.npmjs.org/fast-shallow-equal/-/fast-shallow-equal-1.0.0.tgz#d4dcaf6472440dcefa6f88b98e3251e27f25628b" integrity sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw== -fast-url-parser@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz#f4af3ea9f34d8a271cf58ad2b3759f431f0b318d" - integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= - dependencies: - punycode "^1.3.2" - fastest-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/fastest-stable-stringify/-/fastest-stable-stringify-1.0.1.tgz#9122d406d4c9d98bea644a6b6853d5874b87b028" @@ -12487,23 +12474,6 @@ got@^10.7.0: to-readable-stream "^2.0.0" type-fest "^0.10.0" -got@^11.1.4: - version "11.6.2" - resolved "https://registry.npmjs.org/got/-/got-11.6.2.tgz#79d7bb8c11df212b97f25565407a1f4ae73210ec" - integrity sha512-/21qgUePCeus29Jk7MEti8cgQUNXFSWfIevNIk4H7u1wmXNDrGPKPY6YsPY+o9CIT/a2DjCjRz0x1nM9FtS2/A== - dependencies: - "@sindresorhus/is" "^3.1.1" - "@szmarczak/http-timer" "^4.0.5" - "@types/cacheable-request" "^6.0.1" - "@types/responselike" "^1.0.0" - cacheable-lookup "^5.0.3" - cacheable-request "^7.0.1" - decompress-response "^6.0.0" - http2-wrapper "^1.0.0-beta.5.2" - lowercase-keys "^2.0.0" - p-cancelable "^2.0.0" - responselike "^2.0.0" - got@^11.5.2: version "11.6.0" resolved "https://registry.npmjs.org/got/-/got-11.6.0.tgz#4978c78f3cbc3a45ee95381f8bb6efd1db1f4638" @@ -12538,6 +12508,23 @@ got@^11.6.2: p-cancelable "^2.0.0" responselike "^2.0.0" +got@^11.7.0: + version "11.8.0" + resolved "https://registry.npmjs.org/got/-/got-11.8.0.tgz#be0920c3586b07fd94add3b5b27cb28f49e6545f" + integrity sha512-k9noyoIIY9EejuhaBNLyZ31D5328LeqnyPNXJQb2XlJZcKakLqN5m6O/ikhq/0lw56kUYS54fVm+D1x57YC9oQ== + dependencies: + "@sindresorhus/is" "^4.0.0" + "@szmarczak/http-timer" "^4.0.5" + "@types/cacheable-request" "^6.0.1" + "@types/responselike" "^1.0.0" + cacheable-lookup "^5.0.3" + cacheable-request "^7.0.1" + decompress-response "^6.0.0" + http2-wrapper "^1.0.0-beta.5.2" + lowercase-keys "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + got@^9.6.0: version "9.6.0" resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" @@ -16343,18 +16330,6 @@ mime-db@1.44.0, "mime-db@>= 1.43.0 < 2": resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== -mime-db@~1.33.0: - version "1.33.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" - integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== - -mime-types@2.1.18: - version "2.1.18" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" - integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== - dependencies: - mime-db "~1.33.0" - mime-types@^2.1.12, mime-types@^2.1.26, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24: version "2.1.27" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f" @@ -18086,7 +18061,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@1.0.2, path-is-inside@^1.0.2: +path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -18123,11 +18098,6 @@ path-to-regexp@0.1.7: resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= -path-to-regexp@2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz#90b617025a16381a879bc82a38d4e8bdeb2bcf45" - integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== - path-to-regexp@^1.7.0: version "1.8.0" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz#887b3ba9d84393e87a0a0b9f4cb756198b53548a" @@ -19175,7 +19145,7 @@ punycode@1.3.2: resolved "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@^1.2.4, punycode@^1.3.2: +punycode@^1.2.4: version "1.4.1" resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= @@ -19220,10 +19190,10 @@ query-string@^4.1.0: object-assign "^4.1.0" strict-uri-encode "^1.0.0" -query-string@^6.12.1: - version "6.13.1" - resolved "https://registry.npmjs.org/query-string/-/query-string-6.13.1.tgz#d913ccfce3b4b3a713989fe6d39466d92e71ccad" - integrity sha512-RfoButmcK+yCta1+FuU8REvisx1oEzhMKwhLUNcepQTPGcNMp1sIqjnfCtfnvGSQZQEhaBHvccujtWoUV3TTbA== +query-string@^6.13.3: + version "6.13.6" + resolved "https://registry.npmjs.org/query-string/-/query-string-6.13.6.tgz#e5ac7c74f2a5da43fbca0b883b4f0bafba439966" + integrity sha512-/WWZ7d9na6s2wMEGdVCVgKWE9Rt7nYyNIf7k8xmHXcesPMlEzicWo3lbYwHyA4wBktI2KrXxxZeACLbE84hvSQ== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" @@ -19306,11 +19276,6 @@ randomfill@^1.0.3: randombytes "^2.0.5" safe-buffer "^5.1.0" -range-parser@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" - integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= - range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" @@ -21045,20 +21010,6 @@ serve-favicon@^2.5.0: parseurl "~1.3.2" safe-buffer "5.1.1" -serve-handler@^6.1.3: - version "6.1.3" - resolved "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz#1bf8c5ae138712af55c758477533b9117f6435e8" - integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== - dependencies: - bytes "3.0.0" - content-disposition "0.5.2" - fast-url-parser "1.1.3" - mime-types "2.1.18" - minimatch "3.0.4" - path-is-inside "1.0.2" - path-to-regexp "2.2.1" - range-parser "1.2.0" - serve-index@^1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" From e1a92d0b5d119d659b4ce54147e4e01d7c961e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 5 Nov 2020 22:41:55 +0100 Subject: [PATCH 088/100] docs: clarify current state of databases (#3250) --- docs/overview/architecture-overview.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/docs/overview/architecture-overview.md b/docs/overview/architecture-overview.md index 2d65e9e430..d8069c8665 100644 --- a/docs/overview/architecture-overview.md +++ b/docs/overview/architecture-overview.md @@ -148,7 +148,7 @@ The CircleCI plugin is an example of a third-party backed plugin. CircleCI is a SaaS service which can be used without any knowledge of Backstage. It has an API which a Backstage plugin consumes to display content. -Requests which go to CircleCI from the users browser are passed through a proxy +Requests going to CircleCI from the user's browser are passed through a proxy service that Backstage provides. Without this, the requests would be blocked by Cross Origin Resource Sharing policies which prevent a browser page served at [https://example.com](https://example.com) from serving resources hosted at @@ -161,16 +161,18 @@ https://circleci.com. As we have seen, both the `lighthouse-audit-service` and `catalog-backend` require a database to work with. -At the time of writing, the `lighthouse-audit-service` requires PostgreSQL to -work with. The service catalog backend uses an in-memory Sqlite3 instance. This -is a development-oriented setup and there are plans to support other databases -in the future. +The Backstage backend and its builtin plugins are based on the +[Knex](http://knexjs.org/) library, and set up a separate logical database per +plugin. This gives great isolation and lets them perform migrations and evolve +separate from each other. -To learn more about the future of databases and Backstage, see the following -GitHub issues. - -- [Knex + Plugins (Multiple vs Single Database) · Issue #1598 · backstage/backstage](https://github.com/backstage/backstage/issues/1598) -- [Update migrations to support postgres by dariddler · Pull Request #1527 · backstage/backstage](https://github.com/backstage/backstage/pull/1527#discussion_r450374145) +The Knex library supports a multitude of databases, but Backstage is at the time +of writing tested primarily against two of them: SQLite, which is mainly used as +an in-memory mock/test database, and PostgreSQL, which is the preferred +production database. Other databases such as the MySQL variants are reported to +work but +[aren't tested as fully](https://github.com/backstage/backstage/issues/2460) +yet. ## Containerization From 85379551e03ea82c7a0e872efe6e420d9742552a Mon Sep 17 00:00:00 2001 From: David Tuite Date: Thu, 5 Nov 2020 21:48:28 +0000 Subject: [PATCH 089/100] Add CircleCI to the Well Known Annotations (#3082) --- .../well-known-annotations.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/features/software-catalog/well-known-annotations.md b/docs/features/software-catalog/well-known-annotations.md index 25489b89d9..5cb6837340 100644 --- a/docs/features/software-catalog/well-known-annotations.md +++ b/docs/features/software-catalog/well-known-annotations.md @@ -158,6 +158,27 @@ fallback (`rollbar.organization` followed by `organization.name`). Specifying this annotation may enable Rollbar related features in Backstage for that entity. +### circleci.com/project-slug + +```yaml +# Example: +metadata: + annotations: + circleci.com/project-slug: github/spotify/pump-station +``` + +The value of this annotation is the so-called slug (or alternatively, the ID) of +a [CircleCI](https://circleci.com/) project within your organization. The value +can be the format of `[source-control-manager]/[organization]/[project-slug]` or +just `[organization]/[project-slug]`. When the `[source-control-manager]` slug +is omitted, `bitbucket` will be used as a fallback. + +Specifying this annotation will cause the CI/CD features in Backstage to display +data from CircleCI for that entity. + +Providing both the `github.com/project-slug` and `circleci.com/project-slug` +annotations can cause problems as both may be used for CI/CD features. + ### backstage.io/ldap-rdn, backstage.io/ldap-uuid, backstage.io/ldap-dn ```yaml From 3b02444c127a423de1163b868533d1088621792b Mon Sep 17 00:00:00 2001 From: David Tuite Date: Thu, 5 Nov 2020 22:10:45 +0000 Subject: [PATCH 090/100] Fix reference to Catalog path in overview docs (#3255) While you do end up on the catalog if you visit `/`, the browser URL is actually `/catalog`. --- docs/features/software-catalog/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/features/software-catalog/index.md b/docs/features/software-catalog/index.md index a7c80d45cc..6076068504 100644 --- a/docs/features/software-catalog/index.md +++ b/docs/features/software-catalog/index.md @@ -33,10 +33,10 @@ More specifically, the Service Catalog enables two main use-cases: ## Getting Started -The Software Catalog is available to browse on the start page at `/`. If you've -followed [Installing in your Backstage App](./installation.md) in your separate -App or [Getting Started with Backstage](../../getting-started) for this repo, -you should be able to browse the catalog at `http://localhost:3000`. +The Software Catalog is available to browse at `/catalog`. If you've followed +[Installing in your Backstage App](./installation.md) in your separate App or +[Getting Started with Backstage](../../getting-started) for this repo, you +should be able to browse the catalog at `http://localhost:3000`. ![](../../assets/software-catalog/service-catalog-home.png) From eecf08e3f7cce128a24d6caaaa1389690d796fb8 Mon Sep 17 00:00:00 2001 From: David Tuite Date: Thu, 5 Nov 2020 23:32:13 +0000 Subject: [PATCH 091/100] Update Node LTS in Getting Started docs (#3254) I've tested and the v14 [Fermium LTS](https://nodejs.org/en/about/releases/) works fine. --- docs/getting-started/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index eb199f4bc8..7fc80b625c 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -24,7 +24,7 @@ Requests towards this repo. Backstage provides the `@backstage/create-app` package to scaffold standalone instances of Backstage. You will need to have [Node.js](https://nodejs.org/en/download/) Active LTS Release installed -(currently v12), [Yarn](https://classic.yarnpkg.com/en/docs/install) and +(currently v14), [Yarn](https://classic.yarnpkg.com/en/docs/install) and [Python](https://www.python.org/downloads/) (although you likely have it already). You will also need to have [Docker](https://docs.docker.com/engine/install/) installed to use some features From c56e28375fbf934dc1f0fcf3e3216a66579f7a24 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 6 Nov 2020 00:33:10 +0100 Subject: [PATCH 092/100] create-app: add missing @backstage/plugin-api-docs entry to plugins.ts (#3257) --- .changeset/lucky-lemons-return.md | 5 +++++ .../templates/default-app/packages/app/src/plugins.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/lucky-lemons-return.md diff --git a/.changeset/lucky-lemons-return.md b/.changeset/lucky-lemons-return.md new file mode 100644 index 0000000000..49125d31d4 --- /dev/null +++ b/.changeset/lucky-lemons-return.md @@ -0,0 +1,5 @@ +--- +'@backstage/create-app': patch +--- + +Fix missing api-docs plugin registration in app template diff --git a/packages/create-app/templates/default-app/packages/app/src/plugins.ts b/packages/create-app/templates/default-app/packages/app/src/plugins.ts index c787ac2166..b719594a0b 100644 --- a/packages/create-app/templates/default-app/packages/app/src/plugins.ts +++ b/packages/create-app/templates/default-app/packages/app/src/plugins.ts @@ -1,3 +1,4 @@ +export { plugin as ApiDocs } from '@backstage/plugin-api-docs'; export { plugin as CatalogPlugin } from '@backstage/plugin-catalog'; export { plugin as RegisterComponent } from '@backstage/plugin-register-component'; export { plugin as ScaffolderPlugin } from '@backstage/plugin-scaffolder'; From 199237d2fb9d62263dffdc6325db1fd2905f34a3 Mon Sep 17 00:00:00 2001 From: Mikaela Grundin <9350337+zatine@users.noreply.github.com> Date: Fri, 6 Nov 2020 09:27:34 +0100 Subject: [PATCH 093/100] core: DependencyGraph component (#3236) * add dependency graph files * add stories for DependencyGraph * add changeset * add margin and border to storybook examples * support dark theme in default label * add transition to nodes, edges and labels * move @types to devDependencies * clean up DependencyGraph test * don't use default exports * change padding format * change marginX/Y to paddingX/Y * fix types export * fix storybook * move @types/dagre from devDependencies to dependencies --- .changeset/shaggy-bobcats-warn.md | 5 + packages/core/package.json | 8 + .../DependencyGraph/DefaultLabel.tsx | 35 ++ .../DependencyGraph/DefaultNode.tsx | 79 +++++ .../DependencyGraph.stories.tsx | 178 ++++++++++ .../DependencyGraph/DependencyGraph.test.tsx | 106 ++++++ .../DependencyGraph/DependencyGraph.tsx | 324 ++++++++++++++++++ .../components/DependencyGraph/Edge.test.tsx | 100 ++++++ .../src/components/DependencyGraph/Edge.tsx | 122 +++++++ .../components/DependencyGraph/Node.test.tsx | 79 +++++ .../src/components/DependencyGraph/Node.tsx | 76 ++++ .../components/DependencyGraph/constants.ts | 21 ++ .../src/components/DependencyGraph/index.ts | 20 ++ .../src/components/DependencyGraph/types.ts | 88 +++++ packages/core/src/components/index.ts | 1 + yarn.lock | 121 +++++++ 16 files changed, 1363 insertions(+) create mode 100644 .changeset/shaggy-bobcats-warn.md create mode 100644 packages/core/src/components/DependencyGraph/DefaultLabel.tsx create mode 100644 packages/core/src/components/DependencyGraph/DefaultNode.tsx create mode 100644 packages/core/src/components/DependencyGraph/DependencyGraph.stories.tsx create mode 100644 packages/core/src/components/DependencyGraph/DependencyGraph.test.tsx create mode 100644 packages/core/src/components/DependencyGraph/DependencyGraph.tsx create mode 100644 packages/core/src/components/DependencyGraph/Edge.test.tsx create mode 100644 packages/core/src/components/DependencyGraph/Edge.tsx create mode 100644 packages/core/src/components/DependencyGraph/Node.test.tsx create mode 100644 packages/core/src/components/DependencyGraph/Node.tsx create mode 100644 packages/core/src/components/DependencyGraph/constants.ts create mode 100644 packages/core/src/components/DependencyGraph/index.ts create mode 100644 packages/core/src/components/DependencyGraph/types.ts diff --git a/.changeset/shaggy-bobcats-warn.md b/.changeset/shaggy-bobcats-warn.md new file mode 100644 index 0000000000..048e1a0ff6 --- /dev/null +++ b/.changeset/shaggy-bobcats-warn.md @@ -0,0 +1,5 @@ +--- +'@backstage/core': minor +--- + +New DependencyGraph component added to core package. diff --git a/packages/core/package.json b/packages/core/package.json index 43f48e0ece..0ddc77f1e4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -35,10 +35,15 @@ "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", + "@types/dagre": "^0.7.44", "@types/react": "^16.9", "@types/react-sparklines": "^1.7.0", "classnames": "^2.2.6", "clsx": "^1.1.0", + "d3-selection": "^2.0.0", + "d3-shape": "^2.0.0", + "d3-zoom": "^2.0.0", + "dagre": "^0.8.5", "immer": "^7.0.9", "lodash": "^4.17.15", "material-table": "^1.69.1", @@ -63,6 +68,9 @@ "@testing-library/react": "^10.4.1", "@testing-library/user-event": "^12.0.7", "@types/classnames": "^2.2.9", + "@types/d3-selection": "^2.0.0", + "@types/d3-shape": "^2.0.0", + "@types/d3-zoom": "^2.0.0", "@types/google-protobuf": "^3.7.2", "@types/jest": "^26.0.7", "@types/node": "^12.0.0", diff --git a/packages/core/src/components/DependencyGraph/DefaultLabel.tsx b/packages/core/src/components/DependencyGraph/DefaultLabel.tsx new file mode 100644 index 0000000000..0679d1dae0 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/DefaultLabel.tsx @@ -0,0 +1,35 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import makeStyles from '@material-ui/core/styles/makeStyles'; +import { BackstageTheme } from '@backstage/theme'; +import { RenderLabelProps } from './types'; + +const useStyles = makeStyles((theme: BackstageTheme) => ({ + text: { + fill: theme.palette.textContrast, + }, +})); + +export function DefaultLabel({ edge: { label } }: RenderLabelProps) { + const classes = useStyles(); + return ( + + {label} + + ); +} diff --git a/packages/core/src/components/DependencyGraph/DefaultNode.tsx b/packages/core/src/components/DependencyGraph/DefaultNode.tsx new file mode 100644 index 0000000000..9656c860ae --- /dev/null +++ b/packages/core/src/components/DependencyGraph/DefaultNode.tsx @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { makeStyles } from '@material-ui/core/styles'; +import { BackstageTheme } from '@backstage/theme'; +import { RenderNodeProps } from './types'; + +const useStyles = makeStyles((theme: BackstageTheme) => ({ + node: { + fill: theme.palette.background.paper, + stroke: theme.palette.border, + }, + text: { + fill: theme.palette.textContrast, + }, +})); + +export function DefaultNode({ node: { id } }: RenderNodeProps) { + const classes = useStyles(); + const [width, setWidth] = React.useState(0); + const [height, setHeight] = React.useState(0); + const idRef = React.useRef(null); + + React.useLayoutEffect(() => { + // set the width to the length of the ID + if (idRef.current) { + let { + height: renderedHeight, + width: renderedWidth, + } = idRef.current.getBBox(); + renderedHeight = Math.round(renderedHeight); + renderedWidth = Math.round(renderedWidth); + + if (renderedHeight !== height || renderedWidth !== width) { + setWidth(renderedWidth); + setHeight(renderedHeight); + } + } + }, [width, height]); + + const padding = 10; + const paddedWidth = width + padding * 2; + const paddedHeight = height + padding * 2; + + return ( + + + + {id} + + + ); +} diff --git a/packages/core/src/components/DependencyGraph/DependencyGraph.stories.tsx b/packages/core/src/components/DependencyGraph/DependencyGraph.stories.tsx new file mode 100644 index 0000000000..e39ecfc5da --- /dev/null +++ b/packages/core/src/components/DependencyGraph/DependencyGraph.stories.tsx @@ -0,0 +1,178 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { DependencyGraph } from './DependencyGraph'; +import { Direction, LabelPosition } from './types'; + +export default { + title: 'Data Display/DependencyGraph', + component: DependencyGraph, +}; + +const containerStyle = { width: '100%' }; +const graphStyle = { border: '1px solid grey' }; + +const exampleNodes = [ + { id: 'source' }, + { id: 'downstream' }, + { id: 'second-downstream' }, + { id: 'third-downstream' }, +]; + +const exampleEdges = [ + { from: 'source', to: 'downstream' }, + { from: 'downstream', to: 'second-downstream' }, + { from: 'downstream', to: 'third-downstream' }, +]; + +export const Default = () => ( +
+ +
+); + +export const BottomToTop = () => ( +
+ +
+); + +export const LeftToRight = () => ( +
+ +
+); + +export const RightToLeft = () => ( +
+ +
+); + +export const WithLabels = () => { + const edges = exampleEdges.map(edge => ({ ...edge, label: 'label' })); + return ( +
+ +
+ ); +}; + +export const CustomNodes = () => { + const colors = ['pink', 'coral', 'yellowgreen', 'aquamarine']; + const nodes = exampleNodes.map((node, index) => ({ + ...node, + description: 'Description text', + color: colors[index], + })); + return ( +
+ ( + + + + {props.node.id} + + + {props.node.description} + + + )} + /> +
+ ); +}; + +export const CustomLabels = () => { + const colors = ['pink', 'coral', 'aqua']; + const edges = exampleEdges.map((edge, index) => ({ + ...edge, + label: colors[index], + color: colors[index], + })); + return ( +
+ ( + + + + {props.edge.label} + + + )} + /> +
+ ); +}; diff --git a/packages/core/src/components/DependencyGraph/DependencyGraph.test.tsx b/packages/core/src/components/DependencyGraph/DependencyGraph.test.tsx new file mode 100644 index 0000000000..526dc6d7dd --- /dev/null +++ b/packages/core/src/components/DependencyGraph/DependencyGraph.test.tsx @@ -0,0 +1,106 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { render } from '@testing-library/react'; +import { DependencyGraph } from './DependencyGraph'; +import { RenderLabelProps, RenderNodeProps } from './types'; +import { EDGE_TEST_ID, LABEL_TEST_ID, NODE_TEST_ID } from './constants'; + +describe('', () => { + beforeAll(() => { + Object.defineProperty(window.SVGElement.prototype, 'getBBox', { + value: () => ({ width: 100, height: 100 }), + configurable: true, + }); + }); + + const nodes = [{ id: 'a' }, { id: 'b' }, { id: 'c' }]; + const edges = [ + { from: nodes[0].id, to: nodes[1].id }, + { from: nodes[1].id, to: nodes[2].id }, + ]; + + const CUSTOM_TEST_ID = 'custom-test-id'; + + it('renders each node and edge supplied', async () => { + const { getByText, queryAllByTestId, findAllByTestId } = render( + , + ); + const renderedNodes = await findAllByTestId(NODE_TEST_ID); + expect(renderedNodes).toHaveLength(3); + expect(getByText(nodes[0].id)).toBeInTheDocument(); + expect(getByText(nodes[1].id)).toBeInTheDocument(); + expect(getByText(nodes[2].id)).toBeInTheDocument(); + expect(queryAllByTestId(EDGE_TEST_ID)).toHaveLength(2); + expect(queryAllByTestId(LABEL_TEST_ID)).toHaveLength(0); + }); + + it('renders edge labels if present', async () => { + const labeledEdges = [ + { ...edges[0], label: 'first' }, + { ...edges[1], label: 'second' }, + ]; + const { getByText, getAllByTestId, findAllByTestId } = render( + , + ); + const renderedEdges = await findAllByTestId(EDGE_TEST_ID); + expect(renderedEdges).toHaveLength(2); + expect(getAllByTestId(LABEL_TEST_ID)).toHaveLength(2); + expect(getByText(labeledEdges[0].label)).toBeInTheDocument(); + expect(getByText(labeledEdges[1].label)).toBeInTheDocument(); + }); + + it('renders nodes according to renderNode prop', async () => { + const singleNode = [nodes[0]]; + + const renderNode = (props: RenderNodeProps) => ( + + {props.node.id} + + + ); + const { getByText, findByTestId, container } = render( + , + ); + const node = await findByTestId(CUSTOM_TEST_ID); + expect(node).toBeInTheDocument(); + expect(container.querySelector('circle')).toBeInTheDocument(); + expect(getByText(singleNode[0].id)).toBeInTheDocument(); + }); + + it('renders labels according to renderLabel prop', async () => { + const labeledEdge = [{ ...edges[0], label: 'label' }]; + + const renderLabel = (props: RenderLabelProps) => ( + + {props.edge.label} + + + ); + const { getByText, findByTestId, container } = render( + , + ); + const node = await findByTestId(CUSTOM_TEST_ID); + expect(node).toBeInTheDocument(); + expect(container.querySelector('circle')).toBeInTheDocument(); + expect(getByText(labeledEdge[0].label)).toBeInTheDocument(); + }); +}); diff --git a/packages/core/src/components/DependencyGraph/DependencyGraph.tsx b/packages/core/src/components/DependencyGraph/DependencyGraph.tsx new file mode 100644 index 0000000000..ced0bdf276 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/DependencyGraph.tsx @@ -0,0 +1,324 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import * as d3Zoom from 'd3-zoom'; +import * as d3Selection from 'd3-selection'; +import useTheme from '@material-ui/core/styles/useTheme'; +import dagre from 'dagre'; +import debounce from 'lodash/debounce'; +import { BackstageTheme } from '@backstage/theme'; +import { + DependencyEdge, + DependencyNode, + Direction, + Alignment, + Ranker, + RenderNodeFunction, + RenderLabelFunction, + GraphEdge, + GraphNode, + LabelPosition, +} from './types'; +import { Node } from './Node'; +import { Edge } from './Edge'; +import { ARROW_MARKER_ID } from './constants'; + +export type DependencyGraphProps = React.SVGProps & { + edges: DependencyEdge[]; + nodes: DependencyNode[]; + direction?: Direction; + align?: Alignment; + nodeMargin?: number; + edgeMargin?: number; + rankMargin?: number; + paddingX?: number; + paddingY?: number; + acyclicer?: 'greedy'; + ranker?: Ranker; + labelPosition?: LabelPosition; + labelOffset?: number; + edgeRanks?: number; + edgeWeight?: number; + renderNode?: RenderNodeFunction; + renderLabel?: RenderLabelFunction; + defs?: SVGDefsElement | SVGDefsElement[]; +}; + +const WORKSPACE_ID = 'workspace'; + +export function DependencyGraph({ + edges, + nodes, + renderNode, + direction = Direction.TOP_BOTTOM, + align, + nodeMargin = 50, + edgeMargin = 10, + rankMargin = 50, + paddingX = 0, + paddingY = 0, + acyclicer, + ranker = Ranker.NETWORK_SIMPLEX, + labelPosition = LabelPosition.RIGHT, + labelOffset = 10, + edgeRanks = 1, + edgeWeight = 1, + renderLabel, + defs, + ...svgProps +}: DependencyGraphProps) { + const theme: BackstageTheme = useTheme(); + const [containerWidth, setContainerWidth] = React.useState(100); + const [containerHeight, setContainerHeight] = React.useState(100); + + const graph = React.useRef>( + new dagre.graphlib.Graph(), + ); + const [graphWidth, setGraphWidth] = React.useState( + graph.current.graph()?.width || 0, + ); + const [graphHeight, setGraphHeight] = React.useState( + graph.current.graph()?.height || 0, + ); + const [graphNodes, setGraphNodes] = React.useState([]); + const [graphEdges, setGraphEdges] = React.useState([]); + + const maxWidth = Math.max(graphWidth, containerWidth); + const maxHeight = Math.max(graphHeight, containerHeight); + + const containerRef = React.useMemo( + () => + debounce((node: SVGSVGElement) => { + if (!node) { + return; + } + // Set up zooming + panning + const container = d3Selection.select(node); + const workspace = d3Selection.select(node.getElementById(WORKSPACE_ID)); + const zoom = d3Zoom + .zoom() + .scaleExtent([1, 10]) + .on('zoom', event => { + event.transform.x = Math.min( + 0, + Math.max( + event.transform.x, + maxWidth - maxWidth * event.transform.k, + ), + ); + event.transform.y = Math.min( + 0, + Math.max( + event.transform.y, + maxHeight - maxHeight * event.transform.k, + ), + ); + workspace.attr('transform', event.transform); + }); + + container.call(zoom); + + const { + width: newContainerWidth, + height: newContainerHeight, + } = node.getBoundingClientRect(); + if (containerWidth !== newContainerWidth) { + setContainerWidth(newContainerWidth); + } + if (containerHeight !== newContainerHeight) { + setContainerHeight(newContainerHeight); + } + }, 100), + [containerHeight, containerWidth, maxWidth, maxHeight], + ); + + const setNodesAndEdges = React.useCallback(() => { + // Cleaning up lingering nodes and edges + const currentGraphNodes = graph.current.nodes(); + const currentGraphEdges = graph.current.edges(); + + currentGraphNodes.forEach(nodeId => { + const remainingNode = nodes.some(node => node.id === nodeId); + if (!remainingNode) { + graph.current.removeNode(nodeId); + } + }); + + currentGraphEdges.forEach(e => { + const remainingEdge = edges.some( + edge => edge.from === e.v && edge.to === e.w, + ); + if (!remainingEdge) { + graph.current.removeEdge(e.v, e.w); + } + }); + + // Adding/updating nodes and edges + nodes.forEach(node => { + const existingNode = graph.current + .nodes() + .find(nodeId => node.id === nodeId); + + if (existingNode) { + const { width, height, x, y } = graph.current.node(existingNode); + graph.current.setNode(existingNode, { ...node, width, height, x, y }); + } else { + graph.current.setNode(node.id, { ...node, width: 0, height: 0 }); + } + }); + + edges.forEach(e => { + graph.current.setEdge(e.from, e.to, { + ...e, + label: e.label, + width: 0, + height: 0, + labelpos: labelPosition, + labeloffset: labelOffset, + weight: edgeWeight, + minlen: edgeRanks, + }); + }); + }, [edges, nodes, labelPosition, labelOffset, edgeWeight, edgeRanks]); + + const updateGraph = React.useMemo( + () => + debounce( + () => { + dagre.layout(graph.current); + const { height, width } = graph.current.graph(); + const newHeight = Math.max(0, height || 0); + const newWidth = Math.max(0, width || 0); + setGraphWidth(newWidth); + setGraphHeight(newHeight); + + setGraphNodes(graph.current.nodes()); + setGraphEdges(graph.current.edges()); + }, + 250, + { leading: true }, + ), + [], + ); + + React.useEffect(() => { + graph.current.setGraph({ + rankdir: direction, + align, + nodesep: nodeMargin, + edgesep: edgeMargin, + ranksep: rankMargin, + marginx: paddingX, + marginy: paddingY, + acyclicer, + ranker, + }); + + setNodesAndEdges(); + updateGraph(); + + return updateGraph.cancel; + }, [ + acyclicer, + align, + direction, + edgeMargin, + paddingX, + paddingY, + nodeMargin, + rankMargin, + ranker, + setNodesAndEdges, + updateGraph, + ]); + + function setNode(id: string, node: DependencyNode) { + graph.current.setNode(id, node); + updateGraph(); + return graph.current; + } + + function setEdge(id: dagre.Edge, edge: DependencyEdge) { + graph.current.setEdge(id, edge); + updateGraph(); + return graph.current; + } + + return ( + + + + + + {defs} + + + + {graphEdges.map(e => { + const edge = graph.current.edge(e) as GraphEdge; + if (!edge) return null; + return ( + + ); + })} + {graphNodes.map((id: string) => { + const node = graph.current.node(id) as GraphNode; + if (!node) return null; + return ( + + ); + })} + + + + ); +} diff --git a/packages/core/src/components/DependencyGraph/Edge.test.tsx b/packages/core/src/components/DependencyGraph/Edge.test.tsx new file mode 100644 index 0000000000..b651c17bf0 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/Edge.test.tsx @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import { render } from '@testing-library/react'; +import { Edge } from './Edge'; +import { RenderLabelProps } from './types'; + +const fromNode = 'node'; +const toNode = 'other-node'; + +const edge = { + from: fromNode, + to: toNode, +}; + +const id = { + v: fromNode, + w: toNode, +}; + +const setEdge = jest.fn(); +const renderElement = jest.fn((props: RenderLabelProps) => ( + {props.edge.label} +)); + +const minProps = { + points: [ + { x: 10, y: 20 }, + { x: 20, y: 20 }, + ], + id, + setEdge, + renderElement, + edge, +}; + +const label = 'label'; +const edgeWithLabel = { ...edge, label }; + +describe('', () => { + beforeEach(() => { + // jsdom does not support SVG elements so we have to fall back to HTMLUnknownElement + Object.defineProperty(window.HTMLUnknownElement.prototype, 'getBBox', { + value: () => ({ width: 100, height: 100 }), + configurable: true, + }); + }); + + afterEach(jest.clearAllMocks); + + it('does not render the supplied label element if label is missing', () => { + const { container } = render(); + expect(container.getElementsByTagName('g')).toHaveLength(0); + }); + + it('renders the supplied label element if label is present', () => { + const { getByText } = render(); + expect(getByText(label)).toBeInTheDocument(); + }); + + it('passes down edge properties to the render method if label is present', () => { + const edgeWithRandomProp = { ...edge, label, randomProp: true }; + render( + , + ); + + expect(renderElement).toHaveBeenCalledWith({ edge: edgeWithRandomProp }); + }); + + it('calls setEdge with edge ID and actual label size after rendering', () => { + const { getByText } = render(); + expect(getByText(label)).toBeInTheDocument(); + + // Updates the edge in the graph + expect(setEdge).toHaveBeenCalledWith(id, { + height: 100, + width: 100, + ...edgeWithLabel, + }); + + // Does not pass down width/height to label + expect(renderElement).not.toHaveBeenCalledWith( + expect.objectContaining({ height: 100, width: 100 }), + ); + }); +}); diff --git a/packages/core/src/components/DependencyGraph/Edge.tsx b/packages/core/src/components/DependencyGraph/Edge.tsx new file mode 100644 index 0000000000..5e67aca63f --- /dev/null +++ b/packages/core/src/components/DependencyGraph/Edge.tsx @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import * as d3Shape from 'd3-shape'; +import isFinite from 'lodash/isFinite'; +import makeStyles from '@material-ui/core/styles/makeStyles'; +import { BackstageTheme } from '@backstage/theme'; +import { + GraphEdge, + RenderLabelProps, + RenderLabelFunction, + DependencyEdge, +} from './types'; +import { ARROW_MARKER_ID, EDGE_TEST_ID, LABEL_TEST_ID } from './constants'; +import { DefaultLabel } from './DefaultLabel'; + +const useStyles = makeStyles((theme: BackstageTheme) => ({ + path: { + strokeWidth: 2, + stroke: theme.palette.textSubtle, + fill: 'none', + transition: `${theme.transitions.duration.shortest}ms`, + }, + label: { + transition: `${theme.transitions.duration.shortest}ms`, + }, +})); + +type EdgePoint = dagre.GraphEdge['points'][0]; + +export type EdgeComponentProps = { + id: dagre.Edge; + edge: GraphEdge; + render?: RenderLabelFunction; + setEdge: (id: dagre.Edge, edge: DependencyEdge) => dagre.graphlib.Graph<{}>; +}; + +const renderDefault = (props: RenderLabelProps) => ; + +const createPath = d3Shape + .line() + .x(d => d.x) + .y(d => d.y) + .curve(d3Shape.curveMonotoneX); + +export function Edge({ + render = renderDefault, + setEdge, + id, + edge, +}: EdgeComponentProps) { + const { x = 0, y = 0, width, height, points, ...labelProps } = edge; + const classes = useStyles(); + + const labelRef = React.useRef(null); + + React.useLayoutEffect(() => { + // set the label width to the actual rendered width to properly layout graph + if (labelRef.current) { + let { + height: renderedHeight, + width: renderedWidth, + } = labelRef.current.getBBox(); + renderedHeight = Math.round(renderedHeight); + renderedWidth = Math.round(renderedWidth); + + if (renderedHeight !== height || renderedWidth !== width) { + setEdge(id, { + ...edge, + height: renderedHeight, + width: renderedWidth, + }); + } + } + }, [edge, height, width, setEdge, id]); + + let path: string = ''; + + if (points) { + const finitePoints = points.filter( + (point: EdgePoint) => isFinite(point.x) && isFinite(point.y), + ); + path = createPath(finitePoints) || ''; + } + + return ( + <> + {path && ( + + )} + {labelProps.label ? ( + + {render({ edge: labelProps })} + + ) : null} + + ); +} diff --git a/packages/core/src/components/DependencyGraph/Node.test.tsx b/packages/core/src/components/DependencyGraph/Node.test.tsx new file mode 100644 index 0000000000..9f9f7c693a --- /dev/null +++ b/packages/core/src/components/DependencyGraph/Node.test.tsx @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import dagre from 'dagre'; +import { render } from '@testing-library/react'; +import { Node } from './Node'; +import { RenderNodeProps } from './types'; + +const node = { id: 'abc' }; +const setNode = jest.fn(() => new dagre.graphlib.Graph()); +const renderElement = jest.fn((props: RenderNodeProps) => ( + {props.node.id} +)); + +const minProps = { + id: node.id, + node, + setNode, + render: renderElement, + x: 0, + y: 0, + width: 0, + height: 0, +}; + +describe('', () => { + beforeEach(() => { + // jsdom does not support SVG elements so we have to fall back to HTMLUnknownElement + Object.defineProperty(window.HTMLUnknownElement.prototype, 'getBBox', { + value: () => ({ width: 100, height: 100 }), + configurable: true, + }); + }); + + afterEach(jest.clearAllMocks); + + it('renders the supplied element', () => { + const { getByText } = render(); + expect(getByText(minProps.id)).toBeInTheDocument(); + }); + + it('passes down node properties to the render method', () => { + const nodeWithRandomProp = { ...node, randomProp: true }; + render(); + + expect(renderElement).toHaveBeenCalledWith({ node: nodeWithRandomProp }); + }); + + it('calls setNode with node ID and actual size after rendering', () => { + const { getByText } = render(); + expect(getByText(minProps.id)).toBeInTheDocument(); + + // Updates the node in the graph + expect(setNode).toHaveBeenCalledWith(node.id, { + height: 100, + width: 100, + ...node, + }); + + // Does not pass down width/height to node + expect(renderElement).not.toHaveBeenCalledWith( + expect.objectContaining({ height: 100, width: 100 }), + ); + }); +}); diff --git a/packages/core/src/components/DependencyGraph/Node.tsx b/packages/core/src/components/DependencyGraph/Node.tsx new file mode 100644 index 0000000000..4d64e31335 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/Node.tsx @@ -0,0 +1,76 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import React from 'react'; +import makeStyles from '@material-ui/core/styles/makeStyles'; +import { DefaultNode } from './DefaultNode'; +import { RenderNodeFunction, RenderNodeProps, GraphNode } from './types'; +import { NODE_TEST_ID } from './constants'; + +const useStyles = makeStyles(theme => ({ + node: { + transition: `${theme.transitions.duration.shortest}ms`, + }, +})); + +export type NodeComponentProps = { + node: GraphNode; + render?: RenderNodeFunction; + setNode: dagre.graphlib.Graph['setNode']; +}; + +const renderDefault = (props: RenderNodeProps) => ; + +export function Node({ + render = renderDefault, + setNode, + node, +}: NodeComponentProps) { + const { width, height, x = 0, y = 0, ...nodeProps } = node; + const classes = useStyles(); + const nodeRef = React.useRef(null); + + React.useLayoutEffect(() => { + // set the node width to the actual rendered width to properly layout graph + if (nodeRef.current) { + let { + height: renderedHeight, + width: renderedWidth, + } = nodeRef.current.getBBox(); + renderedHeight = Math.round(renderedHeight); + renderedWidth = Math.round(renderedWidth); + + if (renderedHeight !== height || renderedWidth !== width) { + setNode(node.id, { + ...node, + height: renderedHeight, + width: renderedWidth, + }); + } + } + }, [node, width, height, setNode]); + + return ( + + {render({ node: nodeProps })} + + ); +} diff --git a/packages/core/src/components/DependencyGraph/constants.ts b/packages/core/src/components/DependencyGraph/constants.ts new file mode 100644 index 0000000000..412a677f87 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/constants.ts @@ -0,0 +1,21 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const ARROW_MARKER_ID = 'arrow-marker'; + +export const NODE_TEST_ID = 'node'; +export const EDGE_TEST_ID = 'edge'; +export const LABEL_TEST_ID = 'label'; diff --git a/packages/core/src/components/DependencyGraph/index.ts b/packages/core/src/components/DependencyGraph/index.ts new file mode 100644 index 0000000000..9a4f0071e3 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/index.ts @@ -0,0 +1,20 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as DependencyGraphTypes from './types'; + +export { DependencyGraph } from './DependencyGraph'; +export { DependencyGraphTypes }; diff --git a/packages/core/src/components/DependencyGraph/types.ts b/packages/core/src/components/DependencyGraph/types.ts new file mode 100644 index 0000000000..19173db4b3 --- /dev/null +++ b/packages/core/src/components/DependencyGraph/types.ts @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import dagre from 'dagre'; + +type CustomType = { [customKey: string]: any }; + +/* Edges */ +export type DependencyEdge = T & { + from: string; + to: string; + label?: string; +}; + +export type GraphEdge = DependencyEdge & + dagre.GraphEdge & + EdgeProperties; + +export type RenderLabelProps = { edge: DependencyEdge }; + +export type RenderLabelFunction = ( + props: RenderLabelProps, +) => React.ReactNode; + +/* Nodes */ +export type DependencyNode = T & { + id: string; +}; + +export type GraphNode = dagre.Node>; + +export type RenderNodeProps = { node: DependencyNode }; + +export type RenderNodeFunction = ( + props: RenderNodeProps, +) => React.ReactNode; + +/* Based on: https://github.com/dagrejs/dagre/wiki#configuring-the-layout */ + +export type EdgeProperties = { + label?: string; + width?: number; + height?: number; + labeloffset?: number; + labelpos?: LabelPosition; + minlen?: number; + weight?: number; + [customKey: string]: any; +}; + +export enum Direction { + TOP_BOTTOM = 'TB', + BOTTOM_TOP = 'BT', + LEFT_RIGHT = 'LR', + RIGHT_LEFT = 'RL', +} + +export enum Alignment { + UP_LEFT = 'UL', + UP_RIGHT = 'UR', + DOWN_LEFT = 'DL', + DOWN_RIGHT = 'DR', +} + +export enum Ranker { + NETWORK_SIMPLEX = 'network-simplex', + TIGHT_TREE = 'tight-tree', + LONGEST_PATH = 'longest-path', +} + +export enum LabelPosition { + LEFT = 'l', + RIGHT = 'r', + CENTER = 'c', +} diff --git a/packages/core/src/components/index.ts b/packages/core/src/components/index.ts index 40c4ef0c11..bcc56debea 100644 --- a/packages/core/src/components/index.ts +++ b/packages/core/src/components/index.ts @@ -18,6 +18,7 @@ export * from './AlertDisplay'; export * from './Button'; export * from './CodeSnippet'; export * from './CopyTextButton'; +export * from './DependencyGraph'; export * from './DismissableBanner'; export * from './FeatureDiscovery'; export * from './HorizontalScrollGrid'; diff --git a/yarn.lock b/yarn.lock index 8ee1728b30..c265aecd6a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4982,16 +4982,38 @@ dependencies: postcss "5 - 7" +"@types/d3-color@*": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/d3-color/-/d3-color-2.0.0.tgz#febdfadade56e215a4c3f612fe3000d92999f5d5" + integrity sha512-Bs0maTeU47rdZT+n42iQ0C4gnbnJlIDJkqHFtIsDx2tPPITDeoSdIrm+00UYXzegzArYC2GsG80eHNMwz08IAw== + "@types/d3-force@^1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@types/d3-force/-/d3-force-1.2.1.tgz#c28803ea36fe29788db69efa0ad6c2dc09544e83" integrity sha512-jqK+I36uz4kTBjyk39meed5y31Ab+tXYN/x1dn3nZEus9yOHCLc+VrcIYLc/aSQ0Y7tMPRlIhLetulME76EiiA== +"@types/d3-interpolate@*": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-2.0.0.tgz#325029216dc722c1c68c33ccda759f1209d35823" + integrity sha512-Wt1v2zTlEN8dSx8hhx6MoOhWQgTkz0Ukj7owAEIOF2QtI0e219paFX9rf/SLOr/UExWb1TcUzatU8zWwFby6gg== + dependencies: + "@types/d3-color" "*" + "@types/d3-path@*": version "1.0.8" resolved "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.8.tgz#48e6945a8ff43ee0a1ce85c8cfa2337de85c7c79" integrity sha512-AZGHWslq/oApTAHu9+yH/Bnk63y9oFOMROtqPAtxl5uB6qm1x2lueWdVEjsjjV3Qc2+QfuzKIwIR5MvVBakfzA== +"@types/d3-path@^1": + version "1.0.9" + resolved "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.9.tgz#73526b150d14cd96e701597cbf346cfd1fd4a58c" + integrity sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ== + +"@types/d3-selection@*", "@types/d3-selection@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-2.0.0.tgz#59df94a8e47ed1050a337d4ffb4d4d213aa590a8" + integrity sha512-EF0lWZ4tg7oDFg4YQFlbOU3936e3a9UmoQ2IXlBy1+cv2c2Pv7knhKUzGlH5Hq2sF/KeDTH1amiRPey2rrLMQA== + "@types/d3-shape@*": version "1.3.2" resolved "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.2.tgz#a41d9d6b10d02e221696b240caf0b5d0f5a588ec" @@ -4999,6 +5021,26 @@ dependencies: "@types/d3-path" "*" +"@types/d3-shape@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-2.0.0.tgz#61aa065726f3c2641aedc59c3603475ab11aeb2f" + integrity sha512-NLzD02m5PiD1KLEDjLN+MtqEcFYn4ZL9+Rqc9ZwARK1cpKZXd91zBETbe6wpBB6Ia0D0VZbpmbW3+BsGPGnCpA== + dependencies: + "@types/d3-path" "^1" + +"@types/d3-zoom@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-2.0.0.tgz#ef8b87464e8ebc7c66b70f6383d1ae841e78e7fc" + integrity sha512-daL0PJm4yT0ISTGa7p2lHX0kvv9FO/IR1ooWbHR/7H4jpbaKiLux5FslyS/OvISPiJ5SXb4sOqYhO6fMB6hKRw== + dependencies: + "@types/d3-interpolate" "*" + "@types/d3-selection" "*" + +"@types/dagre@^0.7.44": + version "0.7.44" + resolved "https://registry.npmjs.org/@types/dagre/-/dagre-0.7.44.tgz#8f4b796b118ca29c132da7068fbc0d0351ee5851" + integrity sha512-N6HD+79w77ZVAaVO7JJDW5yJ9LAxM62FpgNGO9xEde+KVYjDRyhIMzfiErXpr1g0JPon9kwlBzoBK6s4fOww9Q== + "@types/diff@^4.0.2": version "4.0.2" resolved "https://registry.npmjs.org/@types/diff/-/diff-4.0.2.tgz#2e9bb89f9acc3ab0108f0f3dc4dbdcf2fff8a99c" @@ -9645,11 +9687,29 @@ d3-color@1: resolved "https://registry.npmjs.org/d3-color/-/d3-color-1.4.1.tgz#c52002bf8846ada4424d55d97982fef26eb3bc8a" integrity sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q== +"d3-color@1 - 2": + version "2.0.0" + resolved "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz#8d625cab42ed9b8f601a1760a389f7ea9189d62e" + integrity sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ== + "d3-dispatch@1 - 2": version "2.0.0" resolved "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz#8a18e16f76dd3fcaef42163c97b926aa9b55e7cf" integrity sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA== +d3-drag@2: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-drag/-/d3-drag-2.0.0.tgz#9eaf046ce9ed1c25c88661911c1d5a4d8eb7ea6d" + integrity sha512-g9y9WbMnF5uqB9qKqwIIa/921RYWzlUDv9Jl1/yONQwxbOfszAWTCm8u7HOTgJgRDXiRZN56cHT9pd24dmXs8w== + dependencies: + d3-dispatch "1 - 2" + d3-selection "2" + +"d3-ease@1 - 2": + version "2.0.0" + resolved "https://registry.npmjs.org/d3-ease/-/d3-ease-2.0.0.tgz#fd1762bfca00dae4bacea504b1d628ff290ac563" + integrity sha512-68/n9JWarxXkOWMshcT5IcjbB+agblQUaIsbnXmrzejn2O82n3p2A9R2zEB9HIEFWKFwPAEDDN8gR0VdSAyyAQ== + d3-force@^2.0.1: version "2.1.1" resolved "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz#f20ccbf1e6c9e80add1926f09b51f686a8bc0937" @@ -9671,11 +9731,23 @@ d3-interpolate@1, d3-interpolate@^1.3.0: dependencies: d3-color "1" +"d3-interpolate@1 - 2": + version "2.0.1" + resolved "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz#98be499cfb8a3b94d4ff616900501a64abc91163" + integrity sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ== + dependencies: + d3-color "1 - 2" + d3-path@1: version "1.0.9" resolved "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz#48c050bb1fe8c262493a8caf5524e3e9591701cf" integrity sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg== +"d3-path@1 - 2": + version "2.0.0" + resolved "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz#55d86ac131a0548adae241eebfb56b4582dd09d8" + integrity sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA== + "d3-quadtree@1 - 2": version "2.0.0" resolved "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz#edbad045cef88701f6fee3aee8e93fb332d30f9d" @@ -9693,6 +9765,11 @@ d3-scale@^2.1.0: d3-time "1" d3-time-format "2" +d3-selection@2, d3-selection@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-selection/-/d3-selection-2.0.0.tgz#94a11638ea2141b7565f883780dabc7ef6a61066" + integrity sha512-XoGGqhLUN/W14NmaqcO/bb1nqjDAw5WtSYb2X8wiuQWvSZUsUVYsOSkOybUrNvcBjaywBdYPy03eXHMXjk9nZA== + d3-shape@^1.2.0: version "1.3.7" resolved "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz#df63801be07bc986bc54f63789b4fe502992b5d7" @@ -9700,6 +9777,13 @@ d3-shape@^1.2.0: dependencies: d3-path "1" +d3-shape@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-shape/-/d3-shape-2.0.0.tgz#2331b62fa784a2a1daac47a7233cfd69301381fd" + integrity sha512-djpGlA779ua+rImicYyyjnOjeubyhql1Jyn1HK0bTyawuH76UQRWXd+pftr67H6Fa8hSwetkgb/0id3agKWykw== + dependencies: + d3-path "1 - 2" + d3-time-format@2: version "2.3.0" resolved "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz#107bdc028667788a8924ba040faf1fbccd5a7850" @@ -9717,6 +9801,28 @@ d3-time@1: resolved "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz#055edb1d170cfe31ab2da8968deee940b56623e6" integrity sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA== +d3-transition@2: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-transition/-/d3-transition-2.0.0.tgz#366ef70c22ef88d1e34105f507516991a291c94c" + integrity sha512-42ltAGgJesfQE3u9LuuBHNbGrI/AJjNL2OAUdclE70UE6Vy239GCBEYD38uBPoLeNsOhFStGpPI0BAOV+HMxog== + dependencies: + d3-color "1 - 2" + d3-dispatch "1 - 2" + d3-ease "1 - 2" + d3-interpolate "1 - 2" + d3-timer "1 - 2" + +d3-zoom@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/d3-zoom/-/d3-zoom-2.0.0.tgz#f04d0afd05518becce879d04709c47ecd93fba54" + integrity sha512-fFg7aoaEm9/jf+qfstak0IYpnesZLiMX6GZvXtUSdv8RH2o4E2qeelgdU09eKS6wGuiGMfcnMI0nTIqWzRHGpw== + dependencies: + d3-dispatch "1 - 2" + d3-drag "2" + d3-interpolate "1 - 2" + d3-selection "2" + d3-transition "2" + d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -9725,6 +9831,14 @@ d@1, d@^1.0.1: es5-ext "^0.10.50" type "^1.0.1" +dagre@^0.8.5: + version "0.8.5" + resolved "https://registry.npmjs.org/dagre/-/dagre-0.8.5.tgz#ba30b0055dac12b6c1fcc247817442777d06afee" + integrity sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw== + dependencies: + graphlib "^2.1.8" + lodash "^4.17.15" + damerau-levenshtein@^1.0.4: version "1.0.6" resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz#143c1641cb3d85c60c32329e26899adea8701791" @@ -12568,6 +12682,13 @@ graphiql@^1.0.0-alpha.10: regenerator-runtime "^0.13.5" theme-ui "^0.3.1" +graphlib@^2.1.8: + version "2.1.8" + resolved "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz#5761d414737870084c92ec7b5dbcb0592c9d35da" + integrity sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A== + dependencies: + lodash "^4.17.15" + graphql-config@^3.0.2: version "3.0.3" resolved "https://registry.npmjs.org/graphql-config/-/graphql-config-3.0.3.tgz#58907c65ed7d6e04132321450b60e57863ea9a5f" From 5a2705de23f111491c73eb4a1ccbcf3b3618547c Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Fri, 6 Nov 2020 11:43:58 +0100 Subject: [PATCH 094/100] Export `AuthProviders`, `DefaultProviderSettings` and `ProviderSettingsItem` (#3249) `Settings` allows to pass `providerSettings`, but right now there isn't a way to constuct them out of the existing components as they aren't exported. --- .changeset/moody-pugs-smoke.md | 5 +++++ .../src/components/AuthProviders/index.ts | 1 + plugins/user-settings/src/components/index.ts | 18 ++++++++++++++++++ plugins/user-settings/src/index.ts | 3 +-- 4 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .changeset/moody-pugs-smoke.md create mode 100644 plugins/user-settings/src/components/index.ts diff --git a/.changeset/moody-pugs-smoke.md b/.changeset/moody-pugs-smoke.md new file mode 100644 index 0000000000..3092ec4bfe --- /dev/null +++ b/.changeset/moody-pugs-smoke.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-user-settings': patch +--- + +Export `AuthProviders`, `DefaultProviderSettings` and `ProviderSettingsItem`. diff --git a/plugins/user-settings/src/components/AuthProviders/index.ts b/plugins/user-settings/src/components/AuthProviders/index.ts index 2f6a2b5ab1..dd7fbcf79b 100644 --- a/plugins/user-settings/src/components/AuthProviders/index.ts +++ b/plugins/user-settings/src/components/AuthProviders/index.ts @@ -16,3 +16,4 @@ export { AuthProviders } from './AuthProviders'; export { DefaultProviderSettings } from './DefaultProviderSettings'; +export { ProviderSettingsItem } from './ProviderSettingsItem'; diff --git a/plugins/user-settings/src/components/index.ts b/plugins/user-settings/src/components/index.ts new file mode 100644 index 0000000000..fe92b14adb --- /dev/null +++ b/plugins/user-settings/src/components/index.ts @@ -0,0 +1,18 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { Settings } from './Settings'; +export { SettingsPage as Router } from './SettingsPage'; +export * from './AuthProviders'; diff --git a/plugins/user-settings/src/index.ts b/plugins/user-settings/src/index.ts index 113930902a..9b0ce4262c 100644 --- a/plugins/user-settings/src/index.ts +++ b/plugins/user-settings/src/index.ts @@ -14,5 +14,4 @@ * limitations under the License. */ export { plugin } from './plugin'; -export { Settings } from './components/Settings'; -export { SettingsPage as Router } from './components/SettingsPage'; +export * from './components/'; From e8f69ba9367c4c700df0990460753f71aa32b667 Mon Sep 17 00:00:00 2001 From: Jesko Steinberg <61695677+jeskosda@users.noreply.github.com> Date: Fri, 6 Nov 2020 20:17:17 +0100 Subject: [PATCH 095/100] feat: add internal routing to BottomLink (#3258) * feat(core): Link component detect whether it's an external link or not * fix: make BottomLink using backstage/core Link component --- .changeset/dry-pillows-carry.md | 6 ++++++ packages/core/src/components/Link/Link.tsx | 13 ++++++++++--- .../core/src/layout/BottomLink/BottomLink.test.tsx | 1 - packages/core/src/layout/BottomLink/BottomLink.tsx | 4 ++-- 4 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 .changeset/dry-pillows-carry.md diff --git a/.changeset/dry-pillows-carry.md b/.changeset/dry-pillows-carry.md new file mode 100644 index 0000000000..5352e26d2d --- /dev/null +++ b/.changeset/dry-pillows-carry.md @@ -0,0 +1,6 @@ +--- +'@backstage/core': patch +--- + +- The BottomLink is now able to handle with internal routes. +- @backstage/core Link component detect whether it's an external link or not, and render accordingly diff --git a/packages/core/src/components/Link/Link.tsx b/packages/core/src/components/Link/Link.tsx index 8e7e3f179e..59a9604fa7 100644 --- a/packages/core/src/components/Link/Link.tsx +++ b/packages/core/src/components/Link/Link.tsx @@ -25,6 +25,13 @@ type Props = ComponentProps & * Thin wrapper on top of material-ui's Link component * Makes the Link to utilise react-router */ -export const Link = React.forwardRef((props, ref) => ( - -)); +export const Link = React.forwardRef((props, ref) => { + const to = String(props.to); + return /^https?:\/\//.test(to) ? ( + // External links + + ) : ( + // Interact with React Router for internal links + + ); +}); diff --git a/packages/core/src/layout/BottomLink/BottomLink.test.tsx b/packages/core/src/layout/BottomLink/BottomLink.test.tsx index 92ae2ecb3b..8bea00e35d 100644 --- a/packages/core/src/layout/BottomLink/BottomLink.test.tsx +++ b/packages/core/src/layout/BottomLink/BottomLink.test.tsx @@ -22,7 +22,6 @@ const minProps = { title: 'A deepLink title', link: '/mocked', }; - describe('', () => { it('renders without exploding', async () => { const rendered = await renderInTestApp(); diff --git a/packages/core/src/layout/BottomLink/BottomLink.tsx b/packages/core/src/layout/BottomLink/BottomLink.tsx index b3f7b4aa11..e768ffd9e4 100644 --- a/packages/core/src/layout/BottomLink/BottomLink.tsx +++ b/packages/core/src/layout/BottomLink/BottomLink.tsx @@ -16,7 +16,6 @@ import React, { FC } from 'react'; import { - Link, ListItem, ListItemIcon, Divider, @@ -26,6 +25,7 @@ import { import ArrowIcon from '@material-ui/icons/ArrowForward'; import { BackstageTheme } from '@backstage/theme'; import Box from '@material-ui/core/Box'; +import { Link } from '../../components/Link'; const useStyles = makeStyles(theme => ({ root: { @@ -53,7 +53,7 @@ export const BottomLink: FC = ({ link, title, onClick }) => { return (
- + From 33b7300ebefedc35cf7a83b8e6a3938a171aeb39 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Fri, 6 Nov 2020 20:21:36 +0100 Subject: [PATCH 096/100] Capture plugin name under the /api/ prefix for http metrics (#3259) --- .changeset/weak-rice-beam.md | 5 +++ .../src/service/lib/metrics.test.ts | 37 +++++++++++++++++++ .../backend-common/src/service/lib/metrics.ts | 18 ++++++++- 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .changeset/weak-rice-beam.md create mode 100644 packages/backend-common/src/service/lib/metrics.test.ts diff --git a/.changeset/weak-rice-beam.md b/.changeset/weak-rice-beam.md new file mode 100644 index 0000000000..c507e350a9 --- /dev/null +++ b/.changeset/weak-rice-beam.md @@ -0,0 +1,5 @@ +--- +'@backstage/backend-common': patch +--- + +Capture plugin name under the /api/ prefix for http metrics diff --git a/packages/backend-common/src/service/lib/metrics.test.ts b/packages/backend-common/src/service/lib/metrics.test.ts new file mode 100644 index 0000000000..9126423b7e --- /dev/null +++ b/packages/backend-common/src/service/lib/metrics.test.ts @@ -0,0 +1,37 @@ +/* + * Copyright 2020 Spotify AB + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { normalizePath } from './metrics'; + +describe('normalizePath', () => { + it('should normalize /path to /path', async () => { + const path = normalizePath({ url: 'http://server/path' }); + + expect(path).toBe('/path'); + }); + + it('should normalize /path/test to /path', async () => { + const path = normalizePath({ url: 'http://server/path/test' }); + + expect(path).toBe('/path'); + }); + + it('should normalize /api/plugin-name/test to /api/plugin-name', async () => { + const path = normalizePath({ url: 'http://server/api/plugin-name/test' }); + + expect(path).toBe('/api/plugin-name'); + }); +}); diff --git a/packages/backend-common/src/service/lib/metrics.ts b/packages/backend-common/src/service/lib/metrics.ts index d7b544765b..37d441f53c 100644 --- a/packages/backend-common/src/service/lib/metrics.ts +++ b/packages/backend-common/src/service/lib/metrics.ts @@ -16,6 +16,22 @@ import prom from 'prom-client'; import promBundle from 'express-prom-bundle'; import { RequestHandler } from 'express'; +import * as url from 'url'; + +const rootRegEx = new RegExp('^/([^/]*)/.*'); +const apiRegEx = new RegExp('^/api/([^/]*)/.*'); + +export function normalizePath(req: any): string { + const path = url.parse(req.originalUrl || req.url).pathname || '/'; + + // Capture /api/ and the plugin name + if (apiRegEx.test(path)) { + return path.replace(apiRegEx, '/api/$1'); + } + + // Only the first path segment at root level + return path.replace(rootRegEx, '/$1'); +} /** * Adds a /metrics endpoint, register default runtime metrics and instrument the router. @@ -31,7 +47,7 @@ export function metricsHandler(): RequestHandler { // cardinality (e.g. path params). Instead we would have to template them. However, this // is difficult, as every backend plugin might use different routes. Instead we only take // the first directory of the path, to have at least an idea how each plugin performs: - normalizePath: [['^/([^/]*)/.*', '/$1']], + normalizePath, promClient: { collectDefaultMetrics: {} }, }); } From e1292f417ce7a0c4c065fdb9b3b4a6d8bbc46219 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Sat, 7 Nov 2020 01:47:08 -0500 Subject: [PATCH 097/100] Fix #3329: Prevent nightly build on forks (#3261) * Prevent nightly build on forks * Fix indentation * Fix prettier! --- .github/workflows/nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 335bd80109..3f59b815b3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -6,6 +6,8 @@ on: jobs: build: + if: github.repository == 'backstage/backstage' # prevent running on forks + runs-on: ubuntu-latest strategy: From 00b7b66bd8107cc006e0dbb9dbe086bd75764d9f Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Sat, 7 Nov 2020 06:30:16 -0500 Subject: [PATCH 098/100] Fix typo in support button example (#3262) --- packages/core/src/layout/Page/Page.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/layout/Page/Page.stories.tsx b/packages/core/src/layout/Page/Page.stories.tsx index 3b1dd07c7a..1d3aaea412 100644 --- a/packages/core/src/layout/Page/Page.stories.tsx +++ b/packages/core/src/layout/Page/Page.stories.tsx @@ -185,7 +185,7 @@ const ExampleContentHeader = ({ selectedTab }: { selectedTab?: number }) => ( title={selectedTab !== undefined ? tabs[selectedTab].label : 'Header'} > - This Plugin is an example. This text could provide usefull information for + This Plugin is an example. This text could provide useful information for the user. From a41730c6ead2ebf297b13be794af0240d986ad03 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Sat, 7 Nov 2020 06:31:11 -0500 Subject: [PATCH 099/100] [plugin-jenkins] Add tooltip to Jenkins build rerun (#3251) * Add tooltop to Jenkins build rerun * Add tooltip to spelling --- .changeset/calm-emus-push.md | 5 +++++ .github/styles/vocab.txt | 1 + .../src/components/BuildsPage/lib/CITable/CITable.tsx | 10 ++++++---- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .changeset/calm-emus-push.md diff --git a/.changeset/calm-emus-push.md b/.changeset/calm-emus-push.md new file mode 100644 index 0000000000..b83f442c8a --- /dev/null +++ b/.changeset/calm-emus-push.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-jenkins': minor +--- + +Add tooltip for Jenkins rerun button diff --git a/.github/styles/vocab.txt b/.github/styles/vocab.txt index ecb8fdf3c1..3c5fa34adc 100644 --- a/.github/styles/vocab.txt +++ b/.github/styles/vocab.txt @@ -191,6 +191,7 @@ toc tolerations Tolerations toolsets +tooltip touchpoints ui upvote diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 23f9af445c..5d5d7d9fcd 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -14,7 +14,7 @@ * limitations under the License. */ import React, { FC } from 'react'; -import { Box, IconButton, Link, Typography } from '@material-ui/core'; +import { Box, IconButton, Link, Typography, Tooltip } from '@material-ui/core'; import RetryIcon from '@material-ui/icons/Replay'; import GitHubIcon from '@material-ui/icons/GitHub'; import { generatePath, Link as RouterLink } from 'react-router-dom'; @@ -179,9 +179,11 @@ const generatedColumns: TableColumn[] = [ title: 'Actions', sorting: false, render: (row: Partial) => ( - - - + + + + + ), width: '10%', }, From 63834ee3383a8ab548c6fe566bb30bf2ddae1d52 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 6 Nov 2020 15:45:16 +0100 Subject: [PATCH 100/100] microsite/static: add confugration meta-schema based on JSONSchema draft-07 --- microsite/static/schema/config-v1 | 170 ++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 microsite/static/schema/config-v1 diff --git a/microsite/static/schema/config-v1 b/microsite/static/schema/config-v1 new file mode 100644 index 0000000000..f85f2844cc --- /dev/null +++ b/microsite/static/schema/config-v1 @@ -0,0 +1,170 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://backstage.io/schema/config-v1", + "title": "Backstage Configuration Meta-Schema", + "definitions": { + "schemaArray": { + "type": "array", + "minItems": 1, + "items": { "$ref": "#" } + }, + "nonNegativeInteger": { + "type": "integer", + "minimum": 0 + }, + "nonNegativeIntegerDefault0": { + "allOf": [ + { "$ref": "#/definitions/nonNegativeInteger" }, + { "default": 0 } + ] + }, + "simpleTypes": { + "enum": [ + "array", + "boolean", + "integer", + "null", + "number", + "object", + "string" + ] + }, + "stringArray": { + "type": "array", + "items": { "type": "string" }, + "uniqueItems": true, + "default": [] + } + }, + "type": ["object", "boolean"], + "properties": { + "$id": { + "type": "string", + "format": "uri-reference" + }, + "$schema": { + "type": "string", + "format": "uri" + }, + "$ref": { + "type": "string", + "format": "uri-reference" + }, + "$comment": { + "type": "string" + }, + "title": { + "type": "string" + }, + "description": { + "type": "string" + }, + "default": true, + "readOnly": { + "type": "boolean", + "default": false + }, + "writeOnly": { + "type": "boolean", + "default": false + }, + "examples": { + "type": "array", + "items": true + }, + "multipleOf": { + "type": "number", + "exclusiveMinimum": 0 + }, + "maximum": { + "type": "number" + }, + "exclusiveMaximum": { + "type": "number" + }, + "minimum": { + "type": "number" + }, + "exclusiveMinimum": { + "type": "number" + }, + "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, + "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "pattern": { + "type": "string", + "format": "regex" + }, + "additionalItems": { "$ref": "#" }, + "items": { + "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/schemaArray" }], + "default": true + }, + "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, + "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "uniqueItems": { + "type": "boolean", + "default": false + }, + "contains": { "$ref": "#" }, + "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, + "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, + "required": { "$ref": "#/definitions/stringArray" }, + "additionalProperties": { "$ref": "#" }, + "definitions": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "properties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "default": {} + }, + "patternProperties": { + "type": "object", + "additionalProperties": { "$ref": "#" }, + "propertyNames": { "format": "regex" }, + "default": {} + }, + "dependencies": { + "type": "object", + "additionalProperties": { + "anyOf": [{ "$ref": "#" }, { "$ref": "#/definitions/stringArray" }] + } + }, + "propertyNames": { "$ref": "#" }, + "const": true, + "enum": { + "type": "array", + "items": true, + "minItems": 1, + "uniqueItems": true + }, + "type": { + "anyOf": [ + { "$ref": "#/definitions/simpleTypes" }, + { + "type": "array", + "items": { "$ref": "#/definitions/simpleTypes" }, + "minItems": 1, + "uniqueItems": true + } + ] + }, + "format": { "type": "string" }, + "contentMediaType": { "type": "string" }, + "contentEncoding": { "type": "string" }, + "if": { "$ref": "#" }, + "then": { "$ref": "#" }, + "else": { "$ref": "#" }, + "allOf": { "$ref": "#/definitions/schemaArray" }, + "anyOf": { "$ref": "#/definitions/schemaArray" }, + "oneOf": { "$ref": "#/definitions/schemaArray" }, + "not": { "$ref": "#" }, + "visibility": { + "type": "string", + "enum": ["frontend", "backend", "secret"] + } + }, + "default": true +}