Merge branch 'master' of github.com:backstage/backstage into catalog-import-instructions

This commit is contained in:
Adam Harvey
2020-12-03 21:12:09 -05:00
155 changed files with 3405 additions and 733 deletions
-13
View File
@@ -1,13 +0,0 @@
---
'@backstage/create-app': patch
---
Optimized the `yarn install` step in the backend `Dockerfile`.
To apply these changes to an existing app, make the following changes to `packages/backend/Dockerfile`:
Replace the `RUN yarn install ...` line with the following:
```bash
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-api-docs': patch
---
Update swagger-ui-react to 3.37.2
@@ -1,5 +0,0 @@
---
'@backstage/plugin-cost-insights': patch
---
enable SKU breakdown for unlabeled entities
@@ -1,5 +0,0 @@
---
'@backstage/plugin-cost-insights': patch
---
Add breakdown view to the Cost Overview panel
@@ -1,5 +0,0 @@
---
'@backstage/plugin-cost-insights': patch
---
Add support for non-SKU breakdowns for entities in the product panels.
@@ -1,5 +0,0 @@
---
'@backstage/plugin-cost-insights': patch
---
disable support button
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs-backend': patch
---
Update URL auth format for Gitlab clone
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/plugin-circleci': patch
'@backstage/plugin-jenkins': patch
---
Refactor to support ADR004 module exporting.
For more information, see https://backstage.io/docs/architecture-decisions/adrs-adr004.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-sentry': patch
'@backstage/plugin-welcome': patch
---
Refactor route registration to remove deprecating code
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/config-loader': minor
---
Fix typo of "visibility" in config schema reference
If you have defined a config element named `visiblity`, you
will need to fix the spelling to `visibility`. For more info,
see https://backstage.io/docs/conf/defining#visibility.
-9
View File
@@ -1,9 +0,0 @@
---
'@backstage/cli': patch
'@backstage/config-loader': patch
'@backstage/core-api': patch
'@backstage/plugin-catalog-backend': patch
'@backstage/plugin-cost-insights': patch
---
Added a type alias for PositionError = GeolocationPositionError
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/backend-common': patch
---
Allow the `backend.listen.port` config to be both a number or a string.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Bump versions of `esbuild` and `rollup-plugin-esbuild`
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-proxy-backend': patch
---
Filter the headers that are sent from the proxied-targed back to the frontend to not forwarded unwanted authentication or
monitoring contexts from other origins (like `Set-Cookie` with e.g. a google analytics context). The implementation reuses
the `allowedHeaders` configuration that now controls both directions `frontend->target` and `target->frontend`.
-13
View File
@@ -1,13 +0,0 @@
---
'@backstage/create-app': patch
---
Removed `"resolutions"` entry for `esbuild` in the root `package.json` in order to use the version specified by `@backstage/cli`.
To apply this change to an existing app, remove the following from your root `package.json`:
```json
"resolutions": {
"esbuild": "0.6.3"
},
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/create-app': patch
---
Add [API docs plugin](https://github.com/backstage/backstage/tree/master/plugins/api-docs) to new apps being created through the CLI.
-28
View File
@@ -1,28 +0,0 @@
---
'@backstage/plugin-catalog-backend': minor
'@backstage/plugin-catalog-import': minor
'@backstage/catalog-model': patch
'@backstage/plugin-scaffolder': patch
---
Add Analyze location endpoint to catalog backend. Add catalog-import plugin and replace import-component with it. To start using Analyze location endpoint, you have add it to the `createRouter` function options in the `\backstage\packages\backend\src\plugins\catalog.ts` file:
```ts
export default async function createPlugin(env: PluginEnvironment) {
const builder = new CatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
} = await builder.build();
return await createRouter({
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
logger: env.logger,
});
}
```
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Gracefully handle missing codeowners.
The CodeOwnersProcessor now also takes a logger as a parameter.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/catalog-model': minor
'@backstage/plugin-kubernetes': patch
'@backstage/plugin-kubernetes-backend': patch
---
k8s-plugin: refactor approach to use annotation based label-selector
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/cli': minor
'@backstage/plugin-cost-insights': patch
---
sort product panels and navigation menu by greatest cost
update tsconfig.json to use ES2020 api
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
Use type EntityName from catalog-model for entities
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Use the OWNED_BY relation and compare it to the users MEMBER_OF relation. The user entity is searched by name, based on the userId of the identity.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-proxy-backend': patch
---
Add configuration schema for the commonly used properties
+1 -1
View File
@@ -93,6 +93,6 @@ sign-in methods.
More details are provided in dedicated sections of the documentation.
- [OAuth](./oauth.md): Description of the generic OAuth flow implemented by the
[auth-backend](../../plugins/auth-backend).
[auth-backend](https://github.com/backstage/backstage/tree/master/plugins/auth-backend).
- [Glossary](./glossary.md): Glossary of some common terms related to the auth
flows.
@@ -31,6 +31,7 @@ we recommend that you name them `catalog-info.yaml`.
- [Kind: Resource](#kind-resource)
- [Kind: System](#kind-system)
- [Kind: Domain](#kind-domain)
- [Kind: Location](#kind-location)
## Overall Shape Of An Entity
@@ -884,3 +885,58 @@ This kind is not yet defined, but is reserved [for future use](system-model.md).
## Kind: Domain
This kind is not yet defined, but is reserved [for future use](system-model.md).
## Kind: Location
Describes the following entity kind:
| Field | Value |
| ------------ | ----------------------- |
| `apiVersion` | `backstage.io/v1alpha1` |
| `kind` | `Location` |
A location is a marker that references other places to look for catalog data.
Descriptor files for this kind may look as follows.
```yaml
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: org-data
spec:
type: url
targets:
- http://github.com/myorg/myproject/org-data-dump/catalog-info-staff.yaml
- http://github.com/myorg/myproject/org-data-dump/catalog-info-consultants.yaml
```
In addition to the [common envelope metadata](#common-to-all-kinds-the-metadata)
shape, this kind has the following structure.
### `apiVersion` and `kind` [required]
Exactly equal to `backstage.io/v1alpha1` and `Location`, respectively.
### `spec.type` [optional]
The single location type, that's common to the targets specified in the spec. If
it is left out, it is inherited from the location type that originally read the
entity data. For example, if you have a `url` type location, that when read
results in a `Location` kind entity with no `spec.type`, then the referenced
targets in the entity will implicitly also be of `url` type. This is useful
because you can define a hierarchy of things in a directory structure using
relative target paths (see below), and it will work out no matter if it's
consumed locally on disk from a `file` location, or as uploaded on a VCS.
### `spec.target` [optional]
A single target as a string. Can be either an absolute path/URL (depending on
the type), or a relative path such as `./details/catalog-info.yaml` which is
resolved relative to the location of this Location entity itself.
### `spec.targets` [optional]
A list of targets as strings. They can all be either absolute paths/URLs
(depending on the type), or relative paths such as `./details/catalog-info.yaml`
which are resolved relative to the location of this Location entity itself.
+40
View File
@@ -1,5 +1,45 @@
# example-app
## 0.2.5
### Patch Changes
- Updated dependencies [7eb8bfe4a]
- Updated dependencies [fe7257ff0]
- Updated dependencies [a2cfa311a]
- Updated dependencies [69f38457f]
- Updated dependencies [bec334b33]
- Updated dependencies [303c5ea17]
- Updated dependencies [b4488ddb0]
- Updated dependencies [4a655c89d]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [8a16e8af8]
- Updated dependencies [bcc211a08]
- Updated dependencies [00670a96e]
- Updated dependencies [da2ad65cb]
- Updated dependencies [ebf37bbae]
- @backstage/plugin-api-docs@0.3.1
- @backstage/plugin-cost-insights@0.4.2
- @backstage/plugin-sentry@0.2.4
- @backstage/plugin-welcome@0.2.2
- @backstage/cli@0.4.0
- @backstage/catalog-model@0.4.0
- @backstage/plugin-catalog-import@0.3.0
- @backstage/plugin-scaffolder@0.3.2
- @backstage/plugin-kubernetes@0.3.1
- @backstage/plugin-techdocs@0.3.1
- @backstage/plugin-catalog@0.2.5
- @backstage/test-utils@0.1.4
- @backstage/plugin-circleci@0.2.3
- @backstage/plugin-cloudbuild@0.2.3
- @backstage/plugin-github-actions@0.2.3
- @backstage/plugin-jenkins@0.3.2
- @backstage/plugin-lighthouse@0.2.4
- @backstage/plugin-register-component@0.2.3
- @backstage/plugin-rollbar@0.2.5
- @backstage/plugin-search@0.2.2
## 0.2.4
### Patch Changes
+21 -21
View File
@@ -1,37 +1,37 @@
{
"name": "example-app",
"version": "0.2.4",
"version": "0.2.5",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.3.1",
"@backstage/cli": "^0.3.2",
"@backstage/catalog-model": "^0.4.0",
"@backstage/cli": "^0.4.0",
"@backstage/core": "^0.3.2",
"@backstage/plugin-api-docs": "^0.3.0",
"@backstage/plugin-catalog": "^0.2.4",
"@backstage/plugin-catalog-import": "^0.2.0",
"@backstage/plugin-circleci": "^0.2.2",
"@backstage/plugin-cloudbuild": "^0.2.2",
"@backstage/plugin-cost-insights": "^0.4.1",
"@backstage/plugin-api-docs": "^0.3.1",
"@backstage/plugin-catalog": "^0.2.5",
"@backstage/plugin-catalog-import": "^0.3.0",
"@backstage/plugin-circleci": "^0.2.3",
"@backstage/plugin-cloudbuild": "^0.2.3",
"@backstage/plugin-cost-insights": "^0.4.2",
"@backstage/plugin-explore": "^0.2.1",
"@backstage/plugin-gcp-projects": "^0.2.1",
"@backstage/plugin-github-actions": "^0.2.2",
"@backstage/plugin-github-actions": "^0.2.3",
"@backstage/plugin-gitops-profiles": "^0.2.1",
"@backstage/plugin-graphiql": "^0.2.1",
"@backstage/plugin-jenkins": "^0.3.1",
"@backstage/plugin-kubernetes": "^0.3.0",
"@backstage/plugin-lighthouse": "^0.2.3",
"@backstage/plugin-jenkins": "^0.3.2",
"@backstage/plugin-kubernetes": "^0.3.1",
"@backstage/plugin-lighthouse": "^0.2.4",
"@backstage/plugin-newrelic": "^0.2.1",
"@backstage/plugin-register-component": "^0.2.2",
"@backstage/plugin-rollbar": "^0.2.4",
"@backstage/plugin-scaffolder": "^0.3.1",
"@backstage/plugin-sentry": "^0.2.3",
"@backstage/plugin-search": "^0.2.1",
"@backstage/plugin-register-component": "^0.2.3",
"@backstage/plugin-rollbar": "^0.2.5",
"@backstage/plugin-scaffolder": "^0.3.2",
"@backstage/plugin-sentry": "^0.2.4",
"@backstage/plugin-search": "^0.2.2",
"@backstage/plugin-tech-radar": "^0.3.0",
"@backstage/plugin-techdocs": "^0.3.0",
"@backstage/plugin-techdocs": "^0.3.1",
"@backstage/plugin-user-settings": "^0.2.2",
"@backstage/plugin-welcome": "^0.2.1",
"@backstage/test-utils": "^0.1.3",
"@backstage/plugin-welcome": "^0.2.2",
"@backstage/test-utils": "^0.1.4",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/backend-common
## 0.3.3
### Patch Changes
- 612368274: Allow the `backend.listen.port` config to be both a number or a string.
- Updated dependencies [4e7091759]
- Updated dependencies [b4488ddb0]
- @backstage/config-loader@0.4.0
## 0.3.2
### Patch Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.3.2",
"version": "0.3.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -31,7 +31,7 @@
"dependencies": {
"@backstage/cli-common": "^0.1.1",
"@backstage/config": "^0.1.1",
"@backstage/config-loader": "^0.3.0",
"@backstage/config-loader": "^0.4.0",
"@backstage/integration": "^0.1.2",
"@types/cors": "^2.8.6",
"@types/express": "^4.17.6",
@@ -67,8 +67,8 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/test-utils": "^0.1.4",
"@types/archiver": "^3.1.1",
"@types/compression": "^1.7.0",
"@types/concat-stream": "^1.6.0",
@@ -235,6 +235,40 @@ describe('GithubUrlReader', () => {
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
it('includes the subdomain in the github url', async () => {
worker.resetHandlers();
worker.use(
rest.get(
'https://ghe.github.com/backstage/mock/archive/repo.tar.gz',
(_, res, ctx) =>
res(
ctx.status(200),
ctx.set('Content-Type', 'application/x-gzip'),
ctx.body(repoBuffer),
),
),
);
const processor = new GithubUrlReader(
{
host: 'ghe.github.com',
apiBaseUrl: 'https://api.github.com',
},
{ treeResponseFactory },
);
const response = await processor.readTree(
'https://ghe.github.com/backstage/mock/tree/repo/docs',
);
const files = await response.files();
expect(files.length).toBe(1);
const indexMarkdownFile = await files[0].content();
expect(indexMarkdownFile.toString()).toBe('# Test\n');
});
it('must specify a branch', async () => {
const processor = new GithubUrlReader(
{
@@ -179,7 +179,7 @@ export class GithubUrlReader implements UrlReader {
name: repoName,
ref,
protocol,
source,
resource,
full_name,
filepath,
} = parseGitUri(url);
@@ -194,7 +194,7 @@ export class GithubUrlReader implements UrlReader {
// TODO(Rugvip): use API to fetch URL instead
const response = await fetch(
new URL(
`${protocol}://${source}/${full_name}/archive/${ref}.tar.gz`,
`${protocol}://${resource}/${full_name}/archive/${ref}.tar.gz`,
).toString(),
);
if (!response.ok) {
+24
View File
@@ -1,5 +1,29 @@
# example-backend
## 0.2.5
### Patch Changes
- Updated dependencies [ae95c7ff3]
- Updated dependencies [b4488ddb0]
- Updated dependencies [612368274]
- Updated dependencies [6a6c7c14e]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [e42402b47]
- Updated dependencies [bcc211a08]
- Updated dependencies [3619ea4c4]
- @backstage/plugin-techdocs-backend@0.3.1
- @backstage/plugin-catalog-backend@0.3.0
- @backstage/backend-common@0.3.3
- @backstage/plugin-proxy-backend@0.2.2
- @backstage/catalog-model@0.4.0
- @backstage/plugin-kubernetes-backend@0.2.1
- @backstage/plugin-app-backend@0.3.2
- example-app@0.2.5
- @backstage/plugin-auth-backend@0.2.5
- @backstage/plugin-scaffolder-backend@0.3.3
## 0.2.4
### Patch Changes
+12 -12
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.4",
"version": "0.2.5",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"private": true,
@@ -18,24 +18,24 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.3.2",
"@backstage/catalog-model": "^0.3.1",
"@backstage/backend-common": "^0.3.3",
"@backstage/catalog-model": "^0.4.0",
"@backstage/config": "^0.1.1",
"@backstage/plugin-app-backend": "^0.3.1",
"@backstage/plugin-auth-backend": "^0.2.4",
"@backstage/plugin-catalog-backend": "^0.2.3",
"@backstage/plugin-app-backend": "^0.3.2",
"@backstage/plugin-auth-backend": "^0.2.5",
"@backstage/plugin-catalog-backend": "^0.3.0",
"@backstage/plugin-graphql-backend": "^0.1.3",
"@backstage/plugin-kubernetes-backend": "^0.2.0",
"@backstage/plugin-proxy-backend": "^0.2.1",
"@backstage/plugin-kubernetes-backend": "^0.2.1",
"@backstage/plugin-proxy-backend": "^0.2.2",
"@backstage/plugin-rollbar-backend": "^0.1.4",
"@backstage/plugin-scaffolder-backend": "^0.3.2",
"@backstage/plugin-scaffolder-backend": "^0.3.3",
"@backstage/plugin-sentry-backend": "^0.1.3",
"@backstage/plugin-techdocs-backend": "^0.3.0",
"@backstage/plugin-techdocs-backend": "^0.3.1",
"@gitbeaker/node": "^25.2.0",
"@octokit/rest": "^18.0.0",
"azure-devops-node-api": "^10.1.1",
"dockerode": "^3.2.0",
"example-app": "^0.2.4",
"example-app": "^0.2.5",
"express": "^4.17.1",
"express-promise-router": "^3.0.3",
"knex": "^0.21.6",
@@ -45,7 +45,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@types/dockerode": "^2.5.32",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/catalog-client
## 0.3.2
### Patch Changes
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- @backstage/catalog-model@0.4.0
## 0.3.1
### Patch Changes
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-client",
"version": "0.3.1",
"version": "0.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,12 +20,12 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.3.0",
"@backstage/catalog-model": "^0.4.0",
"@backstage/config": "^0.1.1",
"cross-fetch": "^3.0.6"
},
"devDependencies": {
"@backstage/cli": "^0.3.1",
"@backstage/cli": "^0.4.0",
"@types/jest": "^26.0.7",
"msw": "^0.21.2"
},
+31
View File
@@ -1,5 +1,36 @@
# @backstage/catalog-model
## 0.4.0
### Minor Changes
- bcc211a08: k8s-plugin: refactor approach to use annotation based label-selector
### Patch Changes
- 08835a61d: Add support for relative targets and implicit types in Location entities.
- a9fd599f7: Add Analyze location endpoint to catalog backend. Add catalog-import plugin and replace import-component with it. To start using Analyze location endpoint, you have add it to the `createRouter` function options in the `\backstage\packages\backend\src\plugins\catalog.ts` file:
```ts
export default async function createPlugin(env: PluginEnvironment) {
const builder = new CatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
} = await builder.build();
return await createRouter({
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
logger: env.logger,
});
}
```
## 0.3.1
### Patch Changes
@@ -0,0 +1,10 @@
# Examples with relative paths
These examples use Location entities with relative paths
[see #3513](https://github.com/backstage/backstage/pull/3513).
The `examples` sibling directory will be replaced with these contents no sooner
than December 16 2020, to give consumers time to adopt the above change.
The contents of this directory is here for consumers who are on the edge and
want to use the new facility before December 16.
@@ -0,0 +1,8 @@
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: acme-corp
description: A collection of all Backstage example Groups
spec:
targets:
- ./acme/org.yaml
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: backstage
description: The backstage sub-department
spec:
type: sub-department
parent: infrastructure
ancestors: [infrastructure, acme-corp]
children: [team-a, team-b]
descendants: [team-a, team-b]
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: boxoffice
description: The boxoffice sub-department
spec:
type: sub-department
parent: infrastructure
ancestors: [infrastructure, acme-corp]
children: [team-c, team-d]
descendants: [team-c, team-d]
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: infrastructure
description: The infra department
spec:
type: department
parent: acme-corp
ancestors: [acme-corp]
children: [backstage, boxoffice]
descendants: [backstage, boxoffice, team-a, team-b, team-c, team-d]
@@ -0,0 +1,26 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: acme-corp
description: The acme-corp organization
spec:
type: organization
ancestors: []
children: [infrastructure]
descendants:
[infrastructure, backstage, boxoffice, team-a, team-b, team-c, team-d]
---
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: example-groups
description: A collection of all Backstage example Groups
spec:
targets:
- ./infrastructure-group.yaml
- ./boxoffice-group.yaml
- ./backstage-group.yaml
- ./team-a-group.yaml
- ./team-b-group.yaml
- ./team-c-group.yaml
- ./team-d-group.yaml
@@ -0,0 +1,58 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: team-a
description: Team A
spec:
type: team
parent: backstage
ancestors: [backstage, infrastructure, acme-corp]
children: []
descendants: []
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: breanna.davison
spec:
profile:
displayName: Breanna Davison
email: breanna-davison@example.com
picture: https://example.com/staff/breanna.jpeg
memberOf: [team-a]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: janelle.dawe
spec:
profile:
displayName: Janelle Dawe
email: janelle-dawe@example.com
picture: https://example.com/staff/janelle.jpeg
memberOf: [team-a]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: nigel.manning
spec:
profile:
displayName: Nigel Manning
email: nigel-manning@example.com
picture: https://example.com/staff/nigel.jpeg
memberOf: [team-a]
---
# This user is added as an example, to make it more easy for the "Guest"
# sign-in option to demonstrate some entities being owned. In a regular org,
# a guest user would probably not be registered like this.
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: guest
spec:
profile:
displayName: Guest User
email: guest@example.com
picture: https://example.com/staff/the-ceos-dog.jpeg
memberOf: [team-a]
@@ -0,0 +1,66 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: team-b
description: Team B
spec:
type: team
parent: backstage
ancestors: [backstage, infrastructure, acme-corp]
children: []
descendants: []
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: amelia.park
spec:
profile:
displayName: Amelia Park
email: amelia-park@example.com
picture: https://example.com/staff/amelia.jpeg
memberOf: [team-b]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: colette.brock
spec:
profile:
displayName: Colette Brock
email: colette-brock@example.com
picture: https://example.com/staff/colette.jpeg
memberOf: [team-b]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: jenny.doe
spec:
profile:
displayName: Jenny Doe
email: jenny-doe@example.com
picture: https://example.com/staff/jenny.jpeg
memberOf: [team-b]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: jonathon.page
spec:
profile:
displayName: Jonathon Page
email: jonathon-page@example.com
picture: https://example.com/staff/jonathon.jpeg
memberOf: [team-b]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: justine.barrow
spec:
profile:
displayName: Justine Barrow
email: justine-barrow@example.com
picture: https://example.com/staff/justine.jpeg
memberOf: [team-b]
@@ -0,0 +1,66 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: team-c
description: Team C
spec:
type: team
parent: boxoffice
ancestors: [boxoffice, infrastructure, acme-corp]
children: []
descendants: []
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: calum.leavy
spec:
profile:
displayName: Calum Leavy
email: calum-leavy@example.com
picture: https://example.com/staff/calum.jpeg
memberOf: [team-c]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: frank.tiernan
spec:
profile:
displayName: Frank Tiernan
email: frank-tiernan@example.com
picture: https://example.com/staff/frank.jpeg
memberOf: [team-c]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: peadar.macmahon
spec:
profile:
displayName: Peadar MacMahon
email: peadar-macmahon@example.com
picture: https://example.com/staff/peadar.jpeg
memberOf: [team-c]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: sarah.gilroy
spec:
profile:
displayName: Sarah Gilroy
email: sarah-gilroy@example.com
picture: https://example.com/staff/sarah.jpeg
memberOf: [team-c]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: tara.macgovern
spec:
profile:
displayName: Tara MacGovern
email: tara-macgovern@example.com
picture: https://example.com/staff/tara.jpeg
memberOf: [team-c]
@@ -0,0 +1,33 @@
apiVersion: backstage.io/v1alpha1
kind: Group
metadata:
name: team-d
description: Team D
spec:
type: team
parent: boxoffice
ancestors: [boxoffice, infrastructure, acme-corp]
children: []
descendants: []
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: eva.macdowell
spec:
profile:
displayName: Eva MacDowell
email: eva-macdowell@example.com
picture: https://example.com/staff/eva.jpeg
memberOf: [team-d]
---
apiVersion: backstage.io/v1alpha1
kind: User
metadata:
name: lucy.sheehan
spec:
profile:
displayName: Lucy Sheehan
email: lucy-sheehan@example.com
picture: https://example.com/staff/lucy.jpeg
memberOf: [team-d]
@@ -0,0 +1,12 @@
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: example-apis
description: A collection of all Backstage example APIs
spec:
targets:
- ./apis/hello-world-api.yaml
- ./apis/petstore-api.yaml
- ./apis/spotify-api.yaml
- ./apis/streetlights-api.yaml
- ./apis/swapi-graphql.yaml
@@ -0,0 +1,16 @@
apiVersion: backstage.io/v1alpha1
kind: Location
metadata:
name: example-components
description: A collection of all Backstage example components
spec:
targets:
- ./components/artist-lookup-component.yaml
- ./components/petstore-component.yaml
- ./components/playback-order-component.yaml
- ./components/podcast-api-component.yaml
- ./components/queue-proxy-component.yaml
- ./components/searcher-component.yaml
- ./components/playback-lib-component.yaml
- ./components/www-artist-component.yaml
- ./components/shuffle-api-component.yaml
@@ -0,0 +1,48 @@
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: hello-world
description: Hello World example for gRPC
spec:
type: grpc
lifecycle: deprecated
owner: team-c
definition: |
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
option java_multiple_files = true;
option java_package = "io.grpc.examples.helloworld";
option java_outer_classname = "HelloWorldProto";
option objc_class_prefix = "HLW";
package helloworld;
// The greeting service definition.
service Greeter {
// Sends a greeting
rpc SayHello (HelloRequest) returns (HelloReply) {}
}
// The request message containing the user's name.
message HelloRequest {
string name = 1;
}
// The response message containing the greetings
message HelloReply {
string message = 1;
}
@@ -0,0 +1,124 @@
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: petstore
description: The petstore API
tags:
- store
- rest
spec:
type: openapi
lifecycle: experimental
owner: team-c
definition: |
openapi: "3.0.0"
info:
version: 1.0.0
title: Swagger Petstore
license:
name: MIT
servers:
- url: http://petstore.swagger.io/v1
paths:
/pets:
get:
summary: List all pets
operationId: listPets
tags:
- pets
parameters:
- name: limit
in: query
description: How many items to return at one time (max 100)
required: false
schema:
type: integer
format: int32
responses:
'200':
description: A paged array of pets
headers:
x-next:
description: A link to the next page of responses
schema:
type: string
content:
application/json:
schema:
$ref: "#/components/schemas/Pets"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
post:
summary: Create a pet
operationId: createPets
tags:
- pets
responses:
'201':
description: Null response
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
/pets/{petId}:
get:
summary: Info for a specific pet
operationId: showPetById
tags:
- pets
parameters:
- name: petId
in: path
required: true
description: The id of the pet to retrieve
schema:
type: string
responses:
'200':
description: Expected response to a valid request
content:
application/json:
schema:
$ref: "#/components/schemas/Pet"
default:
description: unexpected error
content:
application/json:
schema:
$ref: "#/components/schemas/Error"
components:
schemas:
Pet:
type: object
required:
- id
- name
properties:
id:
type: integer
format: int64
name:
type: string
tag:
type: string
Pets:
type: array
items:
$ref: "#/components/schemas/Pet"
Error:
type: object
required:
- code
- message
properties:
code:
type: integer
format: int32
message:
type: string
@@ -0,0 +1,17 @@
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: spotify
description: The Spotify web API
tags:
- spotify
- rest
annotations:
# The annotation is deprecated, we use placeholders (see below) instead, remove it later.
backstage.io/definition-at-location: 'url:https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/APIs/spotify.com/v1/swagger.yaml'
spec:
type: openapi
lifecycle: production
owner: team-a
definition:
$text: https://github.com/APIs-guru/openapi-directory/blob/master/APIs/spotify.com/v1/swagger.yaml
@@ -0,0 +1,221 @@
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: streetlights
description: The Smartylighting Streetlights API allows you to remotely manage the city lights.
tags:
- mqtt
spec:
type: asyncapi
lifecycle: production
owner: team-c
definition: |
asyncapi: 2.0.0
info:
title: Streetlights API
version: '1.0.0'
description: |
The Smartylighting Streetlights API allows you to remotely manage the city lights.
### Check out its awesome features:
* Turn a specific streetlight on/off 🌃
* Dim a specific streetlight 😎
* Receive real-time information about environmental lighting conditions 📈
license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0
servers:
production:
url: api.streetlights.smartylighting.com:{port}
protocol: mqtt
description: Test broker
variables:
port:
description: Secure connection (TLS) is available through port 8883.
default: '1883'
enum:
- '1883'
- '8883'
security:
- apiKey: []
- supportedOauthFlows:
- streetlights:on
- streetlights:off
- streetlights:dim
- openIdConnectWellKnown: []
defaultContentType: application/json
channels:
smartylighting/streetlights/1/0/event/{streetlightId}/lighting/measured:
description: The topic on which measured values may be produced and consumed.
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
subscribe:
summary: Receive information about environmental lighting conditions of a particular streetlight.
operationId: receiveLightMeasurement
traits:
- $ref: '#/components/operationTraits/kafka'
message:
$ref: '#/components/messages/lightMeasured'
smartylighting/streetlights/1/0/action/{streetlightId}/turn/on:
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
publish:
operationId: turnOn
traits:
- $ref: '#/components/operationTraits/kafka'
message:
$ref: '#/components/messages/turnOnOff'
smartylighting/streetlights/1/0/action/{streetlightId}/turn/off:
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
publish:
operationId: turnOff
traits:
- $ref: '#/components/operationTraits/kafka'
message:
$ref: '#/components/messages/turnOnOff'
smartylighting/streetlights/1/0/action/{streetlightId}/dim:
parameters:
streetlightId:
$ref: '#/components/parameters/streetlightId'
publish:
operationId: dimLight
traits:
- $ref: '#/components/operationTraits/kafka'
message:
$ref: '#/components/messages/dimLight'
components:
messages:
lightMeasured:
name: lightMeasured
title: Light measured
summary: Inform about environmental lighting conditions for a particular streetlight.
contentType: application/json
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/lightMeasuredPayload"
turnOnOff:
name: turnOnOff
title: Turn on/off
summary: Command a particular streetlight to turn the lights on or off.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/turnOnOffPayload"
dimLight:
name: dimLight
title: Dim light
summary: Command a particular streetlight to dim the lights.
traits:
- $ref: '#/components/messageTraits/commonHeaders'
payload:
$ref: "#/components/schemas/dimLightPayload"
schemas:
lightMeasuredPayload:
type: object
properties:
lumens:
type: integer
minimum: 0
description: Light intensity measured in lumens.
sentAt:
$ref: "#/components/schemas/sentAt"
turnOnOffPayload:
type: object
properties:
command:
type: string
enum:
- on
- off
description: Whether to turn on or off the light.
sentAt:
$ref: "#/components/schemas/sentAt"
dimLightPayload:
type: object
properties:
percentage:
type: integer
description: Percentage to which the light should be dimmed to.
minimum: 0
maximum: 100
sentAt:
$ref: "#/components/schemas/sentAt"
sentAt:
type: string
format: date-time
description: Date and time when the message was sent.
securitySchemes:
apiKey:
type: apiKey
in: user
description: Provide your API key as the user and leave the password empty.
supportedOauthFlows:
type: oauth2
description: Flows to support OAuth 2.0
flows:
implicit:
authorizationUrl: 'https://authserver.example/auth'
scopes:
'streetlights:on': Ability to switch lights on
'streetlights:off': Ability to switch lights off
'streetlights:dim': Ability to dim the lights
password:
tokenUrl: 'https://authserver.example/token'
scopes:
'streetlights:on': Ability to switch lights on
'streetlights:off': Ability to switch lights off
'streetlights:dim': Ability to dim the lights
clientCredentials:
tokenUrl: 'https://authserver.example/token'
scopes:
'streetlights:on': Ability to switch lights on
'streetlights:off': Ability to switch lights off
'streetlights:dim': Ability to dim the lights
authorizationCode:
authorizationUrl: 'https://authserver.example/auth'
tokenUrl: 'https://authserver.example/token'
refreshUrl: 'https://authserver.example/refresh'
scopes:
'streetlights:on': Ability to switch lights on
'streetlights:off': Ability to switch lights off
'streetlights:dim': Ability to dim the lights
openIdConnectWellKnown:
type: openIdConnect
openIdConnectUrl: 'https://authserver.example/.well-known'
parameters:
streetlightId:
description: The ID of the streetlight.
schema:
type: string
messageTraits:
commonHeaders:
headers:
type: object
properties:
my-app-header:
type: integer
minimum: 0
maximum: 100
operationTraits:
kafka:
bindings:
kafka:
clientId: my-app-id
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: artist-lookup
description: Artist Lookup
tags:
- java
- data
spec:
type: service
lifecycle: experimental
owner: team-a
@@ -0,0 +1,13 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: petstore
description: Petstore
spec:
type: service
lifecycle: experimental
owner: team-c
implementsApis:
- petstore
- streetlights
- hello-world
@@ -0,0 +1,9 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: playback-sdk
description: Audio and video playback SDK
spec:
type: library
lifecycle: experimental
owner: team-c
@@ -0,0 +1,12 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: playback-order
description: Playback Order
tags:
- java
- playback
spec:
type: service
lifecycle: production
owner: user:guest
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: podcast-api
description: Podcast API
tags:
- java
spec:
type: service
lifecycle: experimental
owner: team-b
@@ -0,0 +1,12 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: queue-proxy
description: Queue Proxy
tags:
- go
- website
spec:
type: website
lifecycle: production
owner: team-b
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: searcher
description: Searcher
tags:
- go
spec:
type: service
lifecycle: production
owner: user:guest
@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: shuffle-api
description: Shuffle API
tags:
- go
spec:
type: service
lifecycle: production
owner: user:guest
@@ -0,0 +1,9 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: www-artist
description: Artist main website
spec:
type: website
lifecycle: production
owner: team-a
@@ -0,0 +1,7 @@
# Example Entities
NOTE: These are being replaced with the contents of the `examples-relative`
sibling directory, after December 16 2020. If you are using this example data
you will need to be using a released version of the catalog backend which
supports relative targets in Location entities
[see #3513](https://github.com/backstage/backstage/pull/3513) after that time.
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-model",
"version": "0.3.1",
"version": "0.4.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -29,7 +29,7 @@
"yup": "^0.29.3"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@types/express": "^4.17.6",
"@types/jest": "^26.0.7",
"@types/lodash": "^4.14.151",
@@ -54,9 +54,9 @@ describe('LocationV1alpha1Validator', () => {
await expect(validator.check(entity)).resolves.toBe(false);
});
it('rejects missing type', async () => {
it('accepts missing type', async () => {
delete (entity as any).spec.type;
await expect(validator.check(entity)).rejects.toThrow(/type/);
await expect(validator.check(entity)).resolves.toBe(true);
});
it('rejects wrong type', async () => {
@@ -26,7 +26,7 @@ const schema = yup.object<Partial<LocationEntityV1alpha1>>({
kind: yup.string().required().equals([KIND]),
spec: yup
.object({
type: yup.string().required().min(1),
type: yup.string().notRequired().min(1),
target: yup.string().notRequired().min(1),
targets: yup.array(yup.string().required()).notRequired(),
})
@@ -37,7 +37,7 @@ export interface LocationEntityV1alpha1 extends Entity {
apiVersion: typeof API_VERSION[number];
kind: typeof KIND;
spec: {
type: string;
type?: string;
target?: string;
targets?: string[];
};
+16
View File
@@ -1,5 +1,21 @@
# @backstage/cli
## 0.4.0
### Minor Changes
- 00670a96e: sort product panels and navigation menu by greatest cost
update tsconfig.json to use ES2020 api
### Patch Changes
- b4488ddb0: Added a type alias for PositionError = GeolocationPositionError
- 4a655c89d: Bump versions of `esbuild` and `rollup-plugin-esbuild`
- 8a16e8af8: Support `.npmrc` when building with private NPM registries
- Updated dependencies [4e7091759]
- Updated dependencies [b4488ddb0]
- @backstage/config-loader@0.4.0
## 0.3.2
### Patch Changes
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.3.2",
"version": "0.4.0",
"private": false,
"publishConfig": {
"access": "public"
@@ -30,7 +30,7 @@
"dependencies": {
"@backstage/cli-common": "^0.1.1",
"@backstage/config": "^0.1.1",
"@backstage/config-loader": "^0.3.0",
"@backstage/config-loader": "^0.4.0",
"@hot-loader/react-dom": "^16.13.0",
"@lerna/package-graph": "^3.18.5",
"@lerna/project": "^3.18.0",
@@ -111,11 +111,11 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/backend-common": "^0.3.2",
"@backstage/backend-common": "^0.3.3",
"@backstage/config": "^0.1.1",
"@backstage/core": "^0.3.2",
"@backstage/dev-utils": "^0.1.4",
"@backstage/test-utils": "^0.1.3",
"@backstage/dev-utils": "^0.1.5",
"@backstage/test-utils": "^0.1.4",
"@backstage/theme": "^0.2.1",
"@types/diff": "^4.0.2",
"@types/fs-extra": "^9.0.1",
@@ -34,11 +34,15 @@ export default async (cmd: Command) => {
const pkgPath = paths.resolveTarget(PKG_PATH);
const pkg = await fs.readJson(pkgPath);
const appConfigs = await findAppConfigs();
const npmrc = (await fs.pathExists(paths.resolveTargetRoot('.npmrc')))
? ['.npmrc']
: [];
const tempDistWorkspace = await createDistWorkspace([pkg.name], {
buildDependencies: Boolean(cmd.build),
files: [
'package.json',
'yarn.lock',
...npmrc,
...appConfigs,
{ src: paths.resolveTarget('Dockerfile'), dest: 'Dockerfile' },
],
+6 -1
View File
@@ -47,6 +47,7 @@ export function registerCommands(program: CommanderStatic) {
program
.command('backend:__experimental__bundle__', { hidden: true })
.description('Bundle all backend packages into dist-workspace')
.option('--build', 'Build packages before packing them into the image')
.action(lazy(() => import('./backend/bundle').then(m => m.default)));
program
@@ -55,7 +56,11 @@ export function registerCommands(program: CommanderStatic) {
.helpOption(', --backstage-cli-help') // Let docker handle --help
.option('--build', 'Build packages before packing them into the image')
.description(
'Bundles the package into a docker image. All extra args are forwarded to docker image build',
// TODO: Add example use cases in Backstage documentation.
// For example, if a $NPM_TOKEN needs to be exposed, run `backend:build-image --secret
// id=NPM_TOKEN,src=/NPM_TOKEN.txt`.
'Bundles the package into a docker image. All extra args are forwarded to ' +
'`docker image build`.',
)
.action(lazy(() => import('./backend/buildImage').then(m => m.default)));
+14
View File
@@ -1,5 +1,19 @@
# @backstage/config-loader
## 0.4.0
### Minor Changes
- 4e7091759: Fix typo of "visibility" in config schema reference
If you have defined a config element named `visiblity`, you
will need to fix the spelling to `visibility`. For more info,
see https://backstage.io/docs/conf/defining#visibility.
### Patch Changes
- b4488ddb0: Added a type alias for PositionError = GeolocationPositionError
## 0.3.0
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/config-loader",
"description": "Config loading functionality used by Backstage backend, and CLI",
"version": "0.3.0",
"version": "0.4.0",
"private": false,
"publishConfig": {
"access": "public",
+7
View File
@@ -1,5 +1,12 @@
# @backstage/core-api
## 0.2.4
### Patch Changes
- b4488ddb0: Added a type alias for PositionError = GeolocationPositionError
- @backstage/test-utils@0.1.4
## 0.2.3
### Patch Changes
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-api",
"description": "Internal Core API used by Backstage plugins and apps",
"version": "0.2.3",
"version": "0.2.4",
"private": false,
"publishConfig": {
"access": "public",
@@ -30,7 +30,7 @@
},
"dependencies": {
"@backstage/config": "^0.1.1",
"@backstage/test-utils": "^0.1.3",
"@backstage/test-utils": "^0.1.4",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -42,7 +42,7 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@backstage/test-utils-core": "^0.1.1",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
+3 -3
View File
@@ -30,7 +30,7 @@
},
"dependencies": {
"@backstage/config": "^0.1.1",
"@backstage/core-api": "^0.2.1",
"@backstage/core-api": "^0.2.4",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -64,8 +64,8 @@
"zen-observable": "^0.8.15"
},
"devDependencies": {
"@backstage/cli": "^0.3.1",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/test-utils": "^0.1.4",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
"@testing-library/user-event": "^12.0.7",
+26
View File
@@ -1,5 +1,31 @@
# @backstage/create-app
## 0.2.3
### Patch Changes
- 68fdc3a9f: Optimized the `yarn install` step in the backend `Dockerfile`.
To apply these changes to an existing app, make the following changes to `packages/backend/Dockerfile`:
Replace the `RUN yarn install ...` line with the following:
```bash
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
```
- 4a655c89d: Removed `"resolutions"` entry for `esbuild` in the root `package.json` in order to use the version specified by `@backstage/cli`.
To apply this change to an existing app, remove the following from your root `package.json`:
```json
"resolutions": {
"esbuild": "0.6.3"
},
```
- ea475893d: Add [API docs plugin](https://github.com/backstage/backstage/tree/master/plugins/api-docs) to new apps being created through the CLI.
## 0.2.2
### Patch Changes
+19 -19
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/create-app",
"description": "Create app package for Backstage",
"version": "0.2.2",
"version": "0.2.3",
"private": false,
"publishConfig": {
"access": "public"
@@ -37,30 +37,30 @@
"recursive-readdir": "^2.2.2"
},
"devDependencies": {
"@backstage/backend-common": "^0.3.2",
"@backstage/catalog-model": "^0.3.1",
"@backstage/cli": "^0.3.2",
"@backstage/backend-common": "^0.3.3",
"@backstage/catalog-model": "^0.4.0",
"@backstage/cli": "^0.4.0",
"@backstage/config": "^0.1.1",
"@backstage/core": "^0.3.2",
"@backstage/plugin-api-docs": "^0.3.0",
"@backstage/plugin-app-backend": "^0.3.1",
"@backstage/plugin-auth-backend": "^0.2.4",
"@backstage/plugin-catalog": "^0.2.4",
"@backstage/plugin-catalog-backend": "^0.2.3",
"@backstage/plugin-circleci": "^0.2.2",
"@backstage/plugin-api-docs": "^0.3.1",
"@backstage/plugin-app-backend": "^0.3.2",
"@backstage/plugin-auth-backend": "^0.2.5",
"@backstage/plugin-catalog": "^0.2.5",
"@backstage/plugin-catalog-backend": "^0.3.0",
"@backstage/plugin-circleci": "^0.2.3",
"@backstage/plugin-explore": "^0.2.1",
"@backstage/plugin-github-actions": "^0.2.2",
"@backstage/plugin-lighthouse": "^0.2.3",
"@backstage/plugin-proxy-backend": "^0.2.1",
"@backstage/plugin-register-component": "^0.2.2",
"@backstage/plugin-github-actions": "^0.2.3",
"@backstage/plugin-lighthouse": "^0.2.4",
"@backstage/plugin-proxy-backend": "^0.2.2",
"@backstage/plugin-register-component": "^0.2.3",
"@backstage/plugin-rollbar-backend": "^0.1.4",
"@backstage/plugin-scaffolder": "^0.3.1",
"@backstage/plugin-scaffolder-backend": "^0.3.2",
"@backstage/plugin-scaffolder": "^0.3.2",
"@backstage/plugin-scaffolder-backend": "^0.3.3",
"@backstage/plugin-tech-radar": "^0.3.0",
"@backstage/plugin-techdocs": "^0.3.0",
"@backstage/plugin-techdocs-backend": "^0.3.0",
"@backstage/plugin-techdocs": "^0.3.1",
"@backstage/plugin-techdocs-backend": "^0.3.1",
"@backstage/plugin-user-settings": "^0.2.2",
"@backstage/test-utils": "^0.1.3",
"@backstage/test-utils": "^0.1.4",
"@backstage/theme": "^0.2.1",
"@types/fs-extra": "^9.0.1",
"@types/inquirer": "^7.3.1",
+11
View File
@@ -1,5 +1,16 @@
# @backstage/dev-utils
## 0.1.5
### Patch Changes
- Updated dependencies [b4488ddb0]
- Updated dependencies [4a655c89d]
- Updated dependencies [8a16e8af8]
- Updated dependencies [00670a96e]
- @backstage/cli@0.4.0
- @backstage/test-utils@0.1.4
## 0.1.4
### Patch Changes
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/dev-utils",
"description": "Utilities for developing Backstage plugins.",
"version": "0.1.4",
"version": "0.1.5",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,9 +29,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/cli": "^0.3.0",
"@backstage/cli": "^0.4.0",
"@backstage/core": "^0.3.1",
"@backstage/test-utils": "^0.1.3",
"@backstage/test-utils": "^0.1.4",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
+1 -1
View File
@@ -24,7 +24,7 @@
"git-url-parse": "^11.4.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@types/jest": "^26.0.7"
},
"files": [
+11
View File
@@ -1,5 +1,16 @@
# @backstage/test-utils
## 0.1.4
### Patch Changes
- Updated dependencies [b4488ddb0]
- Updated dependencies [4a655c89d]
- Updated dependencies [8a16e8af8]
- Updated dependencies [00670a96e]
- @backstage/cli@0.4.0
- @backstage/core-api@0.2.4
## 0.1.3
### Patch Changes
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/test-utils",
"description": "Utilities to test Backstage plugins and apps.",
"version": "0.1.3",
"version": "0.1.4",
"private": false,
"publishConfig": {
"access": "public",
@@ -29,8 +29,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/cli": "^0.3.0",
"@backstage/core-api": "^0.2.0",
"@backstage/cli": "^0.4.0",
"@backstage/core-api": "^0.2.4",
"@backstage/test-utils-core": "^0.1.1",
"@backstage/theme": "^0.2.0",
"@material-ui/core": "^4.11.0",
+1 -1
View File
@@ -31,7 +31,7 @@
"@material-ui/core": "^4.11.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.0"
"@backstage/cli": "^0.4.0"
},
"files": [
"dist"
+12
View File
@@ -1,5 +1,17 @@
# @backstage/plugin-api-docs
## 0.3.1
### Patch Changes
- 7eb8bfe4a: Update swagger-ui-react to 3.37.2
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- Updated dependencies [ebf37bbae]
- @backstage/catalog-model@0.4.0
- @backstage/plugin-catalog@0.2.5
## 0.3.0
### Minor Changes
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-api-docs",
"version": "0.3.0",
"version": "0.3.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,9 +20,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.3.1",
"@backstage/catalog-model": "^0.4.0",
"@backstage/core": "^0.3.2",
"@backstage/plugin-catalog": "^0.2.4",
"@backstage/plugin-catalog": "^0.2.5",
"@backstage/theme": "^0.2.1",
"@kyma-project/asyncapi-react": "^0.14.2",
"@material-icons/font": "^1.0.2",
@@ -40,9 +40,9 @@
"swagger-ui-react": "^3.37.2"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/dev-utils": "^0.1.4",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/dev-utils": "^0.1.5",
"@backstage/test-utils": "^0.1.4",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
"@testing-library/user-event": "^12.0.7",
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-app-backend
## 0.3.2
### Patch Changes
- Updated dependencies [4e7091759]
- Updated dependencies [b4488ddb0]
- Updated dependencies [612368274]
- @backstage/config-loader@0.4.0
- @backstage/backend-common@0.3.3
## 0.3.1
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-app-backend",
"version": "0.3.1",
"version": "0.3.2",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,8 +20,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.3.2",
"@backstage/config-loader": "^0.3.0",
"@backstage/backend-common": "^0.3.3",
"@backstage/config-loader": "^0.4.0",
"@backstage/config": "^0.1.1",
"@types/express": "^4.17.6",
"express": "^4.17.1",
@@ -31,7 +31,7 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@types/supertest": "^2.0.8",
"msw": "^0.20.5",
"supertest": "^4.0.2"
+12
View File
@@ -1,5 +1,17 @@
# @backstage/plugin-auth-backend
## 0.2.5
### Patch Changes
- Updated dependencies [612368274]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- @backstage/backend-common@0.3.3
- @backstage/catalog-model@0.4.0
- @backstage/catalog-client@0.3.2
## 0.2.4
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-auth-backend",
"version": "0.2.4",
"version": "0.2.5",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,9 +20,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.3.2",
"@backstage/catalog-client": "^0.3.1",
"@backstage/catalog-model": "^0.3.1",
"@backstage/backend-common": "^0.3.3",
"@backstage/catalog-client": "^0.3.2",
"@backstage/catalog-model": "^0.4.0",
"@backstage/config": "^0.1.1",
"@types/express": "^4.17.6",
"compression": "^1.7.4",
@@ -55,7 +55,7 @@
"yn": "^4.0.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/cli": "^0.4.0",
"@types/body-parser": "^1.19.0",
"@types/cookie-parser": "^1.4.2",
"@types/express-session": "^1.17.2",
+41
View File
@@ -1,5 +1,46 @@
# @backstage/plugin-catalog-backend
## 0.3.0
### Minor Changes
- a9fd599f7: Add Analyze location endpoint to catalog backend. Add catalog-import plugin and replace import-component with it. To start using Analyze location endpoint, you have add it to the `createRouter` function options in the `\backstage\packages\backend\src\plugins\catalog.ts` file:
```ts
export default async function createPlugin(env: PluginEnvironment) {
const builder = new CatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
} = await builder.build();
return await createRouter({
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
logger: env.logger,
});
}
```
### Patch Changes
- b4488ddb0: Added a type alias for PositionError = GeolocationPositionError
- 08835a61d: Add support for relative targets and implicit types in Location entities.
- e42402b47: Gracefully handle missing codeowners.
The CodeOwnersProcessor now also takes a logger as a parameter.
- Updated dependencies [612368274]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- @backstage/backend-common@0.3.3
- @backstage/catalog-model@0.4.0
## 0.2.3
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-catalog-backend",
"version": "0.2.3",
"version": "0.3.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -21,8 +21,8 @@
},
"dependencies": {
"@azure/msal-node": "^1.0.0-alpha.8",
"@backstage/backend-common": "^0.3.2",
"@backstage/catalog-model": "^0.3.1",
"@backstage/backend-common": "^0.3.3",
"@backstage/catalog-model": "^0.4.0",
"@backstage/config": "^0.1.1",
"@octokit/graphql": "^4.5.6",
"@types/express": "^4.17.6",
@@ -48,8 +48,8 @@
"yup": "^0.29.3"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/test-utils": "^0.1.4",
"@types/core-js": "^2.5.4",
"@types/git-url-parse": "^9.0.0",
"@types/lodash": "^4.14.151",
@@ -0,0 +1,44 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { LocationSpec } from '@backstage/catalog-model';
import { toAbsoluteUrl } from './LocationEntityProcessor';
import path from 'path';
describe('LocationEntityProcessor', () => {
describe('toAbsoluteUrl', () => {
it('handles files', () => {
const base: LocationSpec = {
type: 'file',
target: `some${path.sep}path${path.sep}catalog-info.yaml`,
};
expect(toAbsoluteUrl(base, `.${path.sep}c`)).toBe(
`some${path.sep}path${path.sep}c`,
);
expect(toAbsoluteUrl(base, `${path.sep}c`)).toBe(`${path.sep}c`);
});
it('handles urls', () => {
const base: LocationSpec = {
type: 'url',
target: 'http://a.com/b/catalog-info.yaml',
};
expect(toAbsoluteUrl(base, './c/d')).toBe('http://a.com/b/c/d');
expect(toAbsoluteUrl(base, 'c/d')).toBe('http://a.com/b/c/d');
expect(toAbsoluteUrl(base, 'http://b.com/z')).toBe('http://b.com/z');
});
});
});
@@ -17,27 +17,52 @@
import { Entity, LocationEntity, LocationSpec } from '@backstage/catalog-model';
import * as result from './results';
import { CatalogProcessor, CatalogProcessorEmit } from './types';
import path from 'path';
export function toAbsoluteUrl(base: LocationSpec, target: string): string {
try {
if (base.type === 'file') {
if (target.startsWith('.')) {
return path.join(path.dirname(base.target), target);
}
return target;
}
return new URL(target, base.target).toString();
} catch (e) {
return target;
}
}
export class LocationRefProcessor implements CatalogProcessor {
async postProcessEntity(
entity: Entity,
_location: LocationSpec,
location: LocationSpec,
emit: CatalogProcessorEmit,
): Promise<Entity> {
if (entity.kind === 'Location') {
const location = entity as LocationEntity;
if (location.spec.target) {
const locationEntity = entity as LocationEntity;
const type = locationEntity.spec.type || location.type;
if (type === 'file' && location.target.endsWith(path.sep)) {
emit(
result.location(
{ type: location.spec.type, target: location.spec.target },
false,
result.inputError(
location,
`LocationRefProcessor cannot handle ${type} type location with target ${location.target} that ends with a path separator`,
),
);
}
if (location.spec.targets) {
for (const target of location.spec.targets) {
emit(result.location({ type: location.spec.type, target }, false));
}
const targets = new Array<string>();
if (locationEntity.spec.target) {
targets.push(locationEntity.spec.target);
}
if (locationEntity.spec.targets) {
targets.push(...locationEntity.spec.targets);
}
for (const maybeRelativeTarget of targets) {
const target = toAbsoluteUrl(location, maybeRelativeTarget);
emit(result.location({ type, target }, false));
}
}
+11
View File
@@ -1,5 +1,16 @@
# @backstage/plugin-catalog-graphql
## 0.2.3
### Patch Changes
- Updated dependencies [612368274]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- @backstage/backend-common@0.3.3
- @backstage/catalog-model@0.4.0
## 0.2.2
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-catalog-graphql",
"version": "0.2.2",
"version": "0.2.3",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,8 +20,8 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.3.1",
"@backstage/catalog-model": "^0.3.0",
"@backstage/backend-common": "^0.3.3",
"@backstage/catalog-model": "^0.4.0",
"@backstage/config": "^0.1.1",
"@graphql-modules/core": "^0.7.17",
"apollo-server": "^2.16.1",
@@ -32,8 +32,8 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.3.1",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/test-utils": "^0.1.4",
"@graphql-codegen/cli": "^1.17.7",
"@graphql-codegen/typescript": "^1.17.7",
"@graphql-codegen/typescript-resolvers": "^1.17.7",
+39
View File
@@ -0,0 +1,39 @@
# @backstage/plugin-catalog-import
## 0.3.0
### Minor Changes
- a9fd599f7: Add Analyze location endpoint to catalog backend. Add catalog-import plugin and replace import-component with it. To start using Analyze location endpoint, you have add it to the `createRouter` function options in the `\backstage\packages\backend\src\plugins\catalog.ts` file:
```ts
export default async function createPlugin(env: PluginEnvironment) {
const builder = new CatalogBuilder(env);
const {
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
} = await builder.build();
return await createRouter({
entitiesCatalog,
locationsCatalog,
higherOrderOperation,
locationAnalyzer, //<--
logger: env.logger,
});
}
```
### Patch Changes
- Updated dependencies [b4488ddb0]
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [e42402b47]
- Updated dependencies [bcc211a08]
- Updated dependencies [ebf37bbae]
- @backstage/plugin-catalog-backend@0.3.0
- @backstage/catalog-model@0.4.0
- @backstage/plugin-catalog@0.2.5
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-catalog-import",
"version": "0.2.0",
"version": "0.3.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -21,10 +21,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.3.0",
"@backstage/catalog-model": "^0.4.0",
"@backstage/core": "^0.3.2",
"@backstage/plugin-catalog": "^0.2.0",
"@backstage/plugin-catalog-backend": "^0.2.2",
"@backstage/plugin-catalog": "^0.2.5",
"@backstage/plugin-catalog-backend": "^0.3.0",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -40,9 +40,9 @@
"yaml": "^1.10.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/dev-utils": "^0.1.4",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/dev-utils": "^0.1.5",
"@backstage/test-utils": "^0.1.4",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
"@testing-library/user-event": "^12.0.7",
+14
View File
@@ -1,5 +1,19 @@
# @backstage/plugin-catalog
## 0.2.5
### Patch Changes
- ebf37bbae: Use the OWNED_BY relation and compare it to the users MEMBER_OF relation. The user entity is searched by name, based on the userId of the identity.
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- Updated dependencies [da2ad65cb]
- @backstage/catalog-model@0.4.0
- @backstage/plugin-scaffolder@0.3.2
- @backstage/plugin-techdocs@0.3.1
- @backstage/catalog-client@0.3.2
## 0.2.4
### Patch Changes
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-catalog",
"version": "0.2.4",
"version": "0.2.5",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -21,11 +21,11 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-client": "^0.3.1",
"@backstage/catalog-model": "^0.3.1",
"@backstage/catalog-client": "^0.3.2",
"@backstage/catalog-model": "^0.4.0",
"@backstage/core": "^0.3.2",
"@backstage/plugin-scaffolder": "^0.3.1",
"@backstage/plugin-techdocs": "^0.3.0",
"@backstage/plugin-scaffolder": "^0.3.2",
"@backstage/plugin-techdocs": "^0.3.1",
"@backstage/theme": "^0.2.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -43,9 +43,9 @@
"swr": "^0.3.0"
},
"devDependencies": {
"@backstage/cli": "^0.3.2",
"@backstage/dev-utils": "^0.1.4",
"@backstage/test-utils": "^0.1.3",
"@backstage/cli": "^0.4.0",
"@backstage/dev-utils": "^0.1.5",
"@backstage/test-utils": "^0.1.4",
"@microsoft/microsoft-graph-types": "^1.25.0",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^10.4.1",
+11
View File
@@ -1,5 +1,16 @@
# @backstage/plugin-circleci
## 0.2.3
### Patch Changes
- Updated dependencies [08835a61d]
- Updated dependencies [a9fd599f7]
- Updated dependencies [bcc211a08]
- Updated dependencies [ebf37bbae]
- @backstage/catalog-model@0.4.0
- @backstage/plugin-catalog@0.2.5
## 0.2.2
### Patch Changes

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