Remove accidental import of semver
Signed-off-by: Marcus Crane <marcus.crane@lightspeedhq.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
The `create-plugin` and `create` commands have both been deprecated in favor of a new `new` command. The `new` command is functionally identical to `create`, but the new naming makes it possible to use as yarn script, since `yarn create` is reserved.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
'@backstage/app-defaults': patch
|
||||
'@backstage/core-app-api': patch
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/core-plugin-api': patch
|
||||
'@backstage/dev-utils': patch
|
||||
'@backstage/test-utils': patch
|
||||
'@backstage/plugin-adr': patch
|
||||
'@backstage/plugin-airbrake': patch
|
||||
'@backstage/plugin-allure': patch
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-azure-devops': patch
|
||||
'@backstage/plugin-badges': patch
|
||||
'@backstage/plugin-bazaar': patch
|
||||
'@backstage/plugin-catalog-graph': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-circleci': patch
|
||||
'@backstage/plugin-cloudbuild': patch
|
||||
'@backstage/plugin-code-climate': patch
|
||||
'@backstage/plugin-code-coverage': patch
|
||||
'@backstage/plugin-codescene': patch
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
'@backstage/plugin-explore': patch
|
||||
'@backstage/plugin-gcp-projects': patch
|
||||
'@backstage/plugin-git-release-manager': patch
|
||||
'@backstage/plugin-github-actions': patch
|
||||
'@backstage/plugin-gitops-profiles': patch
|
||||
'@backstage/plugin-graphiql': patch
|
||||
'@backstage/plugin-home': patch
|
||||
'@backstage/plugin-jenkins': patch
|
||||
'@backstage/plugin-kafka': patch
|
||||
'@backstage/plugin-kubernetes': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
'@backstage/plugin-org': patch
|
||||
'@backstage/plugin-pagerduty': patch
|
||||
'@backstage/plugin-permission-react': patch
|
||||
'@backstage/plugin-rollbar': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
'@backstage/plugin-search-react': patch
|
||||
'@backstage/plugin-search': patch
|
||||
'@backstage/plugin-sentry': patch
|
||||
'@backstage/plugin-shortcuts': patch
|
||||
'@backstage/plugin-splunk-on-call': patch
|
||||
'@backstage/plugin-tech-insights': patch
|
||||
'@backstage/plugin-techdocs-addons-test-utils': patch
|
||||
'@backstage/plugin-techdocs-react': patch
|
||||
'@backstage/plugin-techdocs': patch
|
||||
'@backstage/plugin-todo': patch
|
||||
'@backstage/plugin-user-settings': patch
|
||||
---
|
||||
|
||||
Updated React Router dependencies to be peer dependencies.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-node': patch
|
||||
---
|
||||
|
||||
Fix Techdocs S3 and GCS publisher to include bucketRootPath in requests
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/test-utils': minor
|
||||
---
|
||||
|
||||
Elements rendered in a test app are no longer wrapped in a `Routes` and `Route` element, as this is not compatible with React Router v6 stable.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes-backend': patch
|
||||
---
|
||||
|
||||
chore: Exporting KubernetesClientProvider and everything in kubernetes-auth-translator as requested in issue #10457
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-node': patch
|
||||
---
|
||||
|
||||
Adds experimental `catalogServiceRef` for obtaining a `CatalogClient` in the new backend system.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
When using React Router v6 stable, it is now possible for components within the `Route` element tree to have `path` props, although they will be ignored.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/integration': patch
|
||||
'@backstage/plugin-adr': patch
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-techdocs': patch
|
||||
'@backstage/plugin-techdocs-module-addons-contrib': patch
|
||||
'@backstage/plugin-techdocs-node': patch
|
||||
---
|
||||
|
||||
Bump `git-url-parse` version to `^13.0.0`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-node': patch
|
||||
---
|
||||
|
||||
`IdentityClient` is now deprecated. Please migrate to `IdentityApi` and `DefaultIdentityClient` instead. The authenticate function on `DefaultIdentityClient` is also deprecated. Please use `getIdentity` instead.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Added a keep-alive refresh loop to the `DatabaseManager`, keeping the connection
|
||||
pool up.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-plugin-api': patch
|
||||
---
|
||||
|
||||
Updated `createBackendPlugin` and `createBackendModule` to properly forward lack of options.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
The options part of `DatabaseManager.fromConfig` now accepts an optional logger
|
||||
field.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
The `versions:bump` command will now update dependency ranges in `package.json`, even if the new version is within the current range.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added support for custom certificate for webpack dev server.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
The Backstage packages and plugins have all been updated to support React Router v6 stable. The `create-app` template has not been migrated yet, but if you want to migrate your own app or plugins, check out the [migration guide](https://backstage.io/docs/tutorials/react-router-stable-migration).
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-app-api': minor
|
||||
---
|
||||
|
||||
Updated the routing system to be compatible with React Router v6 stable.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Fixes a bug to be able to utilize refresh keys after the entity is loaded from cache
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Remove use of deprecated trimLeft/trimRight
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added a new `migrate react-router-deps` command to aid in the migration to React Router v6 stable.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-node': patch
|
||||
---
|
||||
|
||||
Fixed bug in LunrSearchEngine where stopwords in title is causing in-doc search not working
|
||||
@@ -0,0 +1,53 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Adds `IdentityApi` configuration to `create-app` scaffolding templates.
|
||||
|
||||
To migrate to the new `IdentityApi`, edit the `packages/backend/src/index.ts` adding the following import:
|
||||
|
||||
```typescript
|
||||
import { DefaultIdentityClient } from '@backstage/plugin-auth-node';
|
||||
```
|
||||
|
||||
Use the factory function to create an `IdentityApi` in the `makeCreateEnv` function and return it from the
|
||||
function as follows:
|
||||
|
||||
```typescript
|
||||
function makeCreateEnv(config: Config) {
|
||||
...
|
||||
const identity = DefaultIdentityClient.create({
|
||||
discovery,
|
||||
});
|
||||
...
|
||||
|
||||
return {
|
||||
...,
|
||||
identity
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Backend plugins can be upgraded to work with this new `IdentityApi`.
|
||||
|
||||
Add `identity` to the `RouterOptions` type.
|
||||
|
||||
```typescript
|
||||
export interface RouterOptions {
|
||||
...
|
||||
identity: IdentityApi;
|
||||
}
|
||||
```
|
||||
|
||||
Then you can use the `IdentityApi` from the plugin.
|
||||
|
||||
```typescript
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
const { identity } = options;
|
||||
|
||||
router.get('/user', async (req, res) => {
|
||||
const user = await identity.getIdentity({ request: req });
|
||||
...
|
||||
```
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Implemented KubernetesContainerRunner: a ContainerRunner implementation that leverages Jobs on a kubernetes cluster
|
||||
|
||||
```ts
|
||||
const kubeConfig = new KubeConfig();
|
||||
kubeConfig.loadFromDefault();
|
||||
|
||||
const options: KubernetesContainerRunnerOptions = {
|
||||
kubeConfig,
|
||||
// namespace where Jobs will be created
|
||||
namespace: 'default',
|
||||
// Jobs name will be prefixed with this name
|
||||
name: 'my-runner',
|
||||
// An existing Kubernetes volume that will be used
|
||||
// as base for mounts
|
||||
mountBase: {
|
||||
volumeName: 'workdir',
|
||||
// Every mount must start with the base path
|
||||
// see example below
|
||||
basePath: '/workdir',
|
||||
},
|
||||
// Define a Pod template for the Jobs. It has to include
|
||||
// a volume definition named as the mountBase volumeName
|
||||
podTemplate: {
|
||||
spec: {
|
||||
containers: [],
|
||||
volumes: [
|
||||
{
|
||||
name: 'workdir',
|
||||
persistentVolumeClaim: {
|
||||
claimName: 'workdir-claim',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
const containerRunner = new KubernetesContainerRunner(options);
|
||||
|
||||
const runOptions: RunContainerOptions = {
|
||||
imageName: 'golang:1.17',
|
||||
args: ['echo', 'hello world'],
|
||||
mountDirs: {
|
||||
'/workdir/app': '/app',
|
||||
},
|
||||
};
|
||||
containerRunner.runContainer(runOptions);
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Added support for handling broken symlinks within the scaffolder backend. This is intended for templates that may hold a symlink that is invalid at build time but valid within the destination repo.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Applied the fix from version 1.5.1 of this package, which is part of the v1.5.1 release of Backstage.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-ldap': patch
|
||||
---
|
||||
|
||||
Added ae-dir LDAP vendor to correctly extract DN.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Updated the `TechDocsReaderPage` to be compatible with React Router v6 stable.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Tweaked workspace packaging to not rewrite existing `package.json` files.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
The `RoutedTabs` component has been updated to be compatible with React Router v6 stable.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/plugin-apache-airflow': patch
|
||||
---
|
||||
|
||||
Got rid of usages of the uppercase String type
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': minor
|
||||
---
|
||||
|
||||
Added `repositoryId` output when create a repository in Azure
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-permission-react': patch
|
||||
---
|
||||
|
||||
**DEPRECATION**: The `PermissionedRoute` component has been deprecated in favor of the new `RequirePermission` component. This is because the usage pattern of `PermissionedRoute` is not compatible with React Router v6 stable.
|
||||
|
||||
Embed the type from `react-router` instead of exporting it directly.
|
||||
@@ -172,44 +172,87 @@
|
||||
"@backstage/plugin-xcmetrics": "0.2.28"
|
||||
},
|
||||
"changesets": [
|
||||
"afraid-horses-lick",
|
||||
"afraid-radios-boil",
|
||||
"beige-monkeys-add",
|
||||
"beige-pumas-tap",
|
||||
"big-dolls-reflect",
|
||||
"big-teachers-tell",
|
||||
"blue-snakes-compete",
|
||||
"clever-beans-turn",
|
||||
"cold-frogs-kiss",
|
||||
"curly-hounds-wait",
|
||||
"dry-games-end",
|
||||
"eight-spies-protect",
|
||||
"eleven-bees-marry",
|
||||
"famous-hounds-sit",
|
||||
"famous-wombats-happen",
|
||||
"five-carrots-pay",
|
||||
"flat-plums-shout",
|
||||
"flat-walls-kiss",
|
||||
"fresh-rabbits-juggle",
|
||||
"funny-hounds-obey",
|
||||
"funny-years-speak",
|
||||
"gold-hounds-vanish",
|
||||
"good-avocados-grow",
|
||||
"good-papayas-dress",
|
||||
"gorgeous-swans-kiss",
|
||||
"great-cats-sit",
|
||||
"grumpy-kiwis-juggle",
|
||||
"happy-kiwis-look",
|
||||
"heavy-ligers-laugh",
|
||||
"hot-files-begin",
|
||||
"hot-suits-glow",
|
||||
"hungry-dogs-agree",
|
||||
"large-eagles-shop",
|
||||
"large-trainers-float",
|
||||
"lazy-snakes-film",
|
||||
"light-beans-share",
|
||||
"loud-comics-search",
|
||||
"lovely-ants-invite",
|
||||
"lucky-points-wash",
|
||||
"many-rules-raise",
|
||||
"mean-tomatoes-visit",
|
||||
"metal-crabs-wash",
|
||||
"nervous-rivers-sneeze",
|
||||
"old-lemons-switch",
|
||||
"old-tables-joke",
|
||||
"popular-shirts-happen",
|
||||
"red-numbers-suffer",
|
||||
"renovate-16f36a0",
|
||||
"renovate-4f0c2e3",
|
||||
"renovate-58c2860",
|
||||
"renovate-7d3b357",
|
||||
"renovate-c98c336",
|
||||
"renovate-f18a0fc",
|
||||
"rich-cooks-camp",
|
||||
"rich-melons-compete",
|
||||
"rotten-books-crash",
|
||||
"rude-books-rush",
|
||||
"shaggy-chicken-behave",
|
||||
"shaggy-vans-repeat",
|
||||
"sharp-swans-suffer",
|
||||
"shiny-lobsters-fix",
|
||||
"silent-kings-live",
|
||||
"slimy-zebras-reply",
|
||||
"small-lemons-brake",
|
||||
"small-walls-promise",
|
||||
"smooth-yaks-hug",
|
||||
"spicy-cherries-remember",
|
||||
"strong-games-kiss",
|
||||
"strong-planes-return",
|
||||
"sweet-fishes-taste",
|
||||
"tall-trains-remain",
|
||||
"tame-papayas-protect",
|
||||
"techdocs-jeans-wait",
|
||||
"tender-ladybugs-relax",
|
||||
"tiny-oranges-thank",
|
||||
"tough-dolphins-smile",
|
||||
"two-planets-provide",
|
||||
"weak-yaks-learn",
|
||||
"wild-sheep-roll",
|
||||
"witty-cats-wink",
|
||||
"witty-queens-happen",
|
||||
"young-trees-rescue"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-app-api': patch
|
||||
---
|
||||
|
||||
Updated `ServiceRegistry` to not initialize factories more than once.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Fixed a misconfiguration where all modules where treated as ESM by the React Refresh plugin for Webpack.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/plugin-app-backend': patch
|
||||
'@backstage/plugin-graphql-backend': patch
|
||||
'@backstage/plugin-kubernetes-backend': patch
|
||||
'@backstage/plugin-vault-backend': patch
|
||||
---
|
||||
|
||||
Updated dependency `helmet` to `^6.0.0`.
|
||||
|
||||
Please note that these policies are no longer applied by default:
|
||||
|
||||
helmet.contentSecurityPolicy no longer sets block-all-mixed-content directive by default
|
||||
helmet.expectCt is no longer set by default. It can, however, be explicitly enabled. It will be removed in Helmet 7.
|
||||
@@ -0,0 +1,108 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/backend-test-utils': patch
|
||||
'@backstage/catalog-client': patch
|
||||
'@backstage/cli': patch
|
||||
'@backstage/config-loader': patch
|
||||
'@backstage/core-app-api': patch
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/core-plugin-api': patch
|
||||
'@backstage/integration-react': patch
|
||||
'@backstage/integration': patch
|
||||
'@backstage/release-manifests': patch
|
||||
'@backstage/test-utils': patch
|
||||
'@backstage/plugin-adr-backend': patch
|
||||
'@backstage/plugin-adr': patch
|
||||
'@backstage/plugin-airbrake-backend': patch
|
||||
'@backstage/plugin-airbrake': patch
|
||||
'@backstage/plugin-allure': patch
|
||||
'@backstage/plugin-analytics-module-ga': patch
|
||||
'@backstage/plugin-apache-airflow': patch
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-apollo-explorer': patch
|
||||
'@backstage/plugin-app-backend': patch
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
'@backstage/plugin-auth-node': patch
|
||||
'@backstage/plugin-azure-devops-backend': patch
|
||||
'@backstage/plugin-azure-devops': patch
|
||||
'@backstage/plugin-badges': patch
|
||||
'@backstage/plugin-bitbucket-cloud-common': patch
|
||||
'@backstage/plugin-bitrise': patch
|
||||
'@backstage/plugin-catalog-backend-module-azure': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket-cloud': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket-server': patch
|
||||
'@backstage/plugin-catalog-backend-module-bitbucket': patch
|
||||
'@backstage/plugin-catalog-backend-module-gerrit': patch
|
||||
'@backstage/plugin-catalog-backend-module-github': patch
|
||||
'@backstage/plugin-catalog-backend-module-gitlab': patch
|
||||
'@backstage/plugin-catalog-backend-module-msgraph': patch
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
'@backstage/plugin-catalog-graphql': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-circleci': patch
|
||||
'@backstage/plugin-cloudbuild': patch
|
||||
'@backstage/plugin-code-climate': patch
|
||||
'@backstage/plugin-code-coverage-backend': patch
|
||||
'@backstage/plugin-code-coverage': patch
|
||||
'@backstage/plugin-codescene': patch
|
||||
'@backstage/plugin-config-schema': patch
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
'@backstage/plugin-dynatrace': patch
|
||||
'@backstage/plugin-explore-react': patch
|
||||
'@backstage/plugin-explore': patch
|
||||
'@backstage/plugin-firehydrant': patch
|
||||
'@backstage/plugin-fossa': patch
|
||||
'@backstage/plugin-gcalendar': patch
|
||||
'@backstage/plugin-gcp-projects': patch
|
||||
'@backstage/plugin-git-release-manager': patch
|
||||
'@backstage/plugin-github-actions': patch
|
||||
'@backstage/plugin-github-deployments': patch
|
||||
'@backstage/plugin-github-issues': patch
|
||||
'@backstage/plugin-github-pull-requests-board': patch
|
||||
'@backstage/plugin-gitops-profiles': patch
|
||||
'@backstage/plugin-gocd': patch
|
||||
'@backstage/plugin-graphiql': patch
|
||||
'@backstage/plugin-graphql-backend': patch
|
||||
'@backstage/plugin-home': patch
|
||||
'@backstage/plugin-ilert': patch
|
||||
'@backstage/plugin-jenkins-backend': patch
|
||||
'@backstage/plugin-jenkins': patch
|
||||
'@backstage/plugin-kafka': patch
|
||||
'@backstage/plugin-kubernetes': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
'@backstage/plugin-newrelic': patch
|
||||
'@backstage/plugin-org': patch
|
||||
'@backstage/plugin-pagerduty': patch
|
||||
'@backstage/plugin-periskop-backend': patch
|
||||
'@backstage/plugin-periskop': patch
|
||||
'@backstage/plugin-permission-backend': patch
|
||||
'@backstage/plugin-permission-common': patch
|
||||
'@backstage/plugin-permission-node': patch
|
||||
'@backstage/plugin-proxy-backend': patch
|
||||
'@backstage/plugin-rollbar-backend': patch
|
||||
'@backstage/plugin-rollbar': patch
|
||||
'@backstage/plugin-scaffolder-backend-module-cookiecutter': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
'@backstage/plugin-search': patch
|
||||
'@backstage/plugin-sentry': patch
|
||||
'@backstage/plugin-shortcuts': patch
|
||||
'@backstage/plugin-sonarqube-backend': patch
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
'@backstage/plugin-splunk-on-call': patch
|
||||
'@backstage/plugin-stack-overflow': patch
|
||||
'@backstage/plugin-tech-insights': patch
|
||||
'@backstage/plugin-tech-radar': patch
|
||||
'@backstage/plugin-techdocs-addons-test-utils': patch
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
'@backstage/plugin-techdocs-module-addons-contrib': patch
|
||||
'@backstage/plugin-techdocs': patch
|
||||
'@backstage/plugin-todo-backend': patch
|
||||
'@backstage/plugin-todo': patch
|
||||
'@backstage/plugin-user-settings': patch
|
||||
'@backstage/plugin-vault-backend': patch
|
||||
'@backstage/plugin-vault': patch
|
||||
'@backstage/plugin-xcmetrics': patch
|
||||
---
|
||||
|
||||
Updated dependency `msw` to `^0.46.0`.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/cli': minor
|
||||
---
|
||||
|
||||
Updated dependency `eslint-plugin-jest` to `^27.0.0`.
|
||||
|
||||
Note that this major update to the Jest plugin contains some breaking changes.
|
||||
This means that some of your tests may start seeing some new lint errors. [Read
|
||||
about them
|
||||
here](https://github.com/jest-community/eslint-plugin-jest/blob/main/CHANGELOG.md#2700-2022-08-28).
|
||||
|
||||
These are mostly possible to fix automatically. You can try to run `yarn backstage-cli repo lint --fix` in your repo root to have most or all of them
|
||||
corrected.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins-backend': patch
|
||||
---
|
||||
|
||||
Updated dependency `jenkins` to `^1.0.0`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-elasticsearch': patch
|
||||
---
|
||||
|
||||
Updated dependency `aws-os-connection` to `^0.2.0`.
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
'@backstage/plugin-search-react': minor
|
||||
---
|
||||
|
||||
Provides search autocomplete functionality through a `SearchAutocomplete` component.
|
||||
A `SearchAutocompleteDefaultOption` can also be used to render options with icons, primary texts, and secondary texts.
|
||||
Example:
|
||||
|
||||
```jsx
|
||||
import React, { ChangeEvent, useState, useCallback } from 'react';
|
||||
import useAsync from 'react-use/lib/useAsync';
|
||||
|
||||
import { Grid, Paper } from '@material-ui/core';
|
||||
|
||||
import { Page, Content } from '@backstage/core-components';
|
||||
import { SearchAutocomplete, SearchAutocompleteDefaultOption} from '@backstage/plugin-search-react';
|
||||
|
||||
const OptionsIcon = () => <svg />
|
||||
|
||||
const SearchPage = () => {
|
||||
const [inputValue, setInputValue] = useState('');
|
||||
|
||||
const options = useAsync(async () => {
|
||||
// Gets and returns autocomplete options
|
||||
}, [inputValue])
|
||||
|
||||
const useCallback((_event: ChangeEvent<{}>, newInputValue: string) => {
|
||||
setInputValue(newInputValue);
|
||||
}, [setInputValue])
|
||||
|
||||
return (
|
||||
<Page themeId="home">
|
||||
<Content>
|
||||
<Grid container direction="row">
|
||||
<Grid item xs={12}>
|
||||
<Paper>
|
||||
<SearchAutocomplete
|
||||
options={options}
|
||||
inputValue={inputValue}
|
||||
inputDebounceTime={100}
|
||||
onInputChange={handleInputChange}
|
||||
getOptionLabel={option => option.title}
|
||||
renderOption={option => (
|
||||
<SearchAutocompleteDefaultOption
|
||||
icon={<OptionIcon />}
|
||||
primaryText={option.title}
|
||||
secondaryText={option.text}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Paper>
|
||||
</Grid>
|
||||
</Grid>
|
||||
{'/* Filters and results are omitted */'}
|
||||
</Content>
|
||||
</Page>
|
||||
);
|
||||
};
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
Use the new `inheritParentContextIfAvailable` search context property in `SearchModal` instead of manually checking if a parent context exists, this conditional statement was previously duplicated in more than one component like in `SearchBar` as well and is now only done in ` SearchContextProvider`.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-search-react': minor
|
||||
---
|
||||
|
||||
We noticed a repeated check for the existence of a parent context before creating a child search context in more the one component such as Search Modal and Search Bar and to remove code duplication we extract the conditional to the context provider, now you can use it passing an `inheritParentContextIfAvailable` prop to the `SearchContextProvider`.
|
||||
|
||||
Note: This added property does not create a local context if there is a parent context and in this case, you cannot use it together with `initialState`, it will result in a type error because the parent context is already initialized.
|
||||
@@ -0,0 +1,14 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Added `yarn new` as one of the scripts installed by default, which calls `backstage-cli new`. This script replaces `create-plugin`, which you can now remove if you want to. It is kept in the `create-app` template for backwards compatibility.
|
||||
|
||||
The `remove-plugin` command has been removed, as it has been removed from the Backstage CLI.
|
||||
|
||||
To apply these changes to an existing app, make the following change to the root `package.json`:
|
||||
|
||||
```diff
|
||||
- "remove-plugin": "backstage-cli remove-plugin"
|
||||
+ "new": "backstage-cli new --scope internal"
|
||||
```
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
The options part of `DatabaseManager.fromConfig` now accepts an optional logger
|
||||
field. You may want to supply that logger in your backend initialization code to
|
||||
ensure that you can get relevant logging data when things happen related to the
|
||||
connection pool.
|
||||
|
||||
In `packages/backend/src/index.ts`:
|
||||
|
||||
```diff
|
||||
function makeCreateEnv(config: Config) {
|
||||
const root = getRootLogger();
|
||||
...
|
||||
- const databaseManager = DatabaseManager.fromConfig(config);
|
||||
+ const databaseManager = DatabaseManager.fromConfig(config, { logger: root });
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-stack-overflow': patch
|
||||
---
|
||||
|
||||
Create a front end API.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
fix uiSchema generation when using complex dependencies
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Added a new `backstage-cli repo clean` command that cleans the repo root and runs the clean script in all packages.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-github': patch
|
||||
---
|
||||
|
||||
Added the ability to configure the host for the `GitHubEntityProvider` to use against GitHub Enterprise
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Limit the length of error messages that get written to the database and logs - to prevent performance issues
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Added alpha `scaffolderPlugin` to be used with experimental backend system.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-github-pull-requests-board': patch
|
||||
---
|
||||
|
||||
Add optional `pullRequestLimit` prop to `EntityTeamPullRequestsCard` and `EntityTeamPullRequestsContent` to limit the number of PRs shown per repository. Excluding this prop will default the number of pull requests shown to 10 per repository (the existing functionality).
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
Updated `FlatRoutes` to be compatible with React Router v6 stable.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Use the new `SearchAutocomplete` component in the `TechDocsSearch` component to maintain consistency across search experiences and avoid code duplication.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-permission-backend': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Uptake the `IdentityApi` change to use `getIdentity` instead of `authenticate` for retrieving the logged in users identity.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
'@backstage/core-app-api': patch
|
||||
---
|
||||
|
||||
If you'd like to send analytics events to multiple implementations, you may now
|
||||
do so using the `MultipleAnalyticsApi` implementation provided by this package.
|
||||
|
||||
```tsx
|
||||
import { MultipleAnalyticsApi } from '@backstage/core-app-api';
|
||||
import {
|
||||
analyticsApiRef,
|
||||
configApiRef,
|
||||
storageApiRef,
|
||||
identityApiRef,
|
||||
} from '@internal/backstage/core-plugin-api';
|
||||
import { CustomAnalyticsApi } from '@internal/analytics';
|
||||
import { VendorAnalyticsApi } from '@vendor/analytics';
|
||||
|
||||
createApiFactory({
|
||||
api: analyticsApiRef,
|
||||
deps: { configApi: configApiRef, identityApi: identityApiRef, storageApi: storageApiRef },
|
||||
factory: ({ configApi, identityApi, storageApi }) =>
|
||||
MultipleAnalyticsApi.fromApis([
|
||||
VendorAnalyticsApi.fromConfig(configApi, { identityApi }),
|
||||
CustomAnalyticsApi.fromConfig(configApi, { identityApi, storageApi }),
|
||||
]),
|
||||
}),
|
||||
```
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Updated the root `package.json` to use the new `backstage-cli repo clean` command.
|
||||
|
||||
To apply this change to an existing project, make the following change to the root `package.json`:
|
||||
|
||||
```diff
|
||||
- "clean": "backstage-cli clean && lerna run clean",
|
||||
+ "clean": "backstage-cli repo clean",
|
||||
```
|
||||
@@ -1,4 +1,6 @@
|
||||
.git
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
docs
|
||||
cypress
|
||||
microsite
|
||||
|
||||
@@ -190,12 +190,14 @@ jobs:
|
||||
run: git diff --quiet origin/master HEAD -- yarn.lock
|
||||
continue-on-error: true
|
||||
|
||||
- name: lock
|
||||
run: yarn lock:check
|
||||
|
||||
- name: lint
|
||||
- name: lint changed packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'success' }}
|
||||
run: yarn backstage-cli repo lint --since origin/master
|
||||
|
||||
- name: lint all packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'failure' }}
|
||||
run: yarn backstage-cli repo lint
|
||||
|
||||
- name: test changed packages
|
||||
if: ${{ steps.yarn-lock.outcome == 'success' }}
|
||||
run: yarn lerna -- run test --since origin/master -- --coverage --runInBand
|
||||
|
||||
@@ -56,7 +56,7 @@ jobs:
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
# End of yarn setup
|
||||
|
||||
- name: create-app
|
||||
|
||||
@@ -29,12 +29,12 @@ jobs:
|
||||
# dependencies and the microsite. We leave it to the main master workflow to produce the
|
||||
# cache, as that results in a smaller bundle.
|
||||
- name: top-level yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
- name: microsite yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
working-directory: microsite
|
||||
- name: storybook yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
working-directory: storybook
|
||||
|
||||
- name: build API reference
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
- name: Install Dependencies
|
||||
run: yarn --frozen-lockfile
|
||||
run: yarn --immutable
|
||||
- name: Create Release Pull Request
|
||||
uses: backstage/changesets-action@v2
|
||||
with:
|
||||
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
- uses: actions/setup-python@v3
|
||||
|
||||
- name: install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: generate types
|
||||
run: yarn tsc
|
||||
|
||||
@@ -48,7 +48,7 @@ jobs:
|
||||
- name: setup chrome
|
||||
uses: browser-actions/setup-chrome@latest
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
|
||||
- run: yarn tsc
|
||||
- run: yarn backstage-cli repo build
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
name: E2E Test Kubernetes
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'yarn.lock'
|
||||
- '.github/workflows/verify_kubernetes.yml'
|
||||
- 'packages/backend-common/src/**'
|
||||
|
||||
jobs:
|
||||
verify:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [14.x, 16.x]
|
||||
|
||||
env:
|
||||
CI: true
|
||||
KUBERNETES_TESTS: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
|
||||
- name: yarn install
|
||||
uses: backstage/actions/yarn-install@v0.5.5
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: bootstrap kind
|
||||
uses: helm/kind-action@v1.3.0
|
||||
|
||||
- name: kubernetes test
|
||||
working-directory: packages/backend-common
|
||||
run: yarn test:kubernetes
|
||||
@@ -29,17 +29,13 @@ jobs:
|
||||
# Skip caching of microsite dependencies, it keeps the global cache size
|
||||
# smaller, which make Windows builds a lot faster for the rest of the project.
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
working-directory: microsite
|
||||
|
||||
- name: prettier
|
||||
run: yarn prettier:check
|
||||
working-directory: microsite
|
||||
|
||||
- name: lock
|
||||
run: yarn lock:check
|
||||
working-directory: microsite
|
||||
|
||||
- name: build microsite
|
||||
run: yarn build
|
||||
working-directory: microsite
|
||||
|
||||
@@ -39,7 +39,7 @@ jobs:
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
- name: storybook yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
working-directory: storybook
|
||||
|
||||
- run: yarn build-storybook
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
|
||||
# Windows file operation slowness means there's no point caching this
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: lint
|
||||
run: yarn backstage-cli repo lint
|
||||
|
||||
@@ -61,6 +61,15 @@ typings/
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Yarn 3 files
|
||||
.pnp.*
|
||||
**/.yarn/*
|
||||
!**/.yarn/patches
|
||||
!**/.yarn/plugins
|
||||
!**/.yarn/releases
|
||||
!**/.yarn/sdks
|
||||
!**/.yarn/versions
|
||||
|
||||
# Node version directives
|
||||
.nvmrc
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ services:
|
||||
- echo "yarn --cwd ${TUGBOAT_ROOT} start-backend --config ${TUGBOAT_ROOT}/app-config.yaml --config ${TUGBOAT_ROOT}/.tugboat/tugboat.app-config.production.yaml" >> /etc/service/node/run
|
||||
- chmod +x /etc/service/node/run
|
||||
build:
|
||||
- yarn install --frozen-lockfile
|
||||
- yarn install --immutable
|
||||
- yarn workspace example-app build
|
||||
start:
|
||||
# wget the endpoint. Will retry every 2 seconds. 30 retries = 1m for service to come up. Plenty.
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
-147529
File diff suppressed because one or more lines are too long
+783
File diff suppressed because one or more lines are too long
@@ -1,9 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
registry "https://registry.npmjs.org/"
|
||||
disable-self-update-check true
|
||||
lastUpdateCheck 1580389148099
|
||||
yarn-path ".yarn/releases/yarn-1.22.19.js"
|
||||
network-timeout 300000
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
enableGlobalCache: true
|
||||
|
||||
httpTimeout: 300000
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
npmRegistryServer: 'https://registry.npmjs.org/'
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: '@yarnpkg/plugin-workspace-tools'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.3.cjs
|
||||
+4
-2
@@ -171,7 +171,7 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi
|
||||
| [AEB](https://www.aeb.com/) | [David Fankhänel](mailto:dfl@aeb.com) | Central developer platform for creating new apps via templates, getting an overview via software catalog, etc |
|
||||
| [SALTO Systems](https://saltosystems.com) | [Ian Cowley](mailto:i.cowley@saltosystems.com) | Currently using Backstage as an internal documentation portal. |
|
||||
| [Lummo](https://lummo.com) | [Anjul Sahu](mailto:anjul@lummo.com) | We are building the internal developer portal using Backstage and bringing up all integrations and service information at one place. |
|
||||
| [Frontside](https://frontside.com) | [Taras Mankovski](mailto:taras@frontside.com) | |
|
||||
| [Frontside](https://frontside.com/backstage) | [Taras Mankovski](mailto:taras@frontside.com) | An active community member and contributor, Frontside offers both custom development as well as enterprise support services to help teams get the most out of Backstage for the long-run. |
|
||||
| [Stepstone](https://www.stepstone.com/en/) | [Neil Kennedy](mailto:neil.kennedy@stepstone.com) | StepStone is using Backstage to solve problems around ownership and visibility of our applications. We have thousands of repos, multiple legacy systems and a growing platform that is hard to maintain. Backstage is forming the centre of our push to embrace the chaos. |
|
||||
| [idwall](https://idwall.co) | [Rodrigo Catão Araujo](mailto:rodrigo@idwall.co) | Developer Portal for internal engineers to access service catalog, documentation, observability, infrastructure and internal tooling. |
|
||||
| [Jaguar Land Rover](https://www.jaguarlandrover.com) | [Josh Walker](mailto:jwalke18@jaguarlandrover.com) | Users can request a Gitlab user, which creates a commit with the Terraform code. |
|
||||
@@ -207,4 +207,6 @@ _You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKi
|
||||
| [Fanatics](https://www.fanaticsinc.com/) | [Rory Scott](mailto:rscott@fanatics.com) | Internal Portal consolidating documentation, making it easier to manage applications, internal developer community platform, and self-service cloud infrastructure + pipelines. |
|
||||
| [Appfolio](https://appfolio.com) | [Andy Vaughn](mailto:andy.vaughn@appfolio.com) | Internal software catalog, tech radar, documentation portal to disambiguate software and domain ownership, foster exploration of available developer platform services and tools, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
|
||||
| [isaac](https://isaac.com.br/) | [Leonardo Borges](mailto:leonardo.borges@isaac.com.br), [Ordilei Souza](mailto:ordilei.souza@isaac.com.br) | We're using Backstage as our Internal Developer Portal and main microservices catalog for mapping ownership, health and metrics for each one. |
|
||||
| [Paraná Banco](https://site.paranabanco.com.br/) | [Joao Antunes](mailto:joaopma@pbtech.net.br) | Internal software catalog, documentation and ownership, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
|
||||
| [Paraná Banco](https://site.paranabanco.com.br/) | [Joao Antunes](mailto:joaopma@pbtech.net.br) | Internal software catalog, documentation and ownership, improve communication, democratize documentation and knowledge sharing, and coordinate the software lifecycle; all in service of a best-in-class developer experience. |
|
||||
| [Stone](https://stone.com.br/) | [Levy Fialho](mailto:lfialho@stone.com.br) | We're using Backstage as our Credit Team Developer Portal and microservices catalog for mapping ownership. We are also using mkdocs for microservices documentation. |
|
||||
| [REI](https://www.rei.com/) | [Jen Evans](mailto:jenevan@rei.com) | Developer portal focused on an enterprise-wide app catalog to track ownership and surface APIs. |
|
||||
|
||||
@@ -7,7 +7,6 @@ app:
|
||||
# applicationId: qwerty
|
||||
# site: # datadoghq.eu default = datadoghq.com
|
||||
# env: # optional
|
||||
|
||||
support:
|
||||
url: https://github.com/backstage/backstage/issues # Used by common ErrorPage
|
||||
items: # Used by common SupportButton component
|
||||
|
||||
+9
-9
@@ -40,14 +40,14 @@
|
||||
lodash.once "^4.1.1"
|
||||
|
||||
"@types/node@*":
|
||||
version "18.7.6"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-18.7.6.tgz#31743bc5772b6ac223845e18c3fc26f042713c83"
|
||||
integrity sha512-EdxgKRXgYsNITy5mjjXjVE/CS8YENSdhiagGrLqjG0pvA2owgJ6i4l7wy/PFZGC0B1/H20lWKN7ONVDNYDZm7A==
|
||||
version "18.7.14"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-18.7.14.tgz#0fe081752a3333392d00586d815485a17c2cf3c9"
|
||||
integrity sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==
|
||||
|
||||
"@types/node@^14.14.31":
|
||||
version "14.18.24"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-14.18.24.tgz#406b220dc748947e1959d8a38a75979e87166704"
|
||||
integrity sha512-aJdn8XErcSrfr7k8ZDDfU6/2OgjZcB2Fu9d+ESK8D7Oa5mtsv8Fa8GpcwTA0v60kuZBaalKPzuzun4Ov1YWO/w==
|
||||
version "14.18.26"
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-14.18.26.tgz#239e19f8b4ea1a9eb710528061c1d733dc561996"
|
||||
integrity sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA==
|
||||
|
||||
"@types/sinonjs__fake-timers@8.1.1":
|
||||
version "8.1.1"
|
||||
@@ -304,9 +304,9 @@ cross-spawn@^7.0.0:
|
||||
which "^2.0.1"
|
||||
|
||||
cypress@^10.0.0:
|
||||
version "10.6.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.6.0.tgz#13f46867febf2c3715874ed5dce9c2e946b175fe"
|
||||
integrity sha512-6sOpHjostp8gcLO34p6r/Ci342lBs8S5z9/eb3ZCQ22w2cIhMWGUoGKkosabPBfKcvRS9BE4UxybBtlIs8gTQA==
|
||||
version "10.7.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.7.0.tgz#2d37f8b9751c6de33ee48639cb7e67a2ce593231"
|
||||
integrity sha512-gTFvjrUoBnqPPOu9Vl5SBHuFlzx/Wxg/ZXIz2H4lzoOLFelKeF7mbwYUOzgzgF0oieU2WhJAestQdkgwJMMTvQ==
|
||||
dependencies:
|
||||
"@cypress/request" "^2.88.10"
|
||||
"@cypress/xvfb" "^1.2.4"
|
||||
|
||||
@@ -212,7 +212,7 @@ future.
|
||||
common for companies to have their own npm registry, and this file makes sure
|
||||
that this folder always uses the public registry.
|
||||
|
||||
- [`.yarnrc`](https://github.com/backstage/backstage/tree/master/.yarnrc) -
|
||||
- [`.yarnrc.yml`](https://github.com/backstage/backstage/tree/master/.yarnrc.yml) -
|
||||
Enforces "our" version of Yarn.
|
||||
|
||||
- [`app-config.yaml`](https://github.com/backstage/backstage/tree/master/app-config.yaml) -
|
||||
|
||||
@@ -46,7 +46,7 @@ The source code is available here:
|
||||
Create a new `packages/backend/src/plugins/todolist.ts` with the following content:
|
||||
|
||||
```javascript
|
||||
import { IdentityClient } from '@backstage/plugin-auth-node';
|
||||
import { DefaultIdentityClient } from '@backstage/plugin-auth-node';
|
||||
import { createRouter } from '@internal/plugin-todo-list-backend';
|
||||
import { Router } from 'express';
|
||||
import { PluginEnvironment } from '../types';
|
||||
@@ -57,7 +57,7 @@ The source code is available here:
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
return await createRouter({
|
||||
logger,
|
||||
identity: IdentityClient.create({
|
||||
identity: DefaultIdentityClient.create({
|
||||
discovery,
|
||||
issuer: await discovery.getExternalBaseUrl('auth'),
|
||||
}),
|
||||
|
||||
@@ -154,3 +154,39 @@ schema migrations as well, but you can do so in any manner that you see fit.
|
||||
See the [Knex library documentation](http://knexjs.org/) for examples and
|
||||
details on how to write schema migrations and perform SQL queries against your
|
||||
database..
|
||||
|
||||
## Making Use of the User's Identity
|
||||
|
||||
The Backstage backend comes with a facility for retrieving the identity of the
|
||||
logged in user.
|
||||
|
||||
As part of the environment object that is passed to your `createPlugin`
|
||||
function, there is a `identity` field. You can use that to get an identity
|
||||
from the request.
|
||||
|
||||
```ts
|
||||
// in packages/backend/src/plugins/carmen.ts
|
||||
export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
return await createRouter({
|
||||
model: model,
|
||||
logger: env.logger,
|
||||
identity: env.identity,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
The plugin can then extract the identity from the request.
|
||||
|
||||
```ts
|
||||
export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
const router = Router();
|
||||
|
||||
router.post('/example', async (req, res) => {
|
||||
const identity = await identity.getIdentity({ request: req });
|
||||
...
|
||||
});
|
||||
```
|
||||
|
||||
+2
-1
@@ -55,6 +55,7 @@ process is used to release an emergency fix as version `6.5.1` in the patch rele
|
||||
of the repo in order to convert your changeset into package version bumps and changelog entries.
|
||||
Commit these changes as a second `"Generated release"` commit.
|
||||
- [ ] Create PR towards the base branch (`patch/v1.18.0`) containing the two commits.
|
||||
- [ ] Add a PR body, it will be used as the release description. Typically something like "This release fixes ...".
|
||||
- [ ] Review/Merge the PR into `patch/v1.18.0`. This will automatically trigger a release.
|
||||
|
||||
- [ ] Look up the new version of our package in the patch PR as well as the new release
|
||||
@@ -65,5 +66,5 @@ process is used to release an emergency fix as version `6.5.1` in the patch rele
|
||||
master branch as well. Create a PR that contains the following:
|
||||
|
||||
- [ ] The fix, which you can likely cherry-pick from your patch branch: `git cherry-pick origin/patch/v1.18.0^`
|
||||
- [ ] An updated `CHANGELOG.md` of all patched packages from the tip of the patch branch, `git checkout origin/patch/v1.18.0 -- {packages,plugins}/*/CHANGELOG.md`.
|
||||
- [ ] An updated `CHANGELOG.md` of all patched packages from the tip of the patch branch, `git checkout origin/patch/v1.18.0 -- {packages,plugins}/*/CHANGELOG.md`. Note that if the patch happens after any next-line releases you'll need to restore those entries in the changelog, placing the patch release entry beneath any next-line release entries.
|
||||
- [ ] A changeset with the message "Applied the fix from version `6.5.1` of this package, which is part of the `v1.18.1` release of Backstage."
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,205 @@
|
||||
---
|
||||
id: react-router-stable-migration
|
||||
title: React Router 6.0 Migration
|
||||
description: Guide for how to migrate from React Router v6 beta to React Router v6 stable
|
||||
---
|
||||
|
||||
Backstage has for a long time been using `react-router` version `6.0.0-beta.0`.
|
||||
We adopted this unstable version because v6 had some new features that fit
|
||||
really well with Backstage, particularly relative routing. Because we jumped on
|
||||
this early and unstable version, we knew that we would at some point need a
|
||||
breaking migration to the stable version of `react-router` v6, which is the
|
||||
point we're at now!
|
||||
|
||||
This migration is required but controlled by each app, meaning that you choose
|
||||
when you want to migrate your app. There will however be some point in the
|
||||
future where we drop support for the beta version of `react-router`, at which
|
||||
time you would be forced to migrate.
|
||||
|
||||
The stable version of React Router v6 brings a number of improvements and bug
|
||||
fixes. Notably, the way that paths are resolved has been improved, which fixes a
|
||||
bug where paths like `/catalog` and `/catalog-import` could get confused.
|
||||
|
||||
## Migration
|
||||
|
||||
### Step 1 - Upgrade to Backstage 1.6
|
||||
|
||||
The first Backstage release to support `react-router` v6 is `1.6`. You should upgrade to this version first before you start migrating. If you are an early bird and want to try out migration before that release, it is also shipped in `1.6.0-next.1`.
|
||||
|
||||
### Step 2 - Move `react-router` to `peerDependencies`
|
||||
|
||||
It's important that only one version of `react-router` is installed in the
|
||||
project at a time. Similar to how the `react` version is handled, all plugins
|
||||
and packages now declare a peer dependency on the React Router dependencies,
|
||||
rather than a direct dependency. The only exception to this is the app package
|
||||
(in `packages/app/package.json`), which has the direct dependencies that end up
|
||||
deciding what version of React Router that you are using in your project.
|
||||
|
||||
Your internal packages might specify a dependency on `react-router` or `react-router-dom` in their `package.json`, and it's important that those are converted to `peerDependencies` so that we can control the version of `react-router` in the app `package.json`.
|
||||
|
||||
You can automate this step by running the following command:
|
||||
|
||||
```bash
|
||||
yarn backstage-cli migrate react-router-deps
|
||||
```
|
||||
|
||||
For those interested in doing this manually, apply the below change to all `package.json` files except the one at `packages/app/package.json` or any other app packages. Skip moving any dependencies that don't already exist, and move both `dependencies` and `devDependencies`.
|
||||
|
||||
```diff
|
||||
dependencies {
|
||||
...
|
||||
- "react-router-dom": "^6.0.0-beta.0",
|
||||
- "react-router": "^6.0.0-beta.0"
|
||||
},
|
||||
peerDependencies: {
|
||||
...
|
||||
+ "react-router-dom": "6.0.0-beta.0 || ^6.3.0",
|
||||
+ "react-router": "6.0.0-beta.0 || ^6.3.0"
|
||||
},
|
||||
```
|
||||
|
||||
### Step 3 - Ensure that your external plugins are updated
|
||||
|
||||
It's important that you also update your external plugins to their latest version as these will have to perform the same `peerDependencies` update.
|
||||
|
||||
During this migration there may be external plugins that need updating. If you encounter any plugins outside of the `@backstage` scope that are incompatible with your installation, make sure to check for an existing issue or raise a new one at the plugin's GitHub repository.
|
||||
|
||||
### Step 4 - Bump the React Router dependencies in your app.
|
||||
|
||||
Now it's time to do the actual migration to the latest version of React Router. At this time of writing that is `6.3.0`, but that is of course a moving target.
|
||||
|
||||
The first step is to modify `packages/app/package.json`:
|
||||
|
||||
```diff
|
||||
- "react-router": "6.0.0-beta.0",
|
||||
- "react-router-dom": "6.0.0-beta.0",
|
||||
+ "react-router": "^6.3.0",
|
||||
+ "react-router-dom": "^6.3.0",
|
||||
```
|
||||
|
||||
In case you happen to have multiple app packages in your project, apply the same change to all those packages.
|
||||
|
||||
Once the change has been made, run `yarn install`, and then `yarn why react-router` to validate the installation. You should see the following line in the log as the only resulting entry:
|
||||
|
||||
```
|
||||
=> Found "react-router@6.3.0"
|
||||
```
|
||||
|
||||
If you see multiple entries, and especially `=> Found "react-router@6.0.0-beta.0"`, then your dependencies have not yet been fully migrated to support React Router v6 stable. Double check the steps above, using the information that the Yarn `why` command logged. Repeat the same process for `yarn why react-router-dom`.
|
||||
|
||||
If you end up being stuck not being able to move your entire project to stable versions cleanly, then you can use Yarn `"resolutions"` overrides in your root `package.json`. Try to avoid this option as it may lead to hidden breakages at runtime, and verify any plugins that needed the override. A better option is likely to hold off migrating for a while until plugins have had time to be updated.
|
||||
|
||||
### Step 5 - Breaking Changes
|
||||
|
||||
For a new app created with `npx @backstage/create-app`, the above steps are all you need to do. If you have created internal plugins and customizations then be sure to review the breaking changes in the [React Router changelog](https://reactrouter.com/docs/en/v6/upgrading/reach#breaking-updates) and validate all parts of your app. We've summarized the most important breaking changes below.
|
||||
|
||||
## Breaking Changes
|
||||
|
||||
See [changelog](https://reactrouter.com/docs/en/v6/upgrading/reach#breaking-updates) for a full list of breaking changes. Below we highlight a couple of the most important ones.
|
||||
|
||||
### Route paths
|
||||
|
||||
`Route` components must always contain a `path` or `index` prop.
|
||||
|
||||
```tsx
|
||||
<Routes>
|
||||
{/* Invalid */}
|
||||
<Route element={<Example />} />
|
||||
|
||||
{/* Valid */}
|
||||
<Route path="/" element={<Example />} />
|
||||
|
||||
{/* Valid but discouraged due to incompatibility with react-router beta */}
|
||||
<Route index element={<Example />} />
|
||||
</Routes>
|
||||
```
|
||||
|
||||
Absolute route paths within each `Routes` element must now match their own location, meaning that the following is invalid:
|
||||
|
||||
```tsx
|
||||
<Routes>
|
||||
<Route path="/foo">
|
||||
<Route path="/bar" /> {/* INVALID, must be "/foo/bar" or "bar" */}
|
||||
</Route>
|
||||
</Routes>
|
||||
```
|
||||
|
||||
### Routes and Route components
|
||||
|
||||
The `Routes` and `Route` component both received a large related breaking changes. It is no longer possible
|
||||
to have anything but `Route` elements and React fragments be a child of a `Routes` element. This means that
|
||||
structures like these:
|
||||
|
||||
```tsx
|
||||
<Routes>
|
||||
<MyComponent path="/foo" />
|
||||
...
|
||||
</Routes>
|
||||
```
|
||||
|
||||
need to be migrated to this:
|
||||
|
||||
```tsx
|
||||
<Routes>
|
||||
<Route path="/foo" element={<MyComponent />} />
|
||||
...
|
||||
</Routes>
|
||||
```
|
||||
|
||||
Somewhat related to the `Routes` change, it is no longer possible to render a
|
||||
`Route` element by itself, outside of a `Routes` wrapper. Previously, rendering
|
||||
such a `Route` element would cause the contents of its `element` prop to be
|
||||
rendered instead, but it will now throw an error.
|
||||
|
||||
### `PermissionedRoute`
|
||||
|
||||
Because of the above change, the `PermissionedRoute` component no longer works in all situations with React Router v6 stable. It has been deprecated in favor of the new `RequirePermission` component, which can be placed anywhere in order to perform a permissions check.
|
||||
|
||||
It's crucial that you update to `RequirePermission` at the same time as you update to React Router v6 stable as the `PermissionedRoute` component will no longer function.
|
||||
|
||||
```diff
|
||||
- <PermissionedRoute
|
||||
- path="/catalog-import"
|
||||
- permission={catalogEntityCreatePermission}
|
||||
- element={<CatalogImportPage />}
|
||||
+ <Route
|
||||
+ path="/catalog-import"
|
||||
+ element={
|
||||
+ <RequirePermission permission={catalogEntityCreatePermission}>
|
||||
+ <CatalogImportPage />
|
||||
+ </RequirePermission>
|
||||
+ }
|
||||
/>
|
||||
```
|
||||
|
||||
### `<Navigate />` component
|
||||
|
||||
When migrating over to React Router v6 stable, you might also see browser console warnings for the `Navigate` component. This will need to be wrapped up in a `Route` component with the `Navigate` component in the `element` prop.
|
||||
|
||||
```diff
|
||||
- <Navigate key="/" to="catalog" />
|
||||
+ <Route path="/" element={<Navigate to="/catalog" />} />
|
||||
```
|
||||
|
||||
### `NavLink`
|
||||
|
||||
The `NavLink` component no longer has the `activeClassName` and `activeStyle` props. Instead, the `className` and `style` props accept a callback that receives a boolean indicating whether the link is active.
|
||||
|
||||
## For Plugin Authors
|
||||
|
||||
There are a few things to keep in mind when migrating a published plugin. You of course need to make sure that dependencies on React Router are moved to `peerDependencies` as described above.
|
||||
In addition, you need to make sure that your plugin truly is compatible with both versions of React Router at runtime. To help you achieve that, you can follow these additional guidelines:
|
||||
|
||||
- Bump the version of `react-router` and `react-router-dom` in your own project to use the stable version. Place them in `devDependencies` if your plugin is a single package project. The stable version is more strict, so this is the better baseline to work from.
|
||||
- Make sure all `Route` elements have a `path` prop. Do not use the new `index` props, as it is not supported by the beta version. Use `path="/"` for the index routes within a `Routes`.
|
||||
- If you are using `NavLink`, use both the new and old APIs simultaneously, and work around any TypeScript errors.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
Check the browser console for React Router related error messages.
|
||||
|
||||
Check `yarn.lock` for packages depending on older versions of `react-router`:
|
||||
|
||||
```bash
|
||||
yarn why react-router
|
||||
```
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
id: yarn-migration
|
||||
title: Migration to Yarn 3
|
||||
description: Guide for how to migrate a Backstage project to use Yarn 3
|
||||
---
|
||||
|
||||
> NOTE: We do not yet recommend all projects to migrate to Yarn 3. Only do so if you have specific reasons for it.
|
||||
|
||||
While Backstage projects created with `@backstage/create-app` use [Yarn 1](https://classic.yarnpkg.com/) by default, it
|
||||
is possible to switch them to instead use [Yarn 3](https://yarnpkg.com/). Tools like `yarn backstage-cli versions:bump` will
|
||||
still work, as they recognize both lockfile formats.
|
||||
|
||||
## Migration
|
||||
|
||||
In addition to this guide, also be sure to check out the [Yarn migration guide](https://yarnpkg.com/getting-started/migration) as well.
|
||||
|
||||
### Ignore File Updates
|
||||
|
||||
First off, be sure to have the updated ignore entries in your app. These are included in all newly created projects, but might be missing in yours:
|
||||
|
||||
Add the following to `.gitignore`:
|
||||
|
||||
```gitignore
|
||||
# Yarn 3 files
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
```
|
||||
|
||||
And this to `.dockerignore`:
|
||||
|
||||
```gitignore
|
||||
.yarn/cache
|
||||
.yarn/install-state.gz
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
Let's move on to the actual installation. We'd recommend making separate Git commits of most of these steps, in case you need to go back and debug anything. To install Yarn 3, run the following command in the project root:
|
||||
|
||||
```bash
|
||||
yarn set version stable
|
||||
```
|
||||
|
||||
We'll need the Yarn workspace tools plugin later on, so let's install that too:
|
||||
|
||||
```bash
|
||||
yarn plugin import @yarnpkg/plugin-workspace-tools
|
||||
```
|
||||
|
||||
Now we're ready to re-install all dependencies. This will update your `yarn.lock` and switch the project to use `node-modules` as the Yarn node linker.
|
||||
|
||||
In case you had a `.yarnrc` you can delete it now, but be sure to migrate over any options to `.yarnrc.yml`. See the [Yarn configuration docs](https://yarnpkg.com/configuration/manifest) for a full list of options. For example, `registry` is now `npmRegistryServer`, and `network-timeout` is `httpTimeout`.
|
||||
|
||||
### Migrate Usage
|
||||
|
||||
At this point you'll be all set up with Yarn 3! What remains is to migrate any usage of Yarn according to their [migration guide](https://yarnpkg.com/getting-started/migration). For example, any `yarn install --frozen-lockfile` commands should be replaced with `yarn install --immutable`.
|
||||
|
||||
You'll also need to update any `Dockerfile`s to add instructions to copy in your Yarn 3 installation into the image:
|
||||
|
||||
```Dockerfile
|
||||
COPY .yarn ./.yarn
|
||||
COPY .yarnrc.yml ./
|
||||
```
|
||||
|
||||
The `--production` flag to `yarn install` has been removed in Yarn 3, instead you need to use `yarn workspaces focus --all --production` to avoid installing development dependencies in your production deployment. A tradeoff of this is that `yarn workspaces focus` does not support the `--immutable` flag.
|
||||
|
||||
```Dockerfile
|
||||
RUN yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)"
|
||||
```
|
||||
|
||||
If you have any internal CLI tools in your project that are exposed through `"bin"` entries in `package.json`, then you'll need to add these packages as dependencies in your project root `package.json`. This is to make sure Yarn picks up the executables and makes them available through `yarn <executable>`.
|
||||
@@ -1,5 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
registry "https://registry.npmjs.org/"
|
||||
network-timeout 300000
|
||||
@@ -0,0 +1,41 @@
|
||||
---
|
||||
# prettier-ignore
|
||||
title: Backstage Security Audit & Updates
|
||||
author: Patrik Oldsberg, Spotify
|
||||
authorURL: https://github.com/Rugvip
|
||||
---
|
||||
|
||||
**TL;DR** Backstage’s security posture continues to mature! Today, we’re releasing a report from an independent security audit and the first version of the Backstage Threat Model.
|
||||
|
||||

|
||||
|
||||
As an [Incubating project](https://www.cncf.io/blog/2022/03/15/backstage-project-joins-the-cncf-incubator/) within the [Cloud Native Computing Foundation (CNCF)](https://www.cncf.io/), Backstage was fortunate enough to take advantage of a sponsored security audit. The [Open Source Technology Improvement Fund (OSTIF)](https://ostif.org/) sponsored the audit as part of its ongoing efforts to secure the open source software ecosystem, and the audit itself was performed by [X41 D-Sec](https://x41-dsec.de/). Our goal with the audit was to evaluate and improve Backstage’s security posture, focusing on the core Backstage framework and plugins.
|
||||
|
||||
<!--truncate-->
|
||||
|
||||
## Report Findings and Fixes
|
||||
|
||||
The security audit and improvements concluded earlier this month, on August 18th. The audit **findings** totalled two critical, two high, five medium, and three low severity vulnerabilities, alongside 15 side findings with no direct security impact. As of the [Backstage 1.5 release](https://backstage.io/docs/releases/v1.5.0), eight out of the 12 main findings and many of the side findings are fully remedied. If you are a few versions behind there’s no need to worry though, most fixes were included in the 1.3 release.
|
||||
|
||||
Out of the four findings that have yet to be fixed, three are related to rate limiting or internal DoS concerns. With the introduction of the Backstage Threat Model (more on that below), Backstage’s positioning states that this is outside the scope of the security concerns of Backstage. Rather, we trust internal users of Backstage to not intentionally sabotage the availability of the service. This is not to say that we will never aim to get these findings addressed, but we have pushed them to be potential future improvements as we focus our near-term efforts on improving the product in other ways.
|
||||
|
||||
The last outstanding finding is to build out the capabilities of our service-to-service auth system. This is an area where the audit identified a couple of missing pieces in our early version of the implementation. We have since closed the gap by introducing token expiration, and will continue to work on this as we open up for more complex and hardened deployment patterns through the [evolution of the backend system](https://github.com/backstage/backstage/issues/11611).
|
||||
|
||||
Another important finding was the potential for confusion and user impersonation due to most authentication providers having sign-in enabled by default. This finding reinforced our decision to switch sign-in to being disabled by default for all authentication providers, which was part of the [1.1 release](https://backstage.io/docs/releases/v1.1.0).
|
||||
|
||||
Perhaps the most important outcome of this audit is that it helped us focus our efforts to keep improving the security of Backstage. It identified priority areas in both implementation and documentation for us going forward. One particular area that was pointed out in a finding is the documentation around the security model of Backstage deployment. There have been several efforts to highlight this in documentation, but it is still not clear enough. What we’ve been lacking is documentation that is completely dedicated towards detailing the security concerns of Backstage. That is why in addition to publishing the security audit report, we are also introducing the [Backstage Threat Model](https://backstage.io/docs/overview/threat-model).
|
||||
|
||||
## Introducing the Backstage Threat Model
|
||||
|
||||
The existing Backstage documentation has many security concerns interwoven within its text, but to find them all, you need to spend a lot of time reading. We previously lacked a one-stop-shop for readers that are interested in the security model and concerns of Backstage. So, we are happy to introduce the [Backstage Threat Model](https://backstage.io/docs/overview/threat-model), which closes this gap. The Threat Model outlines key security considerations for operators, developers, and security researchers. It is a living document that will evolve and expand alongside the Backstage project.
|
||||
|
||||
The threat model document covers the trust model and roles involved in a typical Backstage setup, the responsibilities that fall on integrators of Backstage, and common configuration concerns across all Backstage projects. Beyond these three topics, it also dives deeper into a number of core features. The `auth`, `catalog`, `scaffolder`, and `techdocs` plugins are all covered separately with their individual security concerns.
|
||||
|
||||
We’d like to point out a few key parts in case you are in a rush. Be sure to familiarize yourself with the integrator's responsibility to protect the Backstage installation from unauthorized access. If you ingest organizational data into the catalog and use that to sign in users, you’ll also want to check out the first halves of the authentication and catalog sections.
|
||||
|
||||
## Links and References
|
||||
|
||||
- [Full Audit Report](assets/22-08-23/X41-Backstage-Audit-2022.pdf)
|
||||
- [Backstage Security Policy](https://github.com/backstage/backstage/blob/master/SECURITY.md)
|
||||
|
||||
On behalf of the Backstage maintainers and community: thanks to the CNCF, OSTIF, and X41 D-Sec for the opportunity to improve the project.
|
||||
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 49 KiB |
@@ -12,15 +12,13 @@
|
||||
"write-translations": "docusaurus-write-translations",
|
||||
"version": "docusaurus-version",
|
||||
"rename-version": "docusaurus-rename-version",
|
||||
"verify:sidebars": "node ./scripts/verify-sidebars",
|
||||
"lock:check": "yarn-lock-check"
|
||||
"verify:sidebars": "node ./scripts/verify-sidebars"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@spotify/prettier-config": "^14.0.0",
|
||||
"docusaurus": "^2.0.0-alpha.70",
|
||||
"js-yaml": "^4.1.0",
|
||||
"prettier": "^2.6.2",
|
||||
"yarn-lock-check": "^1.0.5"
|
||||
"prettier": "^2.6.2"
|
||||
},
|
||||
"prettier": "@spotify/prettier-config"
|
||||
}
|
||||
|
||||
@@ -325,12 +325,14 @@
|
||||
"Tutorials": [
|
||||
"tutorials/journey",
|
||||
"tutorials/quickstart-app-plugin",
|
||||
"tutorials/react-router-stable-migration",
|
||||
"tutorials/package-role-migration",
|
||||
"tutorials/migrating-away-from-core",
|
||||
"tutorials/configuring-plugin-databases",
|
||||
"tutorials/switching-sqlite-postgres",
|
||||
"tutorials/using-backstage-proxy-within-plugin",
|
||||
"tutorials/backend-to-backend-auth"
|
||||
"tutorials/backend-to-backend-auth",
|
||||
"tutorials/yarn-migration"
|
||||
],
|
||||
"Architecture Decision Records (ADRs)": [
|
||||
"architecture-decisions/adrs-overview",
|
||||
|
||||
+9553
-6675
File diff suppressed because it is too large
Load Diff
@@ -181,11 +181,13 @@ nav:
|
||||
- Deprecations: 'api/deprecations.md'
|
||||
- Tutorials:
|
||||
- Future developer journey: 'tutorials/journey.md'
|
||||
- React Router 6.0 Migration: 'tutorials/react-router-stable-migration.md'
|
||||
- Package Role Migration: 'tutorials/package-role-migration.md'
|
||||
- Migrating away from @backstage/core: 'tutorials/migrating-away-from-core.md'
|
||||
- Adding Custom Plugin to Existing Monorepo App: 'tutorials/quickstart-app-plugin.md'
|
||||
- Switching Backstage from SQLite to PostgreSQL: 'tutorials/switching-sqlite-postgres.md'
|
||||
- Using the Backstage Proxy from Within a Plugin: 'tutorials/using-backstage-proxy-within-plugin.md'
|
||||
- Migration to Yarn 3: 'tutorials/yarn-migration.md'
|
||||
- Architecture Decision Records (ADRs):
|
||||
- Overview: 'architecture-decisions/index.md'
|
||||
- ADR001 - Architecture Decision Record (ADR) log: 'architecture-decisions/adr001-add-adr-log.md'
|
||||
|
||||
+18
-15
@@ -13,8 +13,8 @@
|
||||
"build:api-reports:only": "ts-node -T -P scripts/tsconfig.json scripts/api-extractor.ts",
|
||||
"build:api-docs": "yarn build:api-reports --docs",
|
||||
"tsc": "tsc",
|
||||
"tsc:full": "backstage-cli clean && tsc --skipLibCheck false --incremental false",
|
||||
"clean": "backstage-cli clean && lerna run clean",
|
||||
"tsc:full": "backstage-cli repo clean && tsc --skipLibCheck false --incremental false",
|
||||
"clean": "backstage-cli repo clean",
|
||||
"diff": "lerna run diff --",
|
||||
"test": "backstage-cli test",
|
||||
"test:all": "lerna run test -- --coverage",
|
||||
@@ -23,20 +23,18 @@
|
||||
"lint:all": "backstage-cli repo lint",
|
||||
"lint:type-deps": "node scripts/check-type-dependencies.js",
|
||||
"docker-build": "yarn tsc && yarn workspace example-backend build --build-dependencies && yarn workspace example-backend build-image",
|
||||
"backstage-create": "backstage-cli create --scope backstage --no-private",
|
||||
"create-plugin": "yarn backstage-create --select plugin",
|
||||
"remove-plugin": "backstage-cli remove-plugin",
|
||||
"release": "node scripts/prepare-release.js && changeset version && yarn diff --yes && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' '.changeset/*.json' && yarn install",
|
||||
"new": "backstage-cli new --scope backstage --no-private",
|
||||
"create-plugin": "echo \"use 'yarn new' instead\"",
|
||||
"release": "node scripts/prepare-release.js && changeset version && yarn diff --yes && yarn prettier --write '{packages,plugins}/*/{package.json,CHANGELOG.md}' '.changeset/*.json' && yarn install --no-immutable",
|
||||
"prettier:check": "prettier --check .",
|
||||
"lerna": "lerna",
|
||||
"storybook": "yarn --cwd storybook start",
|
||||
"storybook": "yarn ./storybook run start",
|
||||
"snyk:test": "npx snyk test --yarn-workspaces --strict-out-of-sync=false",
|
||||
"snyk:test:package": "yarn snyk:test --include",
|
||||
"build-storybook": "yarn --cwd storybook build-storybook",
|
||||
"build-storybook": "yarn ./storybook run build-storybook",
|
||||
"techdocs-cli": "node scripts/techdocs-cli.js",
|
||||
"techdocs-cli:dev": "cross-env TECHDOCS_CLI_DEV_MODE=true node scripts/techdocs-cli.js",
|
||||
"prepare": "husky install",
|
||||
"lock:check": "yarn-lock-check"
|
||||
"prepare": "husky install"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
@@ -48,7 +46,7 @@
|
||||
"@types/react": "^17",
|
||||
"@types/react-dom": "^17"
|
||||
},
|
||||
"version": "1.6.0-next.0",
|
||||
"version": "1.6.0-next.1",
|
||||
"dependencies": {
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
"@microsoft/api-documenter": "^7.17.11",
|
||||
@@ -57,14 +55,19 @@
|
||||
"@microsoft/tsdoc": "^0.14.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "workspace:*",
|
||||
"@backstage/codemods": "workspace:*",
|
||||
"@backstage/create-app": "workspace:*",
|
||||
"@changesets/cli": "^2.14.0",
|
||||
"@octokit/rest": "^19.0.3",
|
||||
"@spotify/prettier-config": "^14.0.0",
|
||||
"@techdocs/cli": "workspace:*",
|
||||
"@types/node": "^16.11.26",
|
||||
"@types/webpack": "^5.28.0",
|
||||
"command-exists": "^1.2.9",
|
||||
"cross-env": "^7.0.0",
|
||||
"concurrently": "^7.0.0",
|
||||
"cross-env": "^7.0.0",
|
||||
"e2e-test": "workspace:*",
|
||||
"eslint-plugin-notice": "^0.9.10",
|
||||
"fs-extra": "10.1.0",
|
||||
"husky": "^8.0.0",
|
||||
@@ -75,8 +78,7 @@
|
||||
"semver": "^7.3.2",
|
||||
"shx": "^0.3.2",
|
||||
"ts-node": "^10.4.0",
|
||||
"typescript": "~4.7.0",
|
||||
"yarn-lock-check": "^1.0.5"
|
||||
"typescript": "~4.7.0"
|
||||
},
|
||||
"prettier": "@spotify/prettier-config",
|
||||
"lint-staged": {
|
||||
@@ -90,5 +92,6 @@
|
||||
"*.md": [
|
||||
"node ./scripts/check-docs-quality"
|
||||
]
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@3.2.3"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
# @backstage/app-defaults
|
||||
|
||||
## 1.0.6-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 817f3196f6: Updated React Router dependencies to be peer dependencies.
|
||||
- Updated dependencies
|
||||
- @backstage/core-app-api@1.1.0-next.1
|
||||
- @backstage/core-components@0.11.1-next.1
|
||||
- @backstage/core-plugin-api@1.0.6-next.1
|
||||
- @backstage/plugin-permission-react@0.4.5-next.1
|
||||
|
||||
## 1.0.6-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/app-defaults",
|
||||
"description": "Provides the default wiring of a Backstage App",
|
||||
"version": "1.0.6-next.0",
|
||||
"private": false,
|
||||
"version": "1.0.6-next.1",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.esm.js",
|
||||
@@ -33,21 +32,21 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.11.1-next.0",
|
||||
"@backstage/core-app-api": "^1.0.6-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.6-next.0",
|
||||
"@backstage/plugin-permission-react": "^0.4.5-next.0",
|
||||
"@backstage/core-app-api": "^1.1.0-next.1",
|
||||
"@backstage/core-components": "^0.11.1-next.1",
|
||||
"@backstage/core-plugin-api": "^1.0.6-next.1",
|
||||
"@backstage/plugin-permission-react": "^0.4.5-next.1",
|
||||
"@backstage/theme": "^0.2.16",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"react-router-dom": "6.0.0-beta.0"
|
||||
"@material-ui/icons": "^4.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
"react": "^16.13.1 || ^17.0.0",
|
||||
"react-router-dom": "6.0.0-beta.0 || ^6.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.18.2-next.0",
|
||||
"@backstage/test-utils": "^1.1.4-next.0",
|
||||
"@backstage/cli": "^0.19.0-next.1",
|
||||
"@backstage/test-utils": "^1.2.0-next.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@types/jest": "^26.0.7",
|
||||
|
||||
@@ -1,5 +1,57 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.75-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/app-defaults@1.0.6-next.1
|
||||
- @backstage/core-app-api@1.1.0-next.1
|
||||
- @backstage/core-components@0.11.1-next.1
|
||||
- @backstage/core-plugin-api@1.0.6-next.1
|
||||
- @backstage/plugin-airbrake@0.3.9-next.1
|
||||
- @backstage/plugin-api-docs@0.8.9-next.1
|
||||
- @backstage/plugin-azure-devops@0.2.0-next.1
|
||||
- @backstage/plugin-badges@0.2.33-next.1
|
||||
- @backstage/plugin-catalog-graph@0.2.21-next.1
|
||||
- @backstage/plugin-catalog-import@0.8.12-next.1
|
||||
- @backstage/plugin-catalog-react@1.1.4-next.1
|
||||
- @backstage/plugin-circleci@0.3.9-next.1
|
||||
- @backstage/plugin-cloudbuild@0.3.9-next.1
|
||||
- @backstage/plugin-code-coverage@0.2.2-next.1
|
||||
- @backstage/plugin-cost-insights@0.11.31-next.1
|
||||
- @backstage/plugin-explore@0.3.40-next.1
|
||||
- @backstage/plugin-gcp-projects@0.3.28-next.1
|
||||
- @backstage/plugin-github-actions@0.5.9-next.1
|
||||
- @backstage/plugin-graphiql@0.2.41-next.1
|
||||
- @backstage/plugin-home@0.4.25-next.1
|
||||
- @backstage/plugin-jenkins@0.7.8-next.1
|
||||
- @backstage/plugin-kafka@0.3.9-next.1
|
||||
- @backstage/plugin-kubernetes@0.7.2-next.1
|
||||
- @backstage/plugin-lighthouse@0.3.9-next.1
|
||||
- @backstage/plugin-org@0.5.9-next.1
|
||||
- @backstage/plugin-pagerduty@0.5.2-next.1
|
||||
- @backstage/plugin-permission-react@0.4.5-next.1
|
||||
- @backstage/plugin-rollbar@0.4.9-next.1
|
||||
- @backstage/plugin-scaffolder@1.6.0-next.1
|
||||
- @backstage/plugin-search-react@1.0.2-next.1
|
||||
- @backstage/plugin-search@1.0.2-next.1
|
||||
- @backstage/plugin-sentry@0.4.2-next.1
|
||||
- @backstage/plugin-shortcuts@0.3.1-next.1
|
||||
- @backstage/plugin-tech-insights@0.3.0-next.1
|
||||
- @backstage/plugin-techdocs-react@1.0.4-next.1
|
||||
- @backstage/plugin-techdocs@1.3.2-next.1
|
||||
- @backstage/plugin-todo@0.2.11-next.1
|
||||
- @backstage/plugin-user-settings@0.4.8-next.1
|
||||
- @backstage/cli@0.19.0-next.1
|
||||
- @backstage/plugin-dynatrace@0.2.0-next.1
|
||||
- @backstage/plugin-apache-airflow@0.2.2-next.1
|
||||
- @backstage/plugin-gcalendar@0.3.5-next.1
|
||||
- @backstage/plugin-newrelic@0.3.27-next.1
|
||||
- @backstage/plugin-newrelic-dashboard@0.2.2-next.1
|
||||
- @backstage/plugin-tech-radar@0.5.16-next.1
|
||||
- @backstage/plugin-stack-overflow@0.1.5-next.1
|
||||
|
||||
## 0.2.75-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+51
-51
@@ -1,66 +1,67 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.75-next.0",
|
||||
"version": "0.2.75-next.1",
|
||||
"private": true,
|
||||
"backstage": {
|
||||
"role": "frontend"
|
||||
},
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/app-defaults": "^1.0.6-next.0",
|
||||
"@backstage/app-defaults": "^1.0.6-next.1",
|
||||
"@backstage/catalog-model": "^1.1.0",
|
||||
"@backstage/cli": "^0.18.2-next.0",
|
||||
"@backstage/cli": "^0.19.0-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-app-api": "^1.0.6-next.0",
|
||||
"@backstage/core-components": "^0.11.1-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.6-next.0",
|
||||
"@backstage/core-app-api": "^1.1.0-next.1",
|
||||
"@backstage/core-components": "^0.11.1-next.1",
|
||||
"@backstage/core-plugin-api": "^1.0.6-next.1",
|
||||
"@backstage/integration-react": "^1.1.4-next.0",
|
||||
"@backstage/plugin-airbrake": "^0.3.9-next.0",
|
||||
"@backstage/plugin-api-docs": "^0.8.9-next.0",
|
||||
"@backstage/plugin-azure-devops": "^0.2.0-next.0",
|
||||
"@backstage/plugin-apache-airflow": "^0.2.2-next.0",
|
||||
"@backstage/plugin-badges": "^0.2.33-next.0",
|
||||
"@backstage/plugin-airbrake": "^0.3.9-next.1",
|
||||
"@backstage/plugin-apache-airflow": "^0.2.2-next.1",
|
||||
"@backstage/plugin-api-docs": "^0.8.9-next.1",
|
||||
"@backstage/plugin-azure-devops": "^0.2.0-next.1",
|
||||
"@backstage/plugin-badges": "^0.2.33-next.1",
|
||||
"@backstage/plugin-catalog-common": "^1.0.6-next.0",
|
||||
"@backstage/plugin-catalog-graph": "^0.2.21-next.0",
|
||||
"@backstage/plugin-catalog-import": "^0.8.12-next.0",
|
||||
"@backstage/plugin-catalog-react": "^1.1.4-next.0",
|
||||
"@backstage/plugin-circleci": "^0.3.9-next.0",
|
||||
"@backstage/plugin-cloudbuild": "^0.3.9-next.0",
|
||||
"@backstage/plugin-code-coverage": "^0.2.2-next.0",
|
||||
"@backstage/plugin-cost-insights": "^0.11.31-next.0",
|
||||
"@backstage/plugin-dynatrace": "^0.2.0-next.0",
|
||||
"@backstage/plugin-explore": "^0.3.40-next.0",
|
||||
"@backstage/plugin-gcalendar": "^0.3.5-next.0",
|
||||
"@backstage/plugin-gcp-projects": "^0.3.28-next.0",
|
||||
"@backstage/plugin-github-actions": "^0.5.9-next.0",
|
||||
"@backstage/plugin-catalog-graph": "^0.2.21-next.1",
|
||||
"@backstage/plugin-catalog-import": "^0.8.12-next.1",
|
||||
"@backstage/plugin-catalog-react": "^1.1.4-next.1",
|
||||
"@backstage/plugin-circleci": "^0.3.9-next.1",
|
||||
"@backstage/plugin-cloudbuild": "^0.3.9-next.1",
|
||||
"@backstage/plugin-code-coverage": "^0.2.2-next.1",
|
||||
"@backstage/plugin-cost-insights": "^0.11.31-next.1",
|
||||
"@backstage/plugin-dynatrace": "^0.2.0-next.1",
|
||||
"@backstage/plugin-explore": "^0.3.40-next.1",
|
||||
"@backstage/plugin-gcalendar": "^0.3.5-next.1",
|
||||
"@backstage/plugin-gcp-projects": "^0.3.28-next.1",
|
||||
"@backstage/plugin-github-actions": "^0.5.9-next.1",
|
||||
"@backstage/plugin-gocd": "^0.1.15-next.0",
|
||||
"@backstage/plugin-graphiql": "^0.2.41-next.0",
|
||||
"@backstage/plugin-home": "^0.4.25-next.0",
|
||||
"@backstage/plugin-jenkins": "^0.7.8-next.0",
|
||||
"@backstage/plugin-kafka": "^0.3.9-next.0",
|
||||
"@backstage/plugin-kubernetes": "^0.7.2-next.0",
|
||||
"@backstage/plugin-lighthouse": "^0.3.9-next.0",
|
||||
"@backstage/plugin-newrelic": "^0.3.27-next.0",
|
||||
"@backstage/plugin-newrelic-dashboard": "^0.2.2-next.0",
|
||||
"@backstage/plugin-org": "^0.5.9-next.0",
|
||||
"@backstage/plugin-pagerduty": "0.5.2-next.0",
|
||||
"@backstage/plugin-permission-react": "^0.4.5-next.0",
|
||||
"@backstage/plugin-rollbar": "^0.4.9-next.0",
|
||||
"@backstage/plugin-scaffolder": "^1.6.0-next.0",
|
||||
"@backstage/plugin-search": "^1.0.2-next.0",
|
||||
"@backstage/plugin-graphiql": "^0.2.41-next.1",
|
||||
"@backstage/plugin-home": "^0.4.25-next.1",
|
||||
"@backstage/plugin-jenkins": "^0.7.8-next.1",
|
||||
"@backstage/plugin-kafka": "^0.3.9-next.1",
|
||||
"@backstage/plugin-kubernetes": "^0.7.2-next.1",
|
||||
"@backstage/plugin-lighthouse": "^0.3.9-next.1",
|
||||
"@backstage/plugin-newrelic": "^0.3.27-next.1",
|
||||
"@backstage/plugin-newrelic-dashboard": "^0.2.2-next.1",
|
||||
"@backstage/plugin-org": "^0.5.9-next.1",
|
||||
"@backstage/plugin-pagerduty": "0.5.2-next.1",
|
||||
"@backstage/plugin-permission-react": "^0.4.5-next.1",
|
||||
"@backstage/plugin-rollbar": "^0.4.9-next.1",
|
||||
"@backstage/plugin-scaffolder": "^1.6.0-next.1",
|
||||
"@backstage/plugin-search": "^1.0.2-next.1",
|
||||
"@backstage/plugin-search-common": "^1.0.1-next.0",
|
||||
"@backstage/plugin-search-react": "^1.0.2-next.0",
|
||||
"@backstage/plugin-sentry": "^0.4.2-next.0",
|
||||
"@backstage/plugin-shortcuts": "^0.3.1-next.0",
|
||||
"@backstage/plugin-stack-overflow": "^0.1.5-next.0",
|
||||
"@backstage/plugin-tech-insights": "^0.2.5-next.0",
|
||||
"@backstage/plugin-tech-radar": "^0.5.16-next.0",
|
||||
"@backstage/plugin-techdocs": "^1.3.2-next.0",
|
||||
"@backstage/plugin-search-react": "^1.0.2-next.1",
|
||||
"@backstage/plugin-sentry": "^0.4.2-next.1",
|
||||
"@backstage/plugin-shortcuts": "^0.3.1-next.1",
|
||||
"@backstage/plugin-stack-overflow": "^0.1.5-next.1",
|
||||
"@backstage/plugin-tech-insights": "^0.3.0-next.1",
|
||||
"@backstage/plugin-tech-radar": "^0.5.16-next.1",
|
||||
"@backstage/plugin-techdocs": "^1.3.2-next.1",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.4-next.0",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.4-next.0",
|
||||
"@backstage/plugin-todo": "^0.2.11-next.0",
|
||||
"@backstage/plugin-user-settings": "^0.4.8-next.0",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.4-next.1",
|
||||
"@backstage/plugin-todo": "^0.2.11-next.1",
|
||||
"@backstage/plugin-user-settings": "^0.4.8-next.1",
|
||||
"@backstage/theme": "^0.2.16",
|
||||
"@internal/plugin-catalog-customized": "0.0.2-next.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -69,18 +70,17 @@
|
||||
"@roadiehq/backstage-plugin-github-insights": "^2.0.0",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^2.0.0",
|
||||
"@roadiehq/backstage-plugin-travis-ci": "^2.0.0",
|
||||
"@internal/plugin-catalog-customized": "0.0.2-next.0",
|
||||
"history": "^5.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-router": "6.0.0-beta.0",
|
||||
"react-router-dom": "6.0.0-beta.0",
|
||||
"react-router": "^6.3.0",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-use": "^17.2.4",
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.1.4-next.0",
|
||||
"@backstage/test-utils": "^1.2.0-next.1",
|
||||
"@rjsf/core": "^3.2.1",
|
||||
"@testing-library/cypress": "^8.0.2",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
|
||||
@@ -101,7 +101,7 @@ import * as plugins from './plugins';
|
||||
|
||||
import { techDocsPage } from './components/techdocs/TechDocsPage';
|
||||
import { ApacheAirflowPage } from '@backstage/plugin-apache-airflow';
|
||||
import { PermissionedRoute } from '@backstage/plugin-permission-react';
|
||||
import { RequirePermission } from '@backstage/plugin-permission-react';
|
||||
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common';
|
||||
|
||||
const app = createApp({
|
||||
@@ -157,10 +157,13 @@ const routes = (
|
||||
>
|
||||
{entityPage}
|
||||
</Route>
|
||||
<PermissionedRoute
|
||||
<Route
|
||||
path="/catalog-import"
|
||||
permission={catalogEntityCreatePermission}
|
||||
element={<CatalogImportPage />}
|
||||
element={
|
||||
<RequirePermission permission={catalogEntityCreatePermission}>
|
||||
<CatalogImportPage />
|
||||
</RequirePermission>
|
||||
}
|
||||
/>
|
||||
<Route
|
||||
path="/catalog-graph"
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
"version": "0.2.1-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"main": "dist/index.cjs.js",
|
||||
@@ -34,16 +33,16 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.15.1-next.1",
|
||||
"@backstage/backend-plugin-api": "^0.1.2-next.0",
|
||||
"@backstage/backend-common": "^0.15.1-next.0",
|
||||
"@backstage/backend-tasks": "^0.3.5-next.0",
|
||||
"@backstage/plugin-permission-node": "^0.6.5-next.0",
|
||||
"@backstage/plugin-permission-node": "^0.6.5-next.1",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.18.2-next.0"
|
||||
"@backstage/cli": "^0.19.0-next.1"
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import {
|
||||
createServiceRef,
|
||||
createServiceFactory,
|
||||
ServiceRef,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { ServiceRegistry } from './ServiceRegistry';
|
||||
|
||||
@@ -170,4 +171,53 @@ describe('ServiceRegistry', () => {
|
||||
expect(await factoryB('catalog')).toBe(await factoryB('catalog'));
|
||||
expect(await factoryA('catalog')).not.toBe(await factoryB('catalog'));
|
||||
});
|
||||
|
||||
it('should only call each default factory loader once', async () => {
|
||||
const factoryLoader = jest.fn(async (service: ServiceRef<void>) =>
|
||||
createServiceFactory({
|
||||
service,
|
||||
deps: {},
|
||||
factory: async () => async () => {},
|
||||
}),
|
||||
);
|
||||
const ref = createServiceRef<void>({
|
||||
id: '1',
|
||||
defaultFactory: factoryLoader,
|
||||
});
|
||||
|
||||
const registry = new ServiceRegistry([]);
|
||||
const factory = registry.get(ref)!;
|
||||
await Promise.all([
|
||||
expect(factory('catalog')).resolves.toBeUndefined(),
|
||||
expect(factory('catalog')).resolves.toBeUndefined(),
|
||||
]);
|
||||
expect(factoryLoader).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it('should not call factory functions more than once', async () => {
|
||||
const innerFactory = jest.fn(async (pluginId: string) => {
|
||||
return { x: 1, pluginId };
|
||||
});
|
||||
const factory = jest.fn(async () => innerFactory);
|
||||
const myFactory = createServiceFactory({
|
||||
service: ref1,
|
||||
deps: {},
|
||||
factory,
|
||||
});
|
||||
|
||||
const registry = new ServiceRegistry([myFactory]);
|
||||
|
||||
await Promise.all([
|
||||
registry.get(ref1)!('catalog')!,
|
||||
registry.get(ref1)!('catalog')!,
|
||||
registry.get(ref1)!('catalog')!,
|
||||
registry.get(ref1)!('scaffolder')!,
|
||||
registry.get(ref1)!('scaffolder')!,
|
||||
]);
|
||||
|
||||
expect(factory).toHaveBeenCalledTimes(1);
|
||||
expect(innerFactory).toHaveBeenCalledTimes(2);
|
||||
expect(innerFactory).toHaveBeenCalledWith('catalog');
|
||||
expect(innerFactory).toHaveBeenCalledWith('scaffolder');
|
||||
});
|
||||
});
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user