Merge branch 'master' into blam/bump-graphql-dependencies

This commit is contained in:
Ben Lambert
2022-01-14 05:44:16 +01:00
committed by GitHub
339 changed files with 4723 additions and 1759 deletions
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-bazaar': patch
'@backstage/plugin-bazaar-backend': patch
---
Add Bazaar plugin to marketplace and some minor refactoring
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/core-components': patch
'@backstage/plugin-api-docs': patch
---
chore(deps): bump `react-syntax-highligher` and `swagger-ui-react`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/test-utils': patch
---
Add new `MockConfigApi` as a more discoverable and leaner method for mocking configuration.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/config': patch
---
The `ConfigReader#get` method now always returns a deep clone of the configuration data.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
fix: Register plugin to prioritise Component kind for entityRef
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/integration': patch
---
Adds a new GitHub credentials provider (DefaultGithubCredentialsProvider). It handles multiple app configurations. It looks up the app configuration based on the url.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
build(deps-dev): bump `http-errors` from 1.8.0 to 2.0.0
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-bazaar': patch
'@backstage/plugin-ilert': patch
---
build(deps): bump `@date-io/luxon` from 1.3.13 to 2.11.1
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-todo-backend': patch
---
Properly exported all referenced types
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Create a short delay when `<SidebarSubmenu/>` is opened
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Add catalog permission rules.
-28
View File
@@ -1,28 +0,0 @@
---
'@backstage/cli': minor
---
ESLint upgraded to version 8 and all it's plugins updated to newest version.
If you use any custom plugins for ESLint please check compatibility.
```diff
- "@typescript-eslint/eslint-plugin": "^v4.33.0",
- "@typescript-eslint/parser": "^v4.28.3",
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
+ "@typescript-eslint/parser": "^5.9.0",
- "eslint": "^7.30.0",
+ "eslint": "^8.6.0",
- "eslint-plugin-import": "^2.20.2",
- "eslint-plugin-jest": "^24.1.0",
- "eslint-plugin-jsx-a11y": "^6.2.1",
+ "eslint-plugin-import": "^2.25.4",
+ "eslint-plugin-jest": "^25.3.4",
+ "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.12.4",
- "eslint-plugin-react-hooks": "^4.0.0",
+ "eslint-plugin-react": "^7.28.0",
+ "eslint-plugin-react-hooks": "^4.3.0",
```
Please consult changelogs from packages if you find any problems.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
---
Added possibility to pass customized title and description for the scorecards instead of using hardcoded ones.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-gocd': patch
---
Add GoCD plugin for CI/CD.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
Removed the deprecated `OldIconComponent` type.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-graphql': patch
---
Bump graphql versions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-ldap': patch
---
Make sure to avoid accidental data sharing / mutation of `set` values
-13
View File
@@ -1,13 +0,0 @@
---
'@backstage/plugin-org': patch
---
For the component `EntityMembersListCard` you can now specify the type of members you have in a group. For example:
```tsx
<Grid item xs={12}>
<EntityMembersListCard memberDisplayTitle="Ninja's" />
</Grid>
```
If left empty it will by default use 'Members'.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-permission-node': patch
---
Add helpers for creating PermissionRules with inferred types
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-sonarqube': patch
---
Enhance token description by highlighting that the trailing colon is required.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Allow a custom GithubCredentialsProvider to be passed to the GitHub processors.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-plugin-api': minor
---
Removed previously deprecated exports: `PluginHooks`, `PluginOutput`, and `FeatureFlagOutput`.
The deprecated `register` method of `PluginConfig` has been removed, as well as the deprecated `output` method of `BackstagePlugin`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Fix token pass-through for software templates using beta 3 version
+22
View File
@@ -0,0 +1,22 @@
---
'@backstage/backend-common': patch
'@backstage/config': patch
'@backstage/config-loader': patch
'@backstage/plugin-app-backend': patch
---
Loading of app configurations now reference the `@deprecated` construct from
JSDoc to determine if a property in-use has been deprecated. Users are notified
of deprecated keys in the format:
```txt
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
```
When the `withDeprecatedKeys` option is set to `true` in the `process` method
of `loadConfigSchema`, the user will be notified that deprecated keys have been
identified in their app configuration.
The `backend-common` and `plugin-app-backend` packages have been updated to set
`withDeprecatedKeys` to true so that users are notified of deprecated settings
by default.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/cli': patch
---
Introduce `--deprecated` option to `config:check` to log all deprecated app configuration properties
```sh
$ yarn backstage-cli config:check --lax --deprecated
config:check --lax --deprecated
Loaded config from app-config.yaml
The configuration key 'catalog.processors.githubOrg' of app-config.yaml is deprecated and may be removed soon. Configure a GitHub integration instead.
```
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-ldap': patch
'@backstage/plugin-catalog-backend-module-msgraph': patch
---
Clean up API report
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Provide support for Bitbucket servers with custom BaseURLs.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fix bug with resource loading in permission integration
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-home': patch
---
Adds two new home components - CompanyLogo and Toolkit.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights-backend': patch
---
Modify queries to perform better by filtering on sub-queries as well
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/plugin-azure-devops-backend': minor
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-azure-devops-common': minor
---
- feat: Created PullRequestsDashboardProvider for resolving team and team member relations
- feat: Created useUserTeamIds hook.
- feat: Updated useFilterProcessor to provide teamIds for `AssignedToCurrentUsersTeams` and `CreatedByCurrentUsersTeams` filters.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Switch Webpack minification to use `esbuild` instead of `terser`.
-25
View File
@@ -1,25 +0,0 @@
---
'@backstage/backend-common': patch
'@backstage/core-components': patch
'@backstage/create-app': patch
'@backstage/integration': patch
'@backstage/techdocs-common': patch
'@backstage/plugin-apache-airflow': patch
'@backstage/plugin-auth-backend': patch
'@backstage/plugin-azure-devops': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-catalog-import': patch
'@backstage/plugin-catalog-react': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-code-coverage-backend': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-fossa': patch
'@backstage/plugin-jenkins': patch
'@backstage/plugin-scaffolder': patch
'@backstage/plugin-scaffolder-backend': patch
'@backstage/plugin-search-backend-node': patch
'@backstage/plugin-techdocs': patch
'@backstage/plugin-techdocs-backend': patch
---
Cleaned up API exports
-60
View File
@@ -1,60 +0,0 @@
---
'@backstage/create-app': patch
---
Add permissions to create-app's PluginEnvironment
`CatalogEnvironment` now has a `permissions` field, which means that a permission client must now be provided as part of `PluginEnvironment`. To apply these changes to an existing app, add the following to the `makeCreateEnv` function in `packages/backend/src/index.ts`:
```diff
// packages/backend/src/index.ts
+ import { ServerPermissionClient } from '@backstage/plugin-permission-node';
function makeCreateEnv(config: Config) {
...
+ const permissions = ServerPerimssionClient.fromConfig(config, {
+ discovery,
+ tokenManager,
+ });
root.info(`Created UrlReader ${reader}`);
return (plugin: string): PluginEnvironment => {
...
return {
logger,
cache,
database,
config,
reader,
discovery,
tokenManager,
scheduler,
+ permissions,
};
}
}
```
And add a permissions field to the `PluginEnvironment` type in `packages/backend/src/types.ts`:
```diff
// packages/backend/src/types.ts
+ import { PermissionAuthorizer } from '@backstage/plugin-permission-common';
export type PluginEnvironment = {
...
+ permissions: PermissionAuthorizer;
};
```
[`@backstage/plugin-permission-common`](https://www.npmjs.com/package/@backstage/plugin-permission-common) and [`@backstage/plugin-permission-node`](https://www.npmjs.com/package/@backstage/plugin-permission-node) will need to be installed as dependencies:
```diff
// packages/backend/package.json
+ "@backstage/plugin-permission-common": "...",
+ "@backstage/plugin-permission-node": "...",
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
bump `logform` to use fixed version of `color` dependency
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-pagerduty': patch
'@backstage/plugin-splunk-on-call': patch
---
Clean up emptystate.svg image, removing wrong white artifact from the background
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Updated `ResponseErrorPanel` to not use the deprecated `data` property of `ResponseError`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well.
-12
View File
@@ -1,12 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Update @asyncapi/react-component to 1.0.0-next.26, which will fix the
`ResizeObserver loop limit exceeded` errors which we encountered in several E2E
tests.
For more details check the following links:
- https://github.com/backstage/backstage/pull/8088#issuecomment-991183968
- https://github.com/asyncapi/asyncapi-react/issues/498
-8
View File
@@ -1,8 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
'@backstage/plugin-tech-insights-backend': patch
'@backstage/plugin-tech-insights-common': patch
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
---
adding new operation to run checks for multiple entities in one request
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-app-api': patch
---
Fixed an issue where valid SAML and GitHub sessions would be considered invalid and not be stored.
Deprecated the `SamlSession` and `GithubSession` types.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-graphql': minor
'@backstage/plugin-graphql-backend': patch
---
chore: bumping dependencies in the GraphQL modules and bringing them up to date with the latest `graphql-modules` library
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Removed `@backstage/test-utils` dependency.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Allow a GitHubCredentialsProvider to be passed to the GitHub scaffolder tasks actions.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Add apply-conditions endpoint for evaluating conditional permissions in catalog backend.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/cli': patch
'@backstage/backend-common': patch
---
Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-app-api': minor
---
Removed previously deprecated `ApiRegistry` export.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Switched the secure cookie mode set on the `express-session` to use `'auto'` rather than `true`. This works around an issue where cookies would not be set if TLS termination was handled in a proxy rather than having the backend served directly with HTTPS.
The downside of this change is that secure cookies won't be used unless the backend is directly served with HTTPS. This will be remedied in a future update that allows the backend to configured for trusted proxy mode.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
Fix an issue where the TechDocs sidebar is hidden when the Backstage sidebar is pinned at smaller screen sizes
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-test-utils': patch
---
Bump `testcontainers` dependency to version `8.1.2`
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-airbrake': minor
---
A plugin for Airbrake (https://airbrake.io/) has been created
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
---
In order to integrate the permissions system with the refresh endpoint in catalog-backend, a new AuthorizedRefreshService was created as a thin wrapper around the existing refresh service which performs authorization and handles the case when authorization is denied. In order to instantiate AuthorizedRefreshService, a permission client is required, which was added as a new field to `CatalogEnvironment`.
The new `permissions` field in `CatalogEnvironment` should already receive the permission client from the `PluginEnvrionment`, so there should be no changes required to the catalog backend setup. See [the create-app changelog](https://github.com/backstage/backstage/blob/master/packages/create-app/CHANGELOG.md) for more details.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
---
Removed direct and transitive MUI dependencies.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
Clean up API reports
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/errors': minor
---
Removed the deprecated exports `ErrorResponse` and `parseErrorResponse`.
Removed the deprecated `constructor` and the deprecated `data` property of `ResponseError`.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Exclude the AWS session token from credential validation, because it's not necessary in this context.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-tech-insights': patch
---
fix React warning because of missing `key` prop
@@ -1,6 +1,7 @@
name: 'Dependabot changeset maker'
on:
- pull_request_target
pull_request_target:
branches: 'dependabot/**'
jobs:
generate-changeset:
+1
View File
@@ -15,6 +15,7 @@ Our TypeScript style is inspired by the [style guidelines](https://github.com/Mi
1. Use camelCase for property names and local variables.
1. Do not use `_` as a prefix for private properties.
1. Use whole words in names when possible.
1. Give type parameters names prefixed with `T`, for example `Request<TBody>`.
## Syntax and Types
+125
View File
@@ -0,0 +1,125 @@
---
id: provider
title: Google Identity-Aware Proxy Provider
sidebar_label: Google IAP
# prettier-ignore
description: Adding Google Identity-Aware Proxy as an authentication provider in Backstage
---
Backstage allows offloading the responsibility of authenticating users to the
Google HTTPS Load Balancer & [IAP](https://cloud.google.com/iap), leveraging the
authentication support on the latter.
This tutorial shows how to use authentication on an IAP sitting in front of
Backstage.
It is assumed an IAP is already serving traffic in front of a Backstage instance
configured to serve the frontend app from the backend.
## Configuration
Let's start by adding the following `auth` configuration in your
`app-config.yaml` or `app-config.production.yaml` or similar:
```yaml
auth:
providers:
gcp-iap:
audience:
'/projects/<project number>/global/backendServices/<backend service id>'
```
You can find the project number and service ID in the Google Cloud Console.
This config section must be in place for the provider to load at all. Now let's
add the provider itself.
## Backend Changes
This provider is not enabled by default in the auth backend code, because
besides the config section above, it also needs to be given one or more
callbacks in actual code as well as described below.
Add a `providerFactories` entry to the router in
`packages/backend/plugin/auth.ts`.
```ts
import { createGcpIapProvider } from '@backstage/plugin-auth-backend';
export default async function createPlugin({
logger,
database,
config,
discovery,
}: PluginEnvironment): Promise<Router> {
return await createRouter({
logger,
config,
database,
discovery,
providerFactories: {
'gcp-iap': createGcpIapProvider({
// Replace the auth handler if you want to customize the returned user
// profile info (can be left out; the default implementation is shown
// below which only returns the email). You may want to amend this code
// with something that loads additional user profile data out of e.g.
// GSuite or LDAP or similar.
async authHandler({ iapToken }) {
return { profile: { email: iapToken.email } };
},
signIn: {
// You need to supply an identity resolver, that takes the profile
// and the IAP token and produces the Backstage token with the
// relevant user info.
async resolver({ profile, result: { iapToken } }, ctx) {
// Somehow compute the Backstage token claims. Just some dummy code
// shown here, but you may want to query your LDAP server, or
// GSuite or similar, based on the IAP token sub/email claims
const id = `user:default/${iapToken.email.split('@')[0]}`;
const fullEnt = ['group:default/team-name'];
const token = await ctx.tokenIssuer.issueToken({
claims: { sub: id, ent: fullEnt },
});
return { id, token };
},
},
}),
},
});
}
```
Now the backend is ready to serve auth requests on the
`/api/auth/gcp-iap/refresh` endpoint. All that's left is to update the frontend
sign-in mechanism to poll that endpoint through the IAP, on the user's behalf.
## Frontend Changes
All Backstage apps need a `SignInPage` to be configured. Its purpose is to
establish who the user is and what their identifying credentials are, blocking
rendering the rest of the UI until that's complete, and then keeping those
credentials fresh.
When using IAP Proxy authentication, the Backstage UI will only be loaded once
the user has already successfully completely authenticated themselves with the
IAP and has an active session, so we don't want to make the user have to go
through a _second_ layer of authentication flows after that.
As such, we want to not display a sign-in page visually at all. Instead, we will
pick a `SignInPage` implementation component which knows how to silently make
requests to the backend provider we configured above, and just trusting its
output to properly represent the current user. Luckily, Backstage comes with a
component for this purpose out of the box.
Update your `createApp` call in `packages/app/src/App.tsx`, as follows.
```diff
+import { ProxiedSignInPage } from '@backstage/core-components';
const app = createApp({
components: {
+ SignInPage: props => <ProxiedSignInPage {...props} provider="gcp-iap" />,
```
After this, your app should be ready to leverage the Identity-Aware Proxy for
authentication!
+1 -1
View File
@@ -96,7 +96,7 @@ It can be enabled like this
```tsx
// File: packages/backend/src/plugins/auth.ts
import { googleEmailSignInResolver } from '@backstage/plugin-auth-backend';
import { googleEmailSignInResolver, createGoogleProvider } from '@backstage/plugin-auth-backend';
export default async function createPlugin({
...
@@ -1266,6 +1266,10 @@ shape, this kind has the following structure.
Exactly equal to `backstage.io/v1alpha1` and `Location`, respectively.
### `spec` [required]
The `spec` field is required. The minimal spec should be an empty object.
### `spec.type` [optional]
The single location type, that's common to the targets specified in the spec. If
+13
View File
@@ -26,3 +26,16 @@ catalog:
```
Note the `s3-discovery` type, as this is not a regular `url` processor.
As this processor is not one of the default providers, you will also need to add
the below to `packages/backend/src/plugins/catalog.ts`:
```ts
/* packages/backend/src/plugins/catalog.ts */
import { AwsS3DiscoveryProcessor } from '@backstage/plugin-catalog-backend';
const builder = await CatalogBuilder.create(env);
/** ... other processors ... */
builder.addProcessor(new AwsS3DiscoveryProcessor(env.reader));
```
+1
View File
@@ -556,6 +556,7 @@ Options:
--package &lt;name&gt; Only load config schema that applies to the given package
--lax Do not require environment variables to be set
--frontend Only validate the frontend configuration
--deprecated List all deprecated configuration settings
--config &lt;path&gt; Config files to load instead of app-config.yaml (default: [])
-h, --help display help for command
```
+10
View File
@@ -1,5 +1,15 @@
# @backstage/app-defaults
## 0.1.4
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/core-plugin-api@0.5.0
- @backstage/core-app-api@0.4.0
- @backstage/plugin-permission-react@0.2.2
## 0.1.3
### Patch Changes
+7 -7
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/app-defaults",
"description": "Provides the default wiring of a Backstage App",
"version": "0.1.3",
"version": "0.1.4",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,10 +29,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/core-components": "^0.8.2",
"@backstage/core-app-api": "^0.3.0",
"@backstage/core-plugin-api": "^0.4.0",
"@backstage/plugin-permission-react": "^0.2.0",
"@backstage/core-components": "^0.8.4",
"@backstage/core-app-api": "^0.4.0",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/plugin-permission-react": "^0.2.2",
"@backstage/theme": "^0.2.14",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
@@ -42,8 +42,8 @@
"react": "^16.13.1 || ^17.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.10.3",
"@backstage/test-utils": "^0.2.0",
"@backstage/cli": "^0.11.0",
"@backstage/test-utils": "^0.2.2",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
"@types/jest": "^26.0.7",
+50
View File
@@ -1,5 +1,55 @@
# example-app
## 0.2.60
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/cli@0.11.0
- @backstage/plugin-tech-insights@0.1.5
- @backstage/plugin-gocd@0.1.1
- @backstage/core-plugin-api@0.5.0
- @backstage/plugin-org@0.3.34
- @backstage/plugin-home@0.4.10
- @backstage/plugin-azure-devops@0.1.10
- @backstage/plugin-apache-airflow@0.1.3
- @backstage/plugin-catalog-import@0.7.9
- @backstage/plugin-catalog-react@0.6.11
- @backstage/plugin-code-coverage@0.1.22
- @backstage/plugin-cost-insights@0.11.17
- @backstage/plugin-jenkins@0.5.17
- @backstage/plugin-scaffolder@0.11.18
- @backstage/plugin-techdocs@0.12.14
- @backstage/plugin-kubernetes@0.5.4
- @backstage/plugin-pagerduty@0.3.22
- @backstage/plugin-api-docs@0.6.22
- @backstage/core-app-api@0.4.0
- @backstage/plugin-airbrake@0.1.0
- @backstage/app-defaults@0.1.4
- @backstage/catalog-model@0.9.9
- @backstage/integration-react@0.1.18
- @backstage/plugin-badges@0.2.19
- @backstage/plugin-catalog@0.7.8
- @backstage/plugin-catalog-graph@0.2.6
- @backstage/plugin-circleci@0.2.34
- @backstage/plugin-cloudbuild@0.2.32
- @backstage/plugin-explore@0.3.25
- @backstage/plugin-gcp-projects@0.3.13
- @backstage/plugin-github-actions@0.4.31
- @backstage/plugin-graphiql@0.2.27
- @backstage/plugin-kafka@0.2.25
- @backstage/plugin-lighthouse@0.2.34
- @backstage/plugin-newrelic@0.3.13
- @backstage/plugin-newrelic-dashboard@0.1.3
- @backstage/plugin-rollbar@0.3.23
- @backstage/plugin-search@0.5.5
- @backstage/plugin-sentry@0.3.33
- @backstage/plugin-shortcuts@0.1.19
- @backstage/plugin-tech-radar@0.5.2
- @backstage/plugin-todo@0.1.18
- @backstage/plugin-user-settings@0.3.16
## 0.2.59
### Patch Changes
+46 -46
View File
@@ -1,54 +1,54 @@
{
"name": "example-app",
"version": "0.2.59",
"version": "0.2.60",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/app-defaults": "^0.1.3",
"@backstage/catalog-model": "^0.9.8",
"@backstage/cli": "^0.10.5",
"@backstage/core-app-api": "^0.3.1",
"@backstage/core-components": "^0.8.3",
"@backstage/core-plugin-api": "^0.4.1",
"@backstage/integration-react": "^0.1.16",
"@backstage/plugin-airbrake": "^0.0.0",
"@backstage/plugin-api-docs": "^0.6.21",
"@backstage/plugin-azure-devops": "^0.1.9",
"@backstage/plugin-apache-airflow": "^0.1.2",
"@backstage/plugin-badges": "^0.2.18",
"@backstage/plugin-catalog": "^0.7.7",
"@backstage/plugin-catalog-graph": "^0.2.5",
"@backstage/plugin-catalog-import": "^0.7.8",
"@backstage/plugin-catalog-react": "^0.6.10",
"@backstage/plugin-circleci": "^0.2.33",
"@backstage/plugin-cloudbuild": "^0.2.31",
"@backstage/plugin-code-coverage": "^0.1.21",
"@backstage/plugin-cost-insights": "^0.11.16",
"@backstage/plugin-explore": "^0.3.24",
"@backstage/plugin-gcp-projects": "^0.3.12",
"@backstage/plugin-github-actions": "^0.4.30",
"@backstage/plugin-gocd": "^0.1.0",
"@backstage/plugin-graphiql": "^0.2.26",
"@backstage/plugin-home": "^0.4.9",
"@backstage/plugin-jenkins": "^0.5.16",
"@backstage/plugin-kafka": "^0.2.24",
"@backstage/plugin-kubernetes": "^0.5.3",
"@backstage/plugin-lighthouse": "^0.2.33",
"@backstage/plugin-newrelic": "^0.3.12",
"@backstage/plugin-newrelic-dashboard": "^0.1.2",
"@backstage/plugin-org": "^0.3.33",
"@backstage/plugin-pagerduty": "0.3.21",
"@backstage/plugin-rollbar": "^0.3.22",
"@backstage/plugin-scaffolder": "^0.11.17",
"@backstage/plugin-search": "^0.5.4",
"@backstage/plugin-sentry": "^0.3.32",
"@backstage/plugin-shortcuts": "^0.1.18",
"@backstage/plugin-tech-radar": "^0.5.1",
"@backstage/plugin-techdocs": "^0.12.13",
"@backstage/plugin-todo": "^0.1.17",
"@backstage/plugin-user-settings": "^0.3.15",
"@backstage/app-defaults": "^0.1.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/cli": "^0.11.0",
"@backstage/core-app-api": "^0.4.0",
"@backstage/core-components": "^0.8.4",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/integration-react": "^0.1.18",
"@backstage/plugin-airbrake": "^0.1.0",
"@backstage/plugin-api-docs": "^0.6.22",
"@backstage/plugin-azure-devops": "^0.1.10",
"@backstage/plugin-apache-airflow": "^0.1.3",
"@backstage/plugin-badges": "^0.2.19",
"@backstage/plugin-catalog": "^0.7.8",
"@backstage/plugin-catalog-graph": "^0.2.6",
"@backstage/plugin-catalog-import": "^0.7.9",
"@backstage/plugin-catalog-react": "^0.6.11",
"@backstage/plugin-circleci": "^0.2.34",
"@backstage/plugin-cloudbuild": "^0.2.32",
"@backstage/plugin-code-coverage": "^0.1.22",
"@backstage/plugin-cost-insights": "^0.11.17",
"@backstage/plugin-explore": "^0.3.25",
"@backstage/plugin-gcp-projects": "^0.3.13",
"@backstage/plugin-github-actions": "^0.4.31",
"@backstage/plugin-gocd": "^0.1.1",
"@backstage/plugin-graphiql": "^0.2.27",
"@backstage/plugin-home": "^0.4.10",
"@backstage/plugin-jenkins": "^0.5.17",
"@backstage/plugin-kafka": "^0.2.25",
"@backstage/plugin-kubernetes": "^0.5.4",
"@backstage/plugin-lighthouse": "^0.2.34",
"@backstage/plugin-newrelic": "^0.3.13",
"@backstage/plugin-newrelic-dashboard": "^0.1.3",
"@backstage/plugin-org": "^0.3.34",
"@backstage/plugin-pagerduty": "0.3.22",
"@backstage/plugin-rollbar": "^0.3.23",
"@backstage/plugin-scaffolder": "^0.11.18",
"@backstage/plugin-search": "^0.5.5",
"@backstage/plugin-sentry": "^0.3.33",
"@backstage/plugin-shortcuts": "^0.1.19",
"@backstage/plugin-tech-radar": "^0.5.2",
"@backstage/plugin-techdocs": "^0.12.14",
"@backstage/plugin-todo": "^0.1.18",
"@backstage/plugin-user-settings": "^0.3.16",
"@backstage/search-common": "^0.2.0",
"@backstage/plugin-tech-insights": "^0.1.4",
"@backstage/plugin-tech-insights": "^0.1.5",
"@backstage/theme": "^0.2.14",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
@@ -68,7 +68,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/test-utils": "^0.2.0",
"@backstage/test-utils": "^0.2.2",
"@rjsf/core": "^3.2.1",
"@testing-library/cypress": "^8.0.2",
"@testing-library/jest-dom": "^5.10.1",
+16
View File
@@ -1,5 +1,21 @@
# @backstage/backend-common
## 0.10.3
### Patch Changes
- 5b406daabe: build(deps-dev): bump `http-errors` from 1.8.0 to 2.0.0
- 5333451def: Cleaned up API exports
- db5310e25e: bump `logform` to use fixed version of `color` dependency
- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
- 3b4d8caff6: The GithubUrlReader is switched to use the DefaultGithubCredentialsProvider
- f77bd5c8ff: Clean up API reports
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/integration@0.7.1
- @backstage/errors@0.2.0
- @backstage/config-loader@0.9.2
## 0.10.2
### Patch Changes
+7 -7
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.10.2",
"version": "0.10.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,10 +30,10 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/config-loader": "^0.9.1",
"@backstage/errors": "^0.1.5",
"@backstage/integration": "^0.7.0",
"@backstage/config": "^0.1.12",
"@backstage/config-loader": "^0.9.2",
"@backstage/errors": "^0.2.0",
"@backstage/integration": "^0.7.1",
"@backstage/types": "^0.1.1",
"@google-cloud/storage": "^5.8.0",
"@manypkg/get-packages": "^1.1.3",
@@ -81,8 +81,8 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.10.5",
"@backstage/test-utils": "^0.2.1",
"@backstage/cli": "^0.11.0",
"@backstage/test-utils": "^0.2.2",
"@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
"@types/concat-stream": "^1.6.0",
+4 -1
View File
@@ -39,7 +39,10 @@ const updateRedactionList = (
configs: AppConfig[],
logger: Logger,
) => {
const secretAppConfigs = schema.process(configs, { visibility: ['secret'] });
const secretAppConfigs = schema.process(configs, {
visibility: ['secret'],
withDeprecatedKeys: true,
});
const secretConfig = ConfigReader.fromConfigs(secretAppConfigs);
const values = new Set<string>();
const data = secretConfig.get();
+9
View File
@@ -1,5 +1,14 @@
# @backstage/backend-tasks
## 0.1.3
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/backend-common@0.10.3
- @backstage/errors@0.2.0
## 0.1.2
### Patch Changes
+6 -6
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-tasks",
"description": "Common distributed task management library for Backstage backends",
"version": "0.1.2",
"version": "0.1.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -29,9 +29,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.10.2",
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/backend-common": "^0.10.3",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/luxon": "^2.0.4",
"knex": "^0.95.1",
@@ -43,8 +43,8 @@
"zod": "^3.9.5"
},
"devDependencies": {
"@backstage/backend-test-utils": "^0.1.11",
"@backstage/cli": "^0.10.5",
"@backstage/backend-test-utils": "^0.1.13",
"@backstage/cli": "^0.11.0",
"jest": "^26.0.1",
"wait-for-expect": "^3.0.2"
},
+10
View File
@@ -1,5 +1,15 @@
# @backstage/backend-test-utils
## 0.1.13
### Patch Changes
- b1bc55405e: Bump `testcontainers` dependency to version `8.1.2`
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/backend-common@0.10.3
- @backstage/cli@0.11.0
## 0.1.12
### Patch Changes
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.1.12",
"version": "0.1.13",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,9 +30,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.10.1",
"@backstage/cli": "^0.10.4",
"@backstage/config": "^0.1.9",
"@backstage/backend-common": "^0.10.3",
"@backstage/cli": "^0.11.0",
"@backstage/config": "^0.1.12",
"knex": "^0.95.1",
"mysql2": "^2.2.5",
"pg": "^8.3.0",
@@ -41,7 +41,7 @@
"uuid": "^8.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.10.4",
"@backstage/cli": "^0.11.0",
"jest": "^26.0.1"
},
"files": [
+30
View File
@@ -1,5 +1,35 @@
# example-backend
## 0.2.60
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/plugin-scaffolder-backend@0.15.20
- @backstage/integration@0.7.1
- @backstage/backend-common@0.10.3
- @backstage/plugin-todo-backend@0.1.18
- @backstage/plugin-catalog-backend@0.20.0
- @backstage/plugin-tech-insights-backend@0.1.5
- @backstage/plugin-permission-node@0.3.0
- @backstage/plugin-auth-backend@0.6.2
- @backstage/plugin-code-coverage-backend@0.1.19
- @backstage/plugin-search-backend-node@0.4.4
- @backstage/plugin-techdocs-backend@0.12.3
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.5
- @backstage/plugin-permission-backend@0.3.0
- @backstage/plugin-graphql-backend@0.1.11
- @backstage/plugin-kubernetes-backend@0.4.3
- example-app@0.2.60
- @backstage/backend-tasks@0.1.3
- @backstage/catalog-client@0.5.4
- @backstage/catalog-model@0.9.9
- @backstage/plugin-badges-backend@0.1.15
- @backstage/plugin-kafka-backend@0.2.14
- @backstage/plugin-permission-common@0.3.1
- @backstage/plugin-scaffolder-backend-module-rails@0.2.3
## 0.2.59
### Patch Changes
+26 -26
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.59",
"version": "0.2.60",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -24,43 +24,43 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.10.1",
"@backstage/backend-tasks": "^0.1.0",
"@backstage/catalog-client": "^0.5.3",
"@backstage/catalog-model": "^0.9.8",
"@backstage/config": "^0.1.10",
"@backstage/integration": "^0.7.0",
"@backstage/backend-common": "^0.10.3",
"@backstage/backend-tasks": "^0.1.3",
"@backstage/catalog-client": "^0.5.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/config": "^0.1.12",
"@backstage/integration": "^0.7.1",
"@backstage/plugin-app-backend": "^0.3.21",
"@backstage/plugin-auth-backend": "^0.6.0",
"@backstage/plugin-auth-backend": "^0.6.2",
"@backstage/plugin-azure-devops-backend": "^0.2.6",
"@backstage/plugin-badges-backend": "^0.1.14",
"@backstage/plugin-catalog-backend": "^0.19.4",
"@backstage/plugin-code-coverage-backend": "^0.1.18",
"@backstage/plugin-graphql-backend": "^0.1.10",
"@backstage/plugin-badges-backend": "^0.1.15",
"@backstage/plugin-catalog-backend": "^0.20.0",
"@backstage/plugin-code-coverage-backend": "^0.1.19",
"@backstage/plugin-graphql-backend": "^0.1.11",
"@backstage/plugin-jenkins-backend": "^0.1.10",
"@backstage/plugin-kubernetes-backend": "^0.4.1",
"@backstage/plugin-kafka-backend": "^0.2.13",
"@backstage/plugin-permission-backend": "^0.2.3",
"@backstage/plugin-permission-common": "^0.3.0",
"@backstage/plugin-permission-node": "^0.2.3",
"@backstage/plugin-kubernetes-backend": "^0.4.3",
"@backstage/plugin-kafka-backend": "^0.2.14",
"@backstage/plugin-permission-backend": "^0.3.0",
"@backstage/plugin-permission-common": "^0.3.1",
"@backstage/plugin-permission-node": "^0.3.0",
"@backstage/plugin-proxy-backend": "^0.2.15",
"@backstage/plugin-rollbar-backend": "^0.1.18",
"@backstage/plugin-scaffolder-backend": "^0.15.19",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.2.2",
"@backstage/plugin-scaffolder-backend": "^0.15.20",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.2.3",
"@backstage/plugin-search-backend": "^0.3.0",
"@backstage/plugin-search-backend-node": "^0.4.2",
"@backstage/plugin-search-backend-node": "^0.4.4",
"@backstage/plugin-search-backend-module-elasticsearch": "^0.0.7",
"@backstage/plugin-search-backend-module-pg": "^0.2.3",
"@backstage/plugin-techdocs-backend": "^0.12.2",
"@backstage/plugin-tech-insights-backend": "^0.1.4",
"@backstage/plugin-techdocs-backend": "^0.12.3",
"@backstage/plugin-tech-insights-backend": "^0.1.5",
"@backstage/plugin-tech-insights-node": "^0.1.2",
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.4",
"@backstage/plugin-todo-backend": "^0.1.17",
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.5",
"@backstage/plugin-todo-backend": "^0.1.18",
"@gitbeaker/node": "^34.6.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^11.0.1",
"dockerode": "^3.3.1",
"example-app": "^0.2.58",
"example-app": "^0.2.60",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"express-prom-bundle": "^6.3.6",
@@ -72,7 +72,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.10.4",
"@backstage/cli": "^0.11.0",
"@types/dockerode": "^3.3.0",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-client
## 0.5.4
### Patch Changes
- Updated dependencies
- @backstage/errors@0.2.0
- @backstage/catalog-model@0.9.9
## 0.5.3
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-client",
"description": "An isomorphic client for the catalog backend",
"version": "0.5.3",
"version": "0.5.4",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,12 +30,12 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.9.7",
"@backstage/errors": "^0.1.4",
"@backstage/catalog-model": "^0.9.9",
"@backstage/errors": "^0.2.0",
"cross-fetch": "^3.0.6"
},
"devDependencies": {
"@backstage/cli": "^0.10.3",
"@backstage/cli": "^0.11.0",
"@types/jest": "^26.0.7",
"msw": "^0.35.0"
},
+8
View File
@@ -1,5 +1,13 @@
# @backstage/catalog-model
## 0.9.9
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
## 0.9.8
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-model",
"description": "Types and validators that help describe the model of a Backstage Catalog",
"version": "0.9.8",
"version": "0.9.9",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,8 +30,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/json-schema": "^7.0.5",
"@types/yup": "^0.29.13",
@@ -42,7 +42,7 @@
"yup": "^0.32.9"
},
"devDependencies": {
"@backstage/cli": "^0.10.2",
"@backstage/cli": "^0.11.0",
"@types/jest": "^26.0.7",
"@types/lodash": "^4.14.151",
"yaml": "^1.9.2"
+39
View File
@@ -1,5 +1,44 @@
# @backstage/cli
## 0.11.0
### Minor Changes
- 14e980acee: ESLint upgraded to version 8 and all it's plugins updated to newest version.
If you use any custom plugins for ESLint please check compatibility.
```diff
- "@typescript-eslint/eslint-plugin": "^v4.33.0",
- "@typescript-eslint/parser": "^v4.28.3",
+ "@typescript-eslint/eslint-plugin": "^5.9.0",
+ "@typescript-eslint/parser": "^5.9.0",
- "eslint": "^7.30.0",
+ "eslint": "^8.6.0",
- "eslint-plugin-import": "^2.20.2",
- "eslint-plugin-jest": "^24.1.0",
- "eslint-plugin-jsx-a11y": "^6.2.1",
+ "eslint-plugin-import": "^2.25.4",
+ "eslint-plugin-jest": "^25.3.4",
+ "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.12.4",
- "eslint-plugin-react-hooks": "^4.0.0",
+ "eslint-plugin-react": "^7.28.0",
+ "eslint-plugin-react-hooks": "^4.3.0",
```
Please consult changelogs from packages if you find any problems.
### Patch Changes
- f302d24d34: Switch Webpack minification to use `esbuild` instead of `terser`.
- bee7082094: Update `config/eslint.js` to forbid imports of `@material-ui/icons/` as well.
- 7946418729: Switched to using `@manypkg/get-packages` to list monorepo packages, which provides better support for different kind of monorepo setups.
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
- @backstage/config-loader@0.9.2
## 0.10.5
### Patch Changes
+11 -11
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.10.5",
"version": "0.11.0",
"private": false,
"publishConfig": {
"access": "public"
@@ -29,9 +29,9 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/config-loader": "^0.9.1",
"@backstage/errors": "^0.1.5",
"@backstage/config": "^0.1.12",
"@backstage/config-loader": "^0.9.2",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@hot-loader/react-dom": "^16.13.0",
"@manypkg/get-packages": "^1.1.3",
@@ -115,13 +115,13 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-common": "^0.10.2",
"@backstage/config": "^0.1.11",
"@backstage/core-components": "^0.8.3",
"@backstage/core-plugin-api": "^0.4.1",
"@backstage/core-app-api": "^0.3.1",
"@backstage/dev-utils": "^0.2.16",
"@backstage/test-utils": "^0.2.1",
"@backstage/backend-common": "^0.10.3",
"@backstage/config": "^0.1.12",
"@backstage/core-components": "^0.8.4",
"@backstage/core-plugin-api": "^0.5.0",
"@backstage/core-app-api": "^0.4.0",
"@backstage/dev-utils": "^0.2.17",
"@backstage/test-utils": "^0.2.2",
"@backstage/theme": "^0.2.14",
"@types/diff": "^5.0.0",
"@types/express": "^4.17.6",
@@ -23,5 +23,6 @@ export default async (cmd: Command) => {
fromPackage: cmd.package,
mockEnv: cmd.lax,
fullVisibility: !cmd.frontend,
withDeprecatedKeys: cmd.deprecated,
});
};
+1
View File
@@ -193,6 +193,7 @@ export function registerCommands(program: CommanderStatic) {
)
.option('--lax', 'Do not require environment variables to be set')
.option('--frontend', 'Only validate the frontend configuration')
.option('--deprecated', 'Output deprecated configuration settings')
.option(...configOption)
.description(
'Validate that the given configuration loads and matches schema',
+2
View File
@@ -30,6 +30,7 @@ type Options = {
fromPackage?: string;
mockEnv?: boolean;
withFilteredKeys?: boolean;
withDeprecatedKeys?: boolean;
fullVisibility?: boolean;
};
@@ -91,6 +92,7 @@ export async function loadCliConfig(options: Options) {
? ['frontend', 'backend', 'secret']
: ['frontend'],
withFilteredKeys: options.withFilteredKeys,
withDeprecatedKeys: options.withDeprecatedKeys,
});
const frontendConfig = ConfigReader.fromConfigs(frontendAppConfigs);
+9
View File
@@ -1,5 +1,14 @@
# @backstage/codemods
## 0.1.29
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.8.4
- @backstage/core-plugin-api@0.5.0
- @backstage/core-app-api@0.4.0
## 0.1.28
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/codemods",
"description": "A collection of codemods for Backstage projects",
"version": "0.1.28",
"version": "0.1.29",
"private": false,
"publishConfig": {
"access": "public",
+8
View File
@@ -1,5 +1,13 @@
# @backstage/config-loader
## 0.9.2
### Patch Changes
- Updated dependencies
- @backstage/config@0.1.12
- @backstage/errors@0.2.0
## 0.9.1
### Patch Changes
+1
View File
@@ -21,6 +21,7 @@ export type ConfigSchemaProcessingOptions = {
visibility?: ConfigVisibility[];
valueTransform?: TransformFunc<any>;
withFilteredKeys?: boolean;
withDeprecatedKeys?: boolean;
};
// @public (undocumented)
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config-loader",
"description": "Config loading functionality used by Backstage backend, and CLI",
"version": "0.9.1",
"version": "0.9.2",
"private": false,
"publishConfig": {
"access": "public",
@@ -31,8 +31,8 @@
},
"dependencies": {
"@backstage/cli-common": "^0.1.6",
"@backstage/config": "^0.1.11",
"@backstage/errors": "^0.1.4",
"@backstage/config": "^0.1.12",
"@backstage/errors": "^0.2.0",
"@backstage/types": "^0.1.1",
"@types/json-schema": "^7.0.6",
"ajv": "^7.0.3",
@@ -182,10 +182,10 @@ function compileTsSchemas(paths: string[]) {
program,
// All schemas should export a `Config` symbol
'Config',
// This enables usage of @visibility is doc comments
// This enables usage of @visibility and @deprecated in doc comments
{
required: true,
validationKeywords: ['visibility'],
validationKeywords: ['visibility', 'deprecated'],
},
[path.split(sep).join('/')], // Unix paths are expected for all OSes here
) as JsonObject | null;
@@ -40,6 +40,7 @@ describe('compileConfigSchemas', () => {
],
visibilityByDataPath: new Map(),
visibilityBySchemaPath: new Map(),
deprecationByDataPath: new Map(),
});
expect(validate([{ data: { b: 'b' }, context: 'test' }])).toEqual({
errors: [
@@ -53,6 +54,7 @@ describe('compileConfigSchemas', () => {
],
visibilityByDataPath: new Map(),
visibilityBySchemaPath: new Map(),
deprecationByDataPath: new Map(),
});
});
@@ -112,6 +114,7 @@ describe('compileConfigSchemas', () => {
'/properties/d/items': 'frontend',
}),
),
deprecationByDataPath: new Map(),
});
});
@@ -137,4 +140,34 @@ describe('compileConfigSchemas', () => {
"Config schema visibility is both 'frontend' and 'secret' for properties/a/visibility",
);
});
it('should discover deprecations', () => {
const validate = compileConfigSchemas([
{
path: 'a1',
value: {
type: 'object',
properties: {
a: { type: 'string', deprecated: 'deprecation reason for a' },
b: { type: 'string', deprecated: 'deprecation reason for b' },
c: { type: 'string' },
},
},
},
]);
expect(
validate([
{ data: { a: 'a', b: 'b', c: 'c', d: ['d'] }, context: 'test' },
]),
).toEqual({
deprecationByDataPath: new Map(
Object.entries({
'/a': 'deprecation reason for a',
'/b': 'deprecation reason for b',
}),
),
visibilityByDataPath: new Map(),
visibilityBySchemaPath: new Map(),
});
});
});
@@ -40,6 +40,7 @@ export function compileConfigSchemas(
// output during validation. We work around this by having this extra piece
// of state that we reset before each validation.
const visibilityByDataPath = new Map<string, ConfigVisibility>();
const deprecationByDataPath = new Map<string, string>();
const ajv = new Ajv({
allErrors: true,
@@ -47,28 +48,48 @@ export function compileConfigSchemas(
schemas: {
'https://backstage.io/schema/config-v1': true,
},
}).addKeyword({
keyword: 'visibility',
metaSchema: {
type: 'string',
enum: CONFIG_VISIBILITIES,
},
compile(visibility: ConfigVisibility) {
return (_data, context) => {
if (context?.dataPath === undefined) {
return false;
}
if (visibility && visibility !== 'backend') {
})
.addKeyword({
keyword: 'visibility',
metaSchema: {
type: 'string',
enum: CONFIG_VISIBILITIES,
},
compile(visibility: ConfigVisibility) {
return (_data, context) => {
if (context?.dataPath === undefined) {
return false;
}
if (visibility && visibility !== 'backend') {
const normalizedPath = context.dataPath.replace(
/\['?(.*?)'?\]/g,
(_, segment) => `/${segment}`,
);
visibilityByDataPath.set(normalizedPath, visibility);
}
return true;
};
},
})
.removeKeyword('deprecated') // remove `deprecated` keyword so that we can implement our own compiler
.addKeyword({
keyword: 'deprecated',
metaSchema: { type: 'string' },
compile(deprecationDescription: string) {
return (_data, context) => {
if (context?.dataPath === undefined) {
return false;
}
const normalizedPath = context.dataPath.replace(
/\['?(.*?)'?\]/g,
(_, segment) => `/${segment}`,
);
visibilityByDataPath.set(normalizedPath, visibility);
}
return true;
};
},
});
// create mapping of deprecation description and data path of property
deprecationByDataPath.set(normalizedPath, deprecationDescription);
return true;
};
},
});
for (const schema of schemas) {
try {
@@ -79,6 +100,7 @@ export function compileConfigSchemas(
}
const merged = mergeConfigSchemas(schemas.map(_ => _.value));
const validate = ajv.compile(merged);
const visibilityBySchemaPath = new Map<string, ConfigVisibility>();
@@ -94,17 +116,20 @@ export function compileConfigSchemas(
visibilityByDataPath.clear();
const valid = validate(config);
if (!valid) {
return {
errors: validate.errors ?? [],
visibilityByDataPath: new Map(visibilityByDataPath),
visibilityBySchemaPath,
deprecationByDataPath,
};
}
return {
visibilityByDataPath: new Map(visibilityByDataPath),
visibilityBySchemaPath,
deprecationByDataPath,
};
};
}
@@ -64,6 +64,13 @@ const visibility = new Map<string, ConfigVisibility>(
}),
);
const deprecations = new Map<string, string>(
Object.entries({
'/arr': 'deprecated array',
'/objB/never': 'deprecated nested property',
}),
);
describe('filterByVisibility', () => {
test.each<[ConfigVisibility[], JsonObject]>([
[
@@ -185,9 +192,34 @@ describe('filterByVisibility', () => {
[['frontend', 'backend', 'secret'], { data, filteredKeys: [] }],
])('should filter correctly with %p', (filter, expected) => {
expect(
filterByVisibility(data, filter, visibility, undefined, true),
filterByVisibility(
data,
filter,
visibility,
deprecations,
undefined,
true,
false,
),
).toEqual(expected);
});
it('should include deprecated keys regardless of visibility', () => {
expect(
filterByVisibility(
data,
[],
visibility,
deprecations,
undefined,
true,
true,
).deprecatedKeys,
).toEqual([
{ key: 'arr', description: 'deprecated array' },
{ key: 'objB.never', description: 'deprecated nested property' },
]);
});
});
describe('filterErrorsByVisibility', () => {
@@ -30,10 +30,17 @@ export function filterByVisibility(
data: JsonObject,
includeVisibilities: ConfigVisibility[],
visibilityByDataPath: Map<string, ConfigVisibility>,
deprecationByDataPath: Map<string, string>,
transformFunc?: TransformFunc<number | string | boolean>,
withFilteredKeys?: boolean,
): { data: JsonObject; filteredKeys?: string[] } {
withDeprecatedKeys?: boolean,
): {
data: JsonObject;
filteredKeys?: string[];
deprecatedKeys?: { key: string; description: string }[];
} {
const filteredKeys = new Array<string>();
const deprecatedKeys = new Array<{ key: string; description: string }>();
function transform(
jsonVal: JsonValue,
@@ -44,6 +51,12 @@ export function filterByVisibility(
visibilityByDataPath.get(visibilityPath) ?? DEFAULT_CONFIG_VISIBILITY;
const isVisible = includeVisibilities.includes(visibility);
// deprecated keys are added regardless of visibility indicator
const deprecation = deprecationByDataPath.get(visibilityPath);
if (deprecation) {
deprecatedKeys.push({ key: filterPath, description: deprecation });
}
if (typeof jsonVal !== 'object') {
if (isVisible) {
if (transformFunc) {
@@ -109,6 +122,7 @@ export function filterByVisibility(
return {
filteredKeys: withFilteredKeys ? filteredKeys : undefined,
deprecatedKeys: withDeprecatedKeys ? deprecatedKeys : undefined,
data: (transform(data, '', '') as JsonObject) ?? {},
};
}
@@ -62,7 +62,10 @@ describe('loadConfigSchema', () => {
expect(schema.process(configs)).toEqual(configs);
expect(schema.process(configs, { visibility: ['frontend'] })).toEqual([
{ data: { key1: 'a' }, context: 'test' },
{
data: { key1: 'a' },
context: 'test',
},
]);
expect(
schema.process(configs, {
@@ -71,7 +74,11 @@ describe('loadConfigSchema', () => {
withFilteredKeys: true,
}),
).toEqual([
{ data: { key1: 'X' }, context: 'test', filteredKeys: ['key2'] },
{
data: { key1: 'X' },
context: 'test',
filteredKeys: ['key2'],
},
]);
expect(
schema.process(configs, {
@@ -79,14 +86,21 @@ describe('loadConfigSchema', () => {
withFilteredKeys: true,
}),
).toEqual([
{ data: { key1: 'X', key2: 'X' }, context: 'test', filteredKeys: [] },
{
data: { key1: 'X', key2: 'X' },
context: 'test',
filteredKeys: [],
},
]);
const serialized = schema.serialize();
const schema2 = await loadConfigSchema({ serialized });
expect(schema2.process(configs, { visibility: ['frontend'] })).toEqual([
{ data: { key1: 'a' }, context: 'test' },
{
data: { key1: 'a' },
context: 'test',
},
]);
expect(() =>
schema2.process([...configs, { data: { key1: 3 }, context: 'test2' }]),
@@ -131,7 +145,10 @@ describe('loadConfigSchema', () => {
'Config validation failed, Config should be number { type=number } at /key2',
);
expect(schema.process(configs, { visibility: ['frontend'] })).toEqual([
{ data: { key1: 'a' }, context: 'test' },
{
data: { key1: 'a' },
context: 'test',
},
]);
expect(() => schema.process(configs, { visibility: ['secret'] })).toThrow(
'Config validation failed, Config should be number { type=number } at /key2',
@@ -179,7 +196,12 @@ describe('loadConfigSchema', () => {
];
expect(
schema.process(mkConfig({ x: 1 }), { visibility: ['frontend'] }),
).toEqual([{ data: { nested: [{}] }, context: 'test' }]);
).toEqual([
{
data: { nested: [{}] },
context: 'test',
},
]);
expect(() => schema.process(mkConfig({ y: 1 }))).toThrow(
'Config validation failed, Config should be string { type=string } at /nested/0/y',
);
@@ -190,10 +212,20 @@ describe('loadConfigSchema', () => {
);
expect(
schema.process(mkConfig({ x: 'a' }), { visibility: ['frontend'] }),
).toEqual([{ data: { nested: [{}] }, context: 'test' }]);
).toEqual([
{
data: { nested: [{}] },
context: 'test',
},
]);
expect(
schema.process(mkConfig({ y: 'aaa' }), { visibility: ['frontend'] }),
).toEqual([{ data: { nested: [{ y: 'aaa' }] }, context: 'test' }]);
).toEqual([
{
data: { nested: [{ y: 'aaa' }] },
context: 'test',
},
]);
expect(() =>
schema.process(mkConfig({ y: 'aaaa' }), { visibility: ['frontend'] }),
).toThrow(
@@ -82,7 +82,7 @@ export async function loadConfigSchema(
return {
process(
configs: AppConfig[],
{ visibility, valueTransform, withFilteredKeys } = {},
{ visibility, valueTransform, withFilteredKeys, withDeprecatedKeys } = {},
): AppConfig[] {
const result = validate(configs);
@@ -105,8 +105,10 @@ export async function loadConfigSchema(
data,
visibility,
result.visibilityByDataPath,
result.deprecationByDataPath,
valueTransform,
withFilteredKeys,
withDeprecatedKeys,
),
}));
} else if (valueTransform) {
@@ -116,8 +118,10 @@ export async function loadConfigSchema(
data,
Array.from(CONFIG_VISIBILITIES),
result.visibilityByDataPath,
result.deprecationByDataPath,
valueTransform,
withFilteredKeys,
withDeprecatedKeys,
),
}));
}
@@ -81,6 +81,13 @@ type ValidationResult = {
* The path in the key uses the form `/properties/<key>/items/additionalProperties/<leaf-key>`
*/
visibilityBySchemaPath: Map<string, ConfigVisibility>;
/**
* The deprecated options that were discovered during validation.
*
* The path in the key uses the form `/<key>/<sub-key>/<array-index>/<leaf-key>`
*/
deprecationByDataPath: Map<string, string>;
};
/**
@@ -124,6 +131,13 @@ export type ConfigSchemaProcessingOptions = {
* Default: `false`.
*/
withFilteredKeys?: boolean;
/**
* Whether or not to include the `deprecatedKeys` property in the output `AppConfig`s.
*
* Default: `true`.
*/
withDeprecatedKeys?: boolean;
};
/**

Some files were not shown because too many files have changed in this diff Show More