Merge branch 'master' into kubernetes-common
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
---
|
||||
|
||||
Resolve issues with AsyncAPI rendering by updating `@asyncapi/react-component`
|
||||
to `0.23.0`. The theming of the component is adjusted to the latest styling
|
||||
changes.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': minor
|
||||
---
|
||||
|
||||
make change ratio optional
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
---
|
||||
|
||||
Support a `name` prop for Projects for display purposes
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-github-actions': patch
|
||||
---
|
||||
|
||||
Wrap EmptyState in Card
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/create-app': patch
|
||||
'@backstage/integration': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-github-actions': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
The default `@octokit/rest` dependency was bumped to `"^18.5.3"`.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
---
|
||||
|
||||
Bump react-hook-form version to be the same for the entire project.
|
||||
@@ -1,21 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-bitrise': patch
|
||||
'@backstage/plugin-catalog-import': patch
|
||||
'@backstage/plugin-circleci': patch
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
'@backstage/plugin-explore': patch
|
||||
'@backstage/plugin-fossa': patch
|
||||
'@backstage/plugin-github-actions': patch
|
||||
'@backstage/plugin-github-deployments': patch
|
||||
'@backstage/plugin-graphiql': patch
|
||||
'@backstage/plugin-jenkins': patch
|
||||
'@backstage/plugin-lighthouse': patch
|
||||
'@backstage/plugin-pagerduty': patch
|
||||
'@backstage/plugin-register-component': patch
|
||||
'@backstage/plugin-rollbar': patch
|
||||
'@backstage/plugin-sentry': patch
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
---
|
||||
|
||||
Updated README to have up-to-date install instructions.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Allow passing NavLinkProps to SidebarItem component to use in NavLink
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
---
|
||||
|
||||
Added fields filtering in get API entities to avoid the requesting of unused data
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Updates the end to end test in the app to match the new catalog index page title. To apply this change to an existing app, update `packages/app/cypress/integration/app.js` to search for `"My Company Catalog"` instead of `"My Company Service Catalog"`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Enable starred templates on Scaffolder frontend
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-code-coverage-backend': patch
|
||||
---
|
||||
|
||||
Include migrations
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Removed unused `swr` dependency.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Entity lifecycle and owner are now indexed by the `DefaultCatalogCollator`. A `locationTemplate` may now optionally be provided to its constructor to reflect a custom catalog entity path in the Backstage frontend.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-node': patch
|
||||
---
|
||||
|
||||
Introduced Scheduler which is responsible for adding new tasks to a schedule together with it's interval timer as well as starting and stopping the scheduler processes.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
---
|
||||
|
||||
Add support for displaying JSON schemas.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
Gracefully handle HTTP request failures in download method of AzureBlobStorage publisher.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
Use `RouteRef` to generate path to search page.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Support `gridItem` variant for `EntityLinksCard`.
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Add `if` prop to `EntityLayout.Route` to conditionally render tabs
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-tech-radar': patch
|
||||
---
|
||||
|
||||
Update README for composability
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Add support for non-organization accounts in GitHub Discovery
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Use `EntityRefLink` in header and use relations to reference the owner of the
|
||||
document.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Fix TechDocs landing page table wrong copied link
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Add customization and exportable components for TechDocs landing page
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Disable color transitions on links to avoid issues in dark mode.
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': minor
|
||||
---
|
||||
|
||||
Make `techdocsStorageApiRef` and `techdocsApiRef` use interfaces instead of the
|
||||
actual implementation classes.
|
||||
|
||||
This renames the classes `TechDocsApi` to `TechDocsClient` and `TechDocsStorageApi`
|
||||
to `TechDocsStorageClient` and renames the interfaces `TechDocs` to `TechDocsApi`
|
||||
and `TechDocsStorage` to `TechDocsStorageApi` to comply the pattern elsewhere in
|
||||
the project. This also fixes the types returned by some methods on those
|
||||
interfaces.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Rework state management to avoid rendering multiple while navigating between pages.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-proxy-backend': patch
|
||||
---
|
||||
|
||||
Prefix proxy routes with `/` if not present in configuration
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Added the `nebula-preview` preview to `Octokit` for repository visibility.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/core': patch
|
||||
---
|
||||
|
||||
Improve owner example value in `MissingAnnotationEmptyState`.
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Support `anyOf`, `oneOf` and `allOf` schemas in the scaffolder template.
|
||||
@@ -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`.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-client': patch
|
||||
---
|
||||
|
||||
Allow `filter` parameter to be specified multiple times
|
||||
@@ -1,5 +0,0 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Switch out the time-based personal greeting for a plain title on the catalog index page, and remove the clocks for different timezones.
|
||||
@@ -41,8 +41,10 @@ Kaewkasi
|
||||
Knex
|
||||
Leasot
|
||||
Lerna
|
||||
LocalStack
|
||||
Luxon
|
||||
Minikube
|
||||
Minio
|
||||
Mkdocs
|
||||
Monorepo
|
||||
Namespaces
|
||||
|
||||
@@ -2,15 +2,15 @@
|
||||
# Variables
|
||||
#==========================
|
||||
|
||||
variable "backstage-bucket" {
|
||||
variable "backstage_bucket" {
|
||||
default = "backstage_bucket_for_my_corp"
|
||||
}
|
||||
|
||||
variable "backstage-iam" {
|
||||
variable "backstage_iam" {
|
||||
default = "backstage"
|
||||
}
|
||||
|
||||
variable "shared-managed-tag-value" {
|
||||
variable "shared_managed_tag" {
|
||||
default = "terraform_for_my_corp"
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ variable "shared-managed-tag-value" {
|
||||
#==========================
|
||||
|
||||
resource "aws_s3_bucket" "backstage" {
|
||||
bucket = var.backstage-bucket
|
||||
bucket = var.backstage_bucket
|
||||
acl = "private"
|
||||
provider = aws
|
||||
|
||||
@@ -36,8 +36,8 @@ resource "aws_s3_bucket" "backstage" {
|
||||
}
|
||||
|
||||
tags = {
|
||||
Name = var.backstage-bucket
|
||||
"Managed By Terraform" = var.shared-managed-tag-value
|
||||
Name = var.backstage_bucket
|
||||
"Managed By Terraform" = var.shared_managed_tag
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,16 +56,16 @@ resource "aws_s3_bucket_public_access_block" "backstage" {
|
||||
#==========================
|
||||
|
||||
resource "aws_iam_user" "backstage" {
|
||||
name = var.backstage-iam
|
||||
name = var.backstage_iam
|
||||
}
|
||||
|
||||
resource "aws_iam_user_policy" "backstage" {
|
||||
name = var.backstage-iam
|
||||
name = var.backstage_iam
|
||||
user = aws_iam_user.backstage.name
|
||||
policy = data.aws_iam_policy_document.backstage-policy.json
|
||||
policy = data.aws_iam_policy_document.backstage_policy.json
|
||||
}
|
||||
|
||||
data "aws_iam_policy_document" "backstage-policy" {
|
||||
data "aws_iam_policy_document" "backstage_policy" {
|
||||
statement {
|
||||
actions = [
|
||||
"s3:PutObject",
|
||||
|
||||
@@ -8,44 +8,36 @@ The Kubernetes feature is a plugin to Backstage, and it is exposed as a tab when
|
||||
viewing entities in the software catalog.
|
||||
|
||||
If you haven't setup Backstage already, read the
|
||||
[Getting Started](../../getting-started/index.md).
|
||||
[Getting Started](../../getting-started/index.md) guide.
|
||||
|
||||
## Adding the Kubernetes frontend plugin
|
||||
|
||||
The first step is to add the frontend Kubernetes plugin to your Backstage
|
||||
application. Navigate to your new Backstage application directory. And then to
|
||||
The first step is to add the Kubernetes frontend plugin to your Backstage
|
||||
application. Navigate to your new Backstage application directory, and then to
|
||||
your `packages/app` directory, and install the `@backstage/plugin-kubernetes`
|
||||
package.
|
||||
|
||||
```bash
|
||||
cd my-backstage-app/
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-kubernetes
|
||||
```
|
||||
|
||||
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.
|
||||
|
||||
`EntityPage.tsx`:
|
||||
by adding the "Kubernetes" tab to the respective catalog pages.
|
||||
|
||||
```tsx
|
||||
import { Router as KubernetesRouter } from '@backstage/plugin-kubernetes';
|
||||
// In packages/app/src/components/catalog/EntityPage.tsx
|
||||
import { EntityKubernetesContent } from '@backstage/plugin-kubernetes';
|
||||
|
||||
// ...
|
||||
|
||||
const ServiceEntityPage = ({ entity }: { entity: Entity }) => (
|
||||
<EntityPageLayout>
|
||||
// ...
|
||||
<EntityPageLayout.Content
|
||||
path="/kubernetes/*"
|
||||
title="Kubernetes"
|
||||
element={<KubernetesRouter entity={entity} />}
|
||||
/>
|
||||
// ...
|
||||
</EntityPageLayout>
|
||||
);
|
||||
// You can add the tab to any number of pages, the service page is shown as an
|
||||
// example here
|
||||
const serviceEntityPage = (
|
||||
<EntityLayout>
|
||||
{/* other tabs... */}
|
||||
<EntityLayout.Route path="/kubernetes" title="Kubernetes">
|
||||
<EntityKubernetesContent />
|
||||
</EntityLayout.Route>
|
||||
```
|
||||
|
||||
That's it! But now, we need the Kubernetes Backend plugin for the frontend to
|
||||
@@ -57,17 +49,16 @@ Navigate to `packages/backend` of your Backstage app, and install the
|
||||
`@backstage/plugin-kubernetes-backend` package.
|
||||
|
||||
```bash
|
||||
cd my-backstage-app/
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-kubernetes-backend
|
||||
```
|
||||
|
||||
Create a file called `kubernetes.ts` inside `packages/backend/src/plugins/` and
|
||||
add the following
|
||||
|
||||
`kubernetes.ts`:
|
||||
add the following:
|
||||
|
||||
```typescript
|
||||
// In packages/backend/src/plugins/kubernetes.ts
|
||||
import { createRouter } from '@backstage/plugin-kubernetes-backend';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
@@ -83,18 +74,15 @@ And import the plugin to `packages/backend/src/index.ts`. There are three lines
|
||||
of code you'll need to add, and they should be added near similar code in your
|
||||
existing Backstage backend.
|
||||
|
||||
`index.ts`:
|
||||
|
||||
```typescript
|
||||
// In packages/backend/src/index.ts
|
||||
import kubernetes from './plugins/kubernetes';
|
||||
|
||||
// ...
|
||||
|
||||
const kubernetesEnv = useHotMemoize(module, () => createEnv('kubernetes'));
|
||||
|
||||
// ...
|
||||
|
||||
apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv));
|
||||
async function main() {
|
||||
// ...
|
||||
const kubernetesEnv = useHotMemoize(module, () => createEnv('kubernetes'));
|
||||
// ...
|
||||
apiRouter.use('/kubernetes', await kubernetes(kubernetesEnv));
|
||||
```
|
||||
|
||||
That's it! The Kubernetes frontend and backend have now been added to your
|
||||
|
||||
@@ -37,6 +37,13 @@ The locations added through static configuration cannot be removed through the
|
||||
catalog locations API. To remove these locations, you must remove them from the
|
||||
configuration.
|
||||
|
||||
Syntax errors or other types of errors present in `catalog-info.yaml` files will
|
||||
be logged for investigation. Errors do not cause processing to abort.
|
||||
|
||||
When multiple `catalog-info.yaml` files with the same `metadata.name` property
|
||||
are discovered, one will be processed and all others will be skipped. This
|
||||
action is logged for further investigation.
|
||||
|
||||
### Integration Processors
|
||||
|
||||
Integrations may simply provide a mechanism to handle `url` location type for an
|
||||
@@ -111,8 +118,7 @@ catalog:
|
||||
> deleting entities will not work in this mode.**
|
||||
|
||||
A common use case for this configuration is when organizations have a remote
|
||||
source that should be mirrored into backstage. If we want backstage to be a
|
||||
mirror of this remote source we cannot allow users to also register entities
|
||||
with e.g.
|
||||
source that should be mirrored into Backstage. To make Backstage a mirror of
|
||||
this remote source, users cannot also register new entities with e.g. the
|
||||
[catalog-import](https://github.com/backstage/backstage/tree/master/plugins/catalog-import)
|
||||
plugin.
|
||||
|
||||
@@ -18,6 +18,7 @@ The catalog frontend plugin should be installed in your `app` package, which is
|
||||
created as a part of `@backstage/create-app`. To install the package, run:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-catalog
|
||||
```
|
||||
@@ -103,6 +104,7 @@ The catalog backend should be installed in your `backend` package, which is
|
||||
created as a part of `@backstage/create-app`. To install the package, run:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-catalog-backend
|
||||
```
|
||||
|
||||
@@ -20,6 +20,7 @@ The scaffolder frontend plugin should be installed in your `app` package, which
|
||||
is created as a part of `@backstage/create-app`. To install the package, run:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-scaffolder
|
||||
```
|
||||
@@ -57,6 +58,7 @@ The scaffolder backend should be installed in your `backend` package, which is
|
||||
created as a part of `@backstage/create-app`. To install the package, run:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-scaffolder-backend
|
||||
```
|
||||
@@ -262,6 +264,6 @@ library. By default it will use the
|
||||
[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
|
||||
If you are running Backstage from a Docker container and you want to avoid
|
||||
calling a container inside a container, you can set up Cookiecutter in your own
|
||||
image, this will use the local installation instead.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -22,7 +22,7 @@ Navigate to your new Backstage application directory. And then to your
|
||||
`packages/app` directory, and install the `@backstage/plugin-techdocs` package.
|
||||
|
||||
```bash
|
||||
cd my-backstage-app/
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-techdocs
|
||||
```
|
||||
@@ -54,7 +54,7 @@ Navigate to `packages/backend` of your Backstage app, and install the
|
||||
`@backstage/plugin-techdocs-backend` package.
|
||||
|
||||
```bash
|
||||
cd my-backstage-app/
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-techdocs-backend
|
||||
```
|
||||
|
||||
@@ -135,3 +135,31 @@ const themeOptions = createThemeOptions({
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## Custom Logo
|
||||
|
||||
In addition to a custom theme, you can also customize the logo displayed at the
|
||||
far top left of the site.
|
||||
|
||||
In your frontend app, locate `src/components/Root/` folder. You'll find two
|
||||
components:
|
||||
|
||||
- `LogoFull.tsx` - A larger logo used when the Sidebar navigation is opened.
|
||||
- `LogoIcon.tsx` - A smaller logo used when the sidebar navigation is closed.
|
||||
|
||||
To replace the images, you can simply replace the relevant code in those
|
||||
components with raw SVG definitions.
|
||||
|
||||
You can also use another web image format such as PNG by importing it. To do
|
||||
this, place your new image into a new subdirectory such as
|
||||
`src/components/Root/logo/my-company-logo.png`, and then add this code:
|
||||
|
||||
```jsx
|
||||
import MyCustomLogoFull from './logo/my-company-logo.png';
|
||||
|
||||
//...
|
||||
|
||||
const LogoFull = () => {
|
||||
return <img src={MyCustomLogoFull} />;
|
||||
};
|
||||
```
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
id: integrating-plugin-into-service-catalog
|
||||
title: Integrate into the Service Catalog
|
||||
description: Documentation on How to integrate plugin into service catalog
|
||||
description: How to integrate a plugin into service catalog
|
||||
---
|
||||
|
||||
> This is an advanced use case and currently is an experimental feature. Expect
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,11 +17,11 @@ switch between database backends.
|
||||
|
||||
## Install PostgreSQL
|
||||
|
||||
First, swap out SQLite for PostgreSQL in your `backend` package:
|
||||
First, add PostgreSQL to your `backend` package:
|
||||
|
||||
```shell
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn remove sqlite3
|
||||
yarn add pg
|
||||
```
|
||||
|
||||
@@ -46,7 +46,6 @@ backend:
|
||||
+ #ssl: require # see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require)
|
||||
+ #ca: # if you have a CA file and want to verify it you can uncomment this section
|
||||
+ #$file: <file-path>/ca/server.crt
|
||||
|
||||
```
|
||||
|
||||
If you have an `app-config.local.yaml` for local development, a similar update
|
||||
|
||||
+20
-12
@@ -1,3 +1,9 @@
|
||||
# Backstage Documentation
|
||||
|
||||
This folder holds the service and configuration that runs Backstage's documentation hosted at https://backstage.io.
|
||||
|
||||
It pulls content in from the [root `/docs`](../docs/) folder and builds it into the resulting HTML web site.
|
||||
|
||||
This website was created with [Docusaurus](https://docusaurus.io/).
|
||||
|
||||
# What's In This Document
|
||||
@@ -10,6 +16,8 @@ This website was created with [Docusaurus](https://docusaurus.io/).
|
||||
|
||||
# Getting Started
|
||||
|
||||
Testing the web site locally is a great way to see what final website will look like after publishing, and is ideal for testing more complex changes, large updates to navigation, or complex page designs that may include special alignment, which may not otherwise be validated through continuous integration.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
@@ -22,7 +30,7 @@ $ yarn install
|
||||
$ yarn start
|
||||
```
|
||||
|
||||
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
|
||||
This command starts a local development server and opens up a browser window. Most content changes made to the `docs/` root folder are reflected live without having to restart the server.
|
||||
|
||||
## Build
|
||||
|
||||
@@ -57,9 +65,9 @@ my-docusaurus/
|
||||
siteConfig.js
|
||||
```
|
||||
|
||||
# Editing Content
|
||||
## Editing Content
|
||||
|
||||
## Editing an existing docs page
|
||||
### Editing an existing docs page
|
||||
|
||||
Edit docs by navigating to `docs/` and editing the corresponding document:
|
||||
|
||||
@@ -76,7 +84,7 @@ Edit me...
|
||||
|
||||
For more information about docs, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Editing an existing blog post
|
||||
### Editing an existing blog post
|
||||
|
||||
Edit blog posts by navigating to `website/blog` and editing the corresponding post:
|
||||
|
||||
@@ -93,9 +101,9 @@ Edit me...
|
||||
|
||||
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
||||
|
||||
# Adding Content
|
||||
## Adding Content
|
||||
|
||||
## Adding a new docs page to an existing sidebar
|
||||
### Adding a new docs page to an existing sidebar
|
||||
|
||||
1. Create the doc as a new markdown file in `/docs`, example `docs/newly-created-doc.md`:
|
||||
|
||||
@@ -126,7 +134,7 @@ My new content here..
|
||||
|
||||
For more information about adding new docs, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Adding a new blog post
|
||||
### Adding a new blog post
|
||||
|
||||
1. Make sure there is a header link to your blog in `website/siteConfig.js`:
|
||||
|
||||
@@ -157,7 +165,7 @@ Lorem Ipsum...
|
||||
|
||||
For more information about blog posts, click [here](https://docusaurus.io/docs/en/adding-blog)
|
||||
|
||||
## Adding items to your site's top navigation bar
|
||||
### Adding items to your site's top navigation bar
|
||||
|
||||
1. Add links to docs, custom pages or external links by editing the headerLinks field of `website/siteConfig.js`:
|
||||
|
||||
@@ -181,7 +189,7 @@ For more information about blog posts, click [here](https://docusaurus.io/docs/e
|
||||
|
||||
For more information about the navigation bar, click [here](https://docusaurus.io/docs/en/navigation)
|
||||
|
||||
## Adding custom pages
|
||||
### Adding custom pages
|
||||
|
||||
1. Docusaurus uses React components to build pages. The components are saved as .js files in `website/pages/en`:
|
||||
1. If you want your page to show up in your navigation header, you will need to update `website/siteConfig.js` to add to the `headerLinks` element:
|
||||
@@ -199,11 +207,11 @@ For more information about the navigation bar, click [here](https://docusaurus.i
|
||||
}
|
||||
```
|
||||
|
||||
For more information about custom pages, click [here](https://docusaurus.io/docs/en/custom-pages).
|
||||
Learn more about [Docusaurus custom pages](https://docusaurus.io/docs/en/custom-pages).
|
||||
|
||||
# Full Documentation
|
||||
## Full Documentation
|
||||
|
||||
Full documentation can be found on the [website](https://docusaurus.io/).
|
||||
Full documentation can be found on the [Docusaurus website](https://docusaurus.io/).
|
||||
|
||||
## Additional notes
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ The only thing you need to do is to start the app:
|
||||
|
||||
```bash
|
||||
cd my-app
|
||||
yarn start
|
||||
yarn dev
|
||||
```
|
||||
|
||||
And you are good to go! 👍
|
||||
@@ -101,18 +101,12 @@ We provide a collection of public Backstage plugins (look for packages with the
|
||||
Install in your app’s package folder (`<root>/packages/app`) with:
|
||||
|
||||
```bash
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-<plugin-name>
|
||||
```
|
||||
|
||||
Then add it to your app's `plugin.ts` file to import and register it:
|
||||
|
||||
`<root>/packages/app/src/plugin.ts`:
|
||||
|
||||
```js
|
||||
export { plugin as PluginName } from '@backstage/plugin-<plugin-name>';
|
||||
```
|
||||
|
||||
A plugin registers its own `route` in the app — read the documentation for the specific plugin you are installing for more information on that.
|
||||
After that, you inject the plugin into the application where you want it to be exposed. Please read the documentation for the specific plugin you are installing for more information.
|
||||
|
||||
### Creating an internal plugin
|
||||
|
||||
|
||||
@@ -1,5 +1,47 @@
|
||||
# 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
|
||||
|
||||
+19
-19
@@ -1,45 +1,45 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.25",
|
||||
"version": "0.2.26",
|
||||
"private": true,
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.7.7",
|
||||
"@backstage/cli": "^0.6.9",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@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.5",
|
||||
"@backstage/plugin-catalog-import": "^0.5.3",
|
||||
"@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-code-coverage": "^0.1.2",
|
||||
"@backstage/plugin-cost-insights": "^0.8.4",
|
||||
"@backstage/plugin-explore": "^0.3.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.1",
|
||||
"@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-tech-radar": "^0.3.9",
|
||||
"@backstage/plugin-techdocs": "^0.8.0",
|
||||
"@backstage/plugin-techdocs": "^0.9.0",
|
||||
"@backstage/plugin-todo": "^0.1.0",
|
||||
"@backstage/plugin-user-settings": "^0.2.8",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"@roadiehq/backstage-plugin-buildkite": "^1.0.0",
|
||||
"@roadiehq/backstage-plugin-github-insights": "^1.0.0",
|
||||
"@roadiehq/backstage-plugin-github-pull-requests": "^1.0.0",
|
||||
|
||||
@@ -8,6 +8,8 @@ error handling and similar.
|
||||
Add the library to your backend package:
|
||||
|
||||
```sh
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/backend-common
|
||||
```
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ 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';
|
||||
@@ -64,7 +63,7 @@ export class BitbucketUrlReader implements UrlReader {
|
||||
}
|
||||
|
||||
// @public (undocumented)
|
||||
export const coloredFormat: Format;
|
||||
export const coloredFormat: winston.Logform.Format;
|
||||
|
||||
// @public @deprecated
|
||||
export const createDatabase: typeof createDatabaseClient;
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"@backstage/errors": "^0.1.1",
|
||||
"@backstage/integration": "^0.5.1",
|
||||
"@google-cloud/storage": "^5.8.0",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"@types/cors": "^2.8.6",
|
||||
"@types/dockerode": "^3.2.1",
|
||||
"@types/express": "^4.17.6",
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"@backstage/plugin-techdocs-backend": "^0.7.0",
|
||||
"@backstage/plugin-todo-backend": "^0.1.3",
|
||||
"@gitbeaker/node": "^28.0.2",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"azure-devops-node-api": "^10.1.1",
|
||||
"dockerode": "^3.2.1",
|
||||
"example-app": "^0.2.25",
|
||||
|
||||
@@ -15,12 +15,11 @@
|
||||
*/
|
||||
|
||||
import { createRouter } from '@backstage/plugin-kubernetes-backend';
|
||||
import { Router } from 'express';
|
||||
import { PluginEnvironment } from '../types';
|
||||
|
||||
export default async function createPlugin({
|
||||
logger,
|
||||
config,
|
||||
}: PluginEnvironment): Promise<Router> {
|
||||
}: PluginEnvironment) {
|
||||
return await createRouter({ logger, config });
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ export class CatalogClient implements CatalogApi {
|
||||
|
||||
// @public (undocumented)
|
||||
export type CatalogEntitiesRequest = {
|
||||
filter?: Record<string, string | string[]> | undefined;
|
||||
filter?: Record<string, string | string[]>[] | Record<string, string | string[]> | undefined;
|
||||
fields?: string[] | undefined;
|
||||
};
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ metadata:
|
||||
description: A collection of all Backstage example APIs
|
||||
spec:
|
||||
targets:
|
||||
- ./apis/config-schema-api.yaml
|
||||
- ./apis/hello-world-api.yaml
|
||||
- ./apis/petstore-api.yaml
|
||||
- ./apis/spotify-api.yaml
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
kind: API
|
||||
metadata:
|
||||
name: config-schema
|
||||
description: A Backstage config schemas.
|
||||
spec:
|
||||
type: jsonschema
|
||||
lifecycle: production
|
||||
owner: team-a
|
||||
definition:
|
||||
$text: https://github.com/backstage/backstage/blob/master/plugins/config-schema/dev/example-schema.json
|
||||
@@ -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"
|
||||
|
||||
@@ -7,13 +7,13 @@ This package provides a CLI for developing Backstage plugins and apps.
|
||||
Install the package via npm or Yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/cli
|
||||
npm install --save @backstage/cli
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/cli
|
||||
yarn add @backstage/cli
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
"inquirer": "^7.0.4",
|
||||
"jest": "^26.0.1",
|
||||
"jest-css-modules": "^2.1.0",
|
||||
"json-schema": "^0.2.5",
|
||||
"json-schema": "^0.3.0",
|
||||
"lodash": "^4.17.19",
|
||||
"mini-css-extract-plugin": "^0.9.0",
|
||||
"ora": "^5.3.0",
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"@types/json-schema": "^7.0.6",
|
||||
"ajv": "^7.0.3",
|
||||
"fs-extra": "^9.0.0",
|
||||
"json-schema": "^0.2.5",
|
||||
"json-schema": "^0.3.0",
|
||||
"json-schema-merge-allof": "^0.7.0",
|
||||
"typescript-json-schema": "^0.49.0",
|
||||
"yaml": "^1.9.2",
|
||||
|
||||
@@ -7,13 +7,13 @@ This package provides the core API used by Backstage plugins and apps.
|
||||
Do not install this package directly, it is reexported by `@backstage/core`. Install that instead:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/core
|
||||
npm install --save @backstage/core
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/core
|
||||
yarn add @backstage/core
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/core
|
||||
|
||||
## 0.7.7
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 9afcac5af: Allow passing NavLinkProps to SidebarItem component to use in NavLink
|
||||
- e0c9ed759: Add `if` prop to `EntityLayout.Route` to conditionally render tabs
|
||||
- 6eaecbd81: Improve owner example value in `MissingAnnotationEmptyState`.
|
||||
|
||||
## 0.7.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -7,13 +7,13 @@ This package provides the core API used by Backstage plugins and apps.
|
||||
Install the package via npm or Yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/core
|
||||
npm install --save @backstage/core
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/core
|
||||
yarn add @backstage/core
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core",
|
||||
"description": "Core API used by Backstage plugins and apps",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -57,7 +57,7 @@
|
||||
"react": "^16.12.0",
|
||||
"react-dom": "^16.12.0",
|
||||
"react-helmet": "6.1.0",
|
||||
"react-hook-form": "^6.6.0",
|
||||
"react-hook-form": "^6.15.4",
|
||||
"react-markdown": "^5.0.2",
|
||||
"react-router": "6.0.0-beta.0",
|
||||
"react-router-dom": "6.0.0-beta.0",
|
||||
|
||||
@@ -1,5 +1,44 @@
|
||||
# @backstage/create-app
|
||||
|
||||
## 0.3.20
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 73f3f5d78: Updates the end to end test in the app to match the new catalog index page title. To apply this change to an existing app, update `packages/app/cypress/integration/app.js` to search for `"My Company Catalog"` instead of `"My Company Service Catalog"`.
|
||||
- Updated dependencies [1ce80ff02]
|
||||
- Updated dependencies [4c42ecca2]
|
||||
- Updated dependencies [c614ede9a]
|
||||
- Updated dependencies [9afcac5af]
|
||||
- Updated dependencies [07a7806c3]
|
||||
- Updated dependencies [f6efa71ee]
|
||||
- Updated dependencies [19a4dd710]
|
||||
- Updated dependencies [a99e0bc42]
|
||||
- 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 [a1783f306]
|
||||
- Updated dependencies [6eaecbd81]
|
||||
- Updated dependencies [23769512a]
|
||||
- Updated dependencies [1a142ae8a]
|
||||
- @backstage/plugin-api-docs@0.4.12
|
||||
- @backstage/plugin-github-actions@0.4.4
|
||||
- @backstage/plugin-catalog-import@0.5.4
|
||||
- @backstage/plugin-explore@0.3.4
|
||||
- @backstage/plugin-lighthouse@0.2.15
|
||||
- @backstage/core@0.7.7
|
||||
- @backstage/plugin-scaffolder@0.9.2
|
||||
- @backstage/plugin-catalog@0.5.6
|
||||
- @backstage/plugin-catalog-backend@0.8.1
|
||||
- @backstage/plugin-search@0.3.5
|
||||
- @backstage/plugin-techdocs@0.9.0
|
||||
- @backstage/plugin-scaffolder-backend@0.10.1
|
||||
|
||||
## 0.3.19
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/create-app",
|
||||
"description": "Create app package for Backstage",
|
||||
"version": "0.3.19",
|
||||
"version": "0.3.20",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@backstage/plugin-scaffolder-backend": "^{{version '@backstage/plugin-scaffolder-backend'}}",
|
||||
"@backstage/plugin-techdocs-backend": "^{{version '@backstage/plugin-techdocs-backend'}}",
|
||||
"@gitbeaker/node": "^28.0.2",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"dockerode": "^3.2.1",
|
||||
"express": "^4.17.1",
|
||||
"express-promise-router": "^4.1.0",
|
||||
|
||||
@@ -9,13 +9,13 @@ This package provides utilities that help in developing plugins for Backstage, l
|
||||
Install the package via npm or Yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save-dev @backstage/dev-utils
|
||||
npm install --save-dev @backstage/dev-utils
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add -D @backstage/dev-utils
|
||||
yarn add -D @backstage/dev-utils
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
"@backstage/config": "^0.1.2",
|
||||
"cross-fetch": "^3.0.6",
|
||||
"git-url-parse": "^11.4.4",
|
||||
"@octokit/rest": "^18.0.12",
|
||||
"@octokit/auth-app": "^2.10.5",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"@octokit/auth-app": "^3.4.0",
|
||||
"luxon": "^1.25.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @backstage/techdocs-common
|
||||
|
||||
## 0.5.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f4af06ebe: Gracefully handle HTTP request failures in download method of AzureBlobStorage publisher.
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/techdocs-common",
|
||||
"description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli",
|
||||
"version": "0.5.0",
|
||||
"version": "0.5.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
|
||||
@@ -80,10 +80,17 @@ export class AwsS3Publish implements PublisherBase {
|
||||
'techdocs.publisher.awsS3.endpoint',
|
||||
);
|
||||
|
||||
// AWS forcePathStyle is an optional config. If missing, it defaults to false. Needs to be enabled for cases
|
||||
// where endpoint url points to locally hosted S3 compatible storage like Localstack
|
||||
const s3ForcePathStyle = config.getOptionalBoolean(
|
||||
'techdocs.publisher.awsS3.s3ForcePathStyle',
|
||||
);
|
||||
|
||||
const storageClient = new aws.S3({
|
||||
credentials,
|
||||
...(region && { region }),
|
||||
...(endpoint && { endpoint }),
|
||||
...(s3ForcePathStyle && { s3ForcePathStyle }),
|
||||
});
|
||||
|
||||
return new AwsS3Publish(storageClient, bucketName, logger);
|
||||
|
||||
@@ -7,13 +7,13 @@ This package provides utilities that can be used to test plugins and apps for Ba
|
||||
Install the package via npm or Yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save-dev @backstage/test-utils
|
||||
npm install --save-dev @backstage/test-utils
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add -D @backstage/test-utils
|
||||
yarn add -D @backstage/test-utils
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -7,13 +7,13 @@ This package provides the extended Material UI Theme(s) that power Backstage.
|
||||
Install the package via npm or Yarn:
|
||||
|
||||
```sh
|
||||
$ npm install --save @backstage/theme
|
||||
npm install --save @backstage/theme
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```sh
|
||||
$ yarn add @backstage/theme
|
||||
yarn add @backstage/theme
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @backstage/plugin-api-docs
|
||||
|
||||
## 0.4.12
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 1ce80ff02: Resolve issues with AsyncAPI rendering by updating `@asyncapi/react-component`
|
||||
to `0.23.0`. The theming of the component is adjusted to the latest styling
|
||||
changes.
|
||||
- c614ede9a: Updated README to have up-to-date install instructions.
|
||||
- 07a7806c3: Added fields filtering in get API entities to avoid the requesting of unused data
|
||||
- Updated dependencies [9afcac5af]
|
||||
- Updated dependencies [e0c9ed759]
|
||||
- Updated dependencies [6eaecbd81]
|
||||
- @backstage/core@0.7.7
|
||||
|
||||
## 0.4.11
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -15,6 +15,7 @@ Right now, the following API formats are supported:
|
||||
- [OpenAPI](https://swagger.io/specification/) 2 & 3
|
||||
- [AsyncAPI](https://www.asyncapi.com/docs/specifications/latest/)
|
||||
- [GraphQL](https://graphql.org/learn/schema/)
|
||||
- [JSON Schema](https://json-schema.org/)
|
||||
|
||||
Other formats are displayed as plain text, but this can easily be extended.
|
||||
|
||||
@@ -28,15 +29,15 @@ To link that a component provides or consumes an API, see the [`providesApis`](h
|
||||
1. Install the API docs plugin
|
||||
|
||||
```bash
|
||||
# packages/app
|
||||
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-api-docs
|
||||
```
|
||||
|
||||
2. Add the `ApiExplorerPage` extension to the app:
|
||||
|
||||
```tsx
|
||||
// packages/app/src/App.tsx
|
||||
// In packages/app/src/App.tsx
|
||||
|
||||
import { ApiExplorerPage } from '@backstage/plugin-api-docs';
|
||||
|
||||
@@ -56,7 +57,7 @@ import {
|
||||
} from '@backstage/plugin-api-docs';
|
||||
|
||||
const apiPage = (
|
||||
<EntityLayoutWrapper>
|
||||
<EntityLayout>
|
||||
<EntityLayout.Route path="/" title="Overview">
|
||||
<Grid container spacing={3}>
|
||||
<Grid item md={6}>
|
||||
@@ -80,7 +81,7 @@ const apiPage = (
|
||||
</Grid>
|
||||
</Grid>
|
||||
</EntityLayout.Route>
|
||||
</EntityLayoutWrapper>
|
||||
</EntityLayout>
|
||||
);
|
||||
|
||||
// ...
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
} from '../src';
|
||||
import asyncapiApiEntity from './asyncapi-example-api.yaml';
|
||||
import graphqlApiEntity from './graphql-example-api.yaml';
|
||||
import jsonschemaApiEntity from './jsonschema-example-api.yaml';
|
||||
import openapiApiEntity from './openapi-example-api.yaml';
|
||||
import otherApiEntity from './other-example-api.yaml';
|
||||
|
||||
@@ -41,6 +42,7 @@ createDevApp()
|
||||
items: [
|
||||
openapiApiEntity,
|
||||
asyncapiApiEntity,
|
||||
jsonschemaApiEntity,
|
||||
graphqlApiEntity,
|
||||
otherApiEntity,
|
||||
],
|
||||
@@ -87,6 +89,19 @@ createDevApp()
|
||||
</Page>
|
||||
),
|
||||
})
|
||||
.addPage({
|
||||
title: 'JSON Schema',
|
||||
element: (
|
||||
<Page themeId="home">
|
||||
<Header title="JSON Schema" />
|
||||
<Content>
|
||||
<EntityProvider entity={(jsonschemaApiEntity as any) as Entity}>
|
||||
<EntityApiDefinitionCard />
|
||||
</EntityProvider>
|
||||
</Content>
|
||||
</Page>
|
||||
),
|
||||
})
|
||||
.addPage({
|
||||
title: 'GraphQL',
|
||||
element: (
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
apiVersion: backstage.io/v1alpha1
|
||||
kind: API
|
||||
metadata:
|
||||
name: persons
|
||||
description: Person dataset
|
||||
spec:
|
||||
type: jsonschema
|
||||
lifecycle: experimental
|
||||
owner: team-c
|
||||
# From https://json-schema.org/learn/miscellaneous-examples.html
|
||||
definition: |
|
||||
{
|
||||
"$id": "https://example.com/person.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Person",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"firstName": {
|
||||
"type": "string",
|
||||
"description": "The person's first name."
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string",
|
||||
"description": "The person's last name."
|
||||
},
|
||||
"age": {
|
||||
"description": "Age in years which must be equal to or greater than zero.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-api-docs",
|
||||
"version": "0.4.11",
|
||||
"version": "0.4.12",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,13 +31,16 @@
|
||||
"dependencies": {
|
||||
"@asyncapi/react-component": "^0.23.0",
|
||||
"@backstage/catalog-model": "^0.7.7",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@backstage/core": "^0.7.7",
|
||||
"@backstage/plugin-catalog-react": "^0.1.4",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
"@material-icons/font": "^1.0.2",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"@stoplight/json-schema-viewer": "^4.0.0-beta.16",
|
||||
"@stoplight/mosaic": "^1.0.0-beta.46",
|
||||
"@stoplight/reporter": "^1.10.0",
|
||||
"@types/react": "^16.9",
|
||||
"graphiql": "^1.0.0-alpha.10",
|
||||
"graphql": "^15.3.0",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
import React from 'react';
|
||||
import { AsyncApiDefinitionWidget } from '../AsyncApiDefinitionWidget';
|
||||
import { GraphQlDefinitionWidget } from '../GraphQlDefinitionWidget';
|
||||
import { JsonSchemaDefinitionWidget } from '../JsonSchemaDefinitionWidget';
|
||||
import { OpenApiDefinitionWidget } from '../OpenApiDefinitionWidget';
|
||||
|
||||
export type ApiDefinitionWidget = {
|
||||
@@ -51,5 +52,13 @@ export function defaultDefinitionWidgets(): ApiDefinitionWidget[] {
|
||||
<GraphQlDefinitionWidget definition={definition} />
|
||||
),
|
||||
},
|
||||
{
|
||||
type: 'jsonschema',
|
||||
title: 'JSON Schema',
|
||||
rawLanguage: 'json',
|
||||
component: definition => (
|
||||
<JsonSchemaDefinitionWidget definition={definition} />
|
||||
),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { renderInTestApp } from '@backstage/test-utils';
|
||||
import React from 'react';
|
||||
import { JsonSchemaDefinitionWidget } from './JsonSchemaDefinitionWidget';
|
||||
|
||||
describe('<JsonSchemaDefinitionWidget />', () => {
|
||||
it('renders json schema', async () => {
|
||||
// From https://json-schema.org/learn/miscellaneous-examples.html
|
||||
const definition = `
|
||||
{
|
||||
"$id": "https://example.com/person.schema.json",
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Person",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"firstName": {
|
||||
"type": "string",
|
||||
"description": "The person's first name."
|
||||
},
|
||||
"lastName": {
|
||||
"type": "string",
|
||||
"description": "The person's last name."
|
||||
},
|
||||
"age": {
|
||||
"description": "Age in years which must be equal to or greater than zero.",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
const { getByText } = await renderInTestApp(
|
||||
<JsonSchemaDefinitionWidget definition={definition} />,
|
||||
);
|
||||
|
||||
expect(getByText(/lastName/i)).toBeInTheDocument();
|
||||
expect(getByText(/The person's last name./i)).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('renders error if definition is missing', async () => {
|
||||
const { getByText } = await renderInTestApp(
|
||||
<JsonSchemaDefinitionWidget definition="{}" />,
|
||||
);
|
||||
expect(getByText(/No schema defined/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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 { useTheme } from '@material-ui/core';
|
||||
import { JsonSchemaViewer } from '@stoplight/json-schema-viewer';
|
||||
import { injectStyles, useThemeStore } from '@stoplight/mosaic';
|
||||
import React, { useMemo } from 'react';
|
||||
import { useEffectOnce } from 'react-use';
|
||||
|
||||
injectStyles();
|
||||
|
||||
type Props = {
|
||||
definition: any;
|
||||
};
|
||||
|
||||
export const JsonSchemaDefinitionWidget = ({ definition }: Props) => {
|
||||
const schema = useMemo(() => JSON.parse(definition), [definition]);
|
||||
const theme = useTheme();
|
||||
const themeStore = useThemeStore();
|
||||
|
||||
useEffectOnce(() => {
|
||||
themeStore.setColor('background', theme.palette.background.paper);
|
||||
themeStore.setColor('text', theme.palette.text.primary);
|
||||
themeStore.setColor('primary', theme.palette.primary.main);
|
||||
themeStore.setColor('success', theme.palette.success.main);
|
||||
themeStore.setColor('warning', theme.palette.warning.main);
|
||||
themeStore.setColor('danger', theme.palette.error.main);
|
||||
themeStore.setMode(theme.palette.type);
|
||||
});
|
||||
return (
|
||||
<JsonSchemaViewer
|
||||
schema={schema}
|
||||
emptyText="No schema defined"
|
||||
defaultExpandedDepth={5}
|
||||
/>
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright 2020 Spotify AB
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export { JsonSchemaDefinitionWidget } from './JsonSchemaDefinitionWidget';
|
||||
@@ -20,3 +20,4 @@ export * from './AsyncApiDefinitionWidget';
|
||||
export * from './ComponentsCards';
|
||||
export * from './OpenApiDefinitionWidget';
|
||||
export * from './PlainApiDefinitionWidget';
|
||||
export * from './JsonSchemaDefinitionWidget';
|
||||
|
||||
@@ -7,7 +7,9 @@ This backend plugin can be installed to serve static content of a Backstage app.
|
||||
Add both this package and your local frontend app package as dependencies to your backend, for example
|
||||
|
||||
```bash
|
||||
yarn add @backstage/plugin-app-backend example-app
|
||||
# From your Backstage root directory
|
||||
cd packages/backend
|
||||
yarn add @backstage/plugin-app-backend app
|
||||
```
|
||||
|
||||
By adding the app package as a dependency we ensure that it is built as part of the backend, and that it can be resolved at runtime.
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.7.6",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@backstage/core": "^0.7.7",
|
||||
"@backstage/errors": "^0.1.1",
|
||||
"@backstage/plugin-catalog-react": "^0.1.3",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/plugin-bitrise
|
||||
|
||||
## 0.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c614ede9a: Updated README to have up-to-date install instructions.
|
||||
- Updated dependencies [9afcac5af]
|
||||
- Updated dependencies [e0c9ed759]
|
||||
- Updated dependencies [6eaecbd81]
|
||||
- @backstage/core@0.7.7
|
||||
|
||||
## 0.1.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -8,9 +8,9 @@ Welcome to the Bitrise plugin!
|
||||
## Installation
|
||||
|
||||
```sh
|
||||
# The plugin must be added in the app package
|
||||
$ cd packages/app
|
||||
$ yarn add @backstage/plugin-bitrise
|
||||
# From your Backstage root directory
|
||||
cd packages/app
|
||||
yarn add @backstage/plugin-bitrise
|
||||
```
|
||||
|
||||
Bitrise Plugin exposes an entity tab component named `EntityBitriseContent`. You can include it in the
|
||||
@@ -22,7 +22,7 @@ import { EntityBitriseContent } from '@backstage/plugin-bitrise';
|
||||
|
||||
// Farther down at the website declaration
|
||||
const websiteEntityPage = (
|
||||
<EntityLayoutWrapper>
|
||||
<EntityLayout>
|
||||
{/* Place the following section where you want the tab to appear */}
|
||||
<EntityLayout.Route path="/bitrise" title="Bitrise">
|
||||
<EntityBitriseContent />
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-bitrise",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -21,7 +21,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^0.7.2",
|
||||
"@backstage/core": "^0.7.6",
|
||||
"@backstage/core": "^0.7.7",
|
||||
"@backstage/plugin-catalog-react": "^0.1.2",
|
||||
"@backstage/theme": "^0.2.6",
|
||||
"@material-ui/core": "^4.11.0",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/plugin-catalog-backend
|
||||
|
||||
## 0.8.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- a99e0bc42: Entity lifecycle and owner are now indexed by the `DefaultCatalogCollator`. A `locationTemplate` may now optionally be provided to its constructor to reflect a custom catalog entity path in the Backstage frontend.
|
||||
- Updated dependencies [e1e757569]
|
||||
- @backstage/plugin-search-backend-node@0.1.4
|
||||
|
||||
## 0.8.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@backstage/plugin-catalog-backend",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -35,7 +35,7 @@
|
||||
"@backstage/config": "^0.1.4",
|
||||
"@backstage/errors": "^0.1.1",
|
||||
"@backstage/integration": "^0.5.1",
|
||||
"@backstage/plugin-search-backend-node": "^0.1.3",
|
||||
"@backstage/plugin-search-backend-node": "^0.1.4",
|
||||
"@backstage/search-common": "^0.1.1",
|
||||
"@octokit/graphql": "^4.5.8",
|
||||
"@types/express": "^4.17.6",
|
||||
|
||||
@@ -156,7 +156,7 @@ describe('github', () => {
|
||||
describe('getOrganizationRepositories', () => {
|
||||
it('read repositories', async () => {
|
||||
const input: QueryResponse = {
|
||||
organization: {
|
||||
repositoryOwner: {
|
||||
repositories: {
|
||||
nodes: [
|
||||
{
|
||||
|
||||
@@ -20,7 +20,8 @@ import { graphql } from '@octokit/graphql';
|
||||
// Graphql types
|
||||
|
||||
export type QueryResponse = {
|
||||
organization: Organization;
|
||||
organization?: Organization;
|
||||
repositoryOwner?: Organization | User;
|
||||
};
|
||||
|
||||
export type Organization = {
|
||||
@@ -41,6 +42,7 @@ export type User = {
|
||||
avatarUrl?: string;
|
||||
email?: string;
|
||||
name?: string;
|
||||
repositories?: Connection<Repository>;
|
||||
};
|
||||
|
||||
export type Team = {
|
||||
@@ -228,28 +230,27 @@ export async function getOrganizationRepositories(
|
||||
org: string,
|
||||
): Promise<{ repositories: Repository[] }> {
|
||||
const query = `
|
||||
query repositories($org: String!, $cursor: String) {
|
||||
organization(login: $org) {
|
||||
name
|
||||
repositories(first: 100, after: $cursor) {
|
||||
nodes {
|
||||
name
|
||||
url
|
||||
isArchived
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
query repositories($org: String!, $cursor: String) {
|
||||
repositoryOwner(login: $org) {
|
||||
login
|
||||
repositories(first: 100, after: $cursor) {
|
||||
nodes {
|
||||
name
|
||||
url
|
||||
isArchived
|
||||
}
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
}`;
|
||||
|
||||
const repositories = await queryWithPaging(
|
||||
client,
|
||||
query,
|
||||
r => r.organization?.repositories,
|
||||
r => r.repositoryOwner?.repositories,
|
||||
x => x,
|
||||
{ org },
|
||||
);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user