Merge branch 'master' of github.com:backstage/backstage

This commit is contained in:
Martin Morales
2023-04-04 09:43:04 -05:00
530 changed files with 7969 additions and 1382 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': minor
---
Plugins that instantiate the `KubernetesProxy` must now provide a parameter of the type `KubernetesProxyOptions` which includes providing a `KubernetesAuthTranslator`. The `KubernetesBuilder` now builds its own `KubernetesAuthTranslatorMap` that it provides to the `KubernetesProxy`. The `DispatchingKubernetesAuthTranslator` expects a `KubernetesTranslatorMap` to be provided as a parameter. The `KubernetesBuilder` now has a method called `setAuthTranslatorMap` which allows integrators to bring their own `KubernetesAuthTranslator's` to the `KubernetesPlugin`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-catalog-backend-module-azure': patch
'@backstage/plugin-catalog-backend': patch
---
Use the `LocationSpec` type from the `catalog-common` package in place of the deprecated `LocationSpec` from the `catalog-node` package.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-circleci': patch
---
Add hover over CircleCI avatar icon to show user name in builds table
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-techdocs-module-addons-contrib': patch
---
Bump `photoswipe` dependency to `^5.3.7`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
When building a backend package with dependencies any `--config <path>` options will now be forwarded to any dependent app package builds, unless the build script in the app package already contains a `--config` option.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/backend-app-api': patch
'@backstage/backend-common': patch
---
Allow an additionalConfig to be provided to loadBackendConfig that fetches config values during runtime.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/catalog-client': patch
---
Fixed bug in `queryEntities` of `CatalogClient` where the `sortField` is supposed to be changed to `orderField`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-node': patch
---
Introduced alpha export of the `policyExtensionPoint` for use in the new backend system.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-permission-backend': patch
---
Introduced alpha export of the `permissionPlugin` for use in the new backend system, along with a `permissionModuleAllowAllPolicy` that can be used to allow all requests.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Upgrade `react-virtualized-auto-sizer´ to version `^1.0.11`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-rollbar-backend': patch
---
Replace `camelcase-keys` dependency with one with better compatibility.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Fixed bug in catalog filters where you could not click on the text to select a value.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/create-app': patch
---
Upgraded the TypeScript version to 5.0
To apply this change in your own project, switch the TypeScript version in your root `package.json`:
```diff
- "typescript": "~4.6.4",
+ "typescript": "~5.0.0",
```
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
---
bug: Invert `templateFilter` predicate to align with `Array.filter`
+10
View File
@@ -0,0 +1,10 @@
---
'@backstage/plugin-git-release-manager': patch
'@backstage/plugin-cicd-statistics': patch
'@backstage/plugin-code-coverage': patch
'@backstage/plugin-cost-insights': patch
'@backstage/plugin-xcmetrics': patch
'@backstage/plugin-bitrise': patch
---
Bumped `recharts` dependency to `^2.5.0`.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-playlist': patch
---
Added config properties to change dynamically the group noun for all the components in the UI
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-kubernetes-backend': patch
---
fix localKubectlProxy auth provider fetching
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-tech-insights-backend-module-jsonfc': patch
---
When multiple fact retrievers are used for a check, allow for cases where only one returns a given fact
+24
View File
@@ -220,17 +220,29 @@
},
"changesets": [
"all-my-auth-wanna-ride-today",
"blue-walls-drop",
"bright-pumpkins-bake",
"calm-otters-destroy",
"chatty-coats-thank",
"clean-dolls-search",
"clean-items-draw",
"clean-teachers-thank",
"clever-lizards-whisper",
"create-app-1679405836",
"curly-boats-trade",
"curly-jobs-kneel",
"curly-steaks-mate",
"curvy-rocks-guess",
"eight-trainers-smoke",
"eleven-bats-tease",
"eleven-coats-refuse",
"fair-roses-stare",
"famous-beds-break",
"famous-beds-repair",
"fast-gorillas-approve",
"fast-snakes-buy",
"flat-ways-compete",
"forty-days-tell",
"forty-gorillas-help",
"fresh-schools-fly",
"funny-pots-hide",
@@ -242,6 +254,7 @@
"heavy-colts-wash",
"hungry-lies-cry",
"hungry-monkeys-reply",
"itchy-ads-sit",
"khaki-cars-drum",
"khaki-doors-compare",
"khaki-guests-turn",
@@ -250,15 +263,20 @@
"long-gorillas-remain",
"many-eggs-press",
"mighty-lamps-cross",
"modern-snakes-check",
"nasty-nails-appear",
"neat-donkeys-work",
"neat-pears-argue",
"new-pigs-jam",
"odd-grapes-double",
"old-cougars-sit",
"olive-cycles-join",
"olive-months-talk",
"orange-rabbits-jam",
"perfect-deers-add",
"poor-cars-fold",
"popular-parents-crash",
"popular-radios-visit",
"pretty-carpets-cross",
"rare-seals-decide",
"renovate-179fa0e",
@@ -268,16 +286,20 @@
"seven-gifts-fetch",
"short-panthers-float",
"silly-adults-accept",
"six-jobs-hear",
"soft-roses-cover",
"sour-buttons-collect",
"sour-dragons-cheat",
"stale-cobras-beg",
"stale-paws-sparkle",
"strong-crews-repeat",
"stupid-laws-play",
"swift-meals-live",
"tall-chairs-explain",
"tall-oranges-own",
"ten-hounds-bathe",
"ten-mayflies-beam",
"tender-parrots-fry",
"thick-forks-prove",
"thin-spoons-prove",
"thirty-crabs-tell",
@@ -285,7 +307,9 @@
"tough-cameras-beam",
"twelve-parrots-camp",
"twelve-vans-sell",
"unlucky-snakes-smile",
"warm-buses-switch",
"weak-oranges-give",
"weak-turtles-arrive",
"wet-lamps-happen",
"wise-garlics-camp",
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Fixed bug in the `DefaultCatalogProcessingEngine` where entities that contained multiple different types of relations for the same source entity would not properly trigger stitching for that source entity.
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Split the `BackstageSidebar` style `drawer` class, such that the `width` property is in a separate `drawerWidth` class instead. This makes it such that you can style the `drawer` class in your theme again.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder': patch
---
`scaffolder/next`: bump `rjsf` dependencies to `5.5.0`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': minor
---
The Installed Actions page now shows details for nested objects and arrays
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-search': minor
---
Search modal auto closes on location change
+8
View File
@@ -0,0 +1,8 @@
---
'@backstage/core-plugin-api': patch
'@backstage/plugin-scaffolder-react': patch
'@backstage/plugin-scaffolder-node': patch
'@backstage/plugin-catalog-react': patch
---
Minor type tweaks for TypeScript 5.0
+4 -4
View File
@@ -103,7 +103,7 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/
| [Stilingue](https://www.stilingue.com.br/) | [@stilingue-inteligencia-artificial](https://github.com/Stilingue-IA), [@bbviana](https://github.com/bbviana) | Developer portal, services catalog and centralization of metrics from Grafana, Sentry and GCP. Furthermore, centralization of documentation and infra details like DNS, Network services, SSL and so on. |
| [TUI Group](https://www.tuigroup.com/) | [Simon Stamm](https://github.com/simonstamm), [Christian Rudolph](https://github.com/ChrisRu82) | Developer portal for all engineer to provide discoverability to all internal components, APIs, documentation and to scaffold templates with integrations to our internal tools extended by plugins from our community. |
| [Alliander](https://www.alliander.com/) | [@leon-vg](https://github.com/leon-vg), [@gieljl](https://github.com/gieljl), [@niekteg](https://github.com/niekteg) | Developer portal - software catalog, technical documentation, software templates, tech radar and exploration of used tools/services |
| [VIA](https://www.via.com.br) | [@vagnerguedes](https://github.com/vagnerguedes) | Centralized Developer Experience portal - Software catalog and documentation platform, software templates, techdocs, scaffolding, self-service infrastructure |
| [VIA](https://www.via.com.br) | [Rogerio Segovia](https://github.com/rsegovia) | Centralized Developer Experience portal - Software catalog and documentation platform, software templates, techdocs, scaffolding, self-service infrastructure |
| [Surevine](https://www.surevine.com/) | [@DJDANNY123](https://github.com/djdanny123) | Developer portal for software catalog, discovery and a view of the technologies we are using across the organisation, we are looking to explore how we can enrich our entities in Backstage by integrating a software bill of materials. |
| [Bonial International GmbH](https://www.bonial.com/) | [@pjungermann](https://github.com/pjungermann) | Centralized developer portal with software catalog, tech docs, templates, and more. |
| [Beez Innovation Labs Pvt. Ltd](https://www.beezlabs.com/) | [Karthikeyan Venkatesan](https://github.com/karthikeyan23) | Developer portal with software catalog, scaffolding, tech docs, templates, and infra. |
@@ -119,7 +119,7 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/
| [Marks & Spencer](https://www.marksandspencer.com/) | [Kamal Cheriyath](https://github.com/kcheriyath) | Centralised discovery, adoption and devops automation hub for Engineering & Architecture. |
| [McKesson](https://www.mckesson.com/) | [Agnel Antony](https://github.com/aantony2) | Internal Developer Platform for developer gated CI/CD templates, technical documentation, cloud automation service catalog, etc. |
| [World Fuel Services](https://www.wfscorp.com/) | [Anirudh Kurapathi](https://github.com/anirudhkurapati), [Alex Kwon](https://github.com/alexkwon), [Lester Hernandez](https://github.com/lhernandez-wfscorp), [Avi Boru](https://github.com/aviboru), [Vardhan Annapureddy](https://github.com/harshaaws) | Internal Developer Portal, service catalog product, API's, Software Templates, tech docs and more. |
| [leboncoin](https://www.leboncoin.fr/) | [Andy Ladjadj](https://github.com/aladjadj) | Centralize our multiple UI in a single portal. Simplify onbording, new features and harmonize how people search information. Core features (catalog,api,docs,scafolder) are good to start the adoption. status: internal beta. |
| [leboncoin](https://www.leboncoin.fr/) | [Andy Ladjadj](https://github.com/aladjadj) | Centralize our multiple UI in a single portal. Simplify onbording, new features and harmonize how people search information. |
| [Contentful](https://www.contentful.com) | [James Bourne](https://github.com/jamesmbourne) | Centralized documentation of service ownership, APIs, and documentation, and new service creation with a custom scaffolder - [full case study with Roadie](https://roadie.io/case-studies/maintaining-velocity-through-hypergrowth-contentful/). |
| [Back Market](https://www.backmarket.com) | [Sami Farhat](https://github.com/skfarhat) | Internal Developer Portal featuring catalog, tech-radar, ownership management, component creation (scaffolder) and centralized infrastructure management -- probably more to come. |
| [Avalia Systems](https://avalia.io) | [Olivier Liechti](https://github.com/wasadigi), [Fabio Velloso](https://github.com/fabiovelloso) | Innersource, software analytics, knowledge base for 360 software assessments, collaborative applications, hub for tracking and sharing IP assets. |
@@ -227,7 +227,7 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/
| [Booking.com](https://www.linkedin.com/company/booking.com/) | [Mesut Yilmazyildirim](https://www.linkedin.com/in/myilmazyildirim) | We are adopting Backstage as the new reliability platform inside the company. We are migrating UIs of our internal developer tools to Backstage for a better user experience.
| [Swissquote Bank](https://swissquote.com/company/jobs/open-positions) | [Bruno Rocha](https://www.linkedin.com/in/bruno-rocha1/) | Integrating Backstage as the visualization layer & tactical overview of our services and teams.
| [XP Inc.](https://www.linkedin.com/company/xpinc/) | [Gabriel Santos](https://www.linkedin.com/in/gabriel-santos-6bb740a/) | Developer Portal Catalog (components, APIs, resources, users, groups) and organization relations.
| [OVO Energy](https://www.ovoenergy.com/) | [Michael Wizner](https://github.com/mwz), [Dan Laird](https://github.com/dlaird-ovo), [Samantha Betts](https://github.com/sammbetts) | Developer Experience Tool with an aim to to improve processes, boost productivity, finding of information/docs and building tech engagement throughout the business.
| [OVO Energy](https://www.ovoenergy.com/) | [Michael Wizner](https://github.com/mwz), [Dan Laird](https://github.com/dlaird-ovo), [Samantha Betts](https://github.com/sammbetts) | Developer Experience Tool with an aim to to improve processes, boost productivity, finding of information/docs and building tech engagement throughout the business.
| [MusicTribe](https://careers.musictribe.com/) | [Alex Ford](mailto:alex.j.ford@gmail.com), [Tiago Barbosa](https://github.com/t1agob) | We are starting to use Backstage as a developer portal to share API specifications and documentation, to quickly onboard new projects with the software templates, and to help developers discover software through the catalog.
| [Cazoo](https://www.cazoo.co.uk/) | [Abz Mungul](https://www.linkedin.com/in/abzmungul/), [Scott Edwards](https://www.linkedin.com/in/scott-edwards-tech/) | We're assessing Backstage as our developer platform at Cazoo with a focus on reducing cognitive load for our engineers. We're currently aiming for 3 outcomes: creating visibility into service ownership across teams, improving the discoverability of event schemas and relationships, and improving the discoverability of technical documentation and best practices. |
| [Gumtree](https://www.gumtree.com.au) | [Kumar Gaurav](https://www.linkedin.com/in/kumargaurav517) | We are starting to use it as a single place to find all component information in a distributed architecture. |
@@ -236,4 +236,4 @@ _You can do this by using the [Adopter form](https://info.backstage.spotify.com/
| [CORS.gmbh](https://www.cors.gmbh) | [@dpfaffenbauer](https://github.com/dpfaffenbauer) | Developer Portal for our Projects we develop for our Customers and Hosting them On Kubernetes. |
| [Comcast](https://comcast.github.io/) | [Ryan Emerle](https://github.com/remerle) | Developer portal enabling discovery of products, services, and documentation throughout the enterprise to ultimately reduce friction and improve time-to-market. |
| [Syntasso](https://www.syntasso.io/) | [@syntassodev](https://github.com/syntassodev) | Backstage is used as a optional UI for the [Kratix project](https://kratix.io), a framework for building platforms.
| [Bankdata](https://www.bankdata.dk) | [Thomas Grønbæk](https://www.linkedin.com/in/thomas-grønbæk/) | We are assessing Backstage as our internal developer portal @Bankdata. Goal is to reduce cognitive load and friction for developers and thereby improving developer experience, onboarding and productivity. Expect use of Software Catalog for discoverability and ownership, Tech Docs and Software Templates to integrate tooling and best practices.
+2 -2
View File
@@ -208,12 +208,12 @@ In all cases in this document where voting is mentioned, the voting process is a
It is important for contributors to be and stay active to set an example and show commitment to the project. Inactivity is harmful to the project as it may lead to unexpected delays, contributor attrition, and a loss of trust in the project.
Inactivity is measured by periods of no contributions for longer than:
Inactivity is measured by periods of no contributions without explanation, for longer than:
- Core Maintainer: 2 months
- Project Area Maintainer: 4 months
- Plugin Maintainer: 6 months
- Organization Member: 8 months
- Organization Member: 12 months
Consequences of being inactive include:
+31 -17
View File
@@ -38,15 +38,28 @@ Scope: Discoverability within Backstage, including the home page, information ar
| Raghunandan Balachandran | Spotify | BUX | [soapraj](http://github.com/soapraj) | raghunandanb#1114 |
| Renan Mendes Carvalho | Spotify | BUX | [aitherios](http://github.com/aitherios) | aitherios#0593 |
### Helm Charts
Team: @backstage/helm-chart-maintainers
Scope: The Backstage [Helm Chart(s)](https://github.com/backstage/charts).
| Name | Organization | Team | GitHub | Discord |
| -------------------- | ------------ | ---- | ---------------------------------------- | -------------- |
| Andrew Block | Red Hat | | [sabre1041](http://github.com/sabre1041) | sabre1041#2622 |
| Tom Coufal | Red Hat | | [tumido](http://github.com/tumido) | Tumi#4346 |
| Vincenzo Scamporlino | Spotify | | [vinzscam](http://github.com/vinzscam) | vinzscam#6944 |
### Kubernetes
Team: @backstage/kubernetes-maintainers
Scope: The Kubernetes plugin and the base it provides for other plugins to build upon.
| Name | Organization | Team | GitHub | Discord |
| -------------- | ------------ | ---- | ---------------------------------------- | ------------ |
| Matthew Clarke | Spotify | | [mclarke47](http://github.com/mclarke47) | mclarke#0725 |
| Name | Organization | Team | GitHub | Discord |
| -------------- | ------------ | ---- | ---------------------------------------------- | ----------------- |
| Matthew Clarke | Spotify | | [mclarke47](http://github.com/mclarke47) | mclarke#0725 |
| Jamie Klassen | VMware | | [jamieklassen](http://github.com/jamieklassen) | jamieklassen#3047 |
### TechDocs
@@ -69,20 +82,21 @@ Scope: The TechDocs plugin and related tooling
## Organization Members
| Name | Organization | GitHub | Discord |
| ------------------ | ------------------------- | ----------------------------------------------- | ------------------------------ |
| Adam Harvey | Cisco | [adamdmharvey](https://github.com/adamdmharvey) | `adamharvey#3739` |
| Andre Wanlin | Keyloop | [awanlin](https://github.com/awanlin) | `Ahhhndre#3095` |
| Andrew Thauer | Wealthsimple | [andrewthauer](https://github.com/andrewthauer) | `andrewthauer#3060` |
| Brian Fletcher | RoadieHQ | [punkle](https://github.com/punkle) | `Brian Fletcher#7051` |
| David Tuite | Roadie | [dtuite](https://github.com/dtuite) | `David Tuite (roadie.io)#1010` |
| Himanshu Mishra | Harness.io | [OrkoHunter](https://github.com/OrkoHunter) | `OrkoHunter#1520` |
| Jamie Klassen | VMware | [jamieklassen](https://github.com/jamieklassen) | `jamieklassen#3047` |
| Jussi Hallila | Roadie | [Xantier](https://github.com/Xantier) | `Xantier#0086` |
| Mark Avery | Cvent | [webark](https://github.com/webark) | `webark#8471` |
| Patrick Jungermann | Bonial International GmbH | [pjungermann](https://github.com/pjungermann) | `pjungermann#6933` |
| Phil Kuang | FactSet Research Systems | [kuangp](https://github.com/kuangp) | `pkuang#3202` |
| Taras Mankovski | Frontside | [taras](https://github.com/taras) | `tarasm#1256` |
| Name | Organization | GitHub | Discord |
| ------------------------------ | ------------------------- | ----------------------------------------------- | ------------------------------ |
| Adam Harvey | Cisco | [adamdmharvey](https://github.com/adamdmharvey) | `adamharvey#3739` |
| Andre Wanlin | Keyloop | [awanlin](https://github.com/awanlin) | `Ahhhndre#3095` |
| Andrew Thauer | Wealthsimple | [andrewthauer](https://github.com/andrewthauer) | `andrewthauer#3060` |
| Brian Fletcher | RoadieHQ | [punkle](https://github.com/punkle) | `Brian Fletcher#7051` |
| Carlos Esteban Lopez Jaramillo | VMWare | [luchillo17](https://github.com/luchillo17) | `luchillo17#8777` |
| David Tuite | Roadie | [dtuite](https://github.com/dtuite) | `David Tuite (roadie.io)#1010` |
| Himanshu Mishra | Harness.io | [OrkoHunter](https://github.com/OrkoHunter) | `OrkoHunter#1520` |
| Jamie Klassen | VMware | [jamieklassen](https://github.com/jamieklassen) | `jamieklassen#3047` |
| Jussi Hallila | Roadie | [Xantier](https://github.com/Xantier) | `Xantier#0086` |
| Mark Avery | Cvent | [webark](https://github.com/webark) | `webark#8471` |
| Patrick Jungermann | Bonial International GmbH | [pjungermann](https://github.com/pjungermann) | `pjungermann#6933` |
| Phil Kuang | FactSet Research Systems | [kuangp](https://github.com/kuangp) | `pkuang#3202` |
| Taras Mankovski | Frontside | [taras](https://github.com/taras) | `tarasm#1256` |
## Emeritus Core Maintainers
@@ -121,7 +121,7 @@ given prefix.
In the simple case, what we did above is sufficient, TypeScript is happy, and
the backend runs with the new feature. If they do, feel free to skip this entire
section, and deleting `types.ts`.
section, and delete `types.ts`.
Sometimes though, type errors can be reported on the newly added line, saying
that parts of the `PluginEnvironment` type do not match. This happens when the
+2 -5
View File
@@ -37,10 +37,6 @@ The required steps in the host build are to install dependencies with
`yarn install`, generate type definitions using `yarn tsc`, and build the backend
package with `yarn build:backend`.
> NOTE: If you created your app prior to 2021-02-18, follow the
> [migration step](https://github.com/backstage/backstage/releases/tag/release-2021-02-18)
> to move from `backend:build` to `backend:bundle`.
In a CI workflow it might look something like this:
```bash
@@ -50,7 +46,8 @@ yarn install --frozen-lockfile
yarn tsc
# Build the backend, which bundles it all up into the packages/backend/dist folder.
yarn build:backend
# The configuration files here should match the one you use inside the Dockerfile below.
yarn build:backend --config app-config.yaml
```
Once the host build is complete, we are ready to build our image. The following
+2 -8
View File
@@ -69,15 +69,9 @@ Overall, the only changes to each request are:
- the endpoint's base URL prefix is stripped.
- the `Backstage-Kubernetes-Authorization` header becomes the `Authorization` header that is used when forwarding the request.
## Authentication
The proxy expects a `KubernetesAuthTranslator` to be provided that is used to decorate all requests with `Auth` by default. It does this by supplying a `serviceAccountToken` field into `clusterDetails` using the defined `authProvider` in `clusterDetails`.
Until some security and permission decisions are made (see [this
conversation](https://github.com/backstage/backstage/pull/13026/files#r1029376939)
for context), contributors consuming the proxy endpoint in their plugin code are
responsible for negotiating their own bearer token out-of-band. This requires
knowing some auth details about the cluster being contacted -- in practice, only
clusters with [client side auth
providers](https://backstage.io/docs/features/kubernetes/authentication#client-side-providers) can reasonably be reached.
## Authentication
The proxy has no provisions for mTLS, so it cannot be used to connect to
clusters using the [x509 Client
+17 -4
View File
@@ -376,7 +376,7 @@ There are other more specific search results layout components that also accept
Recently, the Backstage maintainers [announced the new Backend System](https://backstage.io/blog/2023/02/15/backend-system-alpha). The search plugins are now migrated to support the new backend system. In this guide you will learn how to update your backend set up.
In packages/backend-next/index.ts
In "packages/backend-next/index.ts", install the search plugin [1], the search engine [2], and the search collators/decorators modules [3]:
```ts
import { searchPlugin } from '@backstage/plugin-search-backend/alpha';
@@ -386,14 +386,27 @@ import { searchModuleTechDocsCollator } from '@backstage/plugin-search-backend-m
import { searchModuleExploreCollator } from '@backstage/plugin-search-backend-module-explore/alpha';
const backend = createBackend();
// adding the search plugin to the backend
// [1] adding the search plugin to the backend
backend.add(searchPlugin());
// (optional) the default search engine is Lunr, if you want to extend the search backend with another search engine.
// [2] (optional) the default search engine is Lunr, if you want to extend the search backend with another search engine.
backend.add(searchModuleElasticsearchEngine());
// extending search with collator modules to start index documents, take in optional schedule parameters.
// [3] extending search with collator modules to start index documents, take in optional schedule parameters.
backend.add(searchModuleCatalogCollator());
backend.add(searchModuleTechDocsCollator());
backend.add(searchModuleExploreCollator());
backend.start();
```
To create your own collators/decorators modules, please use the [searchModuleCatalogCollator](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-catalog/src/alpha.ts#L49) as an example, we recommend that modules are separated by plugin packages (e.g. `search-backend-module-<plugin-id>`). You can also find the available search engines and collator/decorator modules documentation in the Alpha API reports:
**Search engine modules**
- Postgres [module](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-pg/alpha-api-report.md);
- Elasticsearch [module](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-elasticsearch/alpha-api-report.md).
**Search collator/decorator modules**
- Catalog [module](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-catalog/alpha-api-report.md);
- Explore [module](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-explore/alpha-api-report.md);
- TechDocs [module](https://github.com/backstage/backstage/blob/d7f955f300893f50c4882ea8f5c09aa42dfaacfd/plugins/search-backend-module-techdocs/alpha-api-report.md).
@@ -31,7 +31,7 @@ import { z } from 'zod';
export const createNewFileAction = () => {
return createTemplateAction({
id: 'mycompany:create-file',
id: 'acme:file:create',
schema: {
input: z.object({
contents: z.string().describe('The contents of the file'),
@@ -75,7 +75,7 @@ import { writeFile } from 'fs';
export const createNewFileAction = () => {
return createTemplateAction<{ contents: string; filename: string }>({
id: 'mycompany:create-file',
id: 'acme:file:create',
schema: {
input: {
required: ['contents', 'filename'],
@@ -107,6 +107,17 @@ export const createNewFileAction = () => {
};
```
#### Naming Conventions
Try to keep names consistent for both your own custom actions, and any actions contributed to open source. We've found that a separation of `:` and using a verb as the last part of the name works well.
We follow `provider:entity:verb` or as close to this as possible for our built in actions. For example, `github:actions:create` or `github:repo:create`.
Also feel free to use your company name to namespace them if you prefer too, for example `acme:file:create` like above.
Prefer to use `camelCase` over `snake-case` for these actions if possible, which leads to better reading and writing of template entity definitions.
> We're aware that there are some exceptions to this, but try to follow as close as possible. We'll be working on migrating these in the repository over time too.
### The context object
When the action `handler` is called, we provide you a `context` as the only
@@ -91,7 +91,7 @@ This enables decisions based on characteristics of the resource, but it's import
Install the missing module:
```bash
$ yarn workspace @internal/plugin-todo-list-backend add @backstage/plugin-permission-node zod@~3.18.0
$ yarn workspace @internal/plugin-todo-list-backend add @backstage/plugin-permission-node zod
```
Create a new `plugins/todo-list-backend/src/service/rules.ts` file and append the following code:
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -47,7 +47,7 @@
"@types/react": "^17",
"@types/react-dom": "^17"
},
"version": "1.13.0-next.1",
"version": "1.13.0-next.2",
"dependencies": {
"@backstage/errors": "workspace:^",
"@manypkg/get-packages": "^1.1.3"
@@ -81,7 +81,7 @@
"semver": "^7.3.2",
"shx": "^0.3.2",
"ts-node": "^10.4.0",
"typescript": "~4.7.0"
"typescript": "~5.0.0"
},
"prettier": "@spotify/prettier-config",
"lint-staged": {
+11
View File
@@ -1,5 +1,16 @@
# @backstage/app-defaults
## 1.3.0-next.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.6-next.2
- @backstage/core-plugin-api@1.5.1-next.1
- @backstage/core-app-api@1.7.0-next.2
- @backstage/theme@0.2.19-next.0
- @backstage/plugin-permission-react@0.4.12-next.1
## 1.3.0-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/app-defaults",
"description": "Provides the default wiring of a Backstage App",
"version": "1.3.0-next.1",
"version": "1.3.0-next.2",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
+69
View File
@@ -1,5 +1,74 @@
# example-app
## 0.2.82-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-circleci@0.3.17-next.2
- @backstage/plugin-techdocs-module-addons-contrib@1.0.12-next.2
- @backstage/cli@0.22.6-next.2
- @backstage/core-components@0.12.6-next.2
- @backstage/plugin-catalog-react@1.4.1-next.2
- @backstage/plugin-scaffolder-react@1.3.0-next.2
- @backstage/plugin-scaffolder@1.13.0-next.2
- @backstage/plugin-code-coverage@0.2.10-next.2
- @backstage/plugin-cost-insights@0.12.6-next.2
- @backstage/plugin-playlist@0.1.8-next.2
- @backstage/plugin-search@1.2.0-next.2
- @backstage/core-plugin-api@1.5.1-next.1
- @backstage/plugin-techdocs@1.6.1-next.2
- @backstage/app-defaults@1.3.0-next.2
- @backstage/catalog-model@1.2.1
- @backstage/config@1.0.7
- @backstage/core-app-api@1.7.0-next.2
- @backstage/integration-react@1.1.12-next.2
- @backstage/theme@0.2.19-next.0
- @backstage/plugin-airbrake@0.3.17-next.2
- @backstage/plugin-apache-airflow@0.2.10-next.2
- @backstage/plugin-api-docs@0.9.2-next.2
- @backstage/plugin-azure-devops@0.2.8-next.2
- @backstage/plugin-azure-sites@0.1.6-next.2
- @backstage/plugin-badges@0.2.41-next.2
- @backstage/plugin-catalog-common@1.0.13-next.0
- @backstage/plugin-catalog-graph@0.2.29-next.2
- @backstage/plugin-catalog-import@0.9.7-next.2
- @backstage/plugin-cloudbuild@0.3.17-next.2
- @backstage/plugin-dynatrace@3.0.1-next.2
- @backstage/plugin-entity-feedback@0.2.0-next.2
- @backstage/plugin-explore@0.4.2-next.2
- @backstage/plugin-gcalendar@0.3.13-next.2
- @backstage/plugin-gcp-projects@0.3.36-next.2
- @backstage/plugin-github-actions@0.5.17-next.2
- @backstage/plugin-gocd@0.1.23-next.2
- @backstage/plugin-graphiql@0.2.49-next.2
- @backstage/plugin-home@0.4.33-next.2
- @backstage/plugin-jenkins@0.7.16-next.2
- @backstage/plugin-kafka@0.3.17-next.2
- @backstage/plugin-kubernetes@0.7.10-next.2
- @backstage/plugin-lighthouse@0.4.2-next.2
- @backstage/plugin-linguist@0.1.2-next.2
- @backstage/plugin-linguist-common@0.1.0
- @backstage/plugin-microsoft-calendar@0.1.2-next.2
- @backstage/plugin-newrelic@0.3.35-next.2
- @backstage/plugin-newrelic-dashboard@0.2.10-next.2
- @backstage/plugin-org@0.6.7-next.2
- @backstage/plugin-pagerduty@0.5.10-next.2
- @backstage/plugin-permission-react@0.4.12-next.1
- @backstage/plugin-rollbar@0.4.17-next.2
- @backstage/plugin-search-common@1.2.3-next.0
- @backstage/plugin-search-react@1.5.2-next.2
- @backstage/plugin-sentry@0.5.2-next.2
- @backstage/plugin-shortcuts@0.3.9-next.2
- @backstage/plugin-stack-overflow@0.1.13-next.2
- @backstage/plugin-stackstorm@0.1.1-next.2
- @backstage/plugin-tech-insights@0.3.9-next.2
- @backstage/plugin-tech-radar@0.6.3-next.2
- @backstage/plugin-techdocs-react@1.1.5-next.2
- @backstage/plugin-todo@0.2.19-next.2
- @backstage/plugin-user-settings@0.7.2-next.2
- @internal/plugin-catalog-customized@0.0.9-next.2
## 0.2.82-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-app",
"version": "0.2.82-next.1",
"version": "0.2.82-next.2",
"private": true,
"backstage": {
"role": "frontend"
+3 -4
View File
@@ -60,12 +60,11 @@ import { HomepageCompositionRoot } from '@backstage/plugin-home';
import { LighthousePage } from '@backstage/plugin-lighthouse';
import { NewRelicPage } from '@backstage/plugin-newrelic';
import { NextScaffolderPage } from '@backstage/plugin-scaffolder/alpha';
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
import {
ScaffolderPage,
scaffolderPlugin,
ScaffolderFieldExtensions,
ScaffolderLayouts,
} from '@backstage/plugin-scaffolder';
import { ScaffolderFieldExtensions } from '@backstage/plugin-scaffolder-react';
} from '@backstage/plugin-scaffolder-react';
import { SearchPage } from '@backstage/plugin-search';
import { TechRadarPage } from '@backstage/plugin-tech-radar';
import {
@@ -186,7 +186,7 @@ export const SearchModal = ({ toggleModal }: { toggleModal: () => void }) => {
</Grid>
</Grid>
<Grid item xs>
<SearchResult onClick={toggleModal}>
<SearchResult>
<CatalogSearchResultListItem icon={<CatalogIcon />} />
<TechDocsSearchResultListItem icon={<DocsIcon />} />
<ToolSearchResultListItem icon={<BuildIcon />} />
+17
View File
@@ -1,5 +1,22 @@
# @backstage/backend-app-api
## 0.4.2-next.2
### Patch Changes
- 5c7ce585824: Allow an additionalConfig to be provided to loadBackendConfig that fetches config values during runtime.
- Updated dependencies
- @backstage/backend-common@0.18.4-next.2
- @backstage/plugin-permission-node@0.7.7-next.2
- @backstage/backend-plugin-api@0.5.1-next.2
- @backstage/backend-tasks@0.5.1-next.2
- @backstage/cli-common@0.1.12
- @backstage/config@1.0.7
- @backstage/config-loader@1.1.9
- @backstage/errors@1.1.5
- @backstage/types@1.0.2
- @backstage/plugin-auth-node@0.2.13-next.2
## 0.4.2-next.1
### Patch Changes
+2
View File
@@ -5,6 +5,7 @@
```ts
/// <reference types="node" />
import type { AppConfig } from '@backstage/config';
import { BackendFeature } from '@backstage/backend-plugin-api';
import { CacheClient } from '@backstage/backend-common';
import { Config } from '@backstage/config';
@@ -178,6 +179,7 @@ export const lifecycleServiceFactory: () => ServiceFactory<
export function loadBackendConfig(options: {
remote?: LoadConfigOptionsRemote;
argv: string[];
additionalConfigs?: AppConfig[];
}): Promise<{
config: Config;
}>;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-app-api",
"description": "Core API used by Backstage backend apps",
"version": "0.4.2-next.1",
"version": "0.4.2-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+13 -5
View File
@@ -24,7 +24,8 @@ import {
ConfigTarget,
LoadConfigOptionsRemote,
} from '@backstage/config-loader';
import { Config, ConfigReader } from '@backstage/config';
import { ConfigReader } from '@backstage/config';
import type { Config, AppConfig } from '@backstage/config';
import { getPackages } from '@manypkg/get-packages';
import { ObservableConfigProxy } from './ObservableConfigProxy';
import { isValidUrl } from '../lib/urls';
@@ -70,6 +71,7 @@ export async function createConfigSecretEnumerator(options: {
export async function loadBackendConfig(options: {
remote?: LoadConfigOptionsRemote;
argv: string[];
additionalConfigs?: AppConfig[];
}): Promise<{ config: Config }> {
const args = parseArgs(options.argv);
@@ -92,8 +94,11 @@ export async function loadBackendConfig(options: {
console.info(
`Reloaded config from ${newConfigs.map(c => c.context).join(', ')}`,
);
config.setConfig(ConfigReader.fromConfigs(newConfigs));
const configsToMerge = [...newConfigs];
if (options.additionalConfigs) {
configsToMerge.push(...options.additionalConfigs);
}
config.setConfig(ConfigReader.fromConfigs(configsToMerge));
},
stopSignal: new Promise(resolve => {
if (currentCancelFunc) {
@@ -109,12 +114,15 @@ export async function loadBackendConfig(options: {
}),
},
});
console.info(
`Loaded config from ${appConfigs.map(c => c.context).join(', ')}`,
);
config.setConfig(ConfigReader.fromConfigs(appConfigs));
const finalAppConfigs = [...appConfigs];
if (options.additionalConfigs) {
finalAppConfigs.push(...options.additionalConfigs);
}
config.setConfig(ConfigReader.fromConfigs(finalAppConfigs));
return { config };
}
+17
View File
@@ -1,5 +1,22 @@
# @backstage/backend-common
## 0.18.4-next.2
### Patch Changes
- 5c7ce585824: Allow an additionalConfig to be provided to loadBackendConfig that fetches config values during runtime.
- Updated dependencies
- @backstage/backend-app-api@0.4.2-next.2
- @backstage/backend-dev-utils@0.1.1
- @backstage/backend-plugin-api@0.5.1-next.2
- @backstage/cli-common@0.1.12
- @backstage/config@1.0.7
- @backstage/config-loader@1.1.9
- @backstage/errors@1.1.5
- @backstage/integration@1.4.4-next.0
- @backstage/integration-aws-node@0.1.2
- @backstage/types@1.0.2
## 0.18.4-next.1
### Patch Changes
+2
View File
@@ -6,6 +6,7 @@
/// <reference types="node" />
/// <reference types="webpack-env" />
import { AppConfig } from '@backstage/config';
import { AwsCredentialsManager } from '@backstage/integration-aws-node';
import { AwsS3Integration } from '@backstage/integration';
import { AzureIntegration } from '@backstage/integration';
@@ -533,6 +534,7 @@ export const legacyPlugin: (
export function loadBackendConfig(options: {
logger: LoggerService;
remote?: LoadConfigOptionsRemote;
additionalConfig?: AppConfig;
argv: string[];
}): Promise<Config>;
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.18.4-next.1",
"version": "0.18.4-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+2 -1
View File
@@ -19,7 +19,7 @@ import {
loadBackendConfig as newLoadBackendConfig,
} from '@backstage/backend-app-api';
import { LoggerService } from '@backstage/backend-plugin-api';
import { Config } from '@backstage/config';
import { AppConfig, Config } from '@backstage/config';
import { LoadConfigOptionsRemote } from '@backstage/config-loader';
import { setRootLoggerRedactionList } from './logging/createRootLogger';
@@ -34,6 +34,7 @@ export async function loadBackendConfig(options: {
logger: LoggerService;
// process.argv or any other overrides
remote?: LoadConfigOptionsRemote;
additionalConfig?: AppConfig;
argv: string[];
}): Promise<Config> {
const secretEnumerator = await createConfigSecretEnumerator({
+9
View File
@@ -1,5 +1,14 @@
# @backstage/backend-defaults
## 0.1.9-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-app-api@0.4.2-next.2
- @backstage/backend-common@0.18.4-next.2
- @backstage/backend-plugin-api@0.5.1-next.2
## 0.1.9-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-defaults",
"description": "Backend defaults used by Backstage backend apps",
"version": "0.1.9-next.1",
"version": "0.1.9-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+22
View File
@@ -1,5 +1,27 @@
# example-backend-next
## 0.0.10-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-kubernetes-backend@0.10.0-next.2
- @backstage/plugin-catalog-backend@1.8.1-next.2
- @backstage/plugin-permission-node@0.7.7-next.2
- @backstage/plugin-permission-backend@0.5.19-next.2
- @backstage/plugin-scaffolder-backend@1.13.0-next.2
- @backstage/backend-defaults@0.1.9-next.2
- @backstage/plugin-app-backend@0.3.44-next.2
- @backstage/plugin-auth-node@0.2.13-next.2
- @backstage/plugin-permission-common@0.7.5-next.0
- @backstage/plugin-search-backend@1.3.0-next.2
- @backstage/plugin-search-backend-module-catalog@0.1.0-next.1
- @backstage/plugin-search-backend-module-explore@0.1.0-next.1
- @backstage/plugin-search-backend-module-techdocs@0.1.0-next.1
- @backstage/plugin-search-backend-node@1.2.0-next.2
- @backstage/plugin-techdocs-backend@1.6.1-next.2
- @backstage/plugin-todo-backend@0.1.41-next.2
## 0.0.10-next.1
### Patch Changes
+5 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend-next",
"version": "0.0.10-next.1",
"version": "0.0.10-next.2",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,8 +27,12 @@
"dependencies": {
"@backstage/backend-defaults": "workspace:^",
"@backstage/plugin-app-backend": "workspace:^",
"@backstage/plugin-auth-node": "workspace:^",
"@backstage/plugin-catalog-backend": "workspace:^",
"@backstage/plugin-kubernetes-backend": "workspace:^",
"@backstage/plugin-permission-backend": "workspace:^",
"@backstage/plugin-permission-common": "workspace:^",
"@backstage/plugin-permission-node": "workspace:^",
"@backstage/plugin-scaffolder-backend": "workspace:^",
"@backstage/plugin-search-backend": "workspace:^",
"@backstage/plugin-search-backend-module-catalog": "workspace:^",
+16 -7
View File
@@ -16,15 +16,19 @@
import { createBackend } from '@backstage/backend-defaults';
import { appPlugin } from '@backstage/plugin-app-backend/alpha';
import { todoPlugin } from '@backstage/plugin-todo-backend';
import { techdocsPlugin } from '@backstage/plugin-techdocs-backend/alpha';
import { catalogPlugin } from '@backstage/plugin-catalog-backend/alpha';
import { catalogModuleTemplateKind } from '@backstage/plugin-scaffolder-backend/alpha';
import { searchPlugin } from '@backstage/plugin-search-backend/alpha';
import { searchModuleCatalogCollator } from '@backstage/plugin-search-backend-module-catalog/alpha';
import { searchModuleTechDocsCollator } from '@backstage/plugin-search-backend-module-techdocs/alpha';
import { searchModuleExploreCollator } from '@backstage/plugin-search-backend-module-explore/alpha';
import { kubernetesPlugin } from '@backstage/plugin-kubernetes-backend/alpha';
import {
permissionModuleAllowAllPolicy,
permissionPlugin,
} from '@backstage/plugin-permission-backend/alpha';
import { catalogModuleTemplateKind } from '@backstage/plugin-scaffolder-backend/alpha';
import { searchModuleCatalogCollator } from '@backstage/plugin-search-backend-module-catalog/alpha';
import { searchModuleExploreCollator } from '@backstage/plugin-search-backend-module-explore/alpha';
import { searchModuleTechDocsCollator } from '@backstage/plugin-search-backend-module-techdocs/alpha';
import { searchPlugin } from '@backstage/plugin-search-backend/alpha';
import { techdocsPlugin } from '@backstage/plugin-techdocs-backend/alpha';
import { todoPlugin } from '@backstage/plugin-todo-backend';
const backend = createBackend();
@@ -48,4 +52,9 @@ backend.add(searchModuleExploreCollator());
// Kubernetes
backend.add(kubernetesPlugin());
// Permissions
backend.add(permissionPlugin());
backend.add(permissionModuleAllowAllPolicy());
backend.start();
+11
View File
@@ -1,5 +1,16 @@
# @backstage/backend-plugin-api
## 0.5.1-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-tasks@0.5.1-next.2
- @backstage/config@1.0.7
- @backstage/types@1.0.2
- @backstage/plugin-auth-node@0.2.13-next.2
- @backstage/plugin-permission-common@0.7.5-next.0
## 0.5.1-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-api",
"description": "Core API used by Backstage backend plugins",
"version": "0.5.1-next.1",
"version": "0.5.1-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
+10
View File
@@ -1,5 +1,15 @@
# @backstage/backend-tasks
## 0.5.1-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-common@0.18.4-next.2
- @backstage/config@1.0.7
- @backstage/errors@1.1.5
- @backstage/types@1.0.2
## 0.5.1-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-tasks",
"description": "Common distributed task management library for Backstage backends",
"version": "0.5.1-next.1",
"version": "0.5.1-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
@@ -39,6 +39,8 @@ async function migrateUntilBefore(knex: Knex, target: string): Promise<void> {
}
}
jest.setTimeout(60_000);
describe('migrations', () => {
const databases = TestDatabases.create({
ids: ['POSTGRES_13', 'POSTGRES_9', 'SQLITE_3'],
@@ -80,6 +82,5 @@ describe('migrations', () => {
await knex.destroy();
},
60_000,
);
});
@@ -32,6 +32,8 @@ function defer() {
return { promise, resolve };
}
jest.setTimeout(60_000);
describe('PluginTaskManagerImpl', () => {
const databases = TestDatabases.create({
ids: ['POSTGRES_13', 'POSTGRES_9', 'SQLITE_3'],
@@ -77,7 +79,6 @@ describe('PluginTaskManagerImpl', () => {
await promise;
expect(fn).toHaveBeenCalledWith(expect.any(AbortSignal));
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -98,7 +99,6 @@ describe('PluginTaskManagerImpl', () => {
await promise;
expect(fn).toHaveBeenCalledWith(expect.any(AbortSignal));
},
60_000,
);
});
@@ -125,7 +125,6 @@ describe('PluginTaskManagerImpl', () => {
await promise;
expect(fn).toHaveBeenCalledWith(expect.any(AbortSignal));
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -146,7 +145,6 @@ describe('PluginTaskManagerImpl', () => {
NotFoundError,
);
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -172,7 +170,6 @@ describe('PluginTaskManagerImpl', () => {
ConflictError,
);
},
60_000,
);
});
@@ -300,7 +297,6 @@ describe('PluginTaskManagerImpl', () => {
await promise;
expect(fn).toHaveBeenCalledWith(expect.any(AbortSignal));
},
60_000,
);
});
@@ -340,7 +336,6 @@ describe('PluginTaskManagerImpl', () => {
},
]);
},
60_000,
);
});
@@ -20,6 +20,8 @@ import { Duration } from 'luxon';
import waitForExpect from 'wait-for-expect';
import { TaskScheduler } from './TaskScheduler';
jest.setTimeout(60_000);
describe('TaskScheduler', () => {
const logger = getVoidLogger();
const databases = TestDatabases.create({
@@ -56,7 +58,6 @@ describe('TaskScheduler', () => {
expect(fn).toHaveBeenCalled();
});
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -77,6 +78,5 @@ describe('TaskScheduler', () => {
expect(fn).toHaveBeenCalled();
});
},
60_000,
);
});
@@ -23,6 +23,8 @@ import { DbTasksRow, DB_TASKS_TABLE } from '../database/tables';
import { TaskWorker } from './TaskWorker';
import { TaskSettingsV2 } from './types';
jest.setTimeout(60_000);
describe('TaskWorker', () => {
const logger = getVoidLogger();
const databases = TestDatabases.create({
@@ -115,7 +117,6 @@ describe('TaskWorker', () => {
}),
);
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -140,7 +141,6 @@ describe('TaskWorker', () => {
expect(logger.error).toHaveBeenCalled();
});
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -164,7 +164,6 @@ describe('TaskWorker', () => {
expect(fn).toHaveBeenCalledTimes(3);
});
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -223,7 +222,6 @@ describe('TaskWorker', () => {
}),
);
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -280,7 +278,6 @@ describe('TaskWorker', () => {
false,
);
},
60_000,
);
it.each(databases.eachSupportedId())(
@@ -334,6 +331,5 @@ describe('TaskWorker', () => {
await promise2;
expect(fn1.mock.calls.length).toBeGreaterThan(before);
},
60_000,
);
});
+12
View File
@@ -1,5 +1,17 @@
# @backstage/backend-test-utils
## 0.1.36-next.2
### Patch Changes
- Updated dependencies
- @backstage/backend-app-api@0.4.2-next.2
- @backstage/backend-common@0.18.4-next.2
- @backstage/backend-plugin-api@0.5.1-next.2
- @backstage/config@1.0.7
- @backstage/types@1.0.2
- @backstage/plugin-auth-node@0.2.13-next.2
## 0.1.36-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.1.36-next.1",
"version": "0.1.36-next.2",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {
@@ -22,12 +22,16 @@ import { TestDatabases } from './TestDatabases';
const itIfDocker = isDockerDisabledForTests() ? it.skip : it;
jest.setTimeout(60_000);
describe('TestDatabases', () => {
const OLD_ENV = process.env;
beforeEach(() => {
jest.resetModules();
process.env = { ...OLD_ENV };
});
afterAll(() => {
process.env = OLD_ENV;
});
@@ -49,109 +53,84 @@ describe('TestDatabases', () => {
{ a: 1 },
]);
},
60_000,
);
});
itIfDocker(
'obeys a provided connection string for postgres 13',
async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startPostgresContainer(
'postgres:13',
);
itIfDocker('obeys a provided connection string for postgres 13', async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startPostgresContainer(
'postgres:13',
);
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING = `postgresql://${user}:${password}@${host}:${port}`;
const input = await dbs.init('POSTGRES_13');
await input.schema.createTable('a', table =>
table.string('x').primary(),
);
await input.insert({ x: 'y' }).into('a');
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_POSTGRES13_CONNECTION_STRING = `postgresql://${user}:${password}@${host}:${port}`;
const input = await dbs.init('POSTGRES_13');
await input.schema.createTable('a', table => table.string('x').primary());
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([
{ x: 'y' },
]);
} finally {
await stop();
}
},
60_000,
);
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([{ x: 'y' }]);
} finally {
await stop();
}
});
itIfDocker(
'obeys a provided connection string for postgres 9',
async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startPostgresContainer(
'postgres:9',
);
itIfDocker('obeys a provided connection string for postgres 9', async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startPostgresContainer(
'postgres:9',
);
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING = `postgresql://${user}:${password}@${host}:${port}`;
const input = await dbs.init('POSTGRES_9');
await input.schema.createTable('a', table =>
table.string('x').primary(),
);
await input.insert({ x: 'y' }).into('a');
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_POSTGRES9_CONNECTION_STRING = `postgresql://${user}:${password}@${host}:${port}`;
const input = await dbs.init('POSTGRES_9');
await input.schema.createTable('a', table => table.string('x').primary());
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([
{ x: 'y' },
]);
} finally {
await stop();
}
},
60_000,
);
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'pg',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([{ x: 'y' }]);
} finally {
await stop();
}
});
itIfDocker(
'obeys a provided connection string for mysql 8',
async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startMysqlContainer(
'mysql:8',
);
itIfDocker('obeys a provided connection string for mysql 8', async () => {
const dbs = TestDatabases.create();
const { host, port, user, password, stop } = await startMysqlContainer(
'mysql:8',
);
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING = `mysql://${user}:${password}@${host}:${port}/ignored`;
const input = await dbs.init('MYSQL_8');
await input.schema.createTable('a', table =>
table.string('x').primary(),
);
await input.insert({ x: 'y' }).into('a');
try {
// Leave a mark
process.env.BACKSTAGE_TEST_DATABASE_MYSQL8_CONNECTION_STRING = `mysql://${user}:${password}@${host}:${port}/ignored`;
const input = await dbs.init('MYSQL_8');
await input.schema.createTable('a', table => table.string('x').primary());
await input.insert({ x: 'y' }).into('a');
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'mysql2',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([
{ x: 'y' },
]);
} finally {
await stop();
}
},
60_000,
);
// Look for the mark
const database = input.client.config.connection.database;
const output = knexFactory({
client: 'mysql2',
connection: { host, port, user, password, database },
});
// eslint-disable-next-line jest/no-standalone-expect
await expect(output.select('x').from('a')).resolves.toEqual([{ x: 'y' }]);
} finally {
await stop();
}
});
});
@@ -20,21 +20,19 @@ import { startMysqlContainer } from './startMysqlContainer';
const itIfDocker = isDockerDisabledForTests() ? it.skip : it;
jest.setTimeout(60_000);
describe('startMysqlContainer', () => {
itIfDocker(
'successfully launches the container',
async () => {
const { stop, ...connection } = await startMysqlContainer('mysql:8');
const db = createConnection({ client: 'mysql2', connection });
try {
const result = await db.select(db.raw('version() AS version'));
// eslint-disable-next-line jest/no-standalone-expect
expect(result[0]?.version).toContain('8.');
} finally {
await db.destroy();
await stop();
}
},
60_000,
);
itIfDocker('successfully launches the container', async () => {
const { stop, ...connection } = await startMysqlContainer('mysql:8');
const db = createConnection({ client: 'mysql2', connection });
try {
const result = await db.select(db.raw('version() AS version'));
// eslint-disable-next-line jest/no-standalone-expect
expect(result[0]?.version).toContain('8.');
} finally {
await db.destroy();
await stop();
}
});
});
@@ -20,23 +20,19 @@ import { startPostgresContainer } from './startPostgresContainer';
const itIfDocker = isDockerDisabledForTests() ? it.skip : it;
jest.setTimeout(60_000);
describe('startPostgresContainer', () => {
itIfDocker(
'successfully launches the container',
async () => {
const { stop, ...connection } = await startPostgresContainer(
'postgres:13',
);
const db = createConnection({ client: 'pg', connection });
try {
const result = await db.select(db.raw('version()'));
// eslint-disable-next-line jest/no-standalone-expect
expect(result[0]?.version).toContain('PostgreSQL');
} finally {
await db.destroy();
await stop();
}
},
60_000,
);
itIfDocker('successfully launches the container', async () => {
const { stop, ...connection } = await startPostgresContainer('postgres:13');
const db = createConnection({ client: 'pg', connection });
try {
const result = await db.select(db.raw('version()'));
// eslint-disable-next-line jest/no-standalone-expect
expect(result[0]?.version).toContain('PostgreSQL');
} finally {
await db.destroy();
await stop();
}
});
});
+51
View File
@@ -1,5 +1,56 @@
# example-backend
## 0.2.82-next.2
### Patch Changes
- Updated dependencies
- @backstage/plugin-kubernetes-backend@0.10.0-next.2
- @backstage/plugin-catalog-backend@1.8.1-next.2
- @backstage/backend-common@0.18.4-next.2
- @backstage/catalog-client@1.4.1-next.0
- @backstage/plugin-permission-node@0.7.7-next.2
- @backstage/plugin-permission-backend@0.5.19-next.2
- @backstage/plugin-rollbar-backend@0.1.41-next.2
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.28-next.2
- @backstage/plugin-scaffolder-backend@1.13.0-next.2
- example-app@0.2.82-next.2
- @backstage/backend-tasks@0.5.1-next.2
- @backstage/catalog-model@1.2.1
- @backstage/config@1.0.7
- @backstage/integration@1.4.4-next.0
- @backstage/plugin-adr-backend@0.3.2-next.2
- @backstage/plugin-app-backend@0.3.44-next.2
- @backstage/plugin-auth-backend@0.18.2-next.2
- @backstage/plugin-auth-node@0.2.13-next.2
- @backstage/plugin-azure-devops-backend@0.3.23-next.2
- @backstage/plugin-azure-sites-backend@0.1.6-next.2
- @backstage/plugin-badges-backend@0.1.38-next.2
- @backstage/plugin-catalog-node@1.3.5-next.2
- @backstage/plugin-code-coverage-backend@0.2.10-next.2
- @backstage/plugin-entity-feedback-backend@0.1.2-next.2
- @backstage/plugin-events-backend@0.2.5-next.2
- @backstage/plugin-events-node@0.2.5-next.2
- @backstage/plugin-explore-backend@0.0.6-next.2
- @backstage/plugin-graphql-backend@0.1.34-next.2
- @backstage/plugin-jenkins-backend@0.1.34-next.2
- @backstage/plugin-kafka-backend@0.2.37-next.2
- @backstage/plugin-lighthouse-backend@0.1.2-next.2
- @backstage/plugin-linguist-backend@0.2.1-next.2
- @backstage/plugin-permission-common@0.7.5-next.0
- @backstage/plugin-playlist-backend@0.2.7-next.2
- @backstage/plugin-proxy-backend@0.2.38-next.2
- @backstage/plugin-scaffolder-backend-module-rails@0.4.12-next.2
- @backstage/plugin-search-backend@1.3.0-next.2
- @backstage/plugin-search-backend-module-elasticsearch@1.2.0-next.2
- @backstage/plugin-search-backend-module-pg@0.5.5-next.2
- @backstage/plugin-search-backend-node@1.2.0-next.2
- @backstage/plugin-search-common@1.2.3-next.0
- @backstage/plugin-tech-insights-backend@0.5.10-next.2
- @backstage/plugin-tech-insights-node@0.4.2-next.2
- @backstage/plugin-techdocs-backend@1.6.1-next.2
- @backstage/plugin-todo-backend@0.1.41-next.2
## 0.2.82-next.1
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.82-next.1",
"version": "0.2.82-next.2",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/catalog-client
## 1.4.1-next.0
### Patch Changes
- c1c4e080b79: Fixed bug in `queryEntities` of `CatalogClient` where the `sortField` is supposed to be changed to `orderField`.
- Updated dependencies
- @backstage/catalog-model@1.2.1
- @backstage/errors@1.1.5
## 1.4.0
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/catalog-client",
"description": "An isomorphic client for the catalog backend",
"version": "1.4.0",
"version": "1.4.1-next.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -352,7 +352,7 @@ describe('CatalogClient', () => {
],
});
expect(mockedEndpoint.mock.calls[0][0].url.search).toBe(
'?limit=100&sortField=metadata.name,asc&sortField=metadata.uid,desc&fields=a,b&fullTextFilterTerm=query',
'?limit=100&orderField=metadata.name,asc&orderField=metadata.uid,desc&fields=a,b&fullTextFilterTerm=query',
);
});
+1 -1
View File
@@ -230,7 +230,7 @@ export class CatalogClient implements CatalogApi {
}
if (orderFields !== undefined) {
(Array.isArray(orderFields) ? orderFields : [orderFields]).forEach(
({ field, order }) => params.push(`sortField=${field},${order}`),
({ field, order }) => params.push(`orderField=${field},${order}`),
);
}
if (fields.length) {
+14
View File
@@ -1,5 +1,19 @@
# @backstage/cli
## 0.22.6-next.2
### Patch Changes
- 8075b67e64c: When building a backend package with dependencies any `--config <path>` options will now be forwarded to any dependent app package builds, unless the build script in the app package already contains a `--config` option.
- Updated dependencies
- @backstage/cli-common@0.1.12
- @backstage/config@1.0.7
- @backstage/config-loader@1.1.9
- @backstage/errors@1.1.5
- @backstage/eslint-plugin@0.1.3-next.0
- @backstage/release-manifests@0.0.9
- @backstage/types@1.0.2
## 0.22.6-next.1
### Patch Changes
+3 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/cli",
"description": "CLI for developing Backstage plugins and apps",
"version": "0.22.6-next.1",
"version": "0.22.6-next.2",
"publishConfig": {
"access": "public"
},
@@ -161,7 +161,8 @@
"mock-fs": "^5.1.0",
"msw": "^1.0.0",
"nodemon": "^2.0.2",
"ts-node": "^10.0.0"
"ts-node": "^10.0.0",
"type-fest": "^2.19.0"
},
"peerDependencies": {
"@microsoft/api-extractor": "^7.21.2"
@@ -28,10 +28,11 @@ const SKELETON_FILE = 'skeleton.tar.gz';
interface BuildBackendOptions {
targetDir: string;
skipBuildDependencies: boolean;
configPaths?: string[];
}
export async function buildBackend(options: BuildBackendOptions) {
const { targetDir, skipBuildDependencies } = options;
const { targetDir, skipBuildDependencies, configPaths } = options;
const pkg = await fs.readJson(resolvePath(targetDir, 'package.json'));
// We build the target package without generating type declarations.
@@ -45,6 +46,7 @@ export async function buildBackend(options: BuildBackendOptions) {
try {
await createDistWorkspace([pkg.name], {
targetDir: tmpDir,
configPaths,
buildDependencies: !skipBuildDependencies,
buildExcludes: [pkg.name],
parallelism: getEnvironmentParallelism(),
+16 -7
View File
@@ -20,20 +20,29 @@ import { findRoleFromCommand, getRoleInfo } from '../../lib/role';
import { paths } from '../../lib/paths';
import { buildFrontend } from './buildFrontend';
import { buildBackend } from './buildBackend';
import { isValidUrl } from '../../lib/urls';
export async function command(opts: OptionValues): Promise<void> {
const role = await findRoleFromCommand(opts);
if (role === 'frontend') {
return buildFrontend({
targetDir: paths.targetDir,
configPaths: opts.config as string[],
writeStats: Boolean(opts.stats),
if (role === 'frontend' || role === 'backend') {
const configPaths = (opts.config as string[]).map(arg => {
if (isValidUrl(arg)) {
return arg;
}
return paths.resolveTarget(arg);
});
}
if (role === 'backend') {
if (role === 'frontend') {
return buildFrontend({
targetDir: paths.targetDir,
configPaths,
writeStats: Boolean(opts.stats),
});
}
return buildBackend({
targetDir: paths.targetDir,
configPaths,
skipBuildDependencies: Boolean(opts.skipBuildDependencies),
});
}
+2 -2
View File
@@ -15,12 +15,12 @@
*/
import chalk from 'chalk';
import inquirer from 'inquirer';
import inquirer, { Answers } from 'inquirer';
import { AnyFactory, Prompt } from './types';
import * as factories from './factories';
import partition from 'lodash/partition';
function applyPromptMessageTransforms<T>(
function applyPromptMessageTransforms<T extends Answers>(
prompt: Prompt<T>,
transforms: {
message: (msg: string) => string;
+4 -2
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { DistinctQuestion } from 'inquirer';
import { Answers, DistinctQuestion } from 'inquirer';
export interface CreateContext {
/** The package scope to use for new packages */
@@ -37,7 +37,9 @@ export interface CreateContext {
export type AnyOptions = Record<string, string>;
export type Prompt<TOptions> = DistinctQuestion<TOptions> & { name: string };
export type Prompt<TOptions extends Answers> = DistinctQuestion<TOptions> & {
name: string;
};
export interface Factory<TOptions extends AnyOptions> {
/**
@@ -60,6 +60,11 @@ type Options = {
*/
targetDir?: string;
/**
* Configuration files to load during packaging.
*/
configPaths?: string[];
/**
* Files to copy into the target workspace.
*
@@ -127,13 +132,18 @@ export async function createDistWorkspace(
if (options.buildDependencies) {
const exclude = options.buildExcludes ?? [];
const configPaths = options.configPaths ?? [];
const toBuild = new Set(
targets.map(_ => _.name).filter(name => !exclude.includes(name)),
);
const standardBuilds = new Array<BuildOptions>();
const customBuild = new Array<{ dir: string; name: string }>();
const customBuild = new Array<{
dir: string;
name: string;
args?: string[];
}>();
for (const pkg of packages) {
if (!toBuild.has(pkg.packageJson.name)) {
@@ -166,7 +176,10 @@ export async function createDistWorkspace(
console.warn(
`Building ${pkg.packageJson.name} separately because it is a bundled package`,
);
customBuild.push({ dir: pkg.dir, name: pkg.packageJson.name });
const args = buildScript.includes('--config')
? []
: configPaths.map(p => ['--config', p]).flat();
customBuild.push({ dir: pkg.dir, name: pkg.packageJson.name, args });
continue;
}
@@ -193,8 +206,8 @@ export async function createDistWorkspace(
if (customBuild.length > 0) {
await runParallelWorkers({
items: customBuild,
worker: async ({ name, dir }) => {
await run('yarn', ['run', 'build'], {
worker: async ({ name, dir, args }) => {
await run('yarn', ['run', 'build', ...(args || [])], {
cwd: dir,
stdoutLogFunc: prefixLogFunc(`${name}: `, 'stdout'),
stderrLogFunc: prefixLogFunc(`${name}: `, 'stderr'),
+10
View File
@@ -1,5 +1,15 @@
# @backstage/core-app-api
## 1.7.0-next.2
### Patch Changes
- Updated dependencies
- @backstage/core-plugin-api@1.5.1-next.1
- @backstage/config@1.0.7
- @backstage/types@1.0.2
- @backstage/version-bridge@1.0.4-next.0
## 1.7.0-next.1
### Patch Changes
+5 -3
View File
@@ -116,9 +116,11 @@ export const ApiProvider: {
(props: PropsWithChildren<ApiProviderProps>): JSX.Element;
propTypes: {
apis: PropTypes.Validator<
PropTypes.InferProps<{
get: PropTypes.Validator<(...args: any[]) => any>;
}>
NonNullable<
PropTypes.InferProps<{
get: PropTypes.Validator<(...args: any[]) => any>;
}>
>
>;
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
};
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-app-api",
"description": "Core app API used by Backstage apps",
"version": "1.7.0-next.1",
"version": "1.7.0-next.2",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
+13
View File
@@ -1,5 +1,18 @@
# @backstage/core-components
## 0.12.6-next.2
### Patch Changes
- 67140d9f96f: Upgrade `react-virtualized-auto-sizer´ to version `^1.0.11`
- 7e60bee2dea: Split the `BackstageSidebar` style `drawer` class, such that the `width` property is in a separate `drawerWidth` class instead. This makes it such that you can style the `drawer` class in your theme again.
- Updated dependencies
- @backstage/core-plugin-api@1.5.1-next.1
- @backstage/config@1.0.7
- @backstage/errors@1.1.5
- @backstage/theme@0.2.19-next.0
- @backstage/version-bridge@1.0.4-next.0
## 0.12.6-next.1
### Patch Changes
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-components",
"description": "Core components used by Backstage plugins and apps",
"version": "0.12.6-next.1",
"version": "0.12.6-next.2",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
@@ -66,7 +66,7 @@
"react-syntax-highlighter": "^15.4.5",
"react-text-truncate": "^0.19.0",
"react-use": "^17.3.2",
"react-virtualized-auto-sizer": "^1.0.6",
"react-virtualized-auto-sizer": "^1.0.11",
"react-window": "^1.8.6",
"remark-gfm": "^3.0.1",
"zen-observable": "^0.10.0",
@@ -77,8 +77,8 @@ export function RealLogViewer(props: RealLogViewerProps) {
<FixedSizeList
ref={listRef}
className={classes.log}
height={height - HEADER_SIZE}
width={width}
height={(height || 480) - HEADER_SIZE}
width={width || 640}
itemData={search.lines}
itemSize={20}
itemCount={search.lines.length}
@@ -376,7 +376,7 @@ export function Table<T extends object = {}>(props: TableProps<T>) {
const newData = (data as any[]).filter(
el =>
!!Object.entries(selectedFilters)
.filter(([, value]) => !!value.length)
.filter(([, value]) => !!(value as { length?: number }).length)
.every(([key, filterValue]) => {
const fieldValue = extractValueByField(
el,
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { BackstageTheme } from '@backstage/theme';
import Box from '@material-ui/core/Box';
import Button from '@material-ui/core/Button';
@@ -39,7 +40,7 @@ import { useSidebarPinState } from './SidebarPinStateContext';
export type SidebarClassKey = 'drawer' | 'drawerOpen';
const useStyles = makeStyles<BackstageTheme, { sidebarConfig: SidebarConfig }>(
theme => ({
drawer: props => ({
drawer: {
display: 'flex',
flexFlow: 'column nowrap',
alignItems: 'flex-start',
@@ -52,7 +53,6 @@ const useStyles = makeStyles<BackstageTheme, { sidebarConfig: SidebarConfig }>(
overflowX: 'hidden',
msOverflowStyle: 'none',
scrollbarWidth: 'none',
width: props.sidebarConfig.drawerWidthClosed,
transition: theme.transitions.create('width', {
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.shortest,
@@ -63,6 +63,9 @@ const useStyles = makeStyles<BackstageTheme, { sidebarConfig: SidebarConfig }>(
'&::-webkit-scrollbar': {
display: 'none',
},
},
drawerWidth: props => ({
width: props.sidebarConfig.drawerWidthClosed,
}),
drawerOpen: props => ({
width: props.sidebarConfig.drawerWidthOpen,
@@ -174,7 +177,7 @@ const DesktopSidebar = (props: DesktopSidebarProps) => {
const isOpen = (state === State.Open && !isSmallScreen) || isPinned;
/**
* Close/Open Sidebar directily without delays. Also toggles `SidebarPinState` to avoid hidden content behind Sidebar.
* Close/Open Sidebar directly without delays. Also toggles `SidebarPinState` to avoid hidden content behind Sidebar.
*/
const setOpen = (open: boolean) => {
if (open) {
@@ -199,7 +202,7 @@ const DesktopSidebar = (props: DesktopSidebarProps) => {
onBlur={disableExpandOnHover ? () => {} : handleClose}
>
<Box
className={classnames(classes.drawer, {
className={classnames(classes.drawer, classes.drawerWidth, {
[classes.drawerOpen]: isOpen,
})}
>
+10
View File
@@ -1,5 +1,15 @@
# @backstage/core-plugin-api
## 1.5.1-next.1
### Patch Changes
- 2898b6c8d52: Minor type tweaks for TypeScript 5.0
- Updated dependencies
- @backstage/config@1.0.7
- @backstage/types@1.0.2
- @backstage/version-bridge@1.0.4-next.0
## 1.5.1-next.0
### Patch Changes
+5 -3
View File
@@ -769,10 +769,12 @@ export function useRouteRefParams<Params extends AnyParams>(
): Params;
// @public
export function withApis<T>(apis: TypesToApiRefs<T>): <P extends T>(
WrappedComponent: React_2.ComponentType<P>,
export function withApis<T extends {}>(
apis: TypesToApiRefs<T>,
): <TProps extends T>(
WrappedComponent: React_2.ComponentType<TProps>,
) => {
(props: React_2.PropsWithChildren<Omit<P, keyof T>>): JSX.Element;
(props: React_2.PropsWithChildren<Omit<TProps, keyof T>>): JSX.Element;
displayName: string;
};
```
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-plugin-api",
"description": "Core API used by Backstage plugins",
"version": "1.5.1-next.0",
"version": "1.5.1-next.1",
"publishConfig": {
"access": "public"
},
@@ -91,11 +91,11 @@ export const AnalyticsContext = (options: {
* @param values - Analytics context key/value pairs.
* @internal
*/
export function withAnalyticsContext<P>(
Component: React.ComponentType<P>,
export function withAnalyticsContext<TProps extends {}>(
Component: React.ComponentType<TProps>,
values: AnalyticsContextValue,
) {
const ComponentWithAnalyticsContext = (props: P) => {
const ComponentWithAnalyticsContext = (props: TProps) => {
return (
<AnalyticsContext attributes={values}>
<Component {...props} />
@@ -58,11 +58,11 @@ export function useApi<T>(apiRef: ApiRef<T>): T {
* @param apis - APIs for the context.
* @public
*/
export function withApis<T>(apis: TypesToApiRefs<T>) {
return function withApisWrapper<P extends T>(
WrappedComponent: React.ComponentType<P>,
export function withApis<T extends {}>(apis: TypesToApiRefs<T>) {
return function withApisWrapper<TProps extends T>(
WrappedComponent: React.ComponentType<TProps>,
) {
const Hoc = (props: PropsWithChildren<Omit<P, keyof T>>) => {
const Hoc = (props: PropsWithChildren<Omit<TProps, keyof T>>) => {
const apiHolder = useApiHolder();
const impls = {} as T;
@@ -79,7 +79,7 @@ export function withApis<T>(apis: TypesToApiRefs<T>) {
}
}
return <WrappedComponent {...(props as P)} {...impls} />;
return <WrappedComponent {...(props as TProps)} {...impls} />;
};
const displayName =
WrappedComponent.displayName || WrappedComponent.name || 'Component';
+16
View File
@@ -1,5 +1,21 @@
# @backstage/create-app
## 0.4.39-next.2
### Patch Changes
- 2945923b133: Upgraded the TypeScript version to 5.0
To apply this change in your own project, switch the TypeScript version in your root `package.json`:
```diff
- "typescript": "~4.6.4",
+ "typescript": "~5.0.0",
```
- Updated dependencies
- @backstage/cli-common@0.1.12
## 0.4.39-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/create-app",
"description": "A CLI that helps you create your own Backstage app",
"version": "0.4.39-next.1",
"version": "0.4.39-next.2",
"publishConfig": {
"access": "public"
},
@@ -35,7 +35,7 @@
"lerna": "^4.0.0",
"node-gyp": "^9.0.0",
"prettier": "^2.3.2",
"typescript": "~4.6.4"
"typescript": "~5.0.0"
},
"resolutions": {
"@types/react": "^17",
+15
View File
@@ -1,5 +1,20 @@
# @backstage/dev-utils
## 1.0.14-next.2
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.12.6-next.2
- @backstage/plugin-catalog-react@1.4.1-next.2
- @backstage/core-plugin-api@1.5.1-next.1
- @backstage/app-defaults@1.3.0-next.2
- @backstage/catalog-model@1.2.1
- @backstage/core-app-api@1.7.0-next.2
- @backstage/integration-react@1.1.12-next.2
- @backstage/test-utils@1.3.0-next.2
- @backstage/theme@0.2.19-next.0
## 1.0.14-next.1
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/dev-utils",
"description": "Utilities for developing Backstage plugins.",
"version": "1.0.14-next.1",
"version": "1.0.14-next.2",
"publishConfig": {
"access": "public",
"main": "dist/index.esm.js",
+9
View File
@@ -1,5 +1,14 @@
# e2e-test
## 0.2.2-next.2
### Patch Changes
- Updated dependencies
- @backstage/create-app@0.4.39-next.2
- @backstage/cli-common@0.1.12
- @backstage/errors@1.1.5
## 0.2.2-next.1
### Patch Changes

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