Merge branch 'backstage:master' into master
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights': patch
|
||||
---
|
||||
|
||||
Move cost-insights data specific API types (non react) into an @backstage/plugin-cost-insights-common
|
||||
isomorphic package. This allows these types to be shared in any backend packages or other cost-insight
|
||||
modules.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Adds the ability to define the Backstage app name using a `BACKSTAGE_APP_NAME`
|
||||
environment variable when running `create-app`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': minor
|
||||
---
|
||||
|
||||
Add `transformLinkUri` and `transformImageUri` to `MarkdownContent`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Bumped create-app version.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-kubernetes-backend': patch
|
||||
'@backstage/plugin-kubernetes-common': patch
|
||||
---
|
||||
|
||||
Fixed the lack of `limitranges` as part of the Default Objects to fetch from the kubernetes api
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-tech-insights-backend': minor
|
||||
---
|
||||
|
||||
Allow FactRetrieverRegistry to be injected into buildTechInsightsContext so that we can override default registry implementation.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Fix the EntityLayout header style so that EntityContextMenu button can display in correct shape when user hover on it
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
---
|
||||
|
||||
Improve error messaging when passing in malformed auth
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Previously, the color of the Entity Context Menu (in the Entity Page Header) was hardcoded as `white`.
|
||||
|
||||
This was an issue for themes that use a header with a white background. By default, the color of the icon is now `theme.palette.bursts.fontColor`.
|
||||
This was an issue for themes that use a header with a white background. By default, the color of the icon is now `theme.page.fontColor`.
|
||||
|
||||
It can now also be overridden in the theme, which is only necessary if the header title, subtitle and three-dots icon need to have different colors. For example:
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': minor
|
||||
---
|
||||
|
||||
Add `allowedRepos` `ui:option` to `RepoUrlPicker` component, and move `repoName` field to own component
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-cost-insights-common': minor
|
||||
---
|
||||
|
||||
Introduces a new isomorphic @backstage/plugin-cost-insight-common package to contain shared types across all other cost insights packages and modules.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-jenkins': patch
|
||||
'@backstage/plugin-jenkins-backend': patch
|
||||
---
|
||||
|
||||
feature: added support for multiple branches to the `JenkinsApi`
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-pg': patch
|
||||
---
|
||||
|
||||
**DEPRECATED**: `PgSearchEngine` static `from` has been deprecated and will be removed in a future release. Use static `fromConfig` method to instantiate.
|
||||
|
||||
Added support for highlighting matched terms in search result data
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-vault': patch
|
||||
'@backstage/plugin-vault-backend': patch
|
||||
---
|
||||
|
||||
Added a path notion in addition to secret name to allow to differentiate secrets in sub-paths
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': minor
|
||||
---
|
||||
|
||||
Update GitLab Merge Request Action to allow source branch to be deleted
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Added an option for the auth backend router to select the algorithm for the JWT token signing keys
|
||||
+30
-1
@@ -157,38 +157,67 @@
|
||||
"@backstage/plugin-vault": "0.1.0",
|
||||
"@backstage/plugin-vault-backend": "0.1.0",
|
||||
"@backstage/plugin-xcmetrics": "0.2.26",
|
||||
"@backstage/plugin-api-docs-module-protoc-gen-doc": "0.0.0"
|
||||
"@backstage/plugin-api-docs-module-protoc-gen-doc": "0.0.0",
|
||||
"@backstage/plugin-catalog-backend-module-openapi": "0.0.0"
|
||||
},
|
||||
"changesets": [
|
||||
"beige-horses-scream",
|
||||
"breezy-poems-grab",
|
||||
"breezy-seas-exist",
|
||||
"bright-balloons-hide",
|
||||
"calm-experts-buy",
|
||||
"chilled-mirrors-grab",
|
||||
"create-app-1656408352",
|
||||
"curly-candles-battle",
|
||||
"curvy-weeks-matter",
|
||||
"eleven-mice-collect",
|
||||
"forty-seals-complain",
|
||||
"great-roses-pump",
|
||||
"green-actors-argue",
|
||||
"happy-boxes-melt",
|
||||
"large-kangaroos-poke",
|
||||
"lemon-goats-obey",
|
||||
"metal-singers-matter",
|
||||
"modern-ducks-lay",
|
||||
"nasty-zoos-cross",
|
||||
"nervous-humans-sip",
|
||||
"plenty-clouds-guess",
|
||||
"polite-eagles-invite",
|
||||
"popular-pots-yell",
|
||||
"pretty-masks-live",
|
||||
"purple-beans-march",
|
||||
"quiet-pens-notice",
|
||||
"red-games-decide",
|
||||
"renovate-4b5ff24",
|
||||
"renovate-9454dab",
|
||||
"rude-llamas-lie",
|
||||
"search-lightning-cult",
|
||||
"search-turtles-itch",
|
||||
"serious-zebras-joke",
|
||||
"shaggy-melons-drive",
|
||||
"sharp-numbers-taste",
|
||||
"sharp-planes-turn",
|
||||
"shiny-turkeys-doubt",
|
||||
"short-olives-train",
|
||||
"shy-cameras-develop",
|
||||
"silent-coats-brake",
|
||||
"silver-needles-unite",
|
||||
"smooth-sheep-hide",
|
||||
"strange-tables-flash",
|
||||
"strange-trains-collect",
|
||||
"strong-lies-explain",
|
||||
"sweet-plants-sparkle",
|
||||
"tame-guests-wave",
|
||||
"techdocs-eyes-sit",
|
||||
"techdocs-gorgeous-plants-sniff",
|
||||
"techdocs-sheep-talk",
|
||||
"techdocs-the-whole-pulse",
|
||||
"thick-radios-drive",
|
||||
"twelve-candles-jump",
|
||||
"two-crews-accept",
|
||||
"unlucky-stingrays-juggle",
|
||||
"weak-bananas-deliver",
|
||||
"weak-llamas-repeat",
|
||||
"wet-dolphins-act",
|
||||
"wicked-icons-grin"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': minor
|
||||
---
|
||||
|
||||
Introduced `GroupDefaultParentEntityPolicy` to set a default group entity parent.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-kafka-backend': patch
|
||||
---
|
||||
|
||||
Updated dependency `kafkajs` to `^2.0.0`.
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
'@backstage/backend-tasks': patch
|
||||
'@backstage/backend-test-utils': patch
|
||||
'@backstage/plugin-app-backend': patch
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
'@backstage/plugin-bazaar-backend': patch
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
'@backstage/plugin-code-coverage-backend': patch
|
||||
'@backstage/plugin-scaffolder-backend': patch
|
||||
'@backstage/plugin-search-backend-module-pg': patch
|
||||
'@backstage/plugin-tech-insights-backend': patch
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
---
|
||||
|
||||
Updated dependency `knex` to `^2.0.0`.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/plugin-codescene': patch
|
||||
'@backstage/plugin-sonarqube': patch
|
||||
---
|
||||
|
||||
Updated dependency `rc-progress` to `3.4.0`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-search-react': patch
|
||||
---
|
||||
|
||||
Fix search pagination to reset page cursor also when a term is cleared.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
'@backstage/plugin-search-backend-module-elasticsearch': minor
|
||||
---
|
||||
|
||||
**BREAKING**: In order to remain interoperable with all currently supported
|
||||
deployments of Elasticsearch, this package will now conditionally use either
|
||||
the `@elastic/elasticsearch` or `@opensearch-project/opensearch` client when
|
||||
communicating with your deployed cluster.
|
||||
|
||||
If you do not rely on types exported from this package, or if you do not make
|
||||
use of the `createElasticSearchClientOptions` or `newClient` methods on the
|
||||
`ElasticSearchSearchEngine` class, then upgrading to this version should not
|
||||
require any further action on your part. Everything will continue to work as it
|
||||
always has.
|
||||
|
||||
If you _do_ rely on either of the above methods or any underlying types, some
|
||||
changes may be needed to your custom code. A type guard is now exported by this
|
||||
package (`isOpenSearchCompatible(options)`), which you may use to help clarify
|
||||
which client options are compatible with which client constructors.
|
||||
|
||||
If you are using this package with the `search.elasticsearch.provider` set to
|
||||
`aws`, and you are making use of the `newClient` method in particular, you may
|
||||
wish to start using the `@opensearch-project/opensearch` client in your custom
|
||||
code.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
**DEPRECATED**: The `bursts` object from `BackstagePaletteAdditions` has been depreciated and will be removed in a future release
|
||||
|
||||
The `genPageTheme` function now includes an optional options object with an optional `fontColor` which defaults to white if not provided.
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs': patch
|
||||
'@backstage/plugin-catalog': minor
|
||||
---
|
||||
|
||||
Add hidden title column to catalog and API table to enable filtering by title.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
The `test` command now ensures that all IO is flushed before exiting when printing `--help`.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Fix: When docs are shown in an entity page under the docs tab the sidebars start overlapping with the header and tabs in the page when you scroll the documentation content.
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Adding ability to customize the "unregister entity" menu item in the entity context menu on the entity page with options 'visible','hidden','disabled'.With this three new options, one can hide the "unregister entity" menu item from the list, disable or keep it enabled.
|
||||
|
||||
The boolean input for "unregister entity" will be deprecated later in favour of the above three options.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder-backend': minor
|
||||
---
|
||||
|
||||
Added two new scaffolder actions: `github:repo:create` and `github:repo:push`
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Updated to remove usage of the `bursts` object in the theme palette
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Add `allowArbitraryValues` to `ui:options` in `OwnedEntityPicker`, similar to `allowArbitraryValues` in `EntityPicker`
|
||||
@@ -0,0 +1,43 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-catalog-react': patch
|
||||
---
|
||||
|
||||
Added new `EntityProcessingStatusPicker` that will filter for entities with orphans and/or errors.
|
||||
|
||||
If you are using the default Catalog page this picker will be added automatically. For those who have customized their Catalog page you'll need to add this manually by doing something like this:
|
||||
|
||||
```diff
|
||||
...
|
||||
import {
|
||||
CatalogFilterLayout,
|
||||
EntityTypePicker,
|
||||
UserListPicker,
|
||||
EntityTagPicker
|
||||
+ EntityProcessingStatusPicker,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
...
|
||||
export const CustomCatalogPage = ({
|
||||
columns,
|
||||
actions,
|
||||
initiallySelectedFilter = 'owned',
|
||||
}: CatalogPageProps) => {
|
||||
return (
|
||||
...
|
||||
<EntityListProvider>
|
||||
<CatalogFilterLayout>
|
||||
<CatalogFilterLayout.Filters>
|
||||
<EntityKindPicker initialFilter="component" hidden />
|
||||
<EntityTypePicker />
|
||||
<UserListPicker initialFilter={initiallySelectedFilter} />
|
||||
<EntityTagPicker />
|
||||
+ <EntityProcessingStatusPicker />
|
||||
<CatalogFilterLayout.Filters>
|
||||
<CatalogFilterLayout.Content>
|
||||
<CatalogTable columns={columns} actions={actions} />
|
||||
</CatalogFilterLayout.Content>
|
||||
</CatalogFilterLayout>
|
||||
</EntityListProvider>
|
||||
...
|
||||
};
|
||||
```
|
||||
@@ -1,85 +0,0 @@
|
||||
name: Automate Merge Renovate PRs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '*/10 * * * *'
|
||||
|
||||
jobs:
|
||||
diff:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const owner = "backstage";
|
||||
const repo = "backstage";
|
||||
const query = `{
|
||||
repository(owner: "backstage", name: "backstage") {
|
||||
pullRequests(labels: ["dependencies"], last: 10, states: [OPEN]) {
|
||||
nodes {
|
||||
title
|
||||
author {
|
||||
login
|
||||
}
|
||||
number
|
||||
mergeable
|
||||
files(first: 1) {
|
||||
nodes {
|
||||
path
|
||||
}
|
||||
}
|
||||
changedFiles
|
||||
commits(last: 1) {
|
||||
nodes {
|
||||
commit {
|
||||
statusCheckRollup {
|
||||
state
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
reviewDecision
|
||||
reviews(first: 10) {
|
||||
nodes {
|
||||
author {
|
||||
login
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
const date = new Date();
|
||||
if (date.getDay() === 2) {
|
||||
console.log("Skipping auto merge because Tuesday is release day");
|
||||
return;
|
||||
}
|
||||
|
||||
const r = await github.graphql(query);
|
||||
const mergable = r.repository.pullRequests.nodes.filter(
|
||||
(pr) =>
|
||||
pr.author.login === "renovate" &&
|
||||
pr.mergeable === "MERGEABLE" &&
|
||||
pr.changedFiles === 1 &&
|
||||
pr.files.nodes[0].path.split("/").slice(-1)[0] === "yarn.lock" &&
|
||||
pr.commits.nodes[0].commit.statusCheckRollup.state === "SUCCESS" &&
|
||||
pr.reviewDecision === "APPROVED"
|
||||
);
|
||||
|
||||
if (mergable.length === 0) {
|
||||
console.log("no mergable PRs");
|
||||
return;
|
||||
}
|
||||
|
||||
for (const pr of mergable) {
|
||||
console.log(`Merging #${pr.number} - ${pr.title}`);
|
||||
await github.rest.pulls.merge({
|
||||
owner,
|
||||
repo,
|
||||
pull_number: pr.number,
|
||||
});
|
||||
await new Promise((r) => setTimeout(r, 2000));
|
||||
}
|
||||
@@ -64,45 +64,16 @@ jobs:
|
||||
- name: fetch branch master
|
||||
run: git fetch origin master
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows.
|
||||
# TODO(Rugvip): move this to composite action once all features we use are supported
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
|
||||
# Cache every node_modules folder inside the monorepo
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
# We use both yarn.lock and package.json as cache keys to ensure that
|
||||
# changes to local monorepo packages bust the cache.
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
|
||||
# If we get a cache hit for node_modules, there's no need to bring in the global
|
||||
# yarn cache or run yarn install, as all dependencies will be installed already.
|
||||
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: yarn install
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: check for yarn.lock changes
|
||||
id: yarn-lock
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
name: Cron
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '*/5 * * * *'
|
||||
|
||||
jobs:
|
||||
cron:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: backstage/actions/cron@v0.2.2
|
||||
with:
|
||||
app-id: ${{ secrets.BACKSTAGE_GOALIE_APPLICATION_ID }}
|
||||
private-key: ${{ secrets.BACKSTAGE_GOALIE_PRIVATE_KEY }}
|
||||
installation-id: ${{ secrets.BACKSTAGE_GOALIE_INSTALLATION_ID }}
|
||||
@@ -0,0 +1,89 @@
|
||||
name: Build and push Docker Hub image
|
||||
on:
|
||||
repository_dispatch:
|
||||
types: [release-published]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: backstage
|
||||
ref: v${{ github.event.client_payload.version }}
|
||||
|
||||
- name: setup-node
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
registry-url: https://registry.npmjs.org/
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows.
|
||||
# TODO(Rugvip): move this to composite action once all features we use are supported
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
|
||||
# Cache every node_modules folder inside the monorepo
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
# We use both yarn.lock and package.json as cache keys to ensure that
|
||||
# changes to local monorepo packages bust the cache.
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
|
||||
# If we get a cache hit for node_modules, there's no need to bring in the global
|
||||
# yarn cache or run yarn install, as all dependencies will be installed already.
|
||||
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v2
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
|
||||
- name: create-app
|
||||
run: npx @backstage/create-app
|
||||
env:
|
||||
BACKSTAGE_APP_NAME: example-app
|
||||
|
||||
- name: yarn build
|
||||
run: yarn build
|
||||
working-directory: ./example-app
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: './example-app'
|
||||
file: ./example-app/packages/backend/Dockerfile
|
||||
push: true
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository_owner }}/backstage:latest
|
||||
ghcr.io/${{ github.repository_owner }}/backstage:${{ github.event.client_payload.version }}
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
run: ls microsite/build/backstage && ls microsite/build/backstage/storybook
|
||||
|
||||
- name: Deploy both microsite and storybook to gh-pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4.3.3
|
||||
uses: JamesIves/github-pages-deploy-action@v4.3.4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: microsite/build/backstage
|
||||
|
||||
@@ -20,33 +20,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
# No verification done here, only build & publish. If the master branch
|
||||
# is broken we will see that from those builds, but we still want to push nightly
|
||||
|
||||
@@ -61,33 +61,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: Fetch previous commit for release check
|
||||
run: git fetch origin '${{ github.event.before }}'
|
||||
@@ -157,33 +139,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: build type declarations
|
||||
run: yarn tsc:full
|
||||
@@ -209,7 +173,7 @@ jobs:
|
||||
# Grabs the version in the root package.json and creates a tag on GitHub
|
||||
- name: Create a release tag
|
||||
id: create_tag
|
||||
run: node scripts/create-release-tag.js --dispatch-workflows
|
||||
run: node scripts/create-release-tag.js
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
|
||||
@@ -219,6 +183,13 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
|
||||
- name: Dispatch repository event
|
||||
uses: peter-evans/repository-dispatch@v2
|
||||
with:
|
||||
token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
event-type: release-published
|
||||
client-payload: '{"version": "${{ steps.create_tag.outputs.version }}"}'
|
||||
|
||||
# Notify everyone about this great new release :D
|
||||
- name: Discord notification
|
||||
uses: Ilshidur/action-discord@0.3.2
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
name: Issue
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'backstage/backstage'
|
||||
steps:
|
||||
- name: Issue sync
|
||||
uses: backstage/actions/issue-sync@v0.2.2
|
||||
@@ -0,0 +1,14 @@
|
||||
name: PR
|
||||
on:
|
||||
pull_request_target:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'backstage/backstage'
|
||||
steps:
|
||||
- name: PR sync
|
||||
uses: backstage/actions/pr-sync@v0.2.2
|
||||
with:
|
||||
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
@@ -1,37 +0,0 @@
|
||||
name: Approve renovate lock file changes
|
||||
on:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- '.github/workflows/sync_renovate-changesets.yml'
|
||||
- '**/yarn.lock'
|
||||
|
||||
jobs:
|
||||
generate-changeset:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.actor == 'renovate[bot]' && github.repository == 'backstage/backstage'
|
||||
steps:
|
||||
- name: Approve
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
github-token: ${{ secrets.GH_SERVICE_ACCOUNT_TOKEN }}
|
||||
script: |
|
||||
const owner = 'backstage';
|
||||
const repo = 'backstage';
|
||||
|
||||
const r = await github.rest.pulls.listFiles({
|
||||
owner,
|
||||
repo,
|
||||
pull_number: context.issue.number,
|
||||
});
|
||||
|
||||
if (r.data.some((f) => f.filename.split('/').slice(-1)[0] !== 'yarn.lock')) {
|
||||
console.log('skipping approval since some files are not yarn.lock');
|
||||
return;
|
||||
}
|
||||
|
||||
await github.rest.pulls.createReview({
|
||||
owner,
|
||||
repo,
|
||||
pull_number: context.issue.number,
|
||||
event: 'APPROVE'
|
||||
})
|
||||
@@ -14,33 +14,15 @@ jobs:
|
||||
# Fetch changes to previous commit - required for 'only_changed' in Prettier action
|
||||
fetch-depth: 0
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: Run Prettier on ADOPTERS.md
|
||||
uses: creyD/prettier_action@v4.2
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
name: Sync Issue Labels
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
jobs:
|
||||
label-issue:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'backstage/backstage'
|
||||
steps:
|
||||
- name: View context attributes
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const keywords = {
|
||||
'techdocs|tech-docs|tech docs': 'docs-like-code',
|
||||
'search': 'search',
|
||||
'catalog': 'catalog',
|
||||
'scaffolder': 'scaffolder',
|
||||
};
|
||||
|
||||
const labels = Object.entries(keywords)
|
||||
.map(([regexp, label]) => {
|
||||
if (new RegExp(regexp, 'gi').test(context.payload.issue.title)) {
|
||||
return label;
|
||||
}
|
||||
})
|
||||
.filter(Boolean);
|
||||
|
||||
if(!labels.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels
|
||||
});
|
||||
@@ -1,10 +1,7 @@
|
||||
name: Sync Release Manifest
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version number, without any 'v' prefix
|
||||
required: true
|
||||
repository_dispatch:
|
||||
types: [release-published]
|
||||
|
||||
jobs:
|
||||
create-new-version:
|
||||
@@ -23,7 +20,7 @@ jobs:
|
||||
with:
|
||||
path: backstage
|
||||
# 'v' prefix is added here for the tag, we keep it out of the manifest logic
|
||||
ref: v${{ github.event.inputs.version }}
|
||||
ref: v${{ github.event.client_payload.version }}
|
||||
|
||||
# Checkout backstage/versions into /backstage/versions, which is where store the output
|
||||
- name: Checkout versions
|
||||
@@ -44,10 +41,10 @@ jobs:
|
||||
cd backstage
|
||||
mkdir -p scripts
|
||||
wget -O scripts/assemble-manifest.js https://raw.githubusercontent.com/backstage/backstage/master/scripts/assemble-manifest.js
|
||||
node scripts/assemble-manifest.js ${{ github.event.inputs.version }}
|
||||
node scripts/assemble-manifest.js ${{ github.event.client_payload.version }}
|
||||
cd versions
|
||||
git add .
|
||||
git commit -am "${{ github.event.inputs.version }}"
|
||||
git commit -am "${{ github.event.client_payload.version }}"
|
||||
git push
|
||||
|
||||
- name: Dispatch update-helper update
|
||||
|
||||
@@ -16,33 +16,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- name: Create Snyk report
|
||||
uses: snyk/actions/node@master
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
name: Verify DCO
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/15 * * * *'
|
||||
|
||||
jobs:
|
||||
dco-helper:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Verify DCO status for open pull requests
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const owner = "backstage";
|
||||
const repo = "backstage";
|
||||
const pulls = await github.paginate(github.rest.pulls.list, {
|
||||
state: "open",
|
||||
owner,
|
||||
repo,
|
||||
});
|
||||
|
||||
for (const pull of pulls) {
|
||||
// Pick out the PRs that have the DCO check
|
||||
const checks = await github.rest.checks.listForRef({
|
||||
owner,
|
||||
repo,
|
||||
ref: pull.head.sha,
|
||||
check_name: "DCO",
|
||||
status: "completed",
|
||||
});
|
||||
// Skip if there are no checks
|
||||
if (!checks.data.check_runs.length) {
|
||||
continue;
|
||||
}
|
||||
// Skip if the conclusion is not action_required
|
||||
if (checks.data.check_runs[0].conclusion !== "action_required") {
|
||||
console.log(`No checks found for PR #${pull.number}, skipping`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const comments = await github.paginate(github.rest.issues.listComments, {
|
||||
owner,
|
||||
repo,
|
||||
issue_number: pull.number,
|
||||
});
|
||||
if (comments.find((c) =>
|
||||
c.user.login === "github-actions[bot]" &&
|
||||
c.body.includes("<!-- dco -->")
|
||||
)
|
||||
) {
|
||||
console.log(`already commented on PR #${pull.number}, skipping`);
|
||||
continue;
|
||||
}
|
||||
console.log(`creating comment on PR #${pull.number}`);
|
||||
const body = `
|
||||
Thanks for the contribution!
|
||||
All commits need to be DCO signed before they are reviewed. Please refer to the the [DCO section in CONTRIBUTING.md](https://github.com/backstage/backstage/blob/master/CONTRIBUTING.md#developer-certificate-of-origin) or the [DCO](${checks.data.check_runs[0].html_url}) status for more info.
|
||||
<!-- dco -->`;
|
||||
await github.rest.issues.createComment({
|
||||
repo,
|
||||
owner,
|
||||
issue_number: pull.number,
|
||||
body,
|
||||
});
|
||||
}
|
||||
@@ -40,35 +40,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: setup chrome
|
||||
uses: browser-actions/setup-chrome@latest
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
|
||||
- run: yarn tsc
|
||||
- run: yarn backstage-cli repo build
|
||||
|
||||
@@ -17,44 +17,30 @@ on:
|
||||
|
||||
jobs:
|
||||
chromatic:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
node-version: [16.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Required to retrieve git history
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: cache all node_modules
|
||||
id: cache-modules
|
||||
uses: actions/cache@v3
|
||||
- name: yarn install
|
||||
uses: backstage/actions/yarn-install@v0.2.2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-v${{ matrix.node-version }}-node_modules-${{ hashFiles('yarn.lock', '**/package.json') }}
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
if: steps.cache-modules.outputs.cache-hit != 'true'
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
- name: top-level install
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
|
||||
- name: storybook yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
working-directory: storybook
|
||||
# End of yarn setup
|
||||
|
||||
- run: yarn build-storybook
|
||||
|
||||
|
||||
@@ -26,25 +26,15 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# Beginning of yarn setup, keep in sync between all workflows, see ci.yml
|
||||
- name: use node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
registry-url: https://registry.npmjs.org/ # Needed for auth
|
||||
- name: find location of global yarn cache
|
||||
id: yarn-cache
|
||||
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||
- name: cache global yarn cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
|
||||
# Windows file operation slowness means there's no point caching this
|
||||
- name: yarn install
|
||||
run: yarn install --frozen-lockfile
|
||||
# End of yarn setup
|
||||
|
||||
- name: lint
|
||||
run: yarn backstage-cli repo lint
|
||||
|
||||
@@ -5,6 +5,7 @@ coverage
|
||||
*.hbs
|
||||
templates
|
||||
api-report.md
|
||||
cli-report.md
|
||||
plugins/scaffolder-backend/sample-templates
|
||||
.vscode
|
||||
dist-types
|
||||
|
||||
+7
-2
@@ -1,6 +1,8 @@
|
||||
# Adopters
|
||||
|
||||
_If you're using Backstage in your organization, please try to add your company name to this list. This really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact._
|
||||
_If you're using Backstage in your organization, please try to add your company name to this list. It really helps the project to gain momentum and credibility. It's a small contribution back to the project with a big impact._
|
||||
_You can do this by using the [Adopter form](https://form.typeform.com/to/zcOaKikB) or by editing this file after following the [CONTRIBUTING.md](./CONTRIBUTING.md)._
|
||||
|
||||
|
||||
| Organization | Contact | Description of Use |
|
||||
|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
@@ -36,7 +38,7 @@ _If you're using Backstage in your organization, please try to add your company
|
||||
| [PagerDuty](https://www.pagerduty.com/) | [Mark Shaw](https://github.com/markshawtoronto) | Developer portal, initially focused on software templates and tech-docs. |
|
||||
| [MoonShiner](https://moonshiner.at) | [Fabian Hippmann](https://github.com/FabianHippmann) | Developer portal - helps us keep track of our customer projects, onboard new developers & improve our development process 🌕🚀🧑🚀 |
|
||||
| [FundApps](https://www.fundapps.co/) | [Elliot Greenwood](https://github.com/egnwd) | Developer Portal - A place for us to keep track of our projects and documentation for all services and processes |
|
||||
| [DAZN](https://dazn.com/) | [Lou Bichard](https://twitter.com/loujaybee), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com), [Kamil Wolny](https://github.com/mrwolny) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). |
|
||||
| [DAZN](https://dazn.com/) | [David Rubio Vidal](https://github.com/davidrv87), [Marco Crivellaro](https://github.com/crivetechie), [Alex Hollerith](mailto:alex.hollerith@dazn.com), [Kamil Wolny](https://github.com/mrwolny) | Ingesting all of DAZN's repos for the catalog, migrating our internal platform apps (pull request boards, release information, inner source marketplace etc) to Backstage plugins (where applicable). |
|
||||
| [HelloFresh](https://www.hellofresh.de/) | [@iammuho](https://github.com/iammuho), [@ElenaForester](https://github.com/ElenaForester), [@diegomarangoni](https://github.com/diegomarangoni) | Our developer portal at HelloFresh - Spread across an organisation of 500+ engineers globally. |
|
||||
| [FactSet](https://www.factset.com/) | [@kuangp](https://github.com/kuangp) | Developer portal to provide discoverability to all internal components, APIs, documentation, and scaffold templates with integrations to our internal infrastructure tools. |
|
||||
| [Workrise](https://www.workrise.com/) | [Michael Rode](https://github.com/michaelrode) | Developer portal, main gateway to our infrastructure, documentation and internal tooling. |
|
||||
@@ -185,3 +187,6 @@ _If you're using Backstage in your organization, please try to add your company
|
||||
| [Clarivate](https://www.clarivate.com) | [Gabriele Carteni](mailto:gabriele.carteni@clarivate.com) | We are building our Developer Portal using Backstage to have a better control over our software ecosystem, integrate SDLC tools and promote best practices |
|
||||
| [Cho Tot](https://www.chotot.com) | [Chotot Team](mailto:sre@chotot.vn) | Internal developer portal, service catalog with CI/CD tools. |
|
||||
| [William Hill](https://www.williamhillgroup.com/) | [Pat Mills](mailto:pat.mills@williamhill.com), [Nathan Flynn](mailto:nflynn@williamhill.co.uk), and [Nishkarsh Raj](mailto:nishkarsh.raj@williamhill.co.uk) | William Hill are leveraging Backstage to build our Engineering Portal. Our mission is to centralize the software catalog inventory to enable service discoverability, reduce the onboarding time for new Engineers, provide a single pane of glass to accelerate Developer Productivity and Save Engineers time. Our aspiration is to create an InnerSource community focussed on organization-wide patterns that are re-usable and can be self-served with the Scaffolder. |
|
||||
| [Vodafone NewZealand Limited](https://vodafone.co.nz) | [Ankit Gupta](mailto:ankit.gupta@vodafone.nz), [DevOps COE](mailto:devopstooling@vodafone.nz) | Vodafone NZ are leveraging Backstage to build centralised and self service Engineering Portal. Our mission is to standardised Pipeline templates across the Engineering teams, One shop stop to create the pipelines and repository with a template approach which reduces creation part from days to minutes and no wait time for developers. A unified view for Azure DevOps pipeline, Azure Repo pull requests, Deployment status from Azure RedHat Openshift-ArgoCD and SonarQube Security and code quality scans report on a single pan to provide a streamlined view for all microservices across the app stack. |
|
||||
| [Coamo](http://www.coamo.com.br) | [@holiiveira](https://github.com/holiiveira), [@gpxlnx](https://github.com/gpxlnx) | We're starting to use it as the main tool of a DevOps platform. Our goal is to provide software templates, centralize our software catalog enabling efficient service discovery, and make it easy to manage the entire software ecosystem in one place.
|
||||
|
|
||||
|
||||
+2
-2
@@ -58,9 +58,9 @@ If you are proposing a feature:
|
||||
- Remember that this is a volunteer-driven project, and that contributions
|
||||
are welcome :)
|
||||
|
||||
### Add your company to ADOPTERS
|
||||
### Add your company to `ADOPTERS`
|
||||
|
||||
Have you started using Backstage? Adding your company to [ADOPTERS](ADOPTERS.md) really helps the project.
|
||||
Have you started using Backstage? Adding your company to [ADOPTERS](ADOPTERS.md) really helps the project, you can do this by filling out this [Adopter form](https://form.typeform.com/to/zcOaKikB).
|
||||
|
||||
## Get Started!
|
||||
|
||||
|
||||
+3
-3
@@ -304,9 +304,9 @@ cross-spawn@^7.0.0:
|
||||
which "^2.0.1"
|
||||
|
||||
cypress@^10.0.0:
|
||||
version "10.2.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a"
|
||||
integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA==
|
||||
version "10.3.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.3.0.tgz#fae8d32f0822fcfb938e79c7c31ef344794336ae"
|
||||
integrity sha512-txkQWKzvBVnWdCuKs5Xc08gjpO89W2Dom2wpZgT9zWZT5jXxqPIxqP/NC1YArtkpmp3fN5HW8aDjYBizHLUFvg==
|
||||
dependencies:
|
||||
"@cypress/request" "^2.88.10"
|
||||
"@cypress/xvfb" "^1.2.4"
|
||||
|
||||
@@ -59,10 +59,38 @@ configured and make the following changes to your backend:
|
||||
|
||||
// Initialize a connection to a search engine.
|
||||
const searchEngine = (await PgSearchEngine.supported(env.database))
|
||||
? await PgSearchEngine.from({ database: env.database })
|
||||
? await PgSearchEngine.fromConfig(env.config, { database: env.database })
|
||||
: new LunrSearchEngine({ logger: env.logger });
|
||||
```
|
||||
|
||||
## Optional Configuration
|
||||
|
||||
The following is an example of the optional configuration that can be applied when using Postgres as the search backend. Currently this is mostly for just the highlight feature:
|
||||
|
||||
```yaml
|
||||
search:
|
||||
pg:
|
||||
highlightOptions:
|
||||
useHighlight: true # Used to enable to disable the highlight feature. The default value is true
|
||||
maxWord: 35 # Used to set the longest headlines to output. The default value is 35.
|
||||
minWord: 15 # Used to set the shortest headlines to output. The default value is 15.
|
||||
shortWord: 3 # Words of this length or less will be dropped at the start and end of a headline, unless they are query terms. The default value of three (3) eliminates common English articles.
|
||||
highlightAll: false # If true the whole document will be used as the headline, ignoring the preceding three parameters. The default is false.
|
||||
maxFragments: 0 # Maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details).
|
||||
fragmentDelimiter: ' ... ' # Delimiter string used to concatenate fragments. Defaults to " ... ".
|
||||
```
|
||||
|
||||
**Note:** the highlight search term feature uses `ts_headline` which has been known to potentially impact performance. You only need this minimal config to disable it should you have issues:
|
||||
|
||||
```yaml
|
||||
search:
|
||||
pg:
|
||||
highlightOptions:
|
||||
useHighlight: false
|
||||
```
|
||||
|
||||
The Postgres documentation on [Highlighting Results](https://www.postgresql.org/docs/current/textsearch-controls.html#TEXTSEARCH-HEADLINE) has more details.
|
||||
|
||||
## ElasticSearch
|
||||
|
||||
Backstage supports ElasticSearch search engine connections, indexing and
|
||||
@@ -80,15 +108,16 @@ const searchEngine = await ElasticSearchSearchEngine.initialize({
|
||||
const indexBuilder = new IndexBuilder({ logger: env.logger, searchEngine });
|
||||
```
|
||||
|
||||
For the engine to be available, your backend package needs a dependency into
|
||||
For the engine to be available, your backend package needs a dependency on
|
||||
package `@backstage/plugin-search-backend-module-elasticsearch`.
|
||||
|
||||
ElasticSearch needs some additional configuration before it is ready to use
|
||||
within your instance. The configuration options are documented in the
|
||||
[configuration schema definition file.](https://github.com/backstage/backstage/blob/master/plugins/search-backend-module-elasticsearch/config.d.ts)
|
||||
|
||||
The underlying functionality is using official ElasticSearch client version 7.x,
|
||||
meaning that ElasticSearch version 7 is the only one confirmed to be supported.
|
||||
The underlying functionality uses either the official ElasticSearch client
|
||||
version 7.x (meaning that ElasticSearch version 7 is the only one confirmed to
|
||||
be supported), or the OpenSearch client, when the `aws` provider is configured.
|
||||
|
||||
Should you need to create your own bespoke search experiences that require more
|
||||
than just a query translator (such as faceted search or Relay pagination), you
|
||||
@@ -97,9 +126,19 @@ search clients. The version of the client need not be the same as one used
|
||||
internally by the elastic search engine plugin. For example:
|
||||
|
||||
```typescript
|
||||
import { Client } from '@elastic/elastic-search';
|
||||
import { isOpenSearchCompatible } from '@backstage/plugin-search-backend-module-elasticsearch';
|
||||
import { Client as ElasticClient } from '@elastic/elastic-search';
|
||||
import { Client as OpenSearchClient } from '@opensearch-project/opensearch';
|
||||
|
||||
const client = searchEngine.newClient(options => new Client(options));
|
||||
const client = searchEngine.newClient(options => {
|
||||
// In reality, you would only import / instantiate one of the following, but
|
||||
// for illustrative purposes, here are both:
|
||||
if (isOpenSearchCompatible(options)) {
|
||||
return new OpenSearchClient(options);
|
||||
} else {
|
||||
return new ElasticClient(options);
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
#### Set custom index template
|
||||
|
||||
@@ -106,8 +106,7 @@ with [Static Location Configuration](#static-location-configuration) or a
|
||||
discovery processor like
|
||||
[GitHub Discovery](../../integrations/github/discovery.md). To enforce usage of
|
||||
processors to locate entities we can configure the catalog into `readonly` mode.
|
||||
This configuration disables the mutating backend catalog APIs and disallows
|
||||
users from registering new entities at run-time.
|
||||
This configuration disables registering and deleting locations with the catalog APIs.
|
||||
|
||||
```yaml
|
||||
catalog:
|
||||
@@ -117,6 +116,8 @@ catalog:
|
||||
> **Note that any plugin relying on the catalog API for creating, updating and
|
||||
> deleting entities will not work in this mode.**
|
||||
|
||||
Deleting an entity by UUID, `DELETE /entities/by-uid/:uid`, is allowed when using this mode. It may be rediscovered as noted in [explicit deletion](life-of-an-entity.md#explicit-deletion).
|
||||
|
||||
A common use case for this configuration is when organizations have a remote
|
||||
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
|
||||
|
||||
@@ -86,6 +86,13 @@ contains more information about the required fields.
|
||||
Once we have a `template.yaml` ready, we can then add it to the software catalog
|
||||
for use by the scaffolder.
|
||||
|
||||
> Note: When you add or modify a template, you will need to refresh the location entity.
|
||||
> Otherwise, Backstage won't display the template in the available templates,
|
||||
> or it will keep showing the old template. You can refresh the location instance by
|
||||
> going into `Catalog` web page, choosing `Locations` instead of `Components`, and selecting the correct location entity.
|
||||
> From there, you can click on the refresh icon representing "Scheduled entity refresh" action.
|
||||
> Afterwards, you should see your template updated.
|
||||
|
||||
You can add the template files to the catalog through
|
||||
[static location configuration](../software-catalog/configuration.md#static-location-configuration),
|
||||
for example:
|
||||
@@ -97,6 +104,8 @@ catalog:
|
||||
target: https://github.com/backstage/software-templates/blob/main/scaffolder-templates/react-ssr-template/template.yaml
|
||||
rules:
|
||||
- allow: [Template]
|
||||
- type: file
|
||||
target: template.yaml # Backstage will expect the file to be in packages/backend/template.yaml
|
||||
```
|
||||
|
||||
Or you can add the template using the `catalog-import` plugin, which unless
|
||||
|
||||
@@ -9,8 +9,9 @@ by writing custom actions which can be used along side our
|
||||
[built-in actions](./builtin-actions.md).
|
||||
|
||||
> Note: When adding custom actions, the actions array will **replace the
|
||||
> built-in actions too**. To ensure you can continue to include the builtin
|
||||
> actions, see below to include them during registration of your action.
|
||||
> built-in actions too**. Meaning, you will no longer be able to use them.
|
||||
> If you want to continue using the builtin actions, include them in the actions
|
||||
> array when registering your custom actions, as seen below.
|
||||
|
||||
## Writing your Custom Action
|
||||
|
||||
@@ -122,27 +123,32 @@ will set the available actions that the scaffolder has access to.
|
||||
```ts
|
||||
import { createBuiltinActions } from '@backstage/plugin-scaffolder-backend';
|
||||
import { ScmIntegrations } from '@backstage/integration';
|
||||
import { createNewFileAction } from './actions/custom';
|
||||
|
||||
const integrations = ScmIntegrations.fromConfig(env.config);
|
||||
export default async function createPlugin(
|
||||
env: PluginEnvironment,
|
||||
): Promise<Router> {
|
||||
const catalogClient = new CatalogClient({ discoveryApi: env.discovery });
|
||||
const integrations = ScmIntegrations.fromConfig(env.config);
|
||||
|
||||
const builtInActions = createBuiltinActions({
|
||||
containerRunner,
|
||||
integrations,
|
||||
catalogClient,
|
||||
config: env.config,
|
||||
reader: env.reader,
|
||||
});
|
||||
const builtInActions = createBuiltinActions({
|
||||
integrations,
|
||||
catalogClient,
|
||||
config: env.config,
|
||||
reader: env.reader,
|
||||
});
|
||||
|
||||
const actions = [...builtInActions, createNewFileAction()];
|
||||
return await createRouter({
|
||||
containerRunner,
|
||||
catalogClient,
|
||||
actions,
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
database: env.database,
|
||||
reader: env.reader,
|
||||
});
|
||||
const actions = [...builtInActions, createNewFileAction()];
|
||||
|
||||
return createRouter({
|
||||
actions,
|
||||
catalogClient: catalogClient,
|
||||
logger: env.logger,
|
||||
config: env.config,
|
||||
database: env.database,
|
||||
reader: env.reader,
|
||||
});
|
||||
}
|
||||
```
|
||||
|
||||
## List of custom action packages
|
||||
|
||||
@@ -320,6 +320,30 @@ The `allowedHosts` part should be set to where you wish to enable this template
|
||||
to publish to. And it can be any host that is listed in your `integrations`
|
||||
config in `app-config.yaml`.
|
||||
|
||||
Besides specifying `allowedHosts` you can also restrict the template to publish to
|
||||
repositories owned by specific users/groups/namespaces by setting the `allowedOwners`
|
||||
option. With the `allowedRepos` option you are able to narrow it down further to a
|
||||
specific set of repository names. A full example could look like this:
|
||||
|
||||
```yaml
|
||||
- title: Choose a location
|
||||
required:
|
||||
- repoUrl
|
||||
properties:
|
||||
repoUrl:
|
||||
title: Repository Location
|
||||
type: string
|
||||
ui:field: RepoUrlPicker
|
||||
ui:options:
|
||||
allowedHosts:
|
||||
- github.com
|
||||
allowedOwners:
|
||||
- backstage
|
||||
- someGithubUser
|
||||
allowedRepos:
|
||||
- backstage
|
||||
```
|
||||
|
||||
The `RepoUrlPicker` is a custom field that we provide part of the
|
||||
`plugin-scaffolder`. You can provide your own custom fields by
|
||||
[writing your own Custom Field Extensions](./writing-custom-field-extensions.md)
|
||||
@@ -485,6 +509,64 @@ the value of `firstName` from the parameters). This is great for passing the
|
||||
values from the form into different steps and reusing these input variables.
|
||||
These template strings preserve the type of the parameter.
|
||||
|
||||
The `${{ parameters.firstName }}` pattern will work only in the template file.
|
||||
If you want to start using values provided from the UI in your code, you will have to use
|
||||
the `${{ values.firstName }}` pattern. Additionally, you have to pass
|
||||
the parameters from the UI to the input of the `fetch:template` step.
|
||||
|
||||
```yaml
|
||||
apiVersion: scaffolder.backstage.io/v1beta3
|
||||
kind: Template
|
||||
metadata:
|
||||
name: v1beta3-demo
|
||||
title: Test Action
|
||||
description: scaffolder v1beta3 template demo
|
||||
spec:
|
||||
owner: backstage/techdocs-core
|
||||
type: service
|
||||
parameters:
|
||||
- title: Fill in some steps
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
name:
|
||||
title: Name
|
||||
type: string
|
||||
description: Unique name of your project
|
||||
urlParameter:
|
||||
title: URL endpoint
|
||||
type: string
|
||||
description: URL endpoint at which the component can be reached
|
||||
default: 'https://www.example.com'
|
||||
enabledDB:
|
||||
title: Enable Database
|
||||
type: boolean
|
||||
default: false
|
||||
...
|
||||
steps:
|
||||
- id: fetch-base
|
||||
name: Fetch Base
|
||||
action: fetch:template
|
||||
input:
|
||||
url: ./template
|
||||
values:
|
||||
name: ${{ parameters.name }}
|
||||
url: ${{ parameters.urlParameter }}
|
||||
enabledDB: ${{ parameters.enabledDB }}
|
||||
```
|
||||
|
||||
Afterwards, if you are using the builtin templating action, you can start using
|
||||
the variables in your code. You can use also any other templating functions from
|
||||
[Nunjucks](https://mozilla.github.io/nunjucks/templating.html#tags) as well.
|
||||
|
||||
```bash
|
||||
#!/bin/bash
|
||||
echo "Hi my name is ${{ values.name }}, and you can fine me at ${{ values.url }}!"
|
||||
{% if values.enabledDB %}
|
||||
echo "You have enabled your database!"
|
||||
{% endif %}
|
||||
```
|
||||
|
||||
As you can see above in the `Outputs` section, `actions` and `steps` can also
|
||||
output things. You can grab that output using `steps.$stepId.output.$property`.
|
||||
|
||||
|
||||
@@ -52,6 +52,8 @@ Addons are rendered in the order in which they are registered.
|
||||
|
||||
## Installing and using Addons
|
||||
|
||||
To start using Addons you need to add the `@backstage/plugin-techdocs-module-addons-contrib` package to your app. You can do that by running this command from the root of your project: `yarn add --cwd packages/app @backstage/plugin-techdocs-module-addons-contrib`
|
||||
|
||||
Addons can be installed and configured in much the same way as extensions for
|
||||
other Backstage plugins: by adding them underneath an extension registry
|
||||
component (`<TechDocsAddons>`) under the route representing the TechDocs Reader
|
||||
@@ -74,6 +76,18 @@ import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
|
||||
</Route>;
|
||||
```
|
||||
|
||||
If you are using a custom [TechDocs reader page](./how-to-guides.md#how-to-customize-the-techdocs-reader-page) your setup will be very similar, here's an example:
|
||||
|
||||
```ts
|
||||
<Route path="/docs/:namespace/:kind/:name/*" element={<TechDocsReaderPage />}>
|
||||
<TechDocsAddons>
|
||||
<ReportIssue />
|
||||
{/* Other addons can be added here. */}
|
||||
</TechDocsAddons>
|
||||
{techDocsPage} // This is your custom TechDocs reader page
|
||||
</Route>
|
||||
```
|
||||
|
||||
The process for configuring Addons on the documentation tab on the entity page
|
||||
is very similar; instead of adding the `<TechDocsAddons>` registry under a
|
||||
`<Route>`, you'd add it as a child of `<EntityTechdocsContent />`:
|
||||
|
||||
@@ -160,7 +160,8 @@ techdocs:
|
||||
|
||||
# techdocs.cache is optional, and is only recommended when you've configured
|
||||
# an external techdocs.publisher.type above. Also requires backend.cache to
|
||||
# be configured with a valid cache store.
|
||||
# be configured with a valid cache store. Configure techdocs.cache.ttl to
|
||||
# enable caching of techdocs assets.
|
||||
cache:
|
||||
# Represents the number of milliseconds a statically built asset should
|
||||
# stay cached. Cache invalidation is handled automatically by the frontend,
|
||||
|
||||
+38
-42
@@ -15,9 +15,9 @@ work"](#future-work). With "next" we mean features planned for release within
|
||||
the ongoing quarter from April through June 2022. With "future" we mean
|
||||
features on the radar, but not yet scheduled.
|
||||
|
||||
| [What's next](#whats-next) | [Future work](#future-work) |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
||||
| [Ease of onboarding](#ease-of-onboarding) <br/> [Backstage Search 1.0](#search-1.0) <br/> [TechDocs Addon Framework](#techdocs-addon-framework) <br/> [Backend Services (initial)](#backend-services-initial) <br/> [Backstage Security Audit](#backstage-security-audit) <br/> [SIGs for contributors](#sigs-for-contributors) | Security Plan (and Strategy) <br/> Composable Homepage 1.0 <br/> GraphQL <br/> Telemetry <br/> Improved UX design |
|
||||
| [What's next](#whats-next) | [Future work](#future-work) |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| [Backstage Search 1.0](#search-1.0) <br/> [Backend Services (MVP)](#backend-services-mvp) <br/> [Backstage Security Audit](#backstage-security-audit) <br/> [Backstage Threat Model](#backstage-threat-model) <br/> [TechDocs Addon Framework](#techdocs-addon-framework) <br/> [Software Catalog pagination](#software-catalog-pagination) <br/> [More SIGs](#more-sigs) | Ease of onboarding <br/> Composable Homepage 1.0 <br/> Creator experience <br/> GraphQL <br/> Telemetry |
|
||||
|
||||
The long-term roadmap (12 - 36 months) is not detailed in the public roadmap.
|
||||
Third-party contributions are also not currently included in the roadmap. Let us
|
||||
@@ -30,47 +30,22 @@ The feature set below is planned for the ongoing quarter, and grouped by theme.
|
||||
The list order doesn't necessarily reflect priority, and the development/release
|
||||
cycle will vary based on maintainer schedules.
|
||||
|
||||
### Ease of onboarding
|
||||
|
||||
A faster (with less development) and easier setup of a proof-of-concept
|
||||
deployment, as part of the onboarding experience, has been a common and loud
|
||||
suggestion from new adopters as well as analysts looking at Backstage.
|
||||
|
||||
With this initiative we plan to start facing this important topic with the most
|
||||
commonly used and challenging tasks. More in particular we plan to reduce the
|
||||
effort required to go from zero to production in installing and customizing
|
||||
Backstage, as well as reducing the effort required to populate the Software
|
||||
Catalog.
|
||||
|
||||
More iterations will be required in the following quarters, but this will be a
|
||||
good improvement in the onboarding experience, especially for the benefit of new
|
||||
adopters.
|
||||
|
||||
### Backstage Search 1.0
|
||||
|
||||
Fix the few remaining issues to get Backstage Search platform up to 1.0. For more information, see the [Backstage Search documentation and roadmap page](https://backstage.io/docs/features/search/search-overview).
|
||||
|
||||
### TechDocs Addon Framework
|
||||
|
||||
Addons are TechDocs features that are added on top of the base docs-like-code experience. An example would be a feature that showed comments on the page. We plan to add an Addon framework and open source a selection of the Addons that we use internally at Spotify. We encourage the Backstage community to add further Addons.
|
||||
|
||||
For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons)
|
||||
|
||||
For general information about TechDocs including roadmap, see [here](https://backstage.io/docs/features/techdocs/techdocs-overview).
|
||||
|
||||
### Backend Services (initial)
|
||||
### Backend Services (MVP)
|
||||
|
||||
To better scale and maintain the Backstage instances, a backend services system
|
||||
is planned to be introduced as part of the software architecture. This layer of
|
||||
backend services will help in decoupling the various modules (e.g. Catalog and
|
||||
Scaffolder) from the frontend experience.
|
||||
|
||||
In this quarter we plan to start designing the new architecture, together with
|
||||
the first experimentation and development of the software components.
|
||||
After the experimentation and design happened in the past quarter, soon we plan to release a first version to start providing the first benefits to adopters and developers.
|
||||
|
||||
### Backstage Security Audit
|
||||
|
||||
This is the continuation of the initiative started in the previous quarter. This
|
||||
This is the continuation of the initiative started in the previous quarters. This
|
||||
quarter will see the publication of the report describing the outcome of the
|
||||
audit, together the first fixes and the development of some of the changes
|
||||
required to address the vulnerabilities.
|
||||
@@ -84,12 +59,34 @@ initiative.
|
||||
This initiative is done together with, and with the support of, the [Cloud
|
||||
Native Computing Foundation (CNCF)](https://www.cncf.io/).
|
||||
|
||||
### SIGs for contributors
|
||||
### Backstage Threat Model
|
||||
|
||||
The request to better coordinate the increasing number of contributions coming
|
||||
from the various adopters' developers is loud and clear. We think that the
|
||||
community is mature enough to start launching the SIGs (Special Interest Groups)
|
||||
following the successful model of Kubernetes.
|
||||
This is another (relevant) initiative planned to make Backstage a secure product for the adopters. The goals of this initiative are:
|
||||
|
||||
1. Understand where security investment and attention is needed.
|
||||
2. Guide the upcoming security audit.
|
||||
3. Communicate expectations to Backstage adopters and inform and attract security researchers.
|
||||
|
||||
The planned artifacts are:
|
||||
|
||||
- Concise high level threat model that will be included as part of the Backstage security documentation.
|
||||
- Granular threat model created in conjunction with the security audit to inform further security investment areas for Backstage.
|
||||
|
||||
### TechDocs Addon Framework
|
||||
|
||||
Addons are TechDocs features that are added on top of the base docs-like-code experience. An example would be a feature that showed comments on the page. We plan to add an Addon framework and open source a selection of the Addons that we use internally at Spotify. We encourage the Backstage community to add further Addons.
|
||||
|
||||
For more information about the TechDocs Addon Framework, see the documentation page [here](https://backstage.io/docs/features/techdocs/addons).
|
||||
|
||||
For general information about TechDocs including roadmap, see [here](https://backstage.io/docs/features/techdocs/techdocs-overview).
|
||||
|
||||
### Software Catalog pagination
|
||||
|
||||
Today adopters with a big catalog (with several thousands of software components) might not have an ideal end-user experience when viewing the `/catalog` page. The issue is related to how the entities are fetched by the frontend. In order to provide a better end-user experience the pagination of the catalog’s entities needs to be enforced. Some experimentation is already completed but in this quarter we plan to continue, and hopefully complete, this relevant enhancement.
|
||||
|
||||
### More SIGs
|
||||
|
||||
In the last quarter we launched the [Catalog SIG (Special Interest Group)](https://github.com/backstage/community/tree/main/sigs/sig-catalog) to better coordinate the increasing number of contributions to the project. We think that this is the proper path to follow to engage more with the contributors. For this reason we will launch other SIGs dedicated to the most interesting topics for the community.
|
||||
|
||||
## Future work
|
||||
|
||||
@@ -97,18 +94,17 @@ The following feature list doesn't represent a commitment to develop, and the
|
||||
list order doesn't reflect any priority or importance, but these features are on
|
||||
the maintainers' radar, with clear interest expressed by the community.
|
||||
|
||||
- **Security Plan (and Strategy):** The purpose of the Security Strategy is to
|
||||
move another step along the path to maturing the platform, setting the
|
||||
expectations of any adopters from a security standpoint.
|
||||
- **Ease of onboarding:** A faster (with less development) and easier setup of
|
||||
Backstage and the most relevant/adopted plugins.
|
||||
- **Composable Homepage 1.0:** Driving this to 1.0 by adding some composable
|
||||
components.
|
||||
- **Creator experience:** Provide a better Backstage user experience through
|
||||
visual guidelines and templates, especially navigation across plug-ins and
|
||||
portal functionalities.
|
||||
- **[GraphQL](https://graphql.org/) support:** Introduce the ability to query
|
||||
Backstage backend services with a standard query language for APIs.
|
||||
- **Telemetry:** To efficiently generate logging and metrics in such a way that
|
||||
adopters can get insights so that Backstage can be monitored and improved.
|
||||
- **Improved UX design:** Provide a better Backstage user experience through
|
||||
visual guidelines and templates, especially navigation across plug-ins and
|
||||
portal functionalities.
|
||||
|
||||
## How to influence the roadmap
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -49,7 +49,7 @@
|
||||
"@types/react": "^17",
|
||||
"@types/react-dom": "^17"
|
||||
},
|
||||
"version": "1.4.0-next.0",
|
||||
"version": "1.4.0-next.1",
|
||||
"dependencies": {
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
"@microsoft/api-documenter": "^7.17.11",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @backstage/app-defaults
|
||||
|
||||
## 1.0.4-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.6-next.1
|
||||
- @backstage/theme@0.2.16-next.0
|
||||
- @backstage/plugin-permission-react@0.4.3-next.0
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/app-defaults",
|
||||
"description": "Provides the default wiring of a Backstage App",
|
||||
"version": "1.0.4-next.0",
|
||||
"version": "1.0.4-next.1",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -33,11 +33,11 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.1",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/plugin-permission-react": "^0.4.2",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@backstage/plugin-permission-react": "^0.4.3-next.0",
|
||||
"@backstage/theme": "^0.2.16-next.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"react-router-dom": "6.0.0-beta.0"
|
||||
@@ -46,8 +46,8 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@backstage/test-utils": "^1.1.2-next.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@types/jest": "^26.0.7",
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.73-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.6-next.1
|
||||
- @backstage/cli@0.18.0-next.1
|
||||
- @backstage/plugin-apache-airflow@0.2.0-next.1
|
||||
- @backstage/catalog-model@1.1.0-next.1
|
||||
- @backstage/plugin-search@0.9.1-next.1
|
||||
- @backstage/plugin-org@0.5.7-next.1
|
||||
- @backstage/plugin-catalog@1.3.1-next.1
|
||||
- @backstage/plugin-home@0.4.23-next.1
|
||||
- @backstage/plugin-stack-overflow@0.1.3-next.1
|
||||
- @backstage/theme@0.2.16-next.0
|
||||
- @backstage/plugin-techdocs@1.2.1-next.1
|
||||
- @backstage/app-defaults@1.0.4-next.1
|
||||
- @backstage/integration-react@1.1.2-next.1
|
||||
- @backstage/plugin-airbrake@0.3.7-next.1
|
||||
- @backstage/plugin-api-docs@0.8.7-next.1
|
||||
- @backstage/plugin-azure-devops@0.1.23-next.1
|
||||
- @backstage/plugin-badges@0.2.31-next.1
|
||||
- @backstage/plugin-catalog-common@1.0.4-next.0
|
||||
- @backstage/plugin-catalog-graph@0.2.19-next.1
|
||||
- @backstage/plugin-catalog-import@0.8.10-next.1
|
||||
- @backstage/plugin-catalog-react@1.1.2-next.1
|
||||
- @backstage/plugin-circleci@0.3.7-next.1
|
||||
- @backstage/plugin-cloudbuild@0.3.7-next.1
|
||||
- @backstage/plugin-code-coverage@0.1.34-next.1
|
||||
- @backstage/plugin-cost-insights@0.11.29-next.1
|
||||
- @backstage/plugin-dynatrace@0.1.1-next.1
|
||||
- @backstage/plugin-explore@0.3.38-next.1
|
||||
- @backstage/plugin-gcalendar@0.3.3-next.1
|
||||
- @backstage/plugin-gcp-projects@0.3.26-next.1
|
||||
- @backstage/plugin-github-actions@0.5.7-next.1
|
||||
- @backstage/plugin-gocd@0.1.13-next.1
|
||||
- @backstage/plugin-graphiql@0.2.39-next.1
|
||||
- @backstage/plugin-jenkins@0.7.6-next.1
|
||||
- @backstage/plugin-kafka@0.3.7-next.1
|
||||
- @backstage/plugin-kubernetes@0.6.7-next.1
|
||||
- @backstage/plugin-lighthouse@0.3.7-next.1
|
||||
- @backstage/plugin-newrelic@0.3.25-next.1
|
||||
- @backstage/plugin-newrelic-dashboard@0.1.15-next.1
|
||||
- @backstage/plugin-pagerduty@0.5.0-next.1
|
||||
- @backstage/plugin-permission-react@0.4.3-next.0
|
||||
- @backstage/plugin-rollbar@0.4.7-next.1
|
||||
- @backstage/plugin-scaffolder@1.4.0-next.1
|
||||
- @backstage/plugin-search-common@0.3.6-next.0
|
||||
- @backstage/plugin-sentry@0.3.45-next.1
|
||||
- @backstage/plugin-shortcuts@0.2.8-next.1
|
||||
- @backstage/plugin-tech-insights@0.2.3-next.1
|
||||
- @backstage/plugin-tech-radar@0.5.14-next.1
|
||||
- @backstage/plugin-techdocs-module-addons-contrib@1.0.2-next.1
|
||||
- @backstage/plugin-todo@0.2.9-next.1
|
||||
- @backstage/plugin-user-settings@0.4.6-next.1
|
||||
- @backstage/plugin-search-react@0.2.2-next.1
|
||||
|
||||
## 0.2.73-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+53
-53
@@ -1,67 +1,67 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.73-next.0",
|
||||
"version": "0.2.73-next.1",
|
||||
"private": true,
|
||||
"backstage": {
|
||||
"role": "frontend"
|
||||
},
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/app-defaults": "^1.0.4-next.0",
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/app-defaults": "^1.0.4-next.1",
|
||||
"@backstage/catalog-model": "^1.1.0-next.1",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.1",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/integration-react": "^1.1.2-next.0",
|
||||
"@backstage/plugin-airbrake": "^0.3.7-next.0",
|
||||
"@backstage/plugin-api-docs": "^0.8.7-next.0",
|
||||
"@backstage/plugin-azure-devops": "^0.1.23-next.0",
|
||||
"@backstage/plugin-apache-airflow": "^0.1.15-next.0",
|
||||
"@backstage/plugin-badges": "^0.2.31-next.0",
|
||||
"@backstage/plugin-catalog": "^1.3.1-next.0",
|
||||
"@backstage/plugin-catalog-common": "^1.0.3",
|
||||
"@backstage/plugin-catalog-graph": "^0.2.19-next.0",
|
||||
"@backstage/plugin-catalog-import": "^0.8.10-next.0",
|
||||
"@backstage/plugin-catalog-react": "^1.1.2-next.0",
|
||||
"@backstage/plugin-circleci": "^0.3.7-next.0",
|
||||
"@backstage/plugin-cloudbuild": "^0.3.7-next.0",
|
||||
"@backstage/plugin-code-coverage": "^0.1.34-next.0",
|
||||
"@backstage/plugin-cost-insights": "^0.11.29-next.0",
|
||||
"@backstage/plugin-dynatrace": "^0.1.1-next.0",
|
||||
"@backstage/plugin-explore": "^0.3.38-next.0",
|
||||
"@backstage/plugin-gcalendar": "^0.3.3-next.0",
|
||||
"@backstage/plugin-gcp-projects": "^0.3.26-next.0",
|
||||
"@backstage/plugin-github-actions": "^0.5.7-next.0",
|
||||
"@backstage/plugin-gocd": "^0.1.13-next.0",
|
||||
"@backstage/plugin-graphiql": "^0.2.39-next.0",
|
||||
"@backstage/plugin-home": "^0.4.23-next.0",
|
||||
"@backstage/plugin-jenkins": "^0.7.6-next.0",
|
||||
"@backstage/plugin-kafka": "^0.3.7-next.0",
|
||||
"@backstage/plugin-kubernetes": "^0.6.7-next.0",
|
||||
"@backstage/plugin-lighthouse": "^0.3.7-next.0",
|
||||
"@backstage/plugin-newrelic": "^0.3.25-next.0",
|
||||
"@backstage/plugin-newrelic-dashboard": "^0.1.15-next.0",
|
||||
"@backstage/plugin-org": "^0.5.7-next.0",
|
||||
"@backstage/plugin-pagerduty": "0.5.0-next.0",
|
||||
"@backstage/plugin-permission-react": "^0.4.2",
|
||||
"@backstage/plugin-rollbar": "^0.4.7-next.0",
|
||||
"@backstage/plugin-scaffolder": "^1.4.0-next.0",
|
||||
"@backstage/plugin-search": "^0.9.1-next.0",
|
||||
"@backstage/plugin-search-react": "^0.2.2-next.0",
|
||||
"@backstage/plugin-search-common": "^0.3.5",
|
||||
"@backstage/plugin-sentry": "^0.3.45-next.0",
|
||||
"@backstage/plugin-shortcuts": "^0.2.8-next.0",
|
||||
"@backstage/plugin-stack-overflow": "^0.1.3-next.0",
|
||||
"@backstage/plugin-tech-radar": "^0.5.14-next.0",
|
||||
"@backstage/plugin-techdocs": "^1.2.1-next.0",
|
||||
"@backstage/integration-react": "^1.1.2-next.1",
|
||||
"@backstage/plugin-airbrake": "^0.3.7-next.1",
|
||||
"@backstage/plugin-api-docs": "^0.8.7-next.1",
|
||||
"@backstage/plugin-azure-devops": "^0.1.23-next.1",
|
||||
"@backstage/plugin-apache-airflow": "^0.2.0-next.1",
|
||||
"@backstage/plugin-badges": "^0.2.31-next.1",
|
||||
"@backstage/plugin-catalog": "^1.3.1-next.1",
|
||||
"@backstage/plugin-catalog-common": "^1.0.4-next.0",
|
||||
"@backstage/plugin-catalog-graph": "^0.2.19-next.1",
|
||||
"@backstage/plugin-catalog-import": "^0.8.10-next.1",
|
||||
"@backstage/plugin-catalog-react": "^1.1.2-next.1",
|
||||
"@backstage/plugin-circleci": "^0.3.7-next.1",
|
||||
"@backstage/plugin-cloudbuild": "^0.3.7-next.1",
|
||||
"@backstage/plugin-code-coverage": "^0.1.34-next.1",
|
||||
"@backstage/plugin-cost-insights": "^0.11.29-next.1",
|
||||
"@backstage/plugin-dynatrace": "^0.1.1-next.1",
|
||||
"@backstage/plugin-explore": "^0.3.38-next.1",
|
||||
"@backstage/plugin-gcalendar": "^0.3.3-next.1",
|
||||
"@backstage/plugin-gcp-projects": "^0.3.26-next.1",
|
||||
"@backstage/plugin-github-actions": "^0.5.7-next.1",
|
||||
"@backstage/plugin-gocd": "^0.1.13-next.1",
|
||||
"@backstage/plugin-graphiql": "^0.2.39-next.1",
|
||||
"@backstage/plugin-home": "^0.4.23-next.1",
|
||||
"@backstage/plugin-jenkins": "^0.7.6-next.1",
|
||||
"@backstage/plugin-kafka": "^0.3.7-next.1",
|
||||
"@backstage/plugin-kubernetes": "^0.6.7-next.1",
|
||||
"@backstage/plugin-lighthouse": "^0.3.7-next.1",
|
||||
"@backstage/plugin-newrelic": "^0.3.25-next.1",
|
||||
"@backstage/plugin-newrelic-dashboard": "^0.1.15-next.1",
|
||||
"@backstage/plugin-org": "^0.5.7-next.1",
|
||||
"@backstage/plugin-pagerduty": "0.5.0-next.1",
|
||||
"@backstage/plugin-permission-react": "^0.4.3-next.0",
|
||||
"@backstage/plugin-rollbar": "^0.4.7-next.1",
|
||||
"@backstage/plugin-scaffolder": "^1.4.0-next.1",
|
||||
"@backstage/plugin-search": "^0.9.1-next.1",
|
||||
"@backstage/plugin-search-react": "^0.2.2-next.1",
|
||||
"@backstage/plugin-search-common": "^0.3.6-next.0",
|
||||
"@backstage/plugin-sentry": "^0.3.45-next.1",
|
||||
"@backstage/plugin-shortcuts": "^0.2.8-next.1",
|
||||
"@backstage/plugin-stack-overflow": "^0.1.3-next.1",
|
||||
"@backstage/plugin-tech-radar": "^0.5.14-next.1",
|
||||
"@backstage/plugin-techdocs": "^1.2.1-next.1",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.2-next.0",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.2-next.0",
|
||||
"@backstage/plugin-todo": "^0.2.9-next.0",
|
||||
"@backstage/plugin-user-settings": "^0.4.6-next.0",
|
||||
"@backstage/plugin-tech-insights": "^0.2.3-next.0",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.2-next.1",
|
||||
"@backstage/plugin-todo": "^0.2.9-next.1",
|
||||
"@backstage/plugin-user-settings": "^0.4.6-next.1",
|
||||
"@backstage/plugin-tech-insights": "^0.2.3-next.1",
|
||||
"@backstage/theme": "^0.2.16-next.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.57",
|
||||
@@ -81,7 +81,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.1",
|
||||
"@rjsf/core": "^3.2.1",
|
||||
"@testing-library/cypress": "^8.0.2",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
|
||||
@@ -167,7 +167,12 @@ const EntityLayoutWrapper = (props: { children?: ReactNode }) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<EntityLayout UNSTABLE_extraContextMenuItems={extraMenuItems}>
|
||||
<EntityLayout
|
||||
UNSTABLE_extraContextMenuItems={extraMenuItems}
|
||||
UNSTABLE_contextMenuOptions={{
|
||||
disableUnregister: 'visible',
|
||||
}}
|
||||
>
|
||||
{props.children}
|
||||
</EntityLayout>
|
||||
<EntityBadgesDialog
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.14.1-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 0fc57887e8: Improve plural handling in logging output for secrets
|
||||
- Updated dependencies
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
- @backstage/integration@1.2.2-next.1
|
||||
- @backstage/config-loader@1.1.3-next.0
|
||||
|
||||
## 0.14.1-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.14.1-next.0",
|
||||
"version": "0.14.1-next.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -36,9 +36,9 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.9",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/config-loader": "^1.1.2",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/integration": "^1.2.2-next.0",
|
||||
"@backstage/config-loader": "^1.1.3-next.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/integration": "^1.2.2-next.1",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@google-cloud/storage": "^6.0.0",
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
@@ -65,7 +65,7 @@
|
||||
"keyv": "^4.0.3",
|
||||
"keyv-memcache": "^1.2.5",
|
||||
"@keyv/redis": "^2.2.3",
|
||||
"knex": "^1.0.2",
|
||||
"knex": "^2.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"logform": "^2.3.2",
|
||||
"luxon": "^2.3.1",
|
||||
@@ -91,8 +91,8 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.1",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@types/archiver": "^5.1.0",
|
||||
"@types/base64-stream": "^1.0.2",
|
||||
"@types/compression": "^1.7.0",
|
||||
|
||||
@@ -251,7 +251,7 @@ export class DatabaseManager {
|
||||
// include base connection if client type has not been overridden
|
||||
...(overridden ? {} : baseConnection),
|
||||
...connection,
|
||||
};
|
||||
} as Partial<Knex.StaticConnectionConfig>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/backend-tasks
|
||||
|
||||
## 0.3.3-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.14.1-next.1
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
|
||||
## 0.3.3-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-tasks",
|
||||
"description": "Common distributed task management library for Backstage backends",
|
||||
"version": "0.3.3-next.0",
|
||||
"version": "0.3.3-next.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -33,13 +33,13 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@types/luxon": "^2.0.4",
|
||||
"cron": "^2.0.0",
|
||||
"knex": "^1.0.2",
|
||||
"knex": "^2.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^2.0.2",
|
||||
"node-abort-controller": "^3.0.1",
|
||||
@@ -48,8 +48,8 @@
|
||||
"zod": "^3.9.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.1",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@types/cron": "^2.0.0",
|
||||
"wait-for-expect": "^3.0.2"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/backend-test-utils
|
||||
|
||||
## 0.1.26-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/cli@0.18.0-next.1
|
||||
- @backstage/backend-common@0.14.1-next.1
|
||||
|
||||
## 0.1.26-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-test-utils",
|
||||
"description": "Test helpers library for Backstage backends",
|
||||
"version": "0.1.26-next.0",
|
||||
"version": "0.1.26-next.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -34,11 +34,11 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.1",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"better-sqlite3": "^7.5.0",
|
||||
"knex": "^1.0.2",
|
||||
"knex": "^2.0.0",
|
||||
"msw": "^0.42.0",
|
||||
"mysql2": "^2.2.5",
|
||||
"pg": "^8.3.0",
|
||||
@@ -46,7 +46,7 @@
|
||||
"uuid": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0"
|
||||
"@backstage/cli": "^0.18.0-next.1"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -1,5 +1,39 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.73-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/plugin-scaffolder-backend@1.4.0-next.1
|
||||
- @backstage/plugin-auth-backend@0.15.0-next.1
|
||||
- @backstage/catalog-model@1.1.0-next.1
|
||||
- @backstage/backend-common@0.14.1-next.1
|
||||
- @backstage/plugin-search-backend-module-elasticsearch@0.2.0-next.1
|
||||
- @backstage/plugin-catalog-backend@1.2.1-next.1
|
||||
- @backstage/plugin-techdocs-backend@1.2.0-next.1
|
||||
- example-app@0.2.73-next.1
|
||||
- @backstage/backend-tasks@0.3.3-next.1
|
||||
- @backstage/catalog-client@1.0.4-next.1
|
||||
- @backstage/integration@1.2.2-next.1
|
||||
- @backstage/plugin-app-backend@0.3.34-next.1
|
||||
- @backstage/plugin-auth-node@0.2.3-next.1
|
||||
- @backstage/plugin-badges-backend@0.1.28-next.1
|
||||
- @backstage/plugin-code-coverage-backend@0.1.32-next.1
|
||||
- @backstage/plugin-jenkins-backend@0.1.24-next.1
|
||||
- @backstage/plugin-kafka-backend@0.2.27-next.1
|
||||
- @backstage/plugin-kubernetes-backend@0.7.0-next.1
|
||||
- @backstage/plugin-permission-backend@0.5.9-next.1
|
||||
- @backstage/plugin-permission-common@0.6.3-next.0
|
||||
- @backstage/plugin-permission-node@0.6.3-next.1
|
||||
- @backstage/plugin-scaffolder-backend-module-rails@0.4.2-next.1
|
||||
- @backstage/plugin-search-backend@0.5.4-next.1
|
||||
- @backstage/plugin-search-backend-module-pg@0.3.5-next.1
|
||||
- @backstage/plugin-search-backend-node@0.6.3-next.1
|
||||
- @backstage/plugin-tech-insights-backend@0.4.2-next.1
|
||||
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.18-next.1
|
||||
- @backstage/plugin-todo-backend@0.1.31-next.1
|
||||
|
||||
## 0.2.73-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.73-next.0",
|
||||
"version": "0.2.73-next.1",
|
||||
"main": "dist/index.cjs.js",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -26,39 +26,39 @@
|
||||
"build-image": "docker build ../.. -f Dockerfile --tag example-backend"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/backend-tasks": "^0.3.3-next.0",
|
||||
"@backstage/catalog-client": "^1.0.4-next.0",
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.1",
|
||||
"@backstage/backend-tasks": "^0.3.3-next.1",
|
||||
"@backstage/catalog-client": "^1.0.4-next.1",
|
||||
"@backstage/catalog-model": "^1.1.0-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/integration": "^1.2.2-next.0",
|
||||
"@backstage/plugin-app-backend": "^0.3.34-next.0",
|
||||
"@backstage/plugin-auth-backend": "^0.14.2-next.0",
|
||||
"@backstage/plugin-auth-node": "^0.2.3-next.0",
|
||||
"@backstage/integration": "^1.2.2-next.1",
|
||||
"@backstage/plugin-app-backend": "^0.3.34-next.1",
|
||||
"@backstage/plugin-auth-backend": "^0.15.0-next.1",
|
||||
"@backstage/plugin-auth-node": "^0.2.3-next.1",
|
||||
"@backstage/plugin-azure-devops-backend": "^0.3.13-next.0",
|
||||
"@backstage/plugin-badges-backend": "^0.1.28-next.0",
|
||||
"@backstage/plugin-catalog-backend": "^1.2.1-next.0",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.32-next.0",
|
||||
"@backstage/plugin-badges-backend": "^0.1.28-next.1",
|
||||
"@backstage/plugin-catalog-backend": "^1.2.1-next.1",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.32-next.1",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.24-next.0",
|
||||
"@backstage/plugin-jenkins-backend": "^0.1.24-next.0",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.7.0-next.0",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.27-next.0",
|
||||
"@backstage/plugin-permission-backend": "^0.5.9-next.0",
|
||||
"@backstage/plugin-permission-common": "^0.6.2",
|
||||
"@backstage/plugin-permission-node": "^0.6.3-next.0",
|
||||
"@backstage/plugin-jenkins-backend": "^0.1.24-next.1",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.7.0-next.1",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.27-next.1",
|
||||
"@backstage/plugin-permission-backend": "^0.5.9-next.1",
|
||||
"@backstage/plugin-permission-common": "^0.6.3-next.0",
|
||||
"@backstage/plugin-permission-node": "^0.6.3-next.1",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.28-next.0",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.31-next.0",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.4.0-next.0",
|
||||
"@backstage/plugin-scaffolder-backend-module-rails": "^0.4.2-next.0",
|
||||
"@backstage/plugin-search-backend": "^0.5.4-next.0",
|
||||
"@backstage/plugin-search-backend-node": "^0.6.3-next.0",
|
||||
"@backstage/plugin-search-backend-module-elasticsearch": "^0.1.6-next.0",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.3.5-next.0",
|
||||
"@backstage/plugin-techdocs-backend": "^1.1.3-next.0",
|
||||
"@backstage/plugin-tech-insights-backend": "^0.4.2-next.0",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.4.0-next.1",
|
||||
"@backstage/plugin-scaffolder-backend-module-rails": "^0.4.2-next.1",
|
||||
"@backstage/plugin-search-backend": "^0.5.4-next.1",
|
||||
"@backstage/plugin-search-backend-node": "^0.6.3-next.1",
|
||||
"@backstage/plugin-search-backend-module-elasticsearch": "^0.2.0-next.1",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.3.5-next.1",
|
||||
"@backstage/plugin-techdocs-backend": "^1.2.0-next.1",
|
||||
"@backstage/plugin-tech-insights-backend": "^0.4.2-next.1",
|
||||
"@backstage/plugin-tech-insights-node": "^0.3.2-next.0",
|
||||
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.18-next.0",
|
||||
"@backstage/plugin-todo-backend": "^0.1.31-next.0",
|
||||
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.18-next.1",
|
||||
"@backstage/plugin-todo-backend": "^0.1.31-next.1",
|
||||
"@gitbeaker/node": "^35.1.0",
|
||||
"@octokit/rest": "^18.5.3",
|
||||
"better-sqlite3": "^7.5.0",
|
||||
@@ -75,7 +75,7 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
||||
@@ -39,7 +39,9 @@ async function createSearchEngine(
|
||||
}
|
||||
|
||||
if (await PgSearchEngine.supported(env.database)) {
|
||||
return await PgSearchEngine.from({ database: env.database });
|
||||
return await PgSearchEngine.fromConfig(env.config, {
|
||||
database: env.database,
|
||||
});
|
||||
}
|
||||
|
||||
return new LunrSearchEngine({ logger: env.logger });
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/catalog-client
|
||||
|
||||
## 1.0.4-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/catalog-model@1.1.0-next.1
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/catalog-client",
|
||||
"description": "An isomorphic client for the catalog backend",
|
||||
"version": "1.0.4-next.0",
|
||||
"version": "1.0.4-next.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -33,12 +33,12 @@
|
||||
"clean": "backstage-cli package clean"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/catalog-model": "^1.1.0-next.1",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"cross-fetch": "^3.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@types/jest": "^26.0.7",
|
||||
"msw": "^0.42.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/catalog-model
|
||||
|
||||
## 1.1.0-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- f1dcc6f3c6: Added type predicates for all entity types, e.g. isUserEntity
|
||||
- Updated dependencies
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
|
||||
## 1.1.0-next.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -230,6 +230,13 @@ export function getEntitySourceLocation(entity: Entity): {
|
||||
target: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class GroupDefaultParentEntityPolicy implements EntityPolicy {
|
||||
constructor(parentEntityRef: string);
|
||||
// (undocumented)
|
||||
enforce(entity: Entity): Promise<Entity>;
|
||||
}
|
||||
|
||||
// @public
|
||||
interface GroupEntityV1alpha1 extends Entity {
|
||||
// (undocumented)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/catalog-model",
|
||||
"description": "Types and validators that help describe the model of a Backstage Catalog",
|
||||
"version": "1.1.0-next.0",
|
||||
"version": "1.1.0-next.1",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"ajv": "^8.10.0",
|
||||
"json-schema": "^0.4.0",
|
||||
@@ -43,7 +43,7 @@
|
||||
"uuid": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"@types/lodash": "^4.14.151",
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { UserEntity, GroupEntity } from '../../kinds';
|
||||
import { GroupDefaultParentEntityPolicy } from './GroupDefaultParentEntityPolicy';
|
||||
|
||||
describe('GroupDefaultParentEntityPolicy', () => {
|
||||
it('should ignore non-group entities', async () => {
|
||||
const p = new GroupDefaultParentEntityPolicy('name');
|
||||
const u: UserEntity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: { name: 'n' },
|
||||
spec: { profile: {}, memberOf: ['c'] },
|
||||
};
|
||||
const result = await p.enforce(u);
|
||||
expect(result).toEqual({
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'User',
|
||||
metadata: { name: 'n' },
|
||||
spec: { profile: {}, memberOf: ['c'] },
|
||||
});
|
||||
});
|
||||
|
||||
it('should parent group entities', async () => {
|
||||
const p = new GroupDefaultParentEntityPolicy('name');
|
||||
const g: GroupEntity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: { name: 'n' },
|
||||
spec: { type: 'foo', children: [] },
|
||||
};
|
||||
const result = await p.enforce(g);
|
||||
expect(result).toEqual({
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: { name: 'n' },
|
||||
spec: { type: 'foo', parent: 'group:default/name', children: [] },
|
||||
});
|
||||
});
|
||||
|
||||
it('should not replace existing parents', async () => {
|
||||
const p = new GroupDefaultParentEntityPolicy('namespace/name');
|
||||
const g: GroupEntity = {
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: { name: 'n' },
|
||||
spec: { type: 'foo', parent: 'group:something/else', children: [] },
|
||||
};
|
||||
const result = await p.enforce(g);
|
||||
expect(result).toEqual({
|
||||
apiVersion: 'backstage.io/v1alpha1',
|
||||
kind: 'Group',
|
||||
metadata: { name: 'n' },
|
||||
spec: { type: 'foo', parent: 'group:something/else', children: [] },
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2022 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Entity } from '../Entity';
|
||||
import { GroupEntity } from '../../kinds';
|
||||
import { EntityPolicy } from './types';
|
||||
import { DEFAULT_NAMESPACE } from '../constants';
|
||||
import { parseEntityRef, stringifyEntityRef } from '../ref';
|
||||
|
||||
/**
|
||||
* DefaultParentPolicy is an EntityPolicy that updates group entities
|
||||
* with a parent of last resort. This ensures that, while we preserve
|
||||
* any existing group hierarchies, we can guarantee that there is a
|
||||
* single global root of the group hierarchy.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export class GroupDefaultParentEntityPolicy implements EntityPolicy {
|
||||
private readonly parentRef: string;
|
||||
|
||||
constructor(parentEntityRef: string) {
|
||||
const { kind, namespace, name } = parseEntityRef(parentEntityRef, {
|
||||
defaultKind: 'Group',
|
||||
defaultNamespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
|
||||
if (kind.toLocaleUpperCase('en-US') !== 'GROUP') {
|
||||
throw new TypeError('group parent must be a group');
|
||||
}
|
||||
|
||||
this.parentRef = stringifyEntityRef({
|
||||
kind: kind,
|
||||
namespace: namespace,
|
||||
name: name,
|
||||
});
|
||||
}
|
||||
|
||||
async enforce(entity: Entity): Promise<Entity> {
|
||||
if (entity.kind !== 'Group') {
|
||||
return entity;
|
||||
}
|
||||
|
||||
const group = entity as GroupEntity;
|
||||
if (group.spec.parent) {
|
||||
return group;
|
||||
}
|
||||
|
||||
// Avoid making the parent entity it's own parent.
|
||||
if (stringifyEntityRef(group) !== this.parentRef) {
|
||||
group.spec.parent = this.parentRef;
|
||||
}
|
||||
|
||||
return group;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
export { DefaultNamespaceEntityPolicy } from './DefaultNamespaceEntityPolicy';
|
||||
export { GroupDefaultParentEntityPolicy } from './GroupDefaultParentEntityPolicy';
|
||||
export { FieldFormatEntityPolicy } from './FieldFormatEntityPolicy';
|
||||
export { NoForeignRootFieldsEntityPolicy } from './NoForeignRootFieldsEntityPolicy';
|
||||
export { SchemaValidEntityPolicy } from './SchemaValidEntityPolicy';
|
||||
|
||||
@@ -1,5 +1,33 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.18.0-next.1
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 96a82d9791: **BREAKING**: Removed the following deprecated package commands:
|
||||
|
||||
- `app:build` - Use `package build` instead
|
||||
- `app:serve` - Use `package start` instead
|
||||
- `backend:build` - Use `package build` instead
|
||||
- `backend:bundle` - Use `package build` instead
|
||||
- `backend:dev` - Use `package start` instead
|
||||
- `plugin:build` - Use `package build` instead
|
||||
- `plugin:serve` - Use `package start` instead
|
||||
- `build` - Use `package build` instead
|
||||
- `lint` - Use `package lint` instead
|
||||
- `prepack` - Use `package prepack` instead
|
||||
- `postpack` - Use `package postpack` instead
|
||||
|
||||
In order to replace these you need to have [migrated to using package roles](https://backstage.io/docs/tutorials/package-role-migration).
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 86640214f0: Upgrade `@rollup/plugin-node-resolve` to `^13.0.6`
|
||||
- e661242844: Updated dependency `run-script-webpack-plugin` to `^0.1.0`.
|
||||
- Updated dependencies
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
- @backstage/config-loader@1.1.3-next.0
|
||||
|
||||
## 0.17.3-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -0,0 +1,563 @@
|
||||
## CLI Report file for "@backstage/cli"
|
||||
|
||||
> Do not edit this file. It is a report generated by `yarn build:api-reports`
|
||||
|
||||
### `backstage-cli`
|
||||
|
||||
```
|
||||
Usage: backstage-cli [options] [command]
|
||||
|
||||
Options:
|
||||
-V, --version
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
create [options]
|
||||
create-plugin [options]
|
||||
plugin:diff [options]
|
||||
test
|
||||
config:docs [options]
|
||||
config:print [options]
|
||||
config:check [options]
|
||||
config:schema [options]
|
||||
repo [command]
|
||||
package [command]
|
||||
migrate [command]
|
||||
versions:bump [options]
|
||||
versions:check [options]
|
||||
clean
|
||||
build-workspace <workspace-dir> [packages...]
|
||||
create-github-app <github-org>
|
||||
info
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-cli build-workspace`
|
||||
|
||||
```
|
||||
Usage: backstage-cli build-workspace [options] <workspace-dir> [packages...]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli clean`
|
||||
|
||||
```
|
||||
Usage: backstage-cli clean [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli config:check`
|
||||
|
||||
```
|
||||
Usage: backstage-cli config:check [options]
|
||||
|
||||
Options:
|
||||
--package <name>
|
||||
--lax
|
||||
--frontend
|
||||
--deprecated
|
||||
--config <path>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli config:docs`
|
||||
|
||||
```
|
||||
Usage: backstage-cli config:docs [options]
|
||||
|
||||
Options:
|
||||
--package <name>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli config:print`
|
||||
|
||||
```
|
||||
Usage: backstage-cli config:print [options]
|
||||
|
||||
Options:
|
||||
--package <name>
|
||||
--lax
|
||||
--frontend
|
||||
--with-secrets
|
||||
--format <format>
|
||||
--config <path>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli config:schema`
|
||||
|
||||
```
|
||||
Usage: backstage-cli config:schema [options]
|
||||
|
||||
Options:
|
||||
--package <name>
|
||||
--format <format>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli create`
|
||||
|
||||
```
|
||||
Usage: backstage-cli create [options]
|
||||
|
||||
Options:
|
||||
--select <name>
|
||||
--option <name>=<value>
|
||||
--scope <scope>
|
||||
--npm-registry <URL>
|
||||
--no-private
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli create-github-app`
|
||||
|
||||
```
|
||||
Usage: backstage-cli create-github-app [options] <github-org>
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli create-plugin`
|
||||
|
||||
```
|
||||
Usage: backstage-cli create-plugin [options]
|
||||
|
||||
Options:
|
||||
--backend
|
||||
--scope <scope>
|
||||
--npm-registry <URL>
|
||||
--no-private
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli info`
|
||||
|
||||
```
|
||||
Usage: backstage-cli info [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli migrate`
|
||||
|
||||
```
|
||||
Usage: backstage-cli migrate [options] [command] [command]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
package-roles
|
||||
package-scripts
|
||||
package-lint-configs
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-cli migrate package-lint-configs`
|
||||
|
||||
```
|
||||
Usage: backstage-cli migrate package-lint-configs [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli migrate package-roles`
|
||||
|
||||
```
|
||||
Usage: backstage-cli migrate package-roles [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli migrate package-scripts`
|
||||
|
||||
```
|
||||
Usage: backstage-cli migrate package-scripts [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package [options] [command] [command]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
start [options]
|
||||
build [options]
|
||||
lint [options] [directories...]
|
||||
test
|
||||
clean
|
||||
prepack
|
||||
postpack
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-cli package build`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package build [options]
|
||||
|
||||
Options:
|
||||
--role <name>
|
||||
--minify
|
||||
--experimental-type-build
|
||||
--skip-build-dependencies
|
||||
--stats
|
||||
--config <path>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package clean`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package clean [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package lint`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package lint [options] [directories...]
|
||||
|
||||
Options:
|
||||
--format <format>
|
||||
--fix
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package postpack`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package postpack [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package prepack`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package prepack [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package start`
|
||||
|
||||
```
|
||||
Usage: backstage-cli package start [options]
|
||||
|
||||
Options:
|
||||
--config <path>
|
||||
--role <name>
|
||||
--check
|
||||
--inspect
|
||||
--inspect-brk
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli package test`
|
||||
|
||||
```
|
||||
Usage: backstage-cli [--config=<pathToConfigFile>] [TestPathPattern]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
-v, --version
|
||||
--all
|
||||
--automock
|
||||
-b, --bail
|
||||
--cache
|
||||
--cacheDirectory
|
||||
--changedFilesWithAncestor
|
||||
--changedSince
|
||||
--ci
|
||||
--clearCache
|
||||
--clearMocks
|
||||
--collectCoverage
|
||||
--collectCoverageFrom
|
||||
--collectCoverageOnlyFrom
|
||||
--color
|
||||
--colors
|
||||
-c, --config
|
||||
--coverage
|
||||
--coverageDirectory
|
||||
--coveragePathIgnorePatterns
|
||||
--coverageProvider
|
||||
--coverageReporters
|
||||
--coverageThreshold
|
||||
--debug
|
||||
--detectLeaks
|
||||
--detectOpenHandles
|
||||
--env
|
||||
--errorOnDeprecated
|
||||
-e, --expand
|
||||
--filter
|
||||
--findRelatedTests
|
||||
--forceExit
|
||||
--globalSetup
|
||||
--globalTeardown
|
||||
--globals
|
||||
--haste
|
||||
--init
|
||||
--injectGlobals
|
||||
--json
|
||||
--lastCommit
|
||||
--listTests
|
||||
--logHeapUsage
|
||||
--maxConcurrency
|
||||
-w, --maxWorkers
|
||||
--moduleDirectories
|
||||
--moduleFileExtensions
|
||||
--moduleNameMapper
|
||||
--modulePathIgnorePatterns
|
||||
--modulePaths
|
||||
--noStackTrace
|
||||
--notify
|
||||
--notifyMode
|
||||
-o, --onlyChanged
|
||||
-f, --onlyFailures
|
||||
--outputFile
|
||||
--passWithNoTests
|
||||
--preset
|
||||
--prettierPath
|
||||
--projects
|
||||
--reporters
|
||||
--resetMocks
|
||||
--resetModules
|
||||
--resolver
|
||||
--restoreMocks
|
||||
--rootDir
|
||||
--roots
|
||||
-i, --runInBand
|
||||
--runTestsByPath
|
||||
--runner
|
||||
--selectProjects
|
||||
--setupFiles
|
||||
--setupFilesAfterEnv
|
||||
--showConfig
|
||||
--silent
|
||||
--skipFilter
|
||||
--snapshotSerializers
|
||||
--testEnvironment
|
||||
--testEnvironmentOptions
|
||||
--testFailureExitCode
|
||||
--testLocationInResults
|
||||
--testMatch
|
||||
-t, --testNamePattern
|
||||
--testPathIgnorePatterns
|
||||
--testPathPattern
|
||||
--testRegex
|
||||
--testResultsProcessor
|
||||
--testRunner
|
||||
--testSequencer
|
||||
--testTimeout
|
||||
--testURL
|
||||
--timers
|
||||
--transform
|
||||
--transformIgnorePatterns
|
||||
--unmockedModulePathPatterns
|
||||
-u, --updateSnapshot
|
||||
--useStderr
|
||||
--verbose
|
||||
--watch
|
||||
--watchAll
|
||||
--watchPathIgnorePatterns
|
||||
--watchman
|
||||
```
|
||||
|
||||
### `backstage-cli plugin:diff`
|
||||
|
||||
```
|
||||
Usage: backstage-cli plugin:diff [options]
|
||||
|
||||
Options:
|
||||
--check
|
||||
--yes
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli repo`
|
||||
|
||||
```
|
||||
Usage: backstage-cli repo [options] [command] [command]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
build [options]
|
||||
lint [options]
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-cli repo build`
|
||||
|
||||
```
|
||||
Usage: backstage-cli repo build [options]
|
||||
|
||||
Options:
|
||||
--all
|
||||
--since <ref>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli repo lint`
|
||||
|
||||
```
|
||||
Usage: backstage-cli repo lint [options]
|
||||
|
||||
Options:
|
||||
--format <format>
|
||||
--since <ref>
|
||||
--fix
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli test`
|
||||
|
||||
```
|
||||
Usage: backstage-cli [--config=<pathToConfigFile>] [TestPathPattern]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
-v, --version
|
||||
--all
|
||||
--automock
|
||||
-b, --bail
|
||||
--cache
|
||||
--cacheDirectory
|
||||
--changedFilesWithAncestor
|
||||
--changedSince
|
||||
--ci
|
||||
--clearCache
|
||||
--clearMocks
|
||||
--collectCoverage
|
||||
--collectCoverageFrom
|
||||
--collectCoverageOnlyFrom
|
||||
--color
|
||||
--colors
|
||||
-c, --config
|
||||
--coverage
|
||||
--coverageDirectory
|
||||
--coveragePathIgnorePatterns
|
||||
--coverageProvider
|
||||
--coverageReporters
|
||||
--coverageThreshold
|
||||
--debug
|
||||
--detectLeaks
|
||||
--detectOpenHandles
|
||||
--env
|
||||
--errorOnDeprecated
|
||||
-e, --expand
|
||||
--filter
|
||||
--findRelatedTests
|
||||
--forceExit
|
||||
--globalSetup
|
||||
--globalTeardown
|
||||
--globals
|
||||
--haste
|
||||
--init
|
||||
--injectGlobals
|
||||
--json
|
||||
--lastCommit
|
||||
--listTests
|
||||
--logHeapUsage
|
||||
--maxConcurrency
|
||||
-w, --maxWorkers
|
||||
--moduleDirectories
|
||||
--moduleFileExtensions
|
||||
--moduleNameMapper
|
||||
--modulePathIgnorePatterns
|
||||
--modulePaths
|
||||
--noStackTrace
|
||||
--notify
|
||||
--notifyMode
|
||||
-o, --onlyChanged
|
||||
-f, --onlyFailures
|
||||
--outputFile
|
||||
--passWithNoTests
|
||||
--preset
|
||||
--prettierPath
|
||||
--projects
|
||||
--reporters
|
||||
--resetMocks
|
||||
--resetModules
|
||||
--resolver
|
||||
--restoreMocks
|
||||
--rootDir
|
||||
--roots
|
||||
-i, --runInBand
|
||||
--runTestsByPath
|
||||
--runner
|
||||
--selectProjects
|
||||
--setupFiles
|
||||
--setupFilesAfterEnv
|
||||
--showConfig
|
||||
--silent
|
||||
--skipFilter
|
||||
--snapshotSerializers
|
||||
--testEnvironment
|
||||
--testEnvironmentOptions
|
||||
--testFailureExitCode
|
||||
--testLocationInResults
|
||||
--testMatch
|
||||
-t, --testNamePattern
|
||||
--testPathIgnorePatterns
|
||||
--testPathPattern
|
||||
--testRegex
|
||||
--testResultsProcessor
|
||||
--testRunner
|
||||
--testSequencer
|
||||
--testTimeout
|
||||
--testURL
|
||||
--timers
|
||||
--transform
|
||||
--transformIgnorePatterns
|
||||
--unmockedModulePathPatterns
|
||||
-u, --updateSnapshot
|
||||
--useStderr
|
||||
--verbose
|
||||
--watch
|
||||
--watchAll
|
||||
--watchPathIgnorePatterns
|
||||
--watchman
|
||||
```
|
||||
|
||||
### `backstage-cli versions:bump`
|
||||
|
||||
```
|
||||
Usage: backstage-cli versions:bump [options]
|
||||
|
||||
Options:
|
||||
--pattern <glob>
|
||||
--release <version|next|main>
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-cli versions:check`
|
||||
|
||||
```
|
||||
Usage: backstage-cli versions:check [options]
|
||||
|
||||
Options:
|
||||
--fix
|
||||
-h, --help
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.17.3-next.0",
|
||||
"version": "0.18.0-next.1",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -33,8 +33,8 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.9",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/config-loader": "^1.1.2",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/config-loader": "^1.1.3-next.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/release-manifests": "^0.0.4",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@hot-loader/react-dom-v16": "npm:@hot-loader/react-dom@^16.0.2",
|
||||
@@ -126,14 +126,14 @@
|
||||
"zod": "^3.11.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.1",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.1",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/dev-utils": "^1.0.4-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@backstage/dev-utils": "^1.0.4-next.1",
|
||||
"@backstage/test-utils": "^1.1.2-next.1",
|
||||
"@backstage/theme": "^0.2.16-next.0",
|
||||
"@types/diff": "^5.0.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
|
||||
@@ -78,6 +78,10 @@ export default async (_opts: OptionValues, cmd: Command) => {
|
||||
process.env.TZ = 'UTC';
|
||||
}
|
||||
|
||||
if (args.includes('--help')) {
|
||||
(process.stdout as any)._handle.setBlocking(true);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line jest/no-jest-import
|
||||
await require('jest').run(args);
|
||||
};
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
## CLI Report file for "@backstage/codemods"
|
||||
|
||||
> Do not edit this file. It is a report generated by `yarn build:api-reports`
|
||||
|
||||
### `backstage-codemods`
|
||||
|
||||
```
|
||||
Usage: backstage-codemods [options] [command]
|
||||
|
||||
Options:
|
||||
-V, --version
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
apply <codemod> [target-dirs...]
|
||||
list
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-codemods apply`
|
||||
|
||||
```
|
||||
Usage: backstage-codemods apply [options] [command] <codemod> [target-dirs...]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
|
||||
Commands:
|
||||
core-imports [options] [target-dirs...]
|
||||
extension-names [options] [target-dirs...]
|
||||
help [command]
|
||||
```
|
||||
|
||||
### `backstage-codemods apply core-imports`
|
||||
|
||||
```
|
||||
Usage: backstage-codemods apply core-imports [options] [target-dirs...]
|
||||
|
||||
Options:
|
||||
-d, --dry
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-codemods apply extension-names`
|
||||
|
||||
```
|
||||
Usage: backstage-codemods apply extension-names [options] [target-dirs...]
|
||||
|
||||
Options:
|
||||
-d, --dry
|
||||
-h, --help
|
||||
```
|
||||
|
||||
### `backstage-codemods list`
|
||||
|
||||
```
|
||||
Usage: backstage-codemods list [options]
|
||||
|
||||
Options:
|
||||
-h, --help
|
||||
```
|
||||
@@ -1,5 +1,12 @@
|
||||
# @backstage/config-loader
|
||||
|
||||
## 1.1.3-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
|
||||
## 1.1.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/config-loader",
|
||||
"description": "Config loading functionality used by Backstage backend, and CLI",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -36,7 +36,7 @@
|
||||
"dependencies": {
|
||||
"@backstage/cli-common": "^0.1.9",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@types/json-schema": "^7.0.6",
|
||||
"ajv": "^8.10.0",
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@backstage/test-utils": "^1.1.2-next.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/core-components
|
||||
|
||||
## 0.9.6-next.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 3c440ea77e: Change BackstageIconLinkVertical style to use pallette instead of explicit color
|
||||
- 7e115d42f9: Support displaying subtitle text in `SidebarSubmenuItem`
|
||||
- Updated dependencies
|
||||
- @backstage/errors@1.1.0-next.0
|
||||
- @backstage/theme@0.2.16-next.0
|
||||
|
||||
## 0.9.6-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-components",
|
||||
"description": "Core components used by Backstage plugins and apps",
|
||||
"version": "0.9.6-next.0",
|
||||
"version": "0.9.6-next.1",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -35,8 +35,8 @@
|
||||
"dependencies": {
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@backstage/errors": "^1.1.0-next.0",
|
||||
"@backstage/theme": "^0.2.16-next.0",
|
||||
"@backstage/version-bridge": "^1.0.1",
|
||||
"@material-table/core": "^3.1.0",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
@@ -56,7 +56,7 @@
|
||||
"pluralize": "^8.0.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"qs": "^6.9.4",
|
||||
"rc-progress": "3.3.3",
|
||||
"rc-progress": "3.4.0",
|
||||
"react-helmet": "6.1.0",
|
||||
"react-hook-form": "^7.12.2",
|
||||
"react-markdown": "^8.0.0",
|
||||
@@ -80,8 +80,8 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/cli": "^0.18.0-next.1",
|
||||
"@backstage/test-utils": "^1.1.2-next.1",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -62,4 +62,42 @@ describe('<MarkdownContent />', () => {
|
||||
expect(fp2).toBeInTheDocument();
|
||||
expect(rendered.getByText(');', { selector: 'span' })).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it('render MarkdownContent component with transformed link', async () => {
|
||||
const rendered = await renderWithEffects(
|
||||
wrapInTestApp(
|
||||
<MarkdownContent
|
||||
content="[Title](https://backstage.io/link)"
|
||||
transformLinkUri={href => {
|
||||
return `${href}-modified`;
|
||||
}}
|
||||
/>,
|
||||
),
|
||||
);
|
||||
const fp1 = rendered.getByText('Title', {
|
||||
selector: 'a',
|
||||
});
|
||||
expect(fp1).toBeInTheDocument();
|
||||
expect(fp1.getAttribute('href')).toEqual(
|
||||
'https://backstage.io/link-modified',
|
||||
);
|
||||
});
|
||||
|
||||
it('render MarkdownContent component with transformed image', async () => {
|
||||
const rendered = await renderWithEffects(
|
||||
wrapInTestApp(
|
||||
<MarkdownContent
|
||||
content=""
|
||||
transformImageUri={() => {
|
||||
return `https://example.com/blog/assets/6/header.png`;
|
||||
}}
|
||||
/>,
|
||||
),
|
||||
);
|
||||
const fp1 = rendered.getByAltText('Image');
|
||||
expect(fp1).toBeInTheDocument();
|
||||
expect(fp1.getAttribute('src')).toEqual(
|
||||
'https://example.com/blog/assets/6/header.png',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -68,6 +68,8 @@ type Props = {
|
||||
content: string;
|
||||
dialect?: 'gfm' | 'common-mark';
|
||||
linkTarget?: Options['linkTarget'];
|
||||
transformLinkUri?: (href: string) => string;
|
||||
transformImageUri?: (href: string) => string;
|
||||
};
|
||||
|
||||
const components: Options['components'] = {
|
||||
@@ -91,7 +93,13 @@ const components: Options['components'] = {
|
||||
* If you just want to render to plain [CommonMark](https://commonmark.org/), set the dialect to `'common-mark'`
|
||||
*/
|
||||
export function MarkdownContent(props: Props) {
|
||||
const { content, dialect = 'gfm', linkTarget } = props;
|
||||
const {
|
||||
content,
|
||||
dialect = 'gfm',
|
||||
linkTarget,
|
||||
transformLinkUri,
|
||||
transformImageUri,
|
||||
} = props;
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<ReactMarkdown
|
||||
@@ -100,6 +108,8 @@ export function MarkdownContent(props: Props) {
|
||||
children={content}
|
||||
components={components}
|
||||
linkTarget={linkTarget}
|
||||
transformLinkUri={transformLinkUri}
|
||||
transformImageUri={transformImageUri}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -63,15 +63,16 @@ const useStyles = makeStyles<BackstageTheme>(
|
||||
},
|
||||
rightItemsBox: {
|
||||
width: 'auto',
|
||||
alignItems: 'center',
|
||||
},
|
||||
title: {
|
||||
color: theme.palette.bursts.fontColor,
|
||||
color: theme.page.fontColor,
|
||||
wordBreak: 'break-word',
|
||||
fontSize: theme.typography.h3.fontSize,
|
||||
marginBottom: 0,
|
||||
},
|
||||
subtitle: {
|
||||
color: theme.palette.bursts.fontColor,
|
||||
color: theme.page.fontColor,
|
||||
opacity: 0.8,
|
||||
display: 'inline-block', // prevents margin collapse of adjacent siblings
|
||||
marginTop: theme.spacing(1),
|
||||
@@ -82,10 +83,10 @@ const useStyles = makeStyles<BackstageTheme>(
|
||||
fontSize: 11,
|
||||
opacity: 0.8,
|
||||
marginBottom: theme.spacing(1),
|
||||
color: theme.palette.bursts.fontColor,
|
||||
color: theme.page.fontColor,
|
||||
},
|
||||
breadcrumb: {
|
||||
color: theme.palette.bursts.fontColor,
|
||||
color: theme.page.fontColor,
|
||||
},
|
||||
breadcrumbType: {
|
||||
fontSize: 'inherit',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user