Merge branch 'master' into eide/shortcut-plugin

This commit is contained in:
Marcus Eide
2021-04-30 14:12:10 +02:00
453 changed files with 28953 additions and 2731 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-cost-insights': minor
---
make change ratio optional
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-github-deployments': patch
---
Adds extraColumns field to GitHub Deployments card
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Forward user token to scaffolder task for subsequent api requests
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Add `config:docs` command that opens up reference documentation for the local configuration schema in a browser.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core': patch
'@backstage/plugin-scaffolder': patch
---
Adding Headings for Accessibility on the Scaffolder Plugin
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Respect top-level UI schema keys in scaffolder forms. Allows more advanced RJSF features such as explicit field ordering.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
No longer add newly created plugins to `plugins.ts` in the app, as it is no longer needed.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-api': patch
'@backstage/core': patch
---
Add support for discovering plugins through the app element tree, removing the need to register them explicitly.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
SystemDiagramCard UI improvements
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core': patch
---
Exported SignInProviderConfig to strongly type SignInPage providers
-11
View File
@@ -1,11 +0,0 @@
---
'@backstage/create-app': patch
---
Removed `plugins.ts` from the app, as plugins are now discovered through the react tree.
To apply this change to an existing app, simply delete `packages/app/src/plugins.ts` along with the import and usage in `packages/app/src/App.tsx`.
Note that there are a few plugins that require explicit registration, in which case you would need to keep them in `plugins.ts`. The set of plugins that need explicit registration is any plugin that doesn't have a component extension that gets rendered as part of the app element tree. An example of such a plugin in the main Backstage repo is `@backstage/plugin-badges`. In the case of the badges plugin this is because there is not yet a component-based API for adding context menu items to the entity layout.
If you have plugins that still rely on route registration through the `register` method of `createPlugin`, these need to be kept in `plugins.ts` as well. However, it is recommended to migrate these to export an extensions component instead.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
GithubDiscoveryProcessor now excludes archived repositories so they won't be added to Backstage.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
Kubernetes client TLS verification is now configurable and defaults to true
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/backend-common': patch
---
Support configuration of file storage for SQLite databases. Every plugin has its
own database file at the specified path.
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/create-app': patch
---
Fix system diagram card to be on the system page
To apply the same fix to an existing application, in `EntityPage.tsx` simply move the `<EntityLayout.route>` for the `/diagram` path from the `groupPage` down into the `systemPage` element.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-radar': patch
---
Update README for composability
-30
View File
@@ -1,30 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Externalize repository processing for BitbucketDiscoveryProcessor.
Add an extension point where you can customize how a matched Bitbucket repository should
be processed. This can for example be used if you want to generate the catalog-info.yaml
automatically based on other files in a repository, while taking advantage of the
build-in repository crawling functionality.
`BitbucketDiscoveryProcessor.fromConfig` now takes an optional parameter `options.parser` where
you can customize the logic for each repository found. The default parser has the same
behaviour as before, where it emits an optional location for the matched repository
and lets the other processors take care of further processing.
```typescript
const customRepositoryParser: BitbucketRepositoryParser = async function* customRepositoryParser({
client,
repository,
}) {
// Custom logic for interpret the matching repository.
// See defaultRepositoryParser for an example
};
const processor = BitbucketDiscoveryProcessor.fromConfig(env.config, {
parser: customRepositoryParser,
logger: env.logger,
});
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core': patch
---
Adding close button on support menu
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/plugin-techdocs': minor
---
Add feedback link icon in Techdocs Reader that directs to GitLab or GitHub repo issue page with pre-filled title and source link.
For link to appear, requires `repo_url` and `edit_uri` to be filled in mkdocs.yml, as per https://www.mkdocs.org/user-guide/configuration. An `edit_uri` will need to be specified for self-hosted GitLab/GitHub instances with a different host name.
To identify issue URL format as GitHub or GitLab, the host name of source in `repo_url` is checked if it contains `gitlab` or `github`. Alternately this is determined by matching to `host` values from `integrations` in app-config.yaml.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-techdocs': patch
---
Add a test id to the shadow root element of the Reader to access it easily in e2e tests
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-proxy-backend': patch
---
Prefix proxy routes with `/` if not present in configuration
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/cli': patch
---
Added support for Datadog rum events
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/catalog-model': patch
'@backstage/cli': patch
'@backstage/config-loader': patch
'@backstage/config': patch
'@backstage/plugin-scaffolder': patch
---
Bump `json-schema` dependency from `0.2.5` to `0.3.0`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/techdocs-common': patch
---
Adding optional config to enable S3-like API for tech-docs using s3ForcePathStyle option.
This allows providers like LocalStack, Minio and Wasabi (+possibly others) to be used to host tech docs.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Allow `filter` parameter to be specified multiple times
+4
View File
@@ -8,12 +8,16 @@
/docs/features/techdocs @backstage/techdocs-core
/docs/features/search @backstage/techdocs-core
/docs/assets/search @backstage/techdocs-core
/plugins/code-coverage @alde @nissayeva
/plugins/code-coverage-backend @alde @nissayeva
/plugins/cost-insights @backstage/silver-lining
/plugins/cloudbuild @trivago/ebarrios
/plugins/search @backstage/techdocs-core
/plugins/search-* @backstage/techdocs-core
/plugins/techdocs @backstage/techdocs-core
/plugins/techdocs-backend @backstage/techdocs-core
/packages/search-common @backstage/techdocs-core
/packages/techdocs-common @backstage/techdocs-core
/.changeset/cost-insights-* @backstage/silver-lining
/.changeset/search-* @backstage/techdocs-core
/.changeset/techdocs-* @backstage/techdocs-core
+7
View File
@@ -10,6 +10,7 @@ Chai
Changesets
Chanwit
Cloudformation
Cobertura
Codecov
Codehilite
Config
@@ -17,10 +18,12 @@ Datadog
Debounce
Discoverability
Dockerfile
dockerfiles
Dockerize
Docusaurus
Env
Expedia
Fargate
Figma
Firekube
Fiverr
@@ -32,13 +35,16 @@ Hackathons
Heroku
Hostname
Iain
JaCoCo
JavaScript
Kaewkasi
Knex
Leasot
Lerna
LocalStack
Luxon
Minikube
Minio
Mkdocs
Monorepo
Namespaces
@@ -76,6 +82,7 @@ Tolerations
WWW
Weaveworks
Webpack
XML
Zalando
Zhou
abc
@@ -48,5 +48,7 @@ jobs:
- uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# projetToken intentionally shared to allow collaborators to run Chromatic on forks
# https://www.chromatic.com/docs/custom-ci-provider#run-chromatic-on-external-forks-of-open-source-projects
projectToken: 9tzak77m9nj
storybookBuildDir: 'packages/storybook/dist'
+3
View File
@@ -85,6 +85,9 @@ jobs:
- name: type checking and declarations
run: yarn tsc:full
- name: check api reports
run: yarn build:api-reports:only --ci
- name: build changed packages
if: ${{ steps.yarn-lock.outcome == 'success' }}
run: yarn lerna -- run build --since origin/master --include-dependencies
+1
View File
@@ -4,6 +4,7 @@ microsite
coverage
*.hbs
templates
api-report.md
plugins/scaffolder-backend/sample-templates
.vscode
dist-types
+3 -3
View File
@@ -2,9 +2,9 @@ app:
title: Backstage Example App
baseUrl: http://localhost:3000
googleAnalyticsTrackingId: # UA-000000-0
datadogRum:
clientToken: '123456789'
applicationId: qwerty
#datadogRum:
# clientToken: '123456789'
# applicationId: qwerty
# site: # datadoghq.eu default = datadoghq.com
# env: # optional
+10
View File
@@ -129,6 +129,16 @@ For the CA, create a `configMap` named `<release name>-<chart name>-postgres-ca`
kubectl create configmap my-company-backstage-postgres-ca --from-file=ca.crt"
```
or disable CA mount
```yaml
backend:
postgresCertMountEnabled: false
lighthouse:
postgresCertMountEnabled: false
```
> Where the release name contains the chart name "backstage" then only the release name will be used.
Now install the helm chart:
@@ -214,7 +214,7 @@ Postgres port for the backend
{{- .Values.postgresql.service.port }}
{{- else if .Values.appConfig.backend.database.connection.port -}}
{{- .Values.appConfig.backend.database.connection.port }}
{{ else }}
{{- else -}}
5432
{{- end -}}
{{- end -}}
@@ -26,6 +26,13 @@ spec:
{{- end}}
containers:
- name: {{ .Chart.Name }}-backend
command: ["node"]
args:
- "packages/backend"
- "--config"
- "app-config.yaml"
- "--config"
- {{ printf "/usr/src/app/%s" (include "backstage.appConfigFilename" .) | quote }}
image: {{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
ports:
@@ -49,16 +56,20 @@ spec:
name: {{ include "backend.postgresql.passwordSecret" .}}
key: postgresql-password
volumeMounts:
{{- if .Values.backend.postgresCertMountEnabled }}
- name: postgres-ca
mountPath: {{ include "backstage.backend.postgresCaDir" . }}
{{- end }}
- name: app-config
mountPath: {{ printf "/usr/src/app/%s" (include "backstage.appConfigFilename" .) }}
subPath: {{ include "backstage.appConfigFilename" . }}
volumes:
{{- if .Values.backend.postgresCertMountEnabled }}
- name: postgres-ca
configMap:
name: {{ include "backstage.fullname" . }}-postgres-ca
{{- end }}
- name: app-config
configMap:
name: {{ include "backstage.fullname" . }}-app-config
@@ -83,5 +94,5 @@ spec:
app: backstage
component: backend
type: ClusterIP
type: {{ .Values.backend.serviceType }}
{{- end }}
@@ -1,3 +1,4 @@
{{- if .Values.frontend.enabled }}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -46,7 +47,6 @@ spec:
{{- if .Values.global.nodeSelector }}
nodeSelector: {{- toYaml .Values.global.nodeSelector | nindent 8 }}
{{- end }}
{{- if .Values.frontend.enabled }}
---
apiVersion: v1
kind: Service
@@ -62,5 +62,5 @@ spec:
app: backstage
component: frontend
type: ClusterIP
type: {{ .Values.frontend.serviceType }}
{{- end }}
@@ -1,3 +1,4 @@
{{- if .Values.lighthouse.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
@@ -7,4 +8,5 @@ data:
PGUSER: {{ include "lighthouse.postgresql.user" . | quote }}
PGPORT: {{ include "lighthouse.postgresql.port" . | quote }}
PGHOST: {{ include "lighthouse.postgresql.host" . | quote }}
PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }}
PGPATH_TO_CA: {{ include "backstage.lighthouse.postgresCaFilename" . | quote }}
{{- end }}
@@ -51,14 +51,18 @@ spec:
name: {{ include "lighthouse.postgresql.passwordSecret" . }}
key: postgresql-password
{{- if .Values.lighthouse.postgresCertMountEnabled }}
volumeMounts:
- name: postgres-ca
mountPath: {{ include "backstage.lighthouse.postgresCaDir" . }}
{{- end }}
{{- if .Values.lighthouse.postgresCertMountEnabled }}
volumes:
- name: postgres-ca
configMap:
name: {{ include "backstage.fullname" . }}-postgres-ca
{{- end }}
{{- if .Values.global.nodeSelector }}
nodeSelector: {{- toYaml .Values.global.nodeSelector | nindent 8 }}
@@ -78,5 +82,5 @@ spec:
app: backstage
component: lighthouse-audit-service
type: ClusterIP
type: {{ .Values.lighthouse.serviceType }}
{{- end }}
@@ -0,0 +1,15 @@
{{- if not .Values.postgresql.enabled }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ include "backend.postgresql.passwordSecret" . }}
labels:
release: {{ .Release.Name }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-delete-policy": "before-hook-creation"
data:
postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
{{- end }}
@@ -1,18 +1,4 @@
{{- if not .Values.postgresql.enabled }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ include "backend.postgresql.passwordSecret" . }}
labels:
release: {{ .Release.Name }}
annotations:
"helm.sh/hook": "pre-install,pre-upgrade"
"helm.sh/hook-delete-policy": "before-hook-creation"
data:
postgresql-password: {{ .Values.appConfig.backend.database.connection.password | b64enc }}
{{- end }}
{{- if .Values.lighthouse.enabled }}
{{- if not .Values.postgresql.enabled }}
---
apiVersion: v1
@@ -28,3 +14,4 @@ metadata:
data:
postgresql-password: {{ .Values.lighthouse.database.connection.password | b64enc }}
{{- end }}
{{- end }}
+7 -2
View File
@@ -3,13 +3,14 @@
# Declare variables to be passed into your templates.
frontend:
enabled: true
enabled: false
replicaCount: 1
image:
repository: martinaif/backstage-k8s-demo-frontend
tag: test1
pullPolicy: IfNotPresent
containerPort: 80
serviceType: ClusterIP
resources:
requests:
memory: 128Mi
@@ -23,9 +24,11 @@ backend:
replicaCount: 1
image:
repository: martinaif/backstage-k8s-demo-backend
tag: test1
tag: 20210423T1550
pullPolicy: IfNotPresent
containerPort: 7000
serviceType: ClusterIP
postgresCertMountEnabled: true
resources:
requests:
memory: 512Mi
@@ -40,6 +43,8 @@ lighthouse:
tag: latest
pullPolicy: IfNotPresent
containerPort: 3003
serviceType: ClusterIP
postgresCertMountEnabled: true
resources:
requests:
memory: 128Mi
@@ -1,18 +0,0 @@
FROM nginx:mainline
# The purpose of this image is to serve the frontend app content separately.
# By default the Backstage backend uses the app-backend plugin to serve the
# app from the backend itself, but it may be desirable to move the frontend
# content serving to a separate deployment, in which case this image can be used.
# This dockerfile requires the app to be built on the host first, as it
# simply copies in the build output into the image.
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
COPY packages/app/dist /usr/share/nginx/html
COPY docker/default.conf.template /etc/nginx/conf.d/default.conf.template
COPY docker/run.sh /usr/local/bin/run.sh
CMD run.sh
ENV PORT 80
@@ -0,0 +1,58 @@
# The purpose of this image is to serve the frontend app content separately.
# By default the Backstage backend uses the app-backend plugin to serve the
# app from the backend itself, but it may be desirable to move the frontend
# content serving to a separate deployment, in which case this image can be
# used.
# This dockerfile also performs the build first inside docker. This may come
# with a build time impact, but is sometimes desirable. If you want to run the
# build on the host instead, use the file simply named Dockerfile in this folder
# instead.
# USAGE:
#
# - Copy this file and the "docker" folder from this directory to your project
# root
#
# - Update your .dockerignore, make sure that the source folders are not
# excluded, but do exclude node_modules and build artifacts:
#
# .git
# node_modules
# packages/*/dist
# packages/*/node_modules
# plugins/*/dist
# plugins/*/node_modules
#
# - Update the copy of this file to add configuration arguments to the "build"
# command, for example:
#
# RUN yarn workspace app build --config <config1> --config <config2> ...
#
# - In your project root, run:
#
# docker build -t backstage-frontend -f Dockerfile.dockerbuild .
FROM node:14-buster AS build
RUN mkdir /app
COPY . /app
WORKDIR /app
RUN yarn install
RUN yarn workspace app build
FROM nginx:mainline
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
COPY --from=build /app/packages/app/dist /usr/share/nginx/html
COPY docker/default.conf.template /etc/nginx/templates/default.conf.template
COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh
ENV PORT 80
@@ -0,0 +1,41 @@
# The purpose of this image is to serve the frontend app content separately.
# By default the Backstage backend uses the app-backend plugin to serve the
# app from the backend itself, but it may be desirable to move the frontend
# content serving to a separate deployment, in which case this image can be
# used.
# This dockerfile requires the app to be built on the host first, as it
# simply copies in the build output into the image. If you want to also perform
# the build itself inside docker, use Dockerfile.build in this folder instead.
# USAGE:
#
# - Copy this file and the "docker" folder from this directory to your project
# root
#
# - Add the following line to your .dockerignore to make sure that the built
# frontend actually can be transferred into the docker image:
#
# !packages/app/dist
#
# - In your project root, run:
#
# yarn install
# yarn tsc
# yarn build --config <config1> --config <config2> ...
# docker build -t backstage-frontend -f Dockerfile.hostbuild .
FROM nginx:mainline
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
COPY packages/app/dist /usr/share/nginx/html
COPY docker/default.conf.template /etc/nginx/templates/default.conf.template
COPY docker/inject-config.sh /docker-entrypoint.d/40-inject-config.sh
ENV PORT 80
@@ -0,0 +1,16 @@
# Frontend with NGINX
This folder contains Docker images that let you run the Backstage frontend as
a separate image, rather than having it served through the `app-backend` plugin
from the backend.
Note that when running the frontend like this, the app configuration becomes
embedded into the actual static JavaScript files at build time. This means that
you will have to supply the list of configuration files as part of the command
line at build.
## Usage
There are two variants: one that builds inside Docker, and one that builds on
the host. See the comments at the top of the individual dockerfiles for usage
instructions.
@@ -2,13 +2,6 @@
set -Eeuo pipefail
# Run nginx as root
sed -i 's/user nginx.*$//' /etc/nginx/nginx.conf
# Write selected env vars to nginx config
envsubst '$PORT' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
# Inject runtime config into the client
function inject_config() {
# Read runtime config from env in the same way as the @backstage/config-loader package
local config
@@ -41,4 +34,3 @@ function inject_config() {
inject_config
exec nginx -g 'daemon off;'
@@ -1,23 +0,0 @@
FROM node:12-buster AS build
RUN mkdir /app
COPY . /app
WORKDIR /app
RUN yarn install
RUN yarn workspace example-app build
# Contruct backstage-frontend image
FROM nginx:mainline
RUN apt-get update && apt-get -y install jq && rm -rf /var/lib/apt/lists/*
# Copy from build stage
COPY --from=build /app/packages/app/dist /usr/share/nginx/html
COPY docker/default.conf.template /etc/nginx/conf.d/default.conf.template
COPY docker/run.sh /usr/local/bin/run.sh
CMD run.sh
ENV PORT 80
@@ -1,19 +0,0 @@
# Standalone Dockerfile for frontend
This directory contains the resources which will help you build backstage without any requirements
other than docker itself. It uses a multi-stage Dockerfile to build and ship backstage.
## Usage
You can simply run the following command to build backstage.
```
# Make sure you are in the root directory of backstage then run
docker build -t backstage-frontend -f ./contrib/docker/multi-stage-frontend/Dockerfile .
```
After a successful build, You can simply run backstage frontend with the following command.
```
docker run -it --rm -p 3080:80 backstage-frontend
```
@@ -0,0 +1,16 @@
# Deploying Backstage with AWS Fargate and Aurora
There are any number of ways to deploy backstage containers on AWS. One of the
simplest from a management and ops perspective is to leverage AWS Fargate and
Aurora PostgreSQL, where both the container orchestration and database clusters
are AWS managed services.
However, to use them properly there are a large number of supporting resources
(VPCs, Security Groups, Load Balancers, Certificate, etc) required. One approach
is to use [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) to
simplify and automate the creation of the entire infrastructure stack along with
automating the build and deploy of the container.
Check out the [Backstage On AWS](https://github.com/rbogle/backstage-on-aws)
repository, for a ready to use CDK application for deploying your custom
Backstage app onto AWS ECS Fargate and Aurora.
@@ -16,7 +16,7 @@ spec:
app.kubernetes.io/name: {{ include "backstage.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{- if .Values.app.enabled }}
{{- if .Values.backend.enabled }}
---
apiVersion: v1
kind: Service
@@ -0,0 +1 @@
This terraform file should create a S3 bucket and setup IAM with a user with an inline policy which gives the user access to the bucket. After you have created the bucket, user and policy you should go to the user in the AWS console and create an access key. This access key should be used as the env variables in step 3a [here](https://backstage.io/docs/features/techdocs/using-cloud-storage#configuring-aws-s3-bucket-with-techdocs).
@@ -0,0 +1,81 @@
#==========================
# Variables
#==========================
variable "backstage_bucket" {
default = "backstage_bucket_for_my_corp"
}
variable "backstage_iam" {
default = "backstage"
}
variable "shared_managed_tag" {
default = "terraform_for_my_corp"
}
#==========================
# Bucket
#==========================
resource "aws_s3_bucket" "backstage" {
bucket = var.backstage_bucket
acl = "private"
provider = aws
lifecycle {
prevent_destroy = true
}
server_side_encryption_configuration {
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "AES256"
}
}
}
tags = {
Name = var.backstage_bucket
"Managed By Terraform" = var.shared_managed_tag
}
}
resource "aws_s3_bucket_public_access_block" "backstage" {
bucket = aws_s3_bucket.backstage.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
#==========================
# IAM
#==========================
resource "aws_iam_user" "backstage" {
name = var.backstage_iam
}
resource "aws_iam_user_policy" "backstage" {
name = var.backstage_iam
user = aws_iam_user.backstage.name
policy = data.aws_iam_policy_document.backstage_policy.json
}
data "aws_iam_policy_document" "backstage_policy" {
statement {
actions = [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket"
]
effect = "Allow"
resources = [
"${aws_s3_bucket.backstage.arn}",
"${aws_s3_bucket.backstage.arn}/*",
]
}
}
+76
View File
@@ -0,0 +1,76 @@
/*
* Copyright 2021 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.
*/
/// <reference types="cypress" />
import 'os';
describe('Integrations', () => {
describe('ReadTree', () => {
it('should work for github', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
target:
'https://github.com/backstage-verification/test-repo/blob/main/**/*',
type: 'url',
});
cy.visit('/catalog');
cy.contains('All').click();
cy.get('table').should('contain', 'github-repo');
cy.get('table').should('contain', 'github-repo-nested');
});
// it('should work for azure', () => {
// cy.loginAsGuest();
// cy.request('POST', '/api/catalog/locations', {
// target:
// 'https://dev.azure.com/backstage-verification/_git/test-repo?path=*',
// type: 'url',
// });
// });
it('should work for gitlab', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
target:
'https://gitlab.com/backstage-verification/test-repo/-/tree/master/**/*',
type: 'url',
});
cy.visit('/catalog');
cy.contains('All').click();
cy.get('table').should('contain', 'gitlab-repo');
cy.get('table').should('contain', 'gitlab-repo-nested');
});
it('should work for bitbucket', () => {
cy.loginAsGuest();
cy.request('POST', '/api/catalog/locations', {
target:
'https://bitbucket.org/backstage-verification/test-repo/src/master/**/*',
type: 'url',
});
cy.visit('/catalog');
cy.contains('All').click();
cy.get('table').should('contain', 'bitbucket-repo');
cy.get('table').should('contain', 'bitbucket-repo-nested');
});
});
});
+1 -1
View File
@@ -232,7 +232,7 @@ package, which is done as follows:
Once the `app-backend` is removed from the backend, you can use your favorite
static file serving method for serving the frontend. An example of how to set up
an NGINX image is available in the
[contrib folder in the main repo](https://github.com/backstage/backstage/blob/master/contrib/docker/frontend-with-nginx/Dockerfile)
[contrib folder in the main repo](https://github.com/backstage/backstage/blob/master/contrib/docker/frontend-with-nginx)
Note that if you're building a separate docker build of the frontend you
probably need to adjust `.dockerignore` appropriately. Most likely by making
+1 -3
View File
@@ -1,12 +1,10 @@
---
id: helm
title: Deploying Backstage with Helm
title: Deploying with Helm
description: How to deploy Backstage with Helm and Kubernetes
sidebar_label: Helm
---
# Helm charts
An example Backstage app can be deployed in Kubernetes using the
[Backstage Helm charts](https://github.com/backstage/backstage/tree/master/contrib/chart/backstage).
+3 -1
View File
@@ -30,7 +30,9 @@ There is also an example of deploying on [Heroku](heroku.md), which only
requires the first two steps.
An example of deploying Backstage with a [Helm chart](helm.md), a common pattern
in AWS, is also available.
in AWS, is also available. There is also a contrib guide to deploying Backstage
with
[AWS Fargate and Aurora PostgreSQL](https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/aws-fargate-deployment.md)
Please consider contributing other deployment guides if you get Backstage set up
on common infrastructure, it would be a great benefit to the community.
+10
View File
@@ -357,6 +357,16 @@ spec:
name: postgres-secrets
- secretRef:
name: backstage-secrets
# Uncomment if health checks are enabled in your app:
# https://backstage.io/docs/plugins/observability#health-checks
# readinessProbe:
# httpGet:
# port: 7000
# path: /healthcheck
# livenessProbe:
# httpGet:
# port: 7000
# path: /healthcheck
```
For production deployments, the `image` reference will usually be a full URL to
+2 -10
View File
@@ -23,16 +23,8 @@ cd packages/app
yarn add @backstage/plugin-kubernetes
```
Once the package has been installed, you need to import the plugin in your app.
Add the following to `packages/app/src/plugins.ts`:
`plugins.ts`:
```typescript
export { plugin as Kubernetes } from '@backstage/plugin-kubernetes';
```
Now, add the "Kubernetes" tab to the catalog entity page. In
Once the package has been installed, you need to import the plugin in your app
by adding the "Kubernetes" tab to the catalog entity page. In
`packages/app/src/components/catalog/EntityPage.tsx`, you'll add a router to get
to the tab, and add the tab itself.
@@ -44,7 +44,7 @@ metadata:
name: artist-web
description: The place to be, for great artists
labels:
system: public-websites
example.com/custom: custom_label_value
annotations:
example.com/service-discovery: artistweb
circleci.com/project-slug: github/example-org/artist-website
@@ -58,6 +58,7 @@ spec:
type: website
lifecycle: production
owner: artist-relations-team
system: public-websites
```
This is the same entity as returned in JSON from the software catalog API:
@@ -76,7 +77,7 @@ This is the same entity as returned in JSON from the software catalog API:
"etag": "ZjU2MWRkZWUtMmMxZS00YTZiLWFmMWMtOTE1NGNiZDdlYzNk",
"generation": 1,
"labels": {
"system": "public-websites"
"example.com/custom": "custom_label_value"
},
"links": [{
"url": "https://admin.example-org.com",
@@ -90,7 +91,8 @@ This is the same entity as returned in JSON from the software catalog API:
"spec": {
"lifecycle": "production",
"owner": "artist-relations-team",
"type": "website"
"type": "website",
"system": "public-websites"
}
}
```
@@ -639,22 +641,11 @@ A list of strings that can be associated with the template, e.g.
This list will also be used in the frontend to display to the user so you can
potentially search and group templates by these tags.
### `spec.type` [optional]
### `spec.type` [required]
The type of component as a string, e.g. `website`. This field is optional but
recommended.
The software catalog accepts any type value, but an organization should take
great care to establish a proper taxonomy for these. Tools including Backstage
itself may read this field and behave differently depending on its value. For
example, a website type component may present tooling in the Backstage interface
that is specific to just websites.
The current set of well-known and common values for this field is:
- `service` - a backend service, typically exposing an API
- `website` - a website
- `library` - a software library, such as an npm module or a Java library
The type of component created by the template, e.g. `website`. This is used for
filtering templates, and should ideally match the Component
[spec.type](#spectype-required) created by the template.
### `spec.parameters` [required]
@@ -24,14 +24,8 @@ yarn add @backstage/plugin-catalog
### Adding the Plugin to your `packages/app`
Add the following entry to the head of your `packages/app/src/plugins.ts`:
```ts
export { catalogPlugin } from '@backstage/plugin-catalog';
```
Next we need to install the two pages that the catalog plugin provides. You can
choose any name for these routes, but we recommend the following:
Add the two pages that the catalog plugin provides to your app. You can choose
any name for these routes, but we recommend the following:
```tsx
// packages/app/src/App.tsx
@@ -273,6 +273,20 @@ project within your organization.
Specifying this annotation may enable SonarQube related features in Backstage
for that entity.
### backstage.io/code-coverage
```yaml
# Example:
metadata:
annotations:
backstage.io/code-coverage: scm-only
```
The value of this annotation controls the code-coverage backstage plugin. If set
to `scm-only`, the plugin will only take into account files stored in source
control (e.g. ignoring generated code). If set to `enabled`, all files covered
by a coverage report will be taken into account.
## Deprecated Annotations
The following annotations are deprecated, and only listed here to aid in
@@ -26,14 +26,8 @@ yarn add @backstage/plugin-scaffolder
### Adding the Plugin to your `packages/app`
Add the following entry to the head of your `packages/app/src/plugins.ts`:
```ts
export { scaffolderPlugin } from '@backstage/plugin-scaffolder';
```
Next we need to install the root page that the Scaffolder plugin provides. You
can choose any path for the route, but we recommend the following:
Add the root page that the Scaffolder plugin provides to your app. You can
choose any path for the route, but we recommend the following:
```tsx
import { ScaffolderPage } from '@backstage/plugin-scaffolder';
@@ -265,7 +259,7 @@ the templates at [localhost:3000/create](http://localhost:3000/create) now!
Software Templates use
[Cookiecutter](https://github.com/cookiecutter/cookiecutter) as templating
library. By default it will use the
[spotify/backstage-cookiecutter](<[spotify/backstage-cookiecutter](https://github.com/backstage/backstage/blob/37e35b910afc7d1270855aed0ec4718aba366c91/plugins/scaffolder-backend/scripts/Cookiecutter.dockerfile)>)
[spotify/backstage-cookiecutter](https://github.com/backstage/backstage/blob/37e35b910afc7d1270855aed0ec4718aba366c91/plugins/scaffolder-backend/scripts/Cookiecutter.dockerfile)
docker image.
If you are running backstage from a Docker container and you want to avoid
+5
View File
@@ -78,6 +78,11 @@ techdocs:
# https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#constructor-property
endpoint: ${AWS_ENDPOINT}
# (Optional) Whether to use path style URLs when communicating with S3.
# Defaults to false.
# This allows providers like LocalStack, Minio and Wasabi (and possibly others) to be used to host tech docs.
s3ForcePathStyle: false
# Required when techdocs.publisher.type is set to 'azureBlobStorage'. Skip otherwise.
azureBlobStorage:
+2 -8
View File
@@ -29,14 +29,8 @@ yarn add @backstage/plugin-techdocs
Once the package has been installed, you need to import the plugin in your app.
Add the following to `packages/app/src/plugins.ts`:
```typescript
export { plugin as TechDocs } from '@backstage/plugin-techdocs';
```
Now we can add a route for the TechDocs page. In `packages/app/src/App.tsx`,
import TechDocsPage and add the following to `FlatRoutes`:
In `packages/app/src/App.tsx`, import `TechDocsPage` and add the following to
`FlatRoutes`:
```tsx
import { TechDocsPage } from '@backstage/plugin-techdocs';
+81
View File
@@ -82,3 +82,84 @@ Caveat: Currently TechDocs sites built using URL Reader will be cached for 30
minutes which means they will not be re-built if new changes are made within 30
minutes. This cache invalidation will be replaced by commit timestamp based
implementation very soon.
## How to use a custom TechDocs home page?
### 1st way: TechDocsCustomHome with a custom configuration
As an example, in your main App.tsx:
```tsx
import {
TechDocsCustomHome,
PanelType,
TechDocsReaderPage,
} from '@backstage/plugin-techdocs';
import { Entity } from '@backstage/catalog-model';
const tabsConfig = [
{
label: 'Custom Tab',
panels: [
{
title: 'Custom Documents Cards 1',
description:
'Explore your internal technical ecosystem through documentation.',
panelType: 'DocsCardGrid' as PanelType,
// optional, is applied to a container of the panel (excludes header of panel)
panelCSS: { maxHeight: '400px', overflow:'auto' },
filterPredicate: (entity: Entity) => !!entity.metadata.annotations?.['customCardAnnotationOne'];
},
{
title: 'Custom Documents Cards 2',
description:
'Explore your internal technical ecosystem through documentation.',
panelType: 'DocsCardGrid' as PanelType,
panelCSS: { maxHeight: '400px', overflow:'auto' },
filterPredicate: (entity: Entity) => !!entity.metadata.annotations?.['customCardAnnotationTwo'];
},
],
},
{
label: 'Overview',
panels: [
{
title: 'Overview',
description:
'Explore your internal technical ecosystem through documentation.',
panelType: 'DocsTable' as PanelType,
filterPredicate: () => true,
},
],
},
];
const routes = (
<FlatRoutes>
<Route
path="/docs"
element={<TechDocsCustomHome tabsConfig={tabsConfig} />}
/>
<Route
path="/docs/:namespace/:kind/:name/*"
element={<TechDocsReaderPage />}
/>
</FlatRoutes>
```
An example of tabsConfig that corresponds to the default documentation home page
can be found at `plugins/techdocs/src/home/components/TechDocsHome.tsx`.
Currently `panelType` has DocsCardGrid and DocsTable available. We currently
recommend that DocsCardGrid can be optionally vertically stacked by setting a
maxHeight using `panelCSS`, and DocsTable to be in a tab by itself.
### 2nd way: Custom home page plugin
A custom home page plugin can be built that uses the components extensions
DocsCardGrid and DocsTable, exported from @backstage/techdocs. They both take a
array of documentation entities ( i.e.have a 'backstage.io/techdocs-ref'
annotation ) as an 'entities' attribute.
For a reference to the React structure of the default home page, please refer to
`plugins/techdocs/src/home/components/TechDocsCustomHome.tsx`.
@@ -119,6 +119,7 @@ techdocs:
Create a dedicated AWS S3 bucket for the storage of TechDocs sites.
[Refer to the official documentation](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/create-bucket.html).
[Terraform example](https://github.com/backstage/backstage/blob/master/contrib/terraform/techdocs-s3-storage/terraform.tf).
TechDocs will publish documentation to this bucket and will fetch files from
here to serve documentation in Backstage. Note that the bucket names are
@@ -155,7 +156,9 @@ variables**
You should follow the
[AWS security best practices guide for authentication](https://docs.aws.amazon.com/general/latest/gr/aws-access-keys-best-practices.html).
TechDocs needs access to read files and metadata of the S3 bucket.
TechDocs needs access to read files and metadata of the S3 bucket. So if you are
creating a policy for a user you want to make sure it is granted access to
ListBucket, GetObject and PutObject.
If the environment variables
@@ -27,14 +27,7 @@ package.json. Backstage Apps are set up as monorepos with
[yarn workspaces](https://classic.yarnpkg.com/en/docs/workspaces/). Since
CircleCI is a frontend UI plugin, it goes in `app` rather than `backend`.
2. Add the plugin itself to the App:
```js
// packages/app/src/plugins.ts
export { plugin as CircleCi } from '@backstage/plugin-circleci';
```
3. Register the plugin in the entity pages:
2. Add the `EntityCircleCIContent` extension to the entity pages in the app:
```diff
// packages/app/src/components/catalog/EntityPage.tsx
+16 -12
View File
@@ -3,28 +3,32 @@ id: installation
title: Datadog RUM Installation
sidebar_label: Installation
# prettier-ignore
description: Adding Datadog RUM to Your App
description: Adding Datadog Real User Monitoring (RUM) to Your App
---
There is a basic [Datadog](https://docs.datadoghq.com/real_user_monitoring/)
Datadog Real User Monitoring (RUM) allows you to visualize and analyze the
real-time performance and user journeys of your application's individual users.
This is an option to profile and monitor the user experience of your Backstage
installation.
There is a basic [Datadog RUM](https://docs.datadoghq.com/real_user_monitoring/)
integration built into Backstage. You can enable it by adding the following to
your app configuration:
your `app-config.yaml`:
```yaml
app:
datadogRum:
clientToken: '123456789'
applicationId: qwerty
# site: # datadoghq.eu default = datadoghq.com
# env: # optional
# site: datadoghq.eu
# env: 'staging'
```
Replace the clientToken and applicationId with the ones generated for you
Datadog.
The `clientToken` and `applicationId` are generated from the Datadog RUM page
following
[these instructions](https://docs.datadoghq.com/real_user_monitoring/browser/).
optional arguments:
There are two optional arguments:
```
site: datadoghq.eu # default equals datadoghq.com
env: dev # allow to specify the environment
```
- `site`: The Datadog site of your organization; defaults to `datadoghq.com`
- `env`: The application environment for Datadog events (no default)
+28 -20
View File
@@ -67,33 +67,41 @@ is available at
### Installing plugins
Plugins are typically loaded by the UI in your Backstage applications
`plugins.ts` file. For example,
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/plugins.ts)
is that file in the Backstage sample app.
Plugins are typically installed as React components in your Backstage
application. For example,
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/App.tsx)
is a file that imports many full-page plugins in the Backstage sample app.
Plugins can be enabled, and passed configuration in `apis.ts`. For example,
[here](https://github.com/backstage/backstage/blob/master/packages/app/src/apis.ts)
is that file in the Backstage sample app.
This is how the Lighthouse plugin would be enabled in a typical Backstage
application:
An example of one of these plugin components is the `CatalogIndexPage`, which is
a full-page view that allows you to browse entities in the Backstage catalog. It
is installed in the app by importing it and adding it as an element like this:
```tsx
import { ApiHolder, ApiRegistry } from '@backstage/core';
import {
lighthouseApiRef,
LighthouseRestApi,
} from '@backstage/plugin-lighthouse';
import { CatalogIndexPage } from '@backstage/plugin-catalog';
const builder = ApiRegistry.builder();
...
export const lighthouseApi = new LighthouseRestApi(/* URL of the lighthouse microservice! */);
builder.add(lighthouseApiRef, lighthouseApi);
export default builder.build() as ApiHolder;
const routes = (
<FlatRoutes>
...
<Route path="/catalog" element={<CatalogIndexPage />} />
...
</FlatRoutes>
);
```
Note that we use `"/catalog"` as our path to this plugin page, but we can choose
any route we want for the page, as long as it doesn't collide with the routes
that we choose for the other plugins in the app.
These components that are exported from plugins are referred to as "Plugin
Extension Components", or "Extension Components". They are regular React
components, but in addition to being able to be rendered by React, they also
contain various pieces of metadata that is used to wire together the entire app.
Extension components are created using `create*Extension` methods, which you can
read more about in the
[composability documentation](../plugins/composability.md).
As of this moment, there is no config based install procedure for plugins. Some
code changes are required.
+8 -1
View File
@@ -153,6 +153,13 @@ re-exported from @backstage/core, and this package should not be used directly.
Stability: See @backstage/core
### `cost-insights` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/cost-insights)
A frontend plugin that allows users to visualize, understand and optimize your
team's cloud costs.
Stability: `1`
### `create-app` [GitHub](https://github.com/backstage/backstage/tree/master/packages/create-app/)
The CLI used to scaffold new Backstage projects.
@@ -359,7 +366,7 @@ https://github.com/backstage/backstage/issues/2771.
### `tech-radar` [GitHub](https://github.com/backstage/backstage/tree/master/plugins/tech-radar/)
Visualize the your company's official guidelines of different areas of software
Visualize your company's official guidelines of different areas of software
development.
Stability: `0`
+6 -5
View File
@@ -36,7 +36,7 @@ Example:
```yaml
# in app-config.yaml
proxy:
'/simple-example': http://simple.example.com:8080
simple-example: http://simple.example.com:8080
'/larger-example/v1':
target: http://larger.example.com:8080/svc.v1
headers:
@@ -46,10 +46,11 @@ proxy:
```
Each key under the proxy configuration entry is a route to match, below the
prefix that the proxy plugin is mounted on. It must start with a slash. For
example, if the backend mounts the proxy plugin as `/proxy`, the above
configuration will lead to the proxy acting on backend requests to
`/api/proxy/simple-example/...` and `/api/proxy/larger-example/v1/...`.
prefix that the proxy plugin is mounted on. If it does not start with a slash,
one will be prefixed automatically. For example, if the backend mounts the proxy
plugin as `/proxy`, the above configuration will lead to the proxy acting on
backend requests to `/api/proxy/simple-example/...` and
`/api/proxy/larger-example/v1/...`.
The value inside each route is either a simple URL string, or an object on the
format accepted by
+1 -2
View File
@@ -100,8 +100,7 @@ There are three things needed for a Backstage app to start making use of a
plugin.
1. Add plugin as dependency in `app/package.json`
2. `import` plugin in `app/src/plugins.ts`
3. Import and use one or more plugin extensions, for example in
2. Import and use one or more plugin extensions, for example in
`app/src/App.tsx`.
Luckily these three steps happen automatically when you create a plugin with the
+1 -1
View File
@@ -5,7 +5,7 @@ authorUrl: https://github.com/spotify
category: CI/CD
description: Automate your development process with CI hosted in the cloud or on a private server.
documentation: https://github.com/backstage/backstage/tree/master/plugins/circleci
iconUrl: https://www.saaves.com/storage/brochure/logo-circleci-icon1583764538.png
iconUrl: img/circleci.png
npmPackageName: '@backstage/plugin-circleci'
tags:
- ci
+1 -1
View File
@@ -5,7 +5,7 @@ authorUrl: https://github.com/spotify
category: Discovery
description: Visualize, understand and optimize your team's cloud costs.
documentation: https://github.com/backstage/backstage/tree/master/plugins/cost-insights
iconUrl: https://www.materialui.co/materialIcons/editor/monetization_on_white_192x192.png
iconUrl: img/cost-insights.png
npmPackageName: '@backstage/plugin-cost-insights'
tags:
- web
+9 -4
View File
@@ -109,6 +109,11 @@
"integrations/bitbucket/discovery"
]
},
{
"type": "subcategory",
"label": "Datadog",
"ids": ["integrations/datadog-rum/installation"]
},
{
"type": "subcategory",
"label": "GitHub",
@@ -130,13 +135,13 @@
},
{
"type": "subcategory",
"label": "LDAP",
"ids": ["integrations/ldap/org"]
"label": "Google GCS",
"ids": ["integrations/google-cloud-storage/locations"]
},
{
"type": "subcategory",
"label": "Google GCS",
"ids": ["integrations/google-cloud-storage/locations"]
"label": "LDAP",
"ids": ["integrations/ldap/org"]
}
],
"Plugins": [
Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

+96 -57
View File
@@ -7,114 +7,153 @@ plugins:
nav:
- Overview:
- What is Backstage?: 'overview/what-is-backstage.md'
- Backstage architecture: 'overview/architecture-overview.md'
- Roadmap: 'overview/roadmap.md'
- Architecture overview: 'overview/architecture-overview.md'
- Project Roadmap: 'overview/roadmap.md'
- Vision: 'overview/vision.md'
- The Spotify story: 'overview/background.md'
- The Spotify Story: 'overview/background.md'
- Strategies for adopting: 'overview/adopting.md'
- Stability Index: 'overview/stability-index.md'
- Logo assets: 'overview/logos.md'
- Getting started:
- Getting Started:
- Getting Started: 'getting-started/index.md'
- Create an App: 'getting-started/create-an-app.md'
- Running Backstage locally: 'getting-started/running-backstage-locally.md'
- App configuration:
- Configuring App with plugins: 'getting-started/configure-app-with-plugins.md'
- Customize the look-and-feel of your App: 'getting-started/app-custom-theme.md'
- Keeping Backstage Updated: 'getting-started/keeping-backstage-updated.md'
- Key Concepts: 'getting-started/concepts.md'
- Contributors: 'getting-started/contributors.md'
- Demo deployment: https://backstage-demo.roadie.io
- Production deployments:
- Create an App: 'getting-started/create-an-app.md'
- App configuration:
- Configuring App with plugins: 'getting-started/configure-app-with-plugins.md'
- Customize the look-and-feel of your App: 'getting-started/app-custom-theme.md'
- Deployment scenarios:
- Docker: 'getting-started/deployment-docker.md'
- Kubernetes: 'getting-started/deployment-k8s.md'
- Kubernetes and Helm: 'getting-started/deployment-helm.md'
- Other: 'getting-started/deployment-other.md'
- Features:
- CLI:
- Overview: 'cli/index.md'
- Commands: 'cli/commands.md'
- Core Features:
- Software Catalog:
- Overview: 'features/software-catalog/index.md'
- Installation: 'features/software-catalog/installation.md'
- Configuration: 'features/software-catalog/configuration.md'
- System model: 'features/software-catalog/system-model.md'
- Installing in your Backstage App: 'features/software-catalog/installation.md'
- Catalog Configuration: 'features/software-catalog/configuration.md'
- System Model: 'features/software-catalog/system-model.md'
- YAML File Format: 'features/software-catalog/descriptor-format.md'
- Entity References: 'features/software-catalog/references.md'
- Well-known Annotations: 'features/software-catalog/well-known-annotations.md'
- Well-known Relations: 'features/software-catalog/well-known-relations.md'
- Extending the model: 'features/software-catalog/extending-the-model.md'
- External integrations: 'features/software-catalog/external-integrations.md'
- API: 'features/software-catalog/api.md'
- Software creation templates:
- Kubernetes:
- Overview: 'features/kubernetes/index.md'
- Installation: 'features/kubernetes/installation.md'
- Configuration: 'features/kubernetes/configuration.md'
- Troubleshooting: 'features/kubernetes/troubleshooting.md'
- Software Templates:
- Overview: 'features/software-templates/index.md'
- Installation: 'features/software-templates/installation.md'
- Adding templates: 'features/software-templates/adding-templates.md'
- Extending the Scaffolder:
- Overview: 'features/software-templates/extending/index.md'
- Create your own Templater: 'features/software-templates/extending/create-your-own-templater.md'
- Create your own Publisher: 'features/software-templates/extending/create-your-own-publisher.md'
- Create your own Preparer: 'features/software-templates/extending/create-your-own-preparer.md'
- Installing in your Backstage App: 'features/software-templates/installation.md'
- Adding your own Templates: 'features/software-templates/adding-templates.md'
- Writing Templates: 'features/software-templates/writing-templates.md'
- Builtin Actions: 'features/software-templates/builtin-actions.md'
- Writing Custom Actions: 'features/software-templates/writing-custom-actions.md'
- Writing Templates (Legacy): 'features/software-templates/legacy.md'
- Backstage Search:
- Overview: 'features/search/README.md'
- Architecture: 'features/search/architecture.md'
- Search Architecture: 'features/search/architecture.md'
- TechDocs:
- Overview: 'features/techdocs/README.md'
- Getting Started: 'features/techdocs/getting-started.md'
- Concepts: 'features/techdocs/concepts.md'
- TechDocs Architecture: 'features/techdocs/architecture.md'
- Creating and Publishing Documentation: 'features/techdocs/creating-and-publishing.md'
- Configuration: 'features/techdocs/configuration.md'
- TechDocs Configuration Options: 'features/techdocs/configuration.md'
- Using Cloud Storage: 'features/techdocs/using-cloud-storage.md'
- Configuring CI/CD to generate and publish TechDocs sites: 'features/techdocs/configuring-ci-cd.md'
- HOW TO guides: 'features/techdocs/how-to-guides.md'
- Troubleshooting: 'features/techdocs/troubleshooting.md'
- FAQ: 'features/techdocs/FAQ.md'
- Kubernetes:
- Overview: 'features/kubernetes/index.md'
- Integrations:
- Overview: 'integrations/index.md'
- Azure DevOps:
- Locations: 'integrations/azure/locations.md'
- Bitbucket:
- Locations: 'integrations/bitbucket/locations.md'
- Discovery: 'integrations/bitbucket/discovery.md'
- Datadog:
- Installation: 'integrations/datadog-rum/installation.md'
- GitHub:
- Locations: 'integrations/github/locations.md'
- Discovery: 'integrations/github/discovery.md'
- Org Data: 'integrations/github/org.md'
- LDAP:
- Org Data: 'integrations/ldap/org.md'
- GitLab:
- Locations: 'integrations/gitlab/locations.md'
- Google Analytics:
- Installation: 'integrations/google-analytics/installation.md'
- Google GCS:
- Locations: 'integrations/google-cloud-storage/locations.md'
- LDAP:
- Org Data: 'integrations/ldap/org.md'
- Plugins:
- Overview: 'plugins/index.md'
- Intro to plugins: 'plugins/index.md'
- Existing plugins: 'plugins/existing-plugins.md'
- Creating a new plugin: 'plugins/create-a-plugin.md'
- Developing a plugin: 'plugins/plugin-development.md'
- Create a Backstage Plugin: 'plugins/create-a-plugin.md'
- Plugin Development: 'plugins/plugin-development.md'
- Structure of a plugin: 'plugins/structure-of-a-plugin.md'
- Plugin Development: 'plugins/plugin-development.md'
- Integrate into the Service Catalog: 'plugins/integrating-plugin-into-service-catalog.md'
- Composability System Migration: 'plugins/composability.md'
- Backends and APIs:
- Proxying: 'plugins/proxying.md'
- Backstage backend plugin: 'plugins/backend-plugin.md'
- Backend plugin: 'plugins/backend-plugin.md'
- Call existing API: 'plugins/call-existing-api.md'
- GitHub Apps for Backend Authentication: 'plugins/github-apps.md'
- Testing:
- Overview: 'plugins/testing.md'
- Testing with Jest: 'plugins/testing.md'
- Publishing:
- Open source and npm: 'plugins/publishing.md'
- Private/internal (non-open source): 'plugins/publish-private.md'
- Publishing: 'plugins/publishing.md'
- Publish private: 'plugins/publish-private.md'
- Add to Marketplace: 'plugins/add-to-marketplace.md'
- Observability: 'plugins/observability.md'
- Configuration:
- Overview: 'conf/index.md'
- Reading Configuration: 'conf/reading.md'
- Writing Configuration: 'conf/writing.md'
- Defining Configuration: 'conf/defining.md'
- Static Configuration in Backstage: 'conf/index.md'
- Reading Backstage Configuration: 'conf/reading.md'
- Writing Backstage Configuration: 'conf/writing.md'
- Defining Configuration for your Plugin: 'conf/defining.md'
- Authentication and identity:
- Overview: 'auth/index.md'
- Add auth provider: 'auth/add-auth-provider.md'
- Adding Authentication: 'auth/index.md'
- Included providers:
- Auth0: 'auth/auth0/provider.md'
- Azure: 'auth/microsoft/provider.md'
- GitHub: 'auth/github/provider.md'
- GitLab: 'auth/gitlab/provider.md'
- Google: 'auth/google/provider.md'
- Okta: 'auth/okta/provider.md'
- OneLogin: 'auth/onelogin/provider.md'
- Adding authentication providers: 'auth/add-auth-provider.md'
- Using authentication and identity: 'auth/using-auth.md'
- Auth backend: 'auth/auth-backend.md'
- Auth backend class structure: 'auth/auth-backend-classes.md'
- OAuth: 'auth/oauth.md'
- OAuth and OpenID Connect: 'auth/oauth.md'
- Auth backend classes: 'auth/auth-backend-classes.md'
- Glossary: 'auth/glossary.md'
- Deployment:
- Deploying Backstage: 'deployment/index.md'
- Docker: 'deployment/docker.md'
- Kubernetes: 'deployment/k8s.md'
- Helm: 'deployment/helm.md'
- Heroku: 'deployment/heroku.md'
- Designing for Backstage:
- Backstage Design Language System (DLS): 'dls/design.md'
- Storybook -- reusable UI components: 'http://backstage.io/storybook'
- Design: 'dls/design.md'
- Contributing to Storybook: 'dls/contributing-to-storybook.md'
- Figma resources: 'dls/figma.md'
- Figma: 'dls/figma.md'
- API references:
- TypeScript APIs:
- Utilities: 'api/utility-apis.md'
- TypeScript API:
- Utility APIs: 'api/utility-apis.md'
- reference/utility-apis/README: 'reference/utility-apis/README.md'
- createPlugin: 'reference/createPlugin.md'
- createPlugin-feature-flags: 'reference/createPlugin-feature-flags.md'
- createPlugin -feature flags: 'reference/createPlugin-feature-flags.md'
- Backend APIs:
- Backend: 'api/backend.md'
- Tutorials:
- Overview: 'tutorials/index.md'
- Future developer journey: 'tutorials/journey.md'
- Monorepo App Setup With Authentication: 'tutorials/quickstart-app-auth.md'
- Adding Custom Plugin to Existing Monorepo App: 'tutorials/quickstart-app-plugin.md'
- Switching Backstage from SQLite to PostgreSQL: 'tutorials/switching-sqlite-postgres.md'
- Architecture Decision Records (ADRs):
- Overview: 'architecture-decisions/index.md'
- ADR001 - Architecture Decision Record (ADR) log: 'architecture-decisions/adr001-add-adr-log.md'
@@ -129,7 +168,7 @@ nav:
- ADR010 - Luxon Date Library: 'architecture-decisions/adr010-luxon-date-library.md'
- ADR011 - Plugin Package Structure: 'architecture-decisions/adr011-plugin-package-structure.md'
- Support:
- 'support/support.md'
- 'support/project-structure.md'
- Support and community: 'support/support.md'
- Backstage Project Structure: 'support/project-structure.md'
- Glossary: glossary.md
- FAQ: FAQ.md
+9
View File
@@ -9,6 +9,9 @@
"start": "yarn workspace example-app start",
"start-backend": "yarn workspace example-backend start",
"build": "lerna run build",
"build:api-reports": "tsc && yarn build:api-reports:only",
"build:api-reports:only": "ts-node -T -P scripts/tsconfig.json scripts/api-extractor.ts",
"build:api-docs": "yarn build:api-reports --docs",
"tsc": "tsc",
"tsc:full": "tsc --skipLibCheck false --incremental false",
"clean": "backstage-cli clean && lerna run clean",
@@ -39,10 +42,16 @@
"**/@roadiehq/**/@backstage/core": "*",
"**/@roadiehq/**/@backstage/plugin-catalog": "*",
"**/@roadiehq/**/@backstage/catalog-model": "*",
"**/@microsoft/api-extractor/typescript": "^4.0.3",
"graphql-language-service-interface": "2.8.2",
"graphql-language-service-parser": "1.9.0"
},
"version": "1.0.0",
"dependencies": {
"@microsoft/api-extractor": "7.13.2-pr1916.0",
"@microsoft/api-documenter": "^7.12.16",
"@microsoft/api-extractor-model": "^7.12.5"
},
"devDependencies": {
"@changesets/cli": "^2.14.0",
"@octokit/openapi-types": "^2.2.0",
+73
View File
@@ -1,5 +1,78 @@
# example-app
## 0.2.26
### Patch Changes
- Updated dependencies [1ce80ff02]
- Updated dependencies [b98de52ae]
- Updated dependencies [4c42ecca2]
- Updated dependencies [c614ede9a]
- Updated dependencies [9afcac5af]
- Updated dependencies [07a7806c3]
- Updated dependencies [f6efa71ee]
- Updated dependencies [19a4dd710]
- Updated dependencies [dcd54c7cd]
- Updated dependencies [da546ce00]
- Updated dependencies [e0c9ed759]
- Updated dependencies [6fbd7beca]
- Updated dependencies [15cbe6815]
- Updated dependencies [39bdaa004]
- Updated dependencies [cb8c848a3]
- Updated dependencies [21fddf452]
- Updated dependencies [17915e29b]
- Updated dependencies [6eaecbd81]
- Updated dependencies [23769512a]
- Updated dependencies [1a142ae8a]
- @backstage/plugin-api-docs@0.4.12
- @backstage/plugin-cost-insights@0.8.5
- @backstage/plugin-github-actions@0.4.4
- @backstage/plugin-catalog-import@0.5.4
- @backstage/plugin-circleci@0.2.13
- @backstage/plugin-explore@0.3.4
- @backstage/plugin-graphiql@0.2.10
- @backstage/plugin-jenkins@0.4.2
- @backstage/plugin-lighthouse@0.2.15
- @backstage/plugin-pagerduty@0.3.3
- @backstage/plugin-rollbar@0.3.4
- @backstage/plugin-sentry@0.3.9
- @backstage/core@0.7.7
- @backstage/plugin-scaffolder@0.9.2
- @backstage/plugin-catalog@0.5.6
- @backstage/plugin-search@0.3.5
- @backstage/plugin-techdocs@0.9.0
## 0.2.25
### Patch Changes
- Updated dependencies [94da20976]
- Updated dependencies [d8cc7e67a]
- Updated dependencies [4e5c94249]
- Updated dependencies [99fbef232]
- Updated dependencies [cb0206b2b]
- Updated dependencies [1373f4f12]
- Updated dependencies [29a7e4be8]
- Updated dependencies [ab07d77f6]
- Updated dependencies [96728a2af]
- Updated dependencies [931b21a12]
- Updated dependencies [937ed39ce]
- Updated dependencies [87c4f59de]
- Updated dependencies [55b2fc0c0]
- Updated dependencies [9a9e7a42f]
- Updated dependencies [50ce875a0]
- Updated dependencies [ac6025f63]
- Updated dependencies [e292e393f]
- Updated dependencies [479b29124]
- @backstage/core@0.7.6
- @backstage/cli@0.6.9
- @backstage/plugin-scaffolder@0.9.1
- @backstage/plugin-catalog-import@0.5.3
- @backstage/plugin-catalog@0.5.5
- @backstage/theme@0.2.6
- @backstage/plugin-code-coverage@0.1.2
- @backstage/plugin-techdocs@0.8.0
## 0.2.24
### Patch Changes
+21 -20
View File
@@ -1,42 +1,43 @@
{
"name": "example-app",
"version": "0.2.24",
"version": "0.2.26",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.7.7",
"@backstage/cli": "^0.6.8",
"@backstage/core": "^0.7.5",
"@backstage/cli": "^0.6.9",
"@backstage/core": "^0.7.7",
"@backstage/integration-react": "^0.1.1",
"@backstage/plugin-api-docs": "^0.4.11",
"@backstage/plugin-api-docs": "^0.4.12",
"@backstage/plugin-badges": "^0.2.0",
"@backstage/plugin-catalog": "^0.5.4",
"@backstage/plugin-catalog-import": "^0.5.2",
"@backstage/plugin-catalog": "^0.5.6",
"@backstage/plugin-catalog-import": "^0.5.4",
"@backstage/plugin-catalog-react": "^0.1.3",
"@backstage/plugin-circleci": "^0.2.12",
"@backstage/plugin-circleci": "^0.2.13",
"@backstage/plugin-cloudbuild": "^0.2.13",
"@backstage/plugin-cost-insights": "^0.8.4",
"@backstage/plugin-explore": "^0.3.2",
"@backstage/plugin-code-coverage": "^0.1.2",
"@backstage/plugin-cost-insights": "^0.8.5",
"@backstage/plugin-explore": "^0.3.4",
"@backstage/plugin-gcp-projects": "^0.2.5",
"@backstage/plugin-github-actions": "^0.4.2",
"@backstage/plugin-graphiql": "^0.2.9",
"@backstage/plugin-jenkins": "^0.4.1",
"@backstage/plugin-github-actions": "^0.4.4",
"@backstage/plugin-graphiql": "^0.2.10",
"@backstage/plugin-jenkins": "^0.4.2",
"@backstage/plugin-kafka": "^0.2.6",
"@backstage/plugin-kubernetes": "^0.4.2",
"@backstage/plugin-lighthouse": "^0.2.14",
"@backstage/plugin-lighthouse": "^0.2.15",
"@backstage/plugin-newrelic": "^0.2.6",
"@backstage/plugin-org": "^0.3.12",
"@backstage/plugin-pagerduty": "0.3.2",
"@backstage/plugin-rollbar": "^0.3.3",
"@backstage/plugin-scaffolder": "^0.9.0",
"@backstage/plugin-search": "^0.3.4",
"@backstage/plugin-sentry": "^0.3.8",
"@backstage/plugin-pagerduty": "0.3.3",
"@backstage/plugin-rollbar": "^0.3.4",
"@backstage/plugin-scaffolder": "^0.9.2",
"@backstage/plugin-search": "^0.3.5",
"@backstage/plugin-sentry": "^0.3.9",
"@backstage/plugin-shortcuts": "^0.1.1",
"@backstage/plugin-tech-radar": "^0.3.9",
"@backstage/plugin-techdocs": "^0.7.2",
"@backstage/plugin-techdocs": "^0.9.0",
"@backstage/plugin-todo": "^0.1.0",
"@backstage/plugin-user-settings": "^0.2.8",
"@backstage/theme": "^0.2.5",
"@backstage/theme": "^0.2.6",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
"@octokit/rest": "^18.0.12",
@@ -102,6 +102,7 @@ import {
EntityTravisCIOverviewCard,
isTravisciAvailable,
} from '@roadiehq/backstage-plugin-travis-ci';
import { EntityCodeCoverageContent } from '@backstage/plugin-code-coverage';
const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
const [badgesDialogOpen, setBadgesDialogOpen] = useState(false);
@@ -303,6 +304,10 @@ const serviceEntityPage = (
<EntityGithubInsightsContent />
</EntityLayout.Route>
<EntityLayout.Route path="/code-coverage" title="Code Coverage">
<EntityCodeCoverageContent />
</EntityLayout.Route>
<EntityLayout.Route path="/kafka" title="Kafka">
<EntityKafkaContent />
</EntityLayout.Route>
@@ -347,6 +352,10 @@ const websiteEntityPage = (
<EntityGithubInsightsContent />
</EntityLayout.Route>
<EntityLayout.Route path="/code-coverage" title="Code Coverage">
<EntityCodeCoverageContent />
</EntityLayout.Route>
<EntityLayout.Route path="/todos" title="TODOs">
<EntityTodoContent />
</EntityLayout.Route>
+8
View File
@@ -1,5 +1,13 @@
# @backstage/backend-common
## 0.6.3
### Patch Changes
- d367f63b5: remove use of deprecated type HelmetOptions
- b42531cfe: Support configuration of file storage for SQLite databases. Every plugin has its
own database file at the specified path.
## 0.6.2
### Patch Changes
+341
View File
@@ -0,0 +1,341 @@
## API Report File for "@backstage/backend-common"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { AzureIntegration } from '@backstage/integration';
import { BitbucketIntegration } from '@backstage/integration';
import { Config } from '@backstage/config';
import { ConfigReader } from '@backstage/config';
import cors from 'cors';
import Docker from 'dockerode';
import { ErrorRequestHandler } from 'express';
import express from 'express';
import { Format } from 'logform';
import { GithubCredentialsProvider } from '@backstage/integration';
import { GitHubIntegration } from '@backstage/integration';
import { GitLabIntegration } from '@backstage/integration';
import * as http from 'http';
import { Knex } from 'knex';
import { Logger } from 'winston';
import { MergeResult } from 'isomorphic-git';
import { PushResult } from 'isomorphic-git';
import { Readable } from 'stream';
import { ReadCommitResult } from 'isomorphic-git';
import { RequestHandler } from 'express';
import { Router } from 'express';
import { Server } from 'http';
import * as winston from 'winston';
import { Writable } from 'stream';
// @public (undocumented)
export class AzureUrlReader implements UrlReader {
constructor(integration: AzureIntegration, deps: {
treeResponseFactory: ReadTreeResponseFactory;
});
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
// (undocumented)
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
// (undocumented)
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
// (undocumented)
toString(): string;
}
// @public
export class BitbucketUrlReader implements UrlReader {
constructor(integration: BitbucketIntegration, deps: {
treeResponseFactory: ReadTreeResponseFactory;
});
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
// (undocumented)
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
// (undocumented)
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
// (undocumented)
toString(): string;
}
// @public (undocumented)
export const coloredFormat: Format;
// @public @deprecated
export const createDatabase: typeof createDatabaseClient;
// @public
export function createDatabaseClient(dbConfig: Config, overrides?: Partial<Knex.Config>): Knex<any, unknown[]>;
// @public (undocumented)
export function createRootLogger(options?: winston.LoggerOptions, env?: NodeJS.ProcessEnv): winston.Logger;
// @public
export function createServiceBuilder(_module: NodeModule): ServiceBuilderImpl;
// @public (undocumented)
export function createStatusCheckRouter(options: StatusCheckRouterOptions): Promise<express.Router>;
// @public
export function ensureDatabaseExists(dbConfig: Config, ...databases: Array<string>): Promise<void>;
// @public
export function errorHandler(options?: ErrorHandlerOptions): ErrorRequestHandler;
// @public (undocumented)
export type ErrorHandlerOptions = {
showStackTraces?: boolean;
logger?: Logger;
logClientErrors?: boolean;
};
// @public (undocumented)
export function getRootLogger(): winston.Logger;
// @public
export function getVoidLogger(): winston.Logger;
// @public (undocumented)
export class Git {
// (undocumented)
add({ dir, filepath, }: {
dir: string;
filepath: string;
}): Promise<void>;
// (undocumented)
addRemote({ dir, url, remote, }: {
dir: string;
remote: string;
url: string;
}): Promise<void>;
// (undocumented)
clone({ url, dir, ref, }: {
url: string;
dir: string;
ref?: string;
}): Promise<void>;
// (undocumented)
commit({ dir, message, author, committer, }: {
dir: string;
message: string;
author: {
name: string;
email: string;
};
committer: {
name: string;
email: string;
};
}): Promise<string>;
// (undocumented)
currentBranch({ dir, fullName, }: {
dir: string;
fullName?: boolean;
}): Promise<string | undefined>;
// (undocumented)
fetch({ dir, remote, }: {
dir: string;
remote?: string;
}): Promise<void>;
// (undocumented)
static fromAuth: ({ username, password, logger, }: {
username?: string | undefined;
password?: string | undefined;
logger?: Logger | undefined;
}) => Git;
// (undocumented)
init({ dir }: {
dir: string;
}): Promise<void>;
// (undocumented)
merge({ dir, theirs, ours, author, committer, }: {
dir: string;
theirs: string;
ours?: string;
author: {
name: string;
email: string;
};
committer: {
name: string;
email: string;
};
}): Promise<MergeResult>;
// (undocumented)
push({ dir, remote }: {
dir: string;
remote: string;
}): Promise<PushResult>;
// (undocumented)
readCommit({ dir, sha, }: {
dir: string;
sha: string;
}): Promise<ReadCommitResult>;
// (undocumented)
resolveRef({ dir, ref, }: {
dir: string;
ref: string;
}): Promise<string>;
}
// @public
export class GithubUrlReader implements UrlReader {
constructor(integration: GitHubIntegration, deps: {
treeResponseFactory: ReadTreeResponseFactory;
credentialsProvider: GithubCredentialsProvider;
});
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
// (undocumented)
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
// (undocumented)
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
// (undocumented)
toString(): string;
}
// @public (undocumented)
export class GitlabUrlReader implements UrlReader {
constructor(integration: GitLabIntegration, deps: {
treeResponseFactory: ReadTreeResponseFactory;
});
// (undocumented)
static factory: ReaderFactory;
// (undocumented)
read(url: string): Promise<Buffer>;
// (undocumented)
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
// (undocumented)
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
// (undocumented)
toString(): string;
}
// @public
export function loadBackendConfig(options: Options): Promise<Config>;
// @public
export function notFoundHandler(): RequestHandler;
// @public
export interface PluginDatabaseManager {
getClient(): Promise<Knex>;
}
// @public
export type PluginEndpointDiscovery = {
getBaseUrl(pluginId: string): Promise<string>;
getExternalBaseUrl(pluginId: string): Promise<string>;
};
// @public (undocumented)
export type ReadTreeResponse = {
files(): Promise<ReadTreeResponseFile[]>;
archive(): Promise<NodeJS.ReadableStream>;
dir(options?: ReadTreeResponseDirOptions): Promise<string>;
etag: string;
};
// @public
export type ReadTreeResponseFile = {
path: string;
content(): Promise<Buffer>;
};
// @public
export function requestLoggingHandler(logger?: Logger): RequestHandler;
// @public
export function resolvePackagePath(name: string, ...paths: string[]): string;
// @public (undocumented)
export const runDockerContainer: ({ imageName, args, logStream, dockerClient, mountDirs, workingDir, envVars, createOptions, }: RunDockerContainerOptions) => Promise<{
error: any;
statusCode: any;
}>;
// @public
export type SearchResponse = {
files: SearchResponseFile[];
etag: string;
};
// @public
export type SearchResponseFile = {
url: string;
content(): Promise<Buffer>;
};
// @public (undocumented)
export type ServiceBuilder = {
loadConfig(config: ConfigReader): ServiceBuilder;
setPort(port: number): ServiceBuilder;
setHost(host: string): ServiceBuilder;
setLogger(logger: Logger): ServiceBuilder;
enableCors(options: cors.CorsOptions): ServiceBuilder;
setHttpsSettings(settings: HttpsSettings): ServiceBuilder;
addRouter(root: string, router: Router | RequestHandler): ServiceBuilder;
start(): Promise<Server>;
};
// @public (undocumented)
export function setRootLogger(newLogger: winston.Logger): void;
// @public
export class SingleConnectionDatabaseManager {
forPlugin(pluginId: string): PluginDatabaseManager;
static fromConfig(config: Config): SingleConnectionDatabaseManager;
}
// @public
export class SingleHostDiscovery implements PluginEndpointDiscovery {
static fromConfig(config: Config, options?: {
basePath?: string;
}): SingleHostDiscovery;
// (undocumented)
getBaseUrl(pluginId: string): Promise<string>;
// (undocumented)
getExternalBaseUrl(pluginId: string): Promise<string>;
}
// @public (undocumented)
export type StatusCheck = () => Promise<any>;
// @public
export function statusCheckHandler(options?: StatusCheckHandlerOptions): Promise<RequestHandler>;
// @public (undocumented)
export interface StatusCheckHandlerOptions {
statusCheck?: StatusCheck;
}
// @public
export type UrlReader = {
read(url: string): Promise<Buffer>;
readTree(url: string, options?: ReadTreeOptions): Promise<ReadTreeResponse>;
search(url: string, options?: SearchOptions): Promise<SearchResponse>;
};
// @public
export class UrlReaders {
static create({ logger, config, factories }: CreateOptions): UrlReader;
static default({ logger, config, factories }: CreateOptions): UrlReader;
}
// @public
export function useHotCleanup(_module: NodeModule, cancelEffect: () => void): void;
// @public
export function useHotMemoize<T>(_module: NodeModule, valueFactory: () => T): T;
// (No @packageDocumentation comment for this package)
```
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.6.2",
"version": "0.6.3",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -73,7 +73,7 @@
}
},
"devDependencies": {
"@backstage/cli": "^0.6.7",
"@backstage/cli": "^0.6.9",
"@backstage/test-utils": "^0.1.10",
"@types/archiver": "^5.1.0",
"@types/compression": "^1.7.0",
@@ -18,7 +18,7 @@ import { Config } from '@backstage/config';
import compression from 'compression';
import cors from 'cors';
import express, { Router } from 'express';
import helmet, { HelmetOptions } from 'helmet';
import helmet from 'helmet';
import * as http from 'http';
import stoppable from 'stoppable';
import { Logger } from 'winston';
@@ -195,14 +195,7 @@ export class ServiceBuilderImpl implements ServiceBuilder {
});
}
private getOptions(): {
port: number;
host: string;
logger: Logger;
corsOptions?: cors.CorsOptions;
httpsSettings?: HttpsSettings;
helmetOptions: HelmetOptions;
} {
private getOptions() {
return {
port: this.port ?? DEFAULT_PORT,
host: this.host ?? DEFAULT_HOST,
+24
View File
@@ -1,5 +1,29 @@
# example-backend
## 0.2.25
### Patch Changes
- Updated dependencies [b9b2b4b76]
- Updated dependencies [84c54474d]
- Updated dependencies [49574a8a3]
- Updated dependencies [d367f63b5]
- Updated dependencies [5fe62f124]
- Updated dependencies [09b5fcf2e]
- Updated dependencies [55b2fc0c0]
- Updated dependencies [c42cd1daa]
- Updated dependencies [b42531cfe]
- Updated dependencies [c2306f898]
- @backstage/plugin-search-backend@0.1.3
- @backstage/plugin-search-backend-node@0.1.3
- @backstage/plugin-scaffolder-backend@0.10.0
- @backstage/plugin-rollbar-backend@0.1.9
- @backstage/backend-common@0.6.3
- @backstage/plugin-catalog-backend@0.8.0
- @backstage/plugin-code-coverage-backend@0.1.2
- @backstage/plugin-kubernetes-backend@0.3.5
- example-app@0.2.25
## 0.2.22
### Patch Changes
+1 -1
View File
@@ -22,7 +22,7 @@ RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz
RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"
# Then copy the rest of the backend bundle, along with any other files we might want.
ADD packages/backend/dist/bundle.tar.gz app-config.yaml ./
COPY packages/backend/dist/bundle.tar.gz app-config.yaml ./
RUN tar xzf bundle.tar.gz && rm bundle.tar.gz
CMD ["node", "packages/backend", "--config", "app-config.yaml"]
+11 -10
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.22",
"version": "0.2.25",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,29 +27,30 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.6.1",
"@backstage/backend-common": "^0.6.3",
"@backstage/catalog-client": "^0.3.9",
"@backstage/catalog-model": "^0.7.5",
"@backstage/config": "^0.1.4",
"@backstage/plugin-app-backend": "^0.3.10",
"@backstage/plugin-auth-backend": "^0.3.7",
"@backstage/plugin-badges-backend": "^0.1.1",
"@backstage/plugin-catalog-backend": "^0.7.0",
"@backstage/plugin-catalog-backend": "^0.8.0",
"@backstage/plugin-code-coverage-backend": "^0.1.2",
"@backstage/plugin-graphql-backend": "^0.1.6",
"@backstage/plugin-kubernetes-backend": "^0.3.3",
"@backstage/plugin-kubernetes-backend": "^0.3.5",
"@backstage/plugin-kafka-backend": "^0.2.3",
"@backstage/plugin-proxy-backend": "^0.2.6",
"@backstage/plugin-rollbar-backend": "^0.1.8",
"@backstage/plugin-scaffolder-backend": "^0.9.4",
"@backstage/plugin-search-backend": "^0.1.2",
"@backstage/plugin-search-backend-node": "^0.1.2",
"@backstage/plugin-rollbar-backend": "^0.1.9",
"@backstage/plugin-scaffolder-backend": "^0.10.0",
"@backstage/plugin-search-backend": "^0.1.3",
"@backstage/plugin-search-backend-node": "^0.1.3",
"@backstage/plugin-techdocs-backend": "^0.7.0",
"@backstage/plugin-todo-backend": "^0.1.3",
"@gitbeaker/node": "^28.0.2",
"@octokit/rest": "^18.0.12",
"azure-devops-node-api": "^10.1.1",
"dockerode": "^3.2.1",
"example-app": "^0.2.21",
"example-app": "^0.2.25",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"knex": "^0.95.1",
@@ -59,7 +60,7 @@
"winston": "^3.2.1"
},
"devDependencies": {
"@backstage/cli": "^0.6.6",
"@backstage/cli": "^0.6.9",
"@types/dockerode": "^3.2.1",
"@types/express": "^4.17.6",
"@types/express-serve-static-core": "^4.17.5"
+5
View File
@@ -37,6 +37,7 @@ import { Config } from '@backstage/config';
import healthcheck from './plugins/healthcheck';
import auth from './plugins/auth';
import catalog from './plugins/catalog';
import codeCoverage from './plugins/codecoverage';
import kubernetes from './plugins/kubernetes';
import kafka from './plugins/kafka';
import rollbar from './plugins/rollbar';
@@ -75,6 +76,9 @@ async function main() {
const healthcheckEnv = useHotMemoize(module, () => createEnv('healthcheck'));
const catalogEnv = useHotMemoize(module, () => createEnv('catalog'));
const codeCoverageEnv = useHotMemoize(module, () =>
createEnv('code-coverage'),
);
const scaffolderEnv = useHotMemoize(module, () => createEnv('scaffolder'));
const authEnv = useHotMemoize(module, () => createEnv('auth'));
const proxyEnv = useHotMemoize(module, () => createEnv('proxy'));
@@ -90,6 +94,7 @@ async function main() {
const apiRouter = Router();
apiRouter.use('/catalog', await catalog(catalogEnv));
apiRouter.use('/code-coverage', await codeCoverage(codeCoverageEnv));
apiRouter.use('/rollbar', await rollbar(rollbarEnv));
apiRouter.use('/scaffolder', await scaffolder(scaffolderEnv));
apiRouter.use('/auth', await auth(authEnv));
@@ -0,0 +1,28 @@
/*
* Copyright 2020 Spotify AB
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createRouter } from '@backstage/plugin-code-coverage-backend';
import { PluginEnvironment } from '../types';
export default async function createPlugin(env: PluginEnvironment) {
return await createRouter({
config: env.config,
discovery: env.discovery,
database: env.database,
urlReader: env.reader,
logger: env.logger,
});
}
+12 -8
View File
@@ -15,7 +15,10 @@
*/
import { useHotCleanup } from '@backstage/backend-common';
import { createRouter } from '@backstage/plugin-search-backend';
import { IndexBuilder } from '@backstage/plugin-search-backend-node';
import {
IndexBuilder,
LunrSearchEngine,
} from '@backstage/plugin-search-backend-node';
import { PluginEnvironment } from '../types';
import { DefaultCatalogCollator } from '@backstage/plugin-catalog-backend';
@@ -23,21 +26,22 @@ export default async function createPlugin({
logger,
discovery,
}: PluginEnvironment) {
const indexBuilder = new IndexBuilder({ logger });
const searchEngine = new LunrSearchEngine({ logger });
const indexBuilder = new IndexBuilder({ logger, searchEngine });
indexBuilder.addCollator({
type: 'software-catalog',
defaultRefreshIntervalSeconds: 600,
collator: new DefaultCatalogCollator(discovery),
collator: new DefaultCatalogCollator({ discovery }),
});
// TODO: Move refresh loop logic into the builder.
const timerId = setInterval(() => {
indexBuilder.build();
}, 60000);
useHotCleanup(module, () => clearInterval(timerId));
const { scheduler } = await indexBuilder.build();
scheduler.start();
useHotCleanup(module, () => scheduler.stop());
return await createRouter({
engine: indexBuilder.getSearchEngine(),
logger,
});
}
+82
View File
@@ -0,0 +1,82 @@
## API Report File for "@backstage/catalog-client"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Entity } from '@backstage/catalog-model';
import { EntityName } from '@backstage/catalog-model';
import { Location as Location_2 } from '@backstage/catalog-model';
// @public (undocumented)
export type AddLocationRequest = {
type?: string;
target: string;
dryRun?: boolean;
presence?: 'optional' | 'required';
};
// @public (undocumented)
export type AddLocationResponse = {
location: Location_2;
entities: Entity[];
};
// @public (undocumented)
export interface CatalogApi {
// (undocumented)
addLocation(location: AddLocationRequest, options?: CatalogRequestOptions): Promise<AddLocationResponse>;
// (undocumented)
getEntities(request?: CatalogEntitiesRequest, options?: CatalogRequestOptions): Promise<CatalogListResponse<Entity>>;
// (undocumented)
getEntityByName(name: EntityName, options?: CatalogRequestOptions): Promise<Entity | undefined>;
// (undocumented)
getLocationByEntity(entity: Entity, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
getLocationById(id: string, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
getOriginLocationByEntity(entity: Entity, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
removeEntityByUid(uid: string, options?: CatalogRequestOptions): Promise<void>;
// (undocumented)
removeLocationById(id: string, options?: CatalogRequestOptions): Promise<void>;
}
// @public (undocumented)
export class CatalogClient implements CatalogApi {
constructor(options: {
discoveryApi: DiscoveryApi;
});
// (undocumented)
addLocation({ type, target, dryRun, presence }: AddLocationRequest, options?: CatalogRequestOptions): Promise<AddLocationResponse>;
// (undocumented)
getEntities(request?: CatalogEntitiesRequest, options?: CatalogRequestOptions): Promise<CatalogListResponse<Entity>>;
// (undocumented)
getEntityByName(compoundName: EntityName, options?: CatalogRequestOptions): Promise<Entity | undefined>;
// (undocumented)
getLocationByEntity(entity: Entity, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
getLocationById(id: string, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
getOriginLocationByEntity(entity: Entity, options?: CatalogRequestOptions): Promise<Location_2 | undefined>;
// (undocumented)
removeEntityByUid(uid: string, options?: CatalogRequestOptions): Promise<void>;
// (undocumented)
removeLocationById(id: string, options?: CatalogRequestOptions): Promise<void>;
}
// @public (undocumented)
export type CatalogEntitiesRequest = {
filter?: Record<string, string | string[]>[] | Record<string, string | string[]> | undefined;
fields?: string[] | undefined;
};
// @public (undocumented)
export type CatalogListResponse<T> = {
items: T[];
};
// (No @packageDocumentation comment for this package)
```
@@ -76,7 +76,38 @@ describe('CatalogClient', () => {
expect(response).toEqual(defaultResponse);
});
it('builds entity search filters properly', async () => {
it('builds multiple entity search filters properly', async () => {
expect.assertions(2);
server.use(
rest.get(`${mockBaseUrl}/entities`, (req, res, ctx) => {
expect(req.url.search).toBe(
'?filter=a=1,b=2,b=3,%C3%B6=%3D&filter=a=2',
);
return res(ctx.json([]));
}),
);
const response = await client.getEntities(
{
filter: [
{
a: '1',
b: ['2', '3'],
ö: '=',
},
{
a: '2',
},
],
},
{ token },
);
expect(response.items).toEqual([]);
});
it('builds single entity search filter properly', async () => {
expect.assertions(2);
server.use(
+17 -8
View File
@@ -56,18 +56,27 @@ export class CatalogClient implements CatalogApi {
request?: CatalogEntitiesRequest,
options?: CatalogRequestOptions,
): Promise<CatalogListResponse<Entity>> {
const { filter = {}, fields = [] } = request ?? {};
const { filter = [], fields = [] } = request ?? {};
const filterItems = [filter].flat();
const params: string[] = [];
const filterParts: string[] = [];
for (const [key, value] of Object.entries(filter)) {
for (const v of [value].flat()) {
filterParts.push(`${encodeURIComponent(key)}=${encodeURIComponent(v)}`);
// filter param can occur multiple times, for example
// /api/catalog/entities?filter=metadata.name=wayback-search,kind=component&filter=metadata.name=www-artist,kind=component'
// the "outer array" defined by `filter` occurrences corresponds to "anyOf" filters
// the "inner array" defined within a `filter` param corresponds to "allOf" filters
for (const filterItem of filterItems) {
const filterParts: string[] = [];
for (const [key, value] of Object.entries(filterItem)) {
for (const v of [value].flat()) {
filterParts.push(
`${encodeURIComponent(key)}=${encodeURIComponent(v)}`,
);
}
}
}
if (filterParts.length) {
params.push(`filter=${filterParts.join(',')}`);
if (filterParts.length) {
params.push(`filter=${filterParts.join(',')}`);
}
}
if (fields.length) {
+4 -1
View File
@@ -17,7 +17,10 @@
import { Entity, EntityName, Location } from '@backstage/catalog-model';
export type CatalogEntitiesRequest = {
filter?: Record<string, string | string[]> | undefined;
filter?:
| Record<string, string | string[]>[]
| Record<string, string | string[]>
| undefined;
fields?: string[] | undefined;
};
+571
View File
@@ -0,0 +1,571 @@
## API Report File for "@backstage/catalog-model"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { JsonObject } from '@backstage/config';
import { JSONSchema7 } from 'json-schema';
import { JsonValue } from '@backstage/config';
import * as yup from 'yup';
// @public (undocumented)
export const analyzeLocationSchema: yup.ObjectSchema<{
location: LocationSpec;
}, object>;
// @public (undocumented)
interface ApiEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION[number];
// (undocumented)
kind: typeof KIND;
// (undocumented)
spec: {
type: string;
lifecycle: string;
owner: string;
definition: string;
system?: string;
};
}
export { ApiEntityV1alpha1 as ApiEntity }
export { ApiEntityV1alpha1 }
// @public (undocumented)
export const apiEntityV1alpha1Validator: KindValidator;
// @public
export class CommonValidatorFunctions {
static isJsonSafe(value: unknown): boolean;
static isValidDnsLabel(value: unknown): boolean;
static isValidDnsSubdomain(value: unknown): boolean;
static isValidPrefixAndOrSuffix(value: unknown, separator: string, isValidPrefix: (value: string) => boolean, isValidSuffix: (value: string) => boolean): boolean;
static isValidString(value: unknown): boolean;
static isValidUrl(value: unknown): boolean;
}
// @public
export function compareEntityToRef(entity: Entity, ref: EntityRef | EntityName, context?: EntityRefContext): boolean;
// @public (undocumented)
interface ComponentEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_2[number];
// (undocumented)
kind: typeof KIND_2;
// (undocumented)
spec: {
type: string;
lifecycle: string;
owner: string;
subcomponentOf?: string;
providesApis?: string[];
consumesApis?: string[];
dependsOn?: string[];
system?: string;
};
}
export { ComponentEntityV1alpha1 as ComponentEntity }
export { ComponentEntityV1alpha1 }
// @public (undocumented)
export const componentEntityV1alpha1Validator: KindValidator;
// @public
export class DefaultNamespaceEntityPolicy implements EntityPolicy {
constructor(namespace?: string);
// (undocumented)
enforce(entity: Entity): Promise<Entity>;
}
// @public (undocumented)
interface DomainEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_3[number];
// (undocumented)
kind: typeof KIND_3;
// (undocumented)
spec: {
owner: string;
};
}
export { DomainEntityV1alpha1 as DomainEntity }
export { DomainEntityV1alpha1 }
// @public (undocumented)
export const domainEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export const EDIT_URL_ANNOTATION = "backstage.io/edit-url";
// @public
export type Entity = {
apiVersion: string;
kind: string;
metadata: EntityMeta;
spec?: JsonObject;
relations?: EntityRelation[];
};
// @public
export const ENTITY_DEFAULT_NAMESPACE = "default";
// @public
export const ENTITY_META_GENERATED_FIELDS: readonly ["uid", "etag", "generation"];
// @public
export function entityHasChanges(previous: Entity, next: Entity): boolean;
// @public
export type EntityLink = {
url: string;
title?: string;
icon?: string;
};
// @public
export type EntityMeta = JsonObject & {
uid?: string;
etag?: string;
generation?: number;
name: string;
namespace?: string;
description?: string;
labels?: Record<string, string>;
annotations?: Record<string, string>;
tags?: string[];
links?: EntityLink[];
};
// @public
export type EntityName = {
kind: string;
namespace: string;
name: string;
};
// @public (undocumented)
export const EntityPolicies: {
allOf(policies: EntityPolicy[]): AllEntityPolicies;
oneOf(policies: EntityPolicy[]): AnyEntityPolicy;
};
// @public
export type EntityPolicy = {
enforce(entity: Entity): Promise<Entity | undefined>;
};
// @public
export type EntityRef = string | {
kind?: string;
namespace?: string;
name: string;
};
// @public
export type EntityRelation = {
type: string;
target: EntityName;
};
// @public
export type EntityRelationSpec = {
source: EntityName;
type: string;
target: EntityName;
};
// @public
export class FieldFormatEntityPolicy implements EntityPolicy {
constructor(validators?: Validators);
// (undocumented)
enforce(entity: Entity): Promise<Entity>;
}
// @public
export function generateEntityEtag(): string;
// @public
export function generateEntityUid(): string;
// @public
export function generateUpdatedEntity(previous: Entity, next: Entity): Entity;
// @public
export function getEntityName(entity: Entity): EntityName;
// @public
export function getEntitySourceLocation(entity: Entity): {
type: string;
target: string;
};
// @public (undocumented)
interface GroupEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_4[number];
// (undocumented)
kind: typeof KIND_4;
// (undocumented)
spec: {
type: string;
profile?: {
displayName?: string;
email?: string;
picture?: string;
};
parent?: string;
children: string[];
members?: string[];
};
}
export { GroupEntityV1alpha1 as GroupEntity }
export { GroupEntityV1alpha1 }
// @public (undocumented)
export const groupEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export type JSONSchema = JSONSchema7 & {
[key in string]?: JsonValue;
};
// @public
export type KindValidator = {
check(entity: Entity): Promise<boolean>;
};
// @public
export class KubernetesValidatorFunctions {
// (undocumented)
static isValidAnnotationKey(value: unknown): boolean;
// (undocumented)
static isValidAnnotationValue(value: unknown): boolean;
// (undocumented)
static isValidApiVersion(value: unknown): boolean;
// (undocumented)
static isValidKind(value: unknown): boolean;
// (undocumented)
static isValidLabelKey(value: unknown): boolean;
// (undocumented)
static isValidLabelValue(value: unknown): boolean;
// (undocumented)
static isValidNamespace(value: unknown): boolean;
// (undocumented)
static isValidObjectName(value: unknown): boolean;
}
// @public (undocumented)
type Location_2 = {
id: string;
} & LocationSpec;
export { Location_2 as Location }
// @public (undocumented)
export const LOCATION_ANNOTATION = "backstage.io/managed-by-location";
// @public (undocumented)
interface LocationEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_5[number];
// (undocumented)
kind: typeof KIND_5;
// (undocumented)
spec: {
type?: string;
target?: string;
targets?: string[];
};
}
export { LocationEntityV1alpha1 as LocationEntity }
export { LocationEntityV1alpha1 }
// @public (undocumented)
export const locationEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export const locationSchema: yup.ObjectSchema<Location_2, object>;
// @public (undocumented)
export type LocationSpec = {
type: string;
target: string;
presence?: 'optional' | 'required';
};
// @public (undocumented)
export const locationSpecSchema: yup.ObjectSchema<LocationSpec, object>;
// @public (undocumented)
export function makeValidator(overrides?: Partial<Validators>): Validators;
// @public
export class NoForeignRootFieldsEntityPolicy implements EntityPolicy {
constructor(knownFields?: string[]);
// (undocumented)
enforce(entity: Entity): Promise<Entity>;
}
// @public (undocumented)
export const ORIGIN_LOCATION_ANNOTATION = "backstage.io/managed-by-origin-location";
// @public
export function parseEntityName(ref: EntityRef, context?: EntityRefContext): EntityName;
// @public
export function parseEntityRef(ref: EntityRef, context?: {
defaultKind: string;
defaultNamespace: string;
}): {
kind: string;
namespace: string;
name: string;
};
// @public (undocumented)
export function parseEntityRef(ref: EntityRef, context?: {
defaultKind: string;
}): {
kind: string;
namespace?: string;
name: string;
};
// @public (undocumented)
export function parseEntityRef(ref: EntityRef, context?: {
defaultNamespace: string;
}): {
kind?: string;
namespace: string;
name: string;
};
// @public
export function parseLocationReference(ref: string): {
type: string;
target: string;
};
// @public (undocumented)
export const RELATION_API_CONSUMED_BY = "apiConsumedBy";
// @public (undocumented)
export const RELATION_API_PROVIDED_BY = "apiProvidedBy";
// @public (undocumented)
export const RELATION_CHILD_OF = "childOf";
// @public
export const RELATION_CONSUMES_API = "consumesApi";
// @public (undocumented)
export const RELATION_DEPENDENCY_OF = "dependencyOf";
// @public
export const RELATION_DEPENDS_ON = "dependsOn";
// @public (undocumented)
export const RELATION_HAS_MEMBER = "hasMember";
// @public (undocumented)
export const RELATION_HAS_PART = "hasPart";
// @public
export const RELATION_MEMBER_OF = "memberOf";
// @public
export const RELATION_OWNED_BY = "ownedBy";
// @public (undocumented)
export const RELATION_OWNER_OF = "ownerOf";
// @public
export const RELATION_PARENT_OF = "parentOf";
// @public
export const RELATION_PART_OF = "partOf";
// @public (undocumented)
export const RELATION_PROVIDES_API = "providesApi";
// @public (undocumented)
interface ResourceEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_6[number];
// (undocumented)
kind: typeof KIND_6;
// (undocumented)
spec: {
type: string;
owner: string;
dependsOn?: string[];
system?: string;
};
}
export { ResourceEntityV1alpha1 as ResourceEntity }
export { ResourceEntityV1alpha1 }
// @public (undocumented)
export const resourceEntityV1alpha1Validator: KindValidator;
// @public @deprecated (undocumented)
export function schemaValidator(kind: string, apiVersion: readonly string[], schema: yup.Schema<any>): KindValidator;
// @public
export class SchemaValidEntityPolicy implements EntityPolicy {
// (undocumented)
enforce(entity: Entity): Promise<Entity>;
}
// @public @deprecated
export function serializeEntityRef(ref: Entity | {
kind?: string;
namespace?: string;
name: string;
}): EntityRef;
// @public (undocumented)
export const SOURCE_LOCATION_ANNOTATION = "backstage.io/source-location";
// @public
export function stringifyEntityRef(ref: Entity | {
kind: string;
namespace?: string;
name: string;
}): string;
// @public
export function stringifyLocationReference(ref: {
type: string;
target: string;
}): string;
// @public (undocumented)
interface SystemEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_7[number];
// (undocumented)
kind: typeof KIND_7;
// (undocumented)
spec: {
owner: string;
domain?: string;
};
}
export { SystemEntityV1alpha1 as SystemEntity }
export { SystemEntityV1alpha1 }
// @public (undocumented)
export const systemEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
interface TemplateEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_8[number];
// (undocumented)
kind: typeof KIND_8;
// (undocumented)
spec: {
type: string;
templater: string;
path?: string;
schema: JSONSchema;
};
}
export { TemplateEntityV1alpha1 as TemplateEntity }
export { TemplateEntityV1alpha1 }
// @public (undocumented)
export const templateEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export interface TemplateEntityV1beta2 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_9[number];
// (undocumented)
kind: typeof KIND_9;
// (undocumented)
metadata: EntityMeta & {
title?: string;
};
// (undocumented)
spec: {
type: string;
parameters?: JsonObject | JsonObject[];
steps: Array<{
id?: string;
name?: string;
action: string;
parameters?: JsonObject;
}>;
output?: {
[name: string]: string;
};
};
}
// @public (undocumented)
export const templateEntityV1beta2Validator: KindValidator;
// @public (undocumented)
interface UserEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: typeof API_VERSION_10[number];
// (undocumented)
kind: typeof KIND_10;
// (undocumented)
spec: {
profile?: {
displayName?: string;
email?: string;
picture?: string;
};
memberOf: string[];
};
}
export { UserEntityV1alpha1 as UserEntity }
export { UserEntityV1alpha1 }
// @public (undocumented)
export const userEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export type Validators = {
isValidApiVersion(value: unknown): boolean;
isValidKind(value: unknown): boolean;
isValidEntityName(value: unknown): boolean;
isValidNamespace(value: unknown): boolean;
isValidLabelKey(value: unknown): boolean;
isValidLabelValue(value: unknown): boolean;
isValidAnnotationKey(value: unknown): boolean;
isValidAnnotationValue(value: unknown): boolean;
isValidTag(value: unknown): boolean;
};
// @public
export const VIEW_URL_ANNOTATION = "backstage.io/view-url";
// (No @packageDocumentation comment for this package)
```
+1 -1
View File
@@ -33,7 +33,7 @@
"@types/json-schema": "^7.0.5",
"@types/yup": "^0.29.8",
"ajv": "^7.0.3",
"json-schema": "^0.2.5",
"json-schema": "^0.3.0",
"lodash": "^4.17.15",
"uuid": "^8.0.0",
"yup": "^0.29.3"
@@ -66,7 +66,7 @@
"properties": {
"type": {
"type": "string",
"description": "The type of component. This field is optional but recommended. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.",
"description": "The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.",
"examples": ["service", "website", "library"],
"minLength": 1
},
@@ -85,7 +85,7 @@
"properties": {
"type": {
"type": "string",
"description": "The type of component. This field is optional but recommended. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.",
"description": "The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.",
"examples": ["service", "website", "library"],
"minLength": 1
},
+25
View File
@@ -0,0 +1,25 @@
## API Report File for "@backstage/cli-common"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
// @public
export function findPaths(searchDir: string): Paths;
// @public (undocumented)
export type Paths = {
ownDir: string;
ownRoot: string;
targetDir: string;
targetRoot: string;
resolveOwn: ResolveFunc;
resolveOwnRoot: ResolveFunc;
resolveTarget: ResolveFunc;
resolveTargetRoot: ResolveFunc;
};
// (No @packageDocumentation comment for this package)
```

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