Merge branch 'master' into feature/EKSCatalog
Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-tech-insights-backend': patch
|
||||
---
|
||||
|
||||
TechInsightsBackend: Added missing 'scheduler' to code examples
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
The template editor now shows the cause of request errors that happen during a dry-run.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-node': minor
|
||||
---
|
||||
|
||||
Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
Bumped `codemirror` dependencies to `v6.0.0`.
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
'@backstage/cli': minor
|
||||
---
|
||||
|
||||
**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).
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@techdocs/cli': patch
|
||||
'@backstage/plugin-techdocs-node': patch
|
||||
---
|
||||
|
||||
Fix the flag parsing for `legacyCopyReadmeMdToIndexMd` in `techdocs-cli generate` command, and decouple it's logic from the `techdocs-ref` flag.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-apache-airflow': minor
|
||||
---
|
||||
|
||||
Exposed DagTableComponent as standalone component + added a prop to get only select DAGs instead of the full list
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Upgrade `@rollup/plugin-node-resolve` to `^13.0.6`
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': minor
|
||||
---
|
||||
|
||||
**BREAKING**: Removed all directly exported auth provider factories, option types, and sign-in resolvers. For example: `AwsAlbProviderOptions`, `bitbucketUserIdSignInResolver`, `createGithubProvider`. These are all still accessible via the `providers` export. For example, use `providers.github.create()` rather than `createGithubProvider()`, and `providers.bitbucket.resolvers.userIdMatchingUserEntityAnnotation()` rather than `bitbucketUserIdSignInResolver`.
|
||||
|
||||
**BREAKING**: Removed the exported `AuthProviderFactoryOptions` type as well as the deprecated option fields of the `AuthProviderFactory` callback. This includes the `tokenManager`, `tokenIssuer`, `discovery`, and `catalogApi` fields. Existing usage of these should be replaced with the new utilities in the `resolverContext` field. The deprecated `TokenIssuer` type is now also removed, since it is no longer used.
|
||||
|
||||
**BREAKING**: Removed `getEntityClaims`, use `getDefaultOwnershipEntityRefs` instead.
|
||||
|
||||
**DEPRECATION**: Deprecated `AtlassianAuthProvider` as it was unintentionally exported.
|
||||
+35
-2
@@ -156,7 +156,40 @@
|
||||
"@backstage/plugin-user-settings": "0.4.5",
|
||||
"@backstage/plugin-vault": "0.1.0",
|
||||
"@backstage/plugin-vault-backend": "0.1.0",
|
||||
"@backstage/plugin-xcmetrics": "0.2.26"
|
||||
"@backstage/plugin-xcmetrics": "0.2.26",
|
||||
"@backstage/plugin-api-docs-module-protoc-gen-doc": "0.0.0"
|
||||
},
|
||||
"changesets": []
|
||||
"changesets": [
|
||||
"beige-horses-scream",
|
||||
"breezy-poems-grab",
|
||||
"breezy-seas-exist",
|
||||
"chilled-mirrors-grab",
|
||||
"curly-candles-battle",
|
||||
"curvy-weeks-matter",
|
||||
"eleven-mice-collect",
|
||||
"great-roses-pump",
|
||||
"large-kangaroos-poke",
|
||||
"modern-ducks-lay",
|
||||
"nasty-zoos-cross",
|
||||
"nervous-humans-sip",
|
||||
"polite-eagles-invite",
|
||||
"purple-beans-march",
|
||||
"red-games-decide",
|
||||
"renovate-9454dab",
|
||||
"rude-llamas-lie",
|
||||
"shaggy-melons-drive",
|
||||
"sharp-planes-turn",
|
||||
"short-olives-train",
|
||||
"smooth-sheep-hide",
|
||||
"strange-trains-collect",
|
||||
"sweet-plants-sparkle",
|
||||
"tame-guests-wave",
|
||||
"techdocs-gorgeous-plants-sniff",
|
||||
"techdocs-the-whole-pulse",
|
||||
"thick-radios-drive",
|
||||
"unlucky-stingrays-juggle",
|
||||
"weak-bananas-deliver",
|
||||
"wet-dolphins-act",
|
||||
"wicked-icons-grin"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/catalog-model': patch
|
||||
---
|
||||
|
||||
Added type predicates for all entity types, e.g. isUserEntity
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Improve plural handling in logging output for secrets
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-api-docs-module-protoc-gen-doc': major
|
||||
'@backstage/plugin-api-docs-module-protoc-gen-doc': minor
|
||||
---
|
||||
|
||||
Added the new `grpcDocsApiWidget` to render `protoc-gen-doc` generated descriptors by the `grpc-docs` package.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/cli': patch
|
||||
---
|
||||
|
||||
Updated dependency `run-script-webpack-plugin` to `^0.1.0`.
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
'@backstage/plugin-search': patch
|
||||
---
|
||||
|
||||
To allow people to use a global search context in the search modal, the code for the search modal has been changed to only create a local search context if there is no parent context already defined.
|
||||
|
||||
If you want to continue using a local context even if you define a global one, you will have to wrap the modal in a new local context manually:
|
||||
|
||||
```tsx
|
||||
<SearchContextProvider>
|
||||
<SearchModal toggleModal={toggleModal} />
|
||||
</SearchContextProvider>
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Support displaying subtitle text in `SidebarSubmenuItem`
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/errors': minor
|
||||
---
|
||||
|
||||
The `ResponseError.fromResponse` now accepts a more narrow response type, in order to avoid incompatibilities between different fetch implementations.
|
||||
|
||||
The `response` property of `ResponseError` has also been narrowed to a new `ConsumedResponse` type that omits all the properties for consuming the body of the response. This is not considered a breaking change as it was always an error to try to consume the body of the response.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-org': patch
|
||||
---
|
||||
|
||||
Render namespaces for teams with subtitles in `MyGroupsSidebarItem`
|
||||
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-openapi': minor
|
||||
---
|
||||
|
||||
Add basic OpenAPI \$ref support.
|
||||
|
||||
For more information see [here](https://github.com/backstage/backstage/tree/master/plugins/catalog-backend-module-openapi).
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Use entity type predicates from catalog-model
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/plugin-stack-overflow': patch
|
||||
'@backstage/plugin-stack-overflow-backend': patch
|
||||
---
|
||||
|
||||
app-config is now picked up properly.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-scaffolder': patch
|
||||
---
|
||||
|
||||
The max content size for dry-run files has been reduced from 256k to 64k.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/theme': patch
|
||||
---
|
||||
|
||||
Adds optional `htmlFontSize` property and also sets typography design tokens for h5 and h6 in base theme.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-backend': patch
|
||||
---
|
||||
|
||||
Add sample headings on the documented component homepage.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs': patch
|
||||
---
|
||||
|
||||
Remove the 60% factor from the font size calculation of headers to use the exact size defined in BackstageTheme.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-ldap': patch
|
||||
---
|
||||
|
||||
Add possibility to resolve relations by RDN, in addition to UUID and DN
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend-module-gitlab': patch
|
||||
---
|
||||
|
||||
Add the possibility in the `GitlabDiscoveryEntityProvider` to scan the whole project instead of concrete groups. For that, use a configuration like this one, where the group parameter is omitted (not mandatory anymore):
|
||||
|
||||
```yaml
|
||||
catalog:
|
||||
providers:
|
||||
gitlab:
|
||||
yourProviderId:
|
||||
host: gitlab-host # Identifies one of the hosts set up in the integrations
|
||||
branch: main # Optional. Uses `master` as default
|
||||
entityFilename: catalog-info.yaml # Optional. Defaults to `catalog-info.yaml`
|
||||
```
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-techdocs-backend': minor
|
||||
---
|
||||
|
||||
Added local publishing target directory `config`: `techdocs.publisher.local.publishDirectory`
|
||||
+1
-2
@@ -8,8 +8,7 @@
|
||||
yarn.lock @backstage/reviewers @backstage-service
|
||||
*/yarn.lock @backstage/reviewers @backstage-service
|
||||
/.changeset/cost-insights-* @backstage/reviewers @backstage/silver-lining
|
||||
/.changeset/search-* @backstage/reviewers @backstage/techdocs-core
|
||||
/.changeset/techdocs-* @backstage/reviewers @backstage/techdocs-core
|
||||
/.changeset @backstage/reviewers @backstage/techdocs-core
|
||||
/cypress/src/integration/plugins/techdocs.spec.ts @backstage/reviewers @backstage/techdocs-core
|
||||
/docs/assets/search @backstage/reviewers @backstage/techdocs-core
|
||||
/docs/features/search @backstage/reviewers @backstage/techdocs-core
|
||||
|
||||
+10
-9
@@ -3,7 +3,7 @@
|
||||
_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._
|
||||
|
||||
| Organization | Contact | Description of Use |
|
||||
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|-----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [Spotify](https://www.spotify.com) | [@leemills83](https://github.com/leemills83) | Main interface towards all of Spotify's infrastructure and technical documentation. |
|
||||
| [bol.com](https://www.bol.com) | [@sagacity](https://github.com/sagacity) | Initial work being done to unify platform tooling. |
|
||||
| [DFDS](https://www.dfds.com) | [@carlsendk](https://github.com/carlsendk) | V2 self-service platform. |
|
||||
@@ -34,9 +34,9 @@ _If you're using Backstage in your organization, please try to add your company
|
||||
| [Netflix](https://www.netflix.com/) | [bleathem](https://github.com/bleathem) | Our Backstage implementation will be the front door to a unified experience connecting our internal platform products across important workflows with integrated knowledge and support. |
|
||||
| [b.well](https://www.icanbwell.com/) | [Jacob Rosales](https://github.com/jrosales) | Foundation for our engineering portal and cloud insights. |
|
||||
| [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 🌕🚀🧑🚀 |
|
||||
| [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/) | [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). |
|
||||
| [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. |
|
||||
@@ -161,7 +161,7 @@ _If you're using Backstage in your organization, please try to add your company
|
||||
| [OVHcloud](https://www.ovhcloud.com/fr/) | [Jean-Philippe Blary](https://github.com/blaryjp), [Arnaud Bauer](mailto:arnaud.bauer@ovhcloud.com), [Flavien Chantelot](https://github.com/Dorn-) | We're providing Backstage to our collaborators to ease their daily jobs, and let them extends it using plugins. |
|
||||
| [Procter & Gamble](https://us.pg.com/) | [Binita Nayak](https://github.com/binitan), [Josh Rose](https://github.com/joshuarose), [RJ Winkler](https://github.com/rjwink) | P&G leverages Backstage to build internal developer portal to ensure developers' happiness. This developer portal shall act as single source of information needed by development teams to seamlessly create, find and maintain their software components/resources/documentation. |
|
||||
| [SANS Institute](https://www.sans.org) | [Christopher Klewin](mailto:cklewin@sans.org) | Developer portal for centralized visibility, reporting, and tooling across multiple organizations. |
|
||||
| [Okay](https://www.okayhq.com/) | [Tomas Barreto](mailto:tomas@okayhq.com) | Service catalog, developer portal, and technical documentation |
|
||||
| [Okay](https://www.okayhq.com/) | [Tomas Barreto](mailto:tomas@okayhq.com) | Service catalog, developer portal, and technical documentation |
|
||||
| [Kaluza](https://www.kaluza.com) | [James Condren](mailto:james.condron@kaluza.com) | To provide an automated golden path to developers, with a focus on discovery and documentation |
|
||||
| [LinkedIn](https://linkedin.com) | [Joshua Lawrence](mailto:jlawrence@linkedin.com) | We are building a platform for internal web tools |
|
||||
| [Forto](https://forto.com) | [Rodolfo Matos](mailto:rodolfo.matos@forto.com) | Still in a experimental phase/assessing the organisational fit. We will be using it mostly a developer portal -- pretty standard use case. |
|
||||
@@ -171,15 +171,16 @@ _If you're using Backstage in your organization, please try to add your company
|
||||
| [AEB](https://www.aeb.com/) | [David Fankhänel](mailto:dfl@aeb.com) | Central developer platform for creating new apps via templates, getting an overview via software catalog, etc |
|
||||
| [SALTO Systems](https://saltosystems.com) | [Ian Cowley](mailto:i.cowley@saltosystems.com) | Currently using Backstage as an internal documentation portal. |
|
||||
| [Lummo](https://lummo.com) | [Anjul Sahu](mailto:anjul@lummo.com) | We are building the internal developer portal using Backstage and bringing up all integrations and service information at one place. |
|
||||
| [Frontside](https://frontside.com) | [Taras Mankovski](mailto:taras@frontside.com) |
|
||||
| [Frontside](https://frontside.com) | [Taras Mankovski](mailto:taras@frontside.com) | |
|
||||
| [Stepstone](https://www.stepstone.com/en/) | [Neil Kennedy](mailto:neil.kennedy@stepstone.com) | StepStone is using Backstage to solve problems around ownership and visibility of our applications. We have thousands of repos, multiple legacy systems and a growing platform that is hard to maintain. Backstage is forming the centre of our push to embrace the chaos. |
|
||||
| [idwall](https://idwall.co) | [Rodrigo Catão Araujo](mailto:rodrigo@idwall.co) | Developer Portal for internal engineers to access service catalog, documentation, observability, infrastructure and internal tooling. |
|
||||
| [Jaguar Land Rover](https://www.jaguarlandrover.com) | [Josh Walker](mailto:jwalke18@jaguarlandrover.com) | Users can request a Gitlab user, which creates a commit with the Terraform code. |
|
||||
| [Glovo](http://glovoapp.com/) | [Yaser Toutah](mailto:yaser.toutah@glovoapp.com) | Developer Portal to improve our Developer Experience, identify ownership and track metadata for our services and tools. It's our Service Catalog. In addition to that, we use it for Service Creation, and much more. |
|
||||
| [Glovo](http://glovoapp.com/) | [Yaser Toutah](mailto:yaser.toutah@glovoapp.com) | Developer Portal to improve our Developer Experience, identify ownership and track metadata for our services and tools. It's our Service Catalog. In addition to that, we use it for Service Creation, and much more. |
|
||||
| [Dixa](https://dixa.com) | [Jens Møller](mailto:jsc@dixa.com) | We are in early stages, but using it to get overview of our repositories and ownership of these. We want among many things to use it for compliance and easier access to key metrics for our repos. |
|
||||
| [Notino](https://notino.com) | [Jan Remunda](mailto:jan.remunda@notino.com) | Backstage is our developer portal. We use it as service catalog and for technical documentation. |
|
||||
| [Polarpoint](https://polarpoint.io/) | [Surj Bains](https://github.com/polarpoint-io) | We are using Backstage as our Developer portal as well as for hosting our DevOps portal for software catalog. |
|
||||
| [Niche](https://niche.com) | [Zach Romitz](mailto:zach.romitz@niche.com) | We are using the Software Catalog, Software Templates, API documentation, and Techdocs to try and centralize service information. |
|
||||
| [Mercedes-Benz.io](https://www.mercedes-benz.io/) | [Manuel Santos](https://github.com/manusant) | At Mercedes-Benz we use it as a developer portal with software catalog, TechDocs, Scaffolding and custom plugins. It provides an overview of our tech ecosystem to our product development teams. The portal also serves as a way to foster collaboration among the numerous companies of the Mercedes-Benz Group.
|
||||
|
||||
|
||||
| [Mercedes-Benz.io](https://www.mercedes-benz.io/) | [Manuel Santos](https://github.com/manusant) | At Mercedes-Benz we use it as a developer portal with software catalog, TechDocs, Scaffolding and custom plugins. It provides an overview of our tech ecosystem to our product development teams. The portal also serves as a way to foster collaboration among the numerous companies of the Mercedes-Benz Group. |
|
||||
| [Funding Circle](https://www.fundingcircle.com/) | [Ariel Pacciaroni](https://github.com/arielpacciaroni) | We are building the internal developer portal using Backstage project and centralizing all services information at one place. The portal helps us track down repositories ownership as well as direct access to key information on every component. |
|
||||
| [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. |
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||

|
||||
|
||||
> 🏖 From July 7th due to Summer Vacations for some of the maintainers, expect the project to move a little slower than normal, and support to be limited. Normal service will resume on August 8th 🏝
|
||||
|
||||
# [Backstage](https://backstage.io)
|
||||
|
||||
[](https://opensource.org/licenses/Apache-2.0)
|
||||
|
||||
@@ -122,10 +122,7 @@ When using ALB auth you can configure it as described [here](https://backstage.i
|
||||
- replace the content of `packages/backend/plugin/auth.ts` with the below and tweak it according to your needs.
|
||||
|
||||
```ts
|
||||
import {
|
||||
createRouter,
|
||||
createAwsAlbProvider,
|
||||
} from '@backstage/plugin-auth-backend';
|
||||
import { createRouter, providers } from '@backstage/plugin-auth-backend';
|
||||
import {
|
||||
DEFAULT_NAMESPACE,
|
||||
stringifyEntityRef,
|
||||
@@ -145,7 +142,7 @@ export default async function createPlugin({
|
||||
database,
|
||||
discovery,
|
||||
providerFactories: {
|
||||
awsalb: createAwsAlbProvider({
|
||||
awsalb: providers.awsAlb.create({
|
||||
authHandler: async ({ fullProfile }) => {
|
||||
let email: string | undefined = undefined;
|
||||
if (fullProfile.emails && fullProfile.emails.length > 0) {
|
||||
|
||||
+3
-3
@@ -304,9 +304,9 @@ cross-spawn@^7.0.0:
|
||||
which "^2.0.1"
|
||||
|
||||
cypress@^10.0.0:
|
||||
version "10.1.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.1.0.tgz#6514a26c721822a02bc194e9a7f72c3142aea174"
|
||||
integrity sha512-aQ4JVZVib4Xd9FZW8IRZfKelUvqF4y5A+oUbNvn8TlsBmEfIg3m5Xd6Mt6PVU/jHiVJ9Psl905B3ZPnrDcmyuQ==
|
||||
version "10.2.0"
|
||||
resolved "https://registry.npmjs.org/cypress/-/cypress-10.2.0.tgz#ca078abfceb13be2a33cbba6e0e80ded770f542a"
|
||||
integrity sha512-+i9lY5ENlfi2mJwsggzR+XASOIgMd7S/Gd3/13NCpv596n3YSplMAueBTIxNLcxDpTcIksp+9pM3UaDrJDpFqA==
|
||||
dependencies:
|
||||
"@cypress/request" "^2.88.10"
|
||||
"@cypress/xvfb" "^1.2.4"
|
||||
|
||||
+1
-2
@@ -223,8 +223,7 @@ For more information, see our
|
||||
|
||||
No, this is not a service offering. We build the piece of software, and someone
|
||||
in your infrastructure team is responsible for
|
||||
[deploying](https://backstage.io/docs/getting-started/deployment-k8s) and
|
||||
maintaining it.
|
||||
[deploying](https://backstage.io/docs/deployment) and maintaining it.
|
||||
|
||||
### How secure is Backstage?
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ In order to use the Bitbucket provider for sign-in, you must configure it with a
|
||||
`signIn.resolver`. See the
|
||||
[Sign-In Resolver documentation](../identity-resolver.md) for more details on
|
||||
how this is done. Note that for the Bitbucket provider, you'll want to use
|
||||
`bitbucket` as the provider ID, and `createBitbucketProvider` for the provider
|
||||
`bitbucket` as the provider ID, and `providers.bitbucket.create` for the provider
|
||||
factory.
|
||||
|
||||
The `@backstage/plugin-auth-backend` plugin also comes with two built-in
|
||||
@@ -74,16 +74,14 @@ same way, but uses the Bitbucket user ID instead, and matches on the
|
||||
The following is an example of how to use one of the built-in resolvers:
|
||||
|
||||
```ts
|
||||
import {
|
||||
createBitbucketProvider,
|
||||
bitbucketUsernameSignInResolver,
|
||||
} from '@backstage/plugin-auth-backend';
|
||||
import { providers } from '@backstage/plugin-auth-backend';
|
||||
|
||||
// ...
|
||||
providerFactories: {
|
||||
bitbucket: createBitbucketProvider({
|
||||
bitbucket: providers.bitbucket.create({
|
||||
signIn: {
|
||||
resolver: bitbucketUsernameSignInResolver,
|
||||
resolver:
|
||||
providers.bitbucket.resolvers.usernameMatchingUserEntityAnnotation(),
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
||||
@@ -110,6 +110,7 @@ Now let's look at the example, with the rest of the commentary being made with i
|
||||
the code comments:
|
||||
|
||||
```ts
|
||||
// File: packages/backend/src/plugins/auth.ts
|
||||
import {
|
||||
createRouter,
|
||||
providers,
|
||||
@@ -170,11 +171,21 @@ property of each of the auth provider integrations. For example, the Google prov
|
||||
a built in resolver that works just like the one we defined above:
|
||||
|
||||
```ts
|
||||
providers.google.create({
|
||||
signIn: {
|
||||
resolver: providers.google.resolvers.emailLocalPartMatchingUserEntityName(),
|
||||
},
|
||||
});
|
||||
// File: packages/backend/src/plugins/auth.ts
|
||||
export default async function createPlugin(
|
||||
// ...
|
||||
return await createRouter({
|
||||
// ...
|
||||
providerFactories: {
|
||||
// ...
|
||||
google: providers.google.create({
|
||||
signIn: {
|
||||
resolver: providers.google.resolvers.emailLocalPartMatchingUserEntityName(),
|
||||
},
|
||||
});
|
||||
}
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
There are also other options, like the this one that looks up a user
|
||||
@@ -195,40 +206,49 @@ that happens during sign-in you can replace `ctx.signInWithCatalogUser` with a s
|
||||
of lower-level calls:
|
||||
|
||||
```ts
|
||||
// File: packages/backend/src/plugins/auth.ts
|
||||
import { getDefaultOwnershipRefs } from '@backstage/plugin-auth-backend';
|
||||
|
||||
// This example only shows the resolver function itself.
|
||||
async ({ profile: { email } }, ctx) => {
|
||||
if (!email) {
|
||||
throw new Error('User profile contained no email');
|
||||
}
|
||||
export default async function createPlugin(
|
||||
// ...
|
||||
return await createRouter({
|
||||
// ...
|
||||
providerFactories: {
|
||||
// ...
|
||||
google: async ({ profile: { email } }, ctx) => {
|
||||
if (!email) {
|
||||
throw new Error('User profile contained no email');
|
||||
}
|
||||
|
||||
// This step calls the catalog to look up a user entity. You could for example
|
||||
// replace it with a call to a different external system.
|
||||
const { entity } = await ctx.findCatalogUser({
|
||||
annotations: {
|
||||
'acme.org/email': email,
|
||||
},
|
||||
});
|
||||
// This step calls the catalog to look up a user entity. You could for example
|
||||
// replace it with a call to a different external system.
|
||||
const { entity } = await ctx.findCatalogUser({
|
||||
annotations: {
|
||||
'acme.org/email': email,
|
||||
},
|
||||
});
|
||||
|
||||
// In this step we extract the ownership references from the user entity using
|
||||
// the standard logic. It uses a reference to the entity itself, as well as the
|
||||
// target of each `memberOf` relation where the target is of the kind `Group`.
|
||||
//
|
||||
// If you replace the catalog lookup with something does not return
|
||||
// an entity you will need to replace this step as well.
|
||||
//
|
||||
// You might also replace it if you for example want to filter out certain groups.
|
||||
const ownershipRefs = getDefaultOwnershipRefs(entity);
|
||||
// In this step we extract the ownership references from the user entity using
|
||||
// the standard logic. It uses a reference to the entity itself, as well as the
|
||||
// target of each `memberOf` relation where the target is of the kind `Group`.
|
||||
//
|
||||
// If you replace the catalog lookup with something that does not return
|
||||
// an entity you will need to replace this step as well.
|
||||
//
|
||||
// You might also replace it if you for example want to filter out certain groups.
|
||||
const ownershipRefs = getDefaultOwnershipRefs(entity);
|
||||
|
||||
// The last step is to issue the token, where we might provide more options in the future.
|
||||
return ctx.issueToken({
|
||||
claims: {
|
||||
sub: stringifyEntityRef(entity),
|
||||
ent: ownershipRefs,
|
||||
},
|
||||
});
|
||||
};
|
||||
// The last step is to issue the token, where we might provide more options in the future.
|
||||
return ctx.issueToken({
|
||||
claims: {
|
||||
sub: stringifyEntityRef(entity),
|
||||
ent: ownershipRefs,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
## Sign-In without Users in the Catalog
|
||||
@@ -252,38 +272,47 @@ check like in the example below, or you might for example look up the GitHub org
|
||||
that the user belongs to using the user access token in the provided result object.
|
||||
|
||||
```ts
|
||||
// File: packages/backend/src/plugins/auth.ts
|
||||
import { DEFAULT_NAMESPACE, stringifyEntityRef, } from '@backstage/catalog-model';
|
||||
|
||||
// This example only shows the resolver function itself.
|
||||
async ({ profile }, ctx) => {
|
||||
if (!profile.email) {
|
||||
throw new Error(
|
||||
'Login failed, user profile does not contain an email',
|
||||
);
|
||||
}
|
||||
// Split the email into the local part and the domain.
|
||||
const [localPart, domain] = profile.email.split('@');
|
||||
export default async function createPlugin(
|
||||
// ...
|
||||
return await createRouter({
|
||||
// ...
|
||||
providerFactories: {
|
||||
// ...
|
||||
google: async ({ profile }, ctx) => {
|
||||
if (!profile.email) {
|
||||
throw new Error(
|
||||
'Login failed, user profile does not contain an email',
|
||||
);
|
||||
}
|
||||
// Split the email into the local part and the domain.
|
||||
const [localPart, domain] = profile.email.split('@');
|
||||
|
||||
// Next we verify the email domain. It is recommended to include this
|
||||
// kind of check if you don't look up the user in an external service.
|
||||
if (domain !== 'acme.org') {
|
||||
throw new Error('Login failed, user email domain check failed');
|
||||
}
|
||||
// Next we verify the email domain. It is recommended to include this
|
||||
// kind of check if you don't look up the user in an external service.
|
||||
if (domain !== 'acme.org') {
|
||||
throw new Error('Login failed, user email domain check failed');
|
||||
}
|
||||
|
||||
// By using `stringifyEntityRef` we ensure that the reference is formatted correctly
|
||||
const userEntityRef = stringifyEntityRef({
|
||||
kind: 'User',
|
||||
name: localPart,
|
||||
namespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
// By using `stringifyEntityRef` we ensure that the reference is formatted correctly
|
||||
const userEntityRef = stringifyEntityRef({
|
||||
kind: 'User',
|
||||
name: localPart,
|
||||
namespace: DEFAULT_NAMESPACE,
|
||||
});
|
||||
|
||||
return ctx.issueToken({
|
||||
claims: {
|
||||
sub: userEntityRef,
|
||||
ent: [userEntityRef],
|
||||
},
|
||||
});
|
||||
},
|
||||
return ctx.issueToken({
|
||||
claims: {
|
||||
sub: userEntityRef,
|
||||
ent: [userEntityRef],
|
||||
},
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
## AuthHandler
|
||||
@@ -304,7 +333,7 @@ export default async function createPlugin(
|
||||
return await createRouter({
|
||||
...
|
||||
providerFactories: {
|
||||
google: createGoogleProvider({
|
||||
google: providers.google.create({
|
||||
authHandler: async ({
|
||||
fullProfile // Type: passport.Profile,
|
||||
idToken // Type: (Optional) string,
|
||||
|
||||
@@ -74,6 +74,12 @@ techdocs:
|
||||
|
||||
type: 'local'
|
||||
|
||||
# Optional when techdocs.publisher.type is set to 'local'.
|
||||
|
||||
local:
|
||||
# (Optional). Set this to specify where the generated documentation is stored.
|
||||
publishDirectory: '/path/to/local/directory'
|
||||
|
||||
# Required when techdocs.publisher.type is set to 'googleGcs'. Skip otherwise.
|
||||
|
||||
googleGcs:
|
||||
|
||||
@@ -155,6 +155,8 @@ auth:
|
||||
clientSecret: YOUR CLIENT SECRET
|
||||
```
|
||||
|
||||
### Add sign-in option to the frontend
|
||||
|
||||
Backstage will re-read the configuration. If there's no errors, that's great! We
|
||||
can continue with the last part of the configuration. The next step is needed to
|
||||
change the sign-in page, this you actually need to add in the source code.
|
||||
@@ -185,10 +187,11 @@ components: {
|
||||
},
|
||||
```
|
||||
|
||||
> Since [v1.1.0](https://github.com/backstage/backstage/releases/tag/v1.1.0-next.3), you must provide an [explicit sign-in resolver](../auth/identity-resolver.md).
|
||||
> Note: The default Backstage app comes with a guest Sign In Resolver. This resolver makes all users share a single "guest" identity and is only intended as a minimum requirement to quickly get up and running. You can read more about how [Sign In Resolvers](../auth/identity-resolver.md#sign-in-resolvers) play a role in creating a [Backstage User Identity](../auth/identity-resolver.md#backstage-user-identity) for logged in users.
|
||||
|
||||
That should be it. You can stop your Backstage App. When you start it again and
|
||||
go to your Backstage portal in your browser, you should have your login prompt!
|
||||
Restart Backstage from the terminal, by stopping it with `Control-C`, and starting it with `yarn dev` . You should be welcomed by a login prompt!
|
||||
|
||||
> Note: Sometimes the frontend starts before the backend resulting in errors on the sign in page. Wait for the backend to start and then reload Backstage to proceed.
|
||||
|
||||
To learn more about Authentication in Backstage, here are some docs you
|
||||
could read:
|
||||
|
||||
@@ -157,7 +157,7 @@ export const HomePage = () => {
|
||||
return (
|
||||
<Grid container spacing={3}>
|
||||
<Grid item xs={12} md={4}>
|
||||
<HomePageCompanyLogo className={container} />
|
||||
<HomePageCompanyLogo />
|
||||
</Grid>
|
||||
</Grid>
|
||||
);
|
||||
|
||||
@@ -28,7 +28,7 @@ the code.
|
||||
sub-folder which is used for a markdown spellchecker.
|
||||
|
||||
- [`.yarn/`](https://github.com/backstage/backstage/tree/master/.yarn) -
|
||||
Backstage ships with it's own `yarn` implementation. This allows us to have
|
||||
Backstage ships with its own `yarn` implementation. This allows us to have
|
||||
better control over our `yarn.lock` file and hopefully avoid problems due to
|
||||
yarn versioning differences.
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ catalog:
|
||||
anotherProviderId: # another identifier
|
||||
organization: myorg
|
||||
project: myproject
|
||||
repository: '*' # this will match all repos starting with service-*
|
||||
repository: '*' # this will match all repos
|
||||
path: /src/*/catalog-info.yaml # this will search for files deep inside the /src folder
|
||||
yetAotherProviderId: # guess, what? Another one :)
|
||||
host: selfhostedazure.yourcompany.com
|
||||
|
||||
@@ -22,7 +22,7 @@ catalog:
|
||||
yourProviderId:
|
||||
host: gitlab-host # Identifies one of the hosts set up in the integrations
|
||||
branch: main # Optional. Uses `master` as default
|
||||
group: example-group # Group and subgroup (if needed) to look for repositories
|
||||
group: example-group # Optional. Group and subgroup (if needed) to look for repositories. If not present the whole project will be scanned
|
||||
entityFilename: catalog-info.yaml # Optional. Defaults to `catalog-info.yaml`
|
||||
```
|
||||
|
||||
|
||||
@@ -135,3 +135,21 @@ package export.
|
||||
accessed via `<package-name>/beta` or `<package-name>/alpha` imports.
|
||||
- `@alpha` - here be dragons. Not visible in the main package entry point, alpha
|
||||
exports must be accessed via `<package-name>/alpha` imports.
|
||||
|
||||
## Node.js Releases
|
||||
|
||||
The Backstage project uses [Node.js](https://nodejs.org/) for both its development
|
||||
tooling and backend runtime. In order for expectations to be clear we use the
|
||||
following schedule for determining the [Node.js releases](https://nodejs.org/en/about/releases/) that we support:
|
||||
|
||||
- At any given point in time we support exactly two adjacent even-numbered
|
||||
releases of Node.js, for example v12 and v14.
|
||||
- Three months before a Node.js release becomes _Active LTS_ we switch support
|
||||
to that release and the previous one. This is halfway through the _Current LTS_
|
||||
cycle for that release and occurs at the end of July every year.
|
||||
|
||||
When we say _Supporting_ a Node.js release, that means the following:
|
||||
|
||||
- The CI pipeline in the main Backstage repo tests towards the supported releases, and we encourage any other Backstage related projects to do the same.
|
||||
- New Backstage projects created with `@backstage/create-app` will have their `engines.node` version set accordingly.
|
||||
- Dropping compatibility with unsupported releases is not considered a breaking change. This includes using new syntax or APIs, as well as bumping dependencies that drop support for these versions.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: AWS Proton
|
||||
author: Amazon Web Services
|
||||
authorUrl: https://aws.amazon.com/
|
||||
category: Infrastructure
|
||||
description: Create and view AWS Proton services for your components in Backstage.
|
||||
documentation: https://github.com/awslabs/aws-proton-plugins-for-backstage#readme
|
||||
iconUrl: https://github.com/awslabs/aws-proton-plugins-for-backstage/blob/main/docs/images/proton-logo.png?raw=true
|
||||
npmPackageName: '@aws/aws-proton-plugin-for-backstage'
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
title: DORA Metrics
|
||||
author: Okay
|
||||
authorUrl: https://www.okayhq.com
|
||||
category: Metrics
|
||||
description: Embed dashboards (like DORA metrics) in your team or service pages from any dev tools (including Github, Gitlab, Jira, Argo, CircleCI, Buildkite, Pagerduty, Rollbar, Sentry, etc).
|
||||
documentation: https://github.com/OkayHQ/backstage-plugin
|
||||
iconUrl: img/okay.png
|
||||
npmPackageName: '@okayhq/backstage-plugin'
|
||||
@@ -5,7 +5,7 @@ authorUrl: https://bestsellerit.com
|
||||
category: Discovery
|
||||
description: This plugin will show you the cost and resource usage of your application within Google Kubernetes Engine (GKE).
|
||||
documentation: https://github.com/BESTSELLER/backstage-plugin-gkeusage/blob/master/README.md
|
||||
iconUrl: https://bestsellerit.com/img/google-container-engine_avatar.svg
|
||||
iconUrl: img/gke-logo.png
|
||||
npmPackageName: '@bestsellerit/backstage-plugin-gkeusage'
|
||||
tags:
|
||||
- gke
|
||||
|
||||
@@ -5,7 +5,7 @@ authorUrl: https://bestsellerit.com
|
||||
category: Discovery
|
||||
description: This plugin will show you information about Docker images within the Harbor cloud native registry.
|
||||
documentation: https://github.com/BESTSELLER/backstage-plugin-harbor/blob/master/README.md
|
||||
iconUrl: https://bestsellerit.com/img/terraform-harbor/goharbor.jpeg
|
||||
iconUrl: https://raw.githubusercontent.com/cncf/artwork/master/projects/harbor/icon/color/harbor-icon-color.svg
|
||||
npmPackageName: '@bestsellerit/backstage-plugin-harbor'
|
||||
tags:
|
||||
- goharbor
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: Humanitec Platform Orchestrator
|
||||
author: Frontside
|
||||
authorUrl: 'https://frontside.com'
|
||||
category: Deployment # A single category e.g. CI, Machine Learning, Services, Monitoring
|
||||
description: |
|
||||
Show workloads, environments and resources deployed by Humanitec Platform Orchestrator.
|
||||
Plugin includes an Entity ComponentCard, Backend API route and scaffolder actions.
|
||||
documentation: https://github.com/thefrontside/backstage/tree/main/plugins/humanitec
|
||||
iconUrl: img/humanitec-logo.png
|
||||
npmPackageName: '@frontside/backstage-plugin-humanitec'
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 45 KiB |
+1
-1
@@ -49,7 +49,7 @@
|
||||
"@types/react": "^17",
|
||||
"@types/react-dom": "^17"
|
||||
},
|
||||
"version": "1.3.0",
|
||||
"version": "1.4.0-next.0",
|
||||
"dependencies": {
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
"@microsoft/api-documenter": "^7.17.11",
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/app-defaults
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/core-components@0.9.6-next.0
|
||||
- @backstage/core-app-api@1.0.4-next.0
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/app-defaults",
|
||||
"description": "Provides the default wiring of a Backstage App",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -33,8 +33,8 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/core-components": "^0.9.5",
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@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",
|
||||
@@ -46,8 +46,8 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@types/jest": "^26.0.7",
|
||||
|
||||
@@ -1,5 +1,60 @@
|
||||
# example-app
|
||||
|
||||
## 0.2.73-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/plugin-scaffolder@1.4.0-next.0
|
||||
- @backstage/catalog-model@1.1.0-next.0
|
||||
- @backstage/core-components@0.9.6-next.0
|
||||
- @backstage/plugin-techdocs-react@1.0.2-next.0
|
||||
- @backstage/plugin-catalog@1.3.1-next.0
|
||||
- @backstage/plugin-stack-overflow@0.1.3-next.0
|
||||
- @backstage/core-app-api@1.0.4-next.0
|
||||
- @backstage/cli@0.17.3-next.0
|
||||
- @backstage/plugin-azure-devops@0.1.23-next.0
|
||||
- @backstage/plugin-techdocs@1.2.1-next.0
|
||||
- @backstage/plugin-catalog-import@0.8.10-next.0
|
||||
- @backstage/plugin-pagerduty@0.5.0-next.0
|
||||
- @backstage/plugin-github-actions@0.5.7-next.0
|
||||
- @backstage/plugin-airbrake@0.3.7-next.0
|
||||
- @backstage/plugin-api-docs@0.8.7-next.0
|
||||
- @backstage/plugin-badges@0.2.31-next.0
|
||||
- @backstage/plugin-catalog-graph@0.2.19-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-gocd@0.1.13-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-dashboard@0.1.15-next.0
|
||||
- @backstage/plugin-org@0.5.7-next.0
|
||||
- @backstage/plugin-rollbar@0.4.7-next.0
|
||||
- @backstage/plugin-search@0.9.1-next.0
|
||||
- @backstage/plugin-sentry@0.3.45-next.0
|
||||
- @backstage/plugin-tech-insights@0.2.3-next.0
|
||||
- @backstage/plugin-todo@0.2.9-next.0
|
||||
- @backstage/app-defaults@1.0.4-next.0
|
||||
- @backstage/integration-react@1.1.2-next.0
|
||||
- @backstage/plugin-apache-airflow@0.1.15-next.0
|
||||
- @backstage/plugin-gcalendar@0.3.3-next.0
|
||||
- @backstage/plugin-gcp-projects@0.3.26-next.0
|
||||
- @backstage/plugin-graphiql@0.2.39-next.0
|
||||
- @backstage/plugin-newrelic@0.3.25-next.0
|
||||
- @backstage/plugin-search-react@0.2.2-next.0
|
||||
- @backstage/plugin-shortcuts@0.2.8-next.0
|
||||
- @backstage/plugin-tech-radar@0.5.14-next.0
|
||||
- @backstage/plugin-techdocs-module-addons-contrib@1.0.2-next.0
|
||||
- @backstage/plugin-user-settings@0.4.6-next.0
|
||||
|
||||
## 0.2.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
+51
-51
@@ -1,66 +1,66 @@
|
||||
{
|
||||
"name": "example-app",
|
||||
"version": "0.2.72",
|
||||
"version": "0.2.73-next.0",
|
||||
"private": true,
|
||||
"backstage": {
|
||||
"role": "frontend"
|
||||
},
|
||||
"bundled": true,
|
||||
"dependencies": {
|
||||
"@backstage/app-defaults": "^1.0.3",
|
||||
"@backstage/catalog-model": "^1.0.3",
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/app-defaults": "^1.0.4-next.0",
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/core-components": "^0.9.5",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/integration-react": "^1.1.1",
|
||||
"@backstage/plugin-airbrake": "^0.3.6",
|
||||
"@backstage/plugin-api-docs": "^0.8.6",
|
||||
"@backstage/plugin-azure-devops": "^0.1.22",
|
||||
"@backstage/plugin-apache-airflow": "^0.1.14",
|
||||
"@backstage/plugin-badges": "^0.2.30",
|
||||
"@backstage/plugin-catalog": "^1.3.0",
|
||||
"@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.18",
|
||||
"@backstage/plugin-catalog-import": "^0.8.9",
|
||||
"@backstage/plugin-catalog-react": "^1.1.1",
|
||||
"@backstage/plugin-circleci": "^0.3.6",
|
||||
"@backstage/plugin-cloudbuild": "^0.3.6",
|
||||
"@backstage/plugin-code-coverage": "^0.1.33",
|
||||
"@backstage/plugin-cost-insights": "^0.11.28",
|
||||
"@backstage/plugin-dynatrace": "^0.1.0",
|
||||
"@backstage/plugin-explore": "^0.3.37",
|
||||
"@backstage/plugin-gcalendar": "^0.3.2",
|
||||
"@backstage/plugin-gcp-projects": "^0.3.25",
|
||||
"@backstage/plugin-github-actions": "^0.5.6",
|
||||
"@backstage/plugin-gocd": "^0.1.12",
|
||||
"@backstage/plugin-graphiql": "^0.2.38",
|
||||
"@backstage/plugin-home": "^0.4.22",
|
||||
"@backstage/plugin-jenkins": "^0.7.5",
|
||||
"@backstage/plugin-kafka": "^0.3.6",
|
||||
"@backstage/plugin-kubernetes": "^0.6.6",
|
||||
"@backstage/plugin-lighthouse": "^0.3.6",
|
||||
"@backstage/plugin-newrelic": "^0.3.24",
|
||||
"@backstage/plugin-newrelic-dashboard": "^0.1.14",
|
||||
"@backstage/plugin-org": "^0.5.6",
|
||||
"@backstage/plugin-pagerduty": "0.4.0",
|
||||
"@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.6",
|
||||
"@backstage/plugin-scaffolder": "^1.3.0",
|
||||
"@backstage/plugin-search": "^0.9.0",
|
||||
"@backstage/plugin-search-react": "^0.2.1",
|
||||
"@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.44",
|
||||
"@backstage/plugin-shortcuts": "^0.2.7",
|
||||
"@backstage/plugin-stack-overflow": "^0.1.2",
|
||||
"@backstage/plugin-tech-radar": "^0.5.13",
|
||||
"@backstage/plugin-techdocs": "^1.2.0",
|
||||
"@backstage/plugin-techdocs-react": "^1.0.1",
|
||||
"@backstage/plugin-techdocs-module-addons-contrib": "^1.0.1",
|
||||
"@backstage/plugin-todo": "^0.2.8",
|
||||
"@backstage/plugin-user-settings": "^0.4.5",
|
||||
"@backstage/plugin-tech-insights": "^0.2.2",
|
||||
"@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/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",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
@@ -81,7 +81,7 @@
|
||||
"zen-observable": "^0.8.15"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@rjsf/core": "^3.2.1",
|
||||
"@testing-library/cypress": "^8.0.2",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# @backstage/backend-common
|
||||
|
||||
## 0.14.1-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- b1edb5cfd9: Fix parsing of S3 URLs for the default region.
|
||||
- c3cfc83af2: Updated JSDoc to be MDX compatible.
|
||||
- Updated dependencies
|
||||
- @backstage/integration@1.2.2-next.0
|
||||
|
||||
## 0.14.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-common",
|
||||
"description": "Common functionality library for Backstage backends",
|
||||
"version": "0.14.0",
|
||||
"version": "0.14.1-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -38,7 +38,7 @@
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/config-loader": "^1.1.2",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/integration": "^1.2.1",
|
||||
"@backstage/integration": "^1.2.2-next.0",
|
||||
"@backstage/types": "^1.0.0",
|
||||
"@google-cloud/storage": "^6.0.0",
|
||||
"@manypkg/get-packages": "^1.1.3",
|
||||
@@ -91,8 +91,8 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^0.1.25",
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/archiver": "^5.1.0",
|
||||
"@types/base64-stream": "^1.0.2",
|
||||
"@types/compression": "^1.7.0",
|
||||
|
||||
@@ -53,7 +53,9 @@ const updateRedactionList = (
|
||||
);
|
||||
|
||||
logger.info(
|
||||
`${values.size} secrets found in the config which will be redacted`,
|
||||
`${values.size} secret${
|
||||
values.size > 1 ? 's' : ''
|
||||
} found in the config which will be redacted`,
|
||||
);
|
||||
|
||||
setRootLoggerRedactionList(Array.from(values));
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @backstage/backend-tasks
|
||||
|
||||
## 0.3.3-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.14.1-next.0
|
||||
|
||||
## 0.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-tasks",
|
||||
"description": "Common distributed task management library for Backstage backends",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -33,7 +33,7 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.14.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"@backstage/types": "^1.0.0",
|
||||
@@ -48,8 +48,8 @@
|
||||
"zod": "^3.9.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-test-utils": "^0.1.25",
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/backend-test-utils": "^0.1.26-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/cron": "^2.0.0",
|
||||
"wait-for-expect": "^3.0.2"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# @backstage/backend-test-utils
|
||||
|
||||
## 0.1.26-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/backend-common@0.14.1-next.0
|
||||
- @backstage/cli@0.17.3-next.0
|
||||
|
||||
## 0.1.25
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/backend-test-utils",
|
||||
"description": "Test helpers library for Backstage backends",
|
||||
"version": "0.1.25",
|
||||
"version": "0.1.26-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"private": false,
|
||||
@@ -34,8 +34,8 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/backend-common": "^0.14.0",
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"better-sqlite3": "^7.5.0",
|
||||
"knex": "^1.0.2",
|
||||
@@ -46,7 +46,7 @@
|
||||
"uuid": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2"
|
||||
"@backstage/cli": "^0.17.3-next.0"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# example-backend
|
||||
|
||||
## 0.2.73-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/plugin-tech-insights-backend@0.4.2-next.0
|
||||
- @backstage/backend-common@0.14.1-next.0
|
||||
- @backstage/catalog-model@1.1.0-next.0
|
||||
- @backstage/plugin-scaffolder-backend@1.4.0-next.0
|
||||
- @backstage/plugin-auth-backend@0.14.2-next.0
|
||||
- @backstage/plugin-kubernetes-backend@0.7.0-next.0
|
||||
- @backstage/integration@1.2.2-next.0
|
||||
- @backstage/plugin-azure-devops-backend@0.3.13-next.0
|
||||
- example-app@0.2.73-next.0
|
||||
- @backstage/backend-tasks@0.3.3-next.0
|
||||
- @backstage/plugin-app-backend@0.3.34-next.0
|
||||
- @backstage/plugin-auth-node@0.2.3-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-graphql-backend@0.1.24-next.0
|
||||
- @backstage/plugin-jenkins-backend@0.1.24-next.0
|
||||
- @backstage/plugin-kafka-backend@0.2.27-next.0
|
||||
- @backstage/plugin-permission-backend@0.5.9-next.0
|
||||
- @backstage/plugin-permission-node@0.6.3-next.0
|
||||
- @backstage/plugin-proxy-backend@0.2.28-next.0
|
||||
- @backstage/plugin-rollbar-backend@0.1.31-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-module-elasticsearch@0.1.6-next.0
|
||||
- @backstage/plugin-search-backend-module-pg@0.3.5-next.0
|
||||
- @backstage/plugin-search-backend-node@0.6.3-next.0
|
||||
- @backstage/plugin-tech-insights-backend-module-jsonfc@0.1.18-next.0
|
||||
- @backstage/plugin-tech-insights-node@0.3.2-next.0
|
||||
- @backstage/plugin-techdocs-backend@1.1.3-next.0
|
||||
- @backstage/plugin-todo-backend@0.1.31-next.0
|
||||
- @backstage/catalog-client@1.0.4-next.0
|
||||
|
||||
## 0.2.72
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "example-backend",
|
||||
"version": "0.2.72",
|
||||
"version": "0.2.73-next.0",
|
||||
"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.0",
|
||||
"@backstage/backend-tasks": "^0.3.2",
|
||||
"@backstage/catalog-client": "^1.0.3",
|
||||
"@backstage/catalog-model": "^1.0.3",
|
||||
"@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/config": "^1.0.1",
|
||||
"@backstage/integration": "^1.2.1",
|
||||
"@backstage/plugin-app-backend": "^0.3.33",
|
||||
"@backstage/plugin-auth-backend": "^0.14.1",
|
||||
"@backstage/plugin-auth-node": "^0.2.2",
|
||||
"@backstage/plugin-azure-devops-backend": "^0.3.12",
|
||||
"@backstage/plugin-badges-backend": "^0.1.27",
|
||||
"@backstage/plugin-catalog-backend": "^1.2.0",
|
||||
"@backstage/plugin-code-coverage-backend": "^0.1.31",
|
||||
"@backstage/plugin-graphql-backend": "^0.1.23",
|
||||
"@backstage/plugin-jenkins-backend": "^0.1.23",
|
||||
"@backstage/plugin-kubernetes-backend": "^0.6.0",
|
||||
"@backstage/plugin-kafka-backend": "^0.2.26",
|
||||
"@backstage/plugin-permission-backend": "^0.5.8",
|
||||
"@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/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-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.2",
|
||||
"@backstage/plugin-proxy-backend": "^0.2.27",
|
||||
"@backstage/plugin-rollbar-backend": "^0.1.30",
|
||||
"@backstage/plugin-scaffolder-backend": "^1.3.0",
|
||||
"@backstage/plugin-scaffolder-backend-module-rails": "^0.4.1",
|
||||
"@backstage/plugin-search-backend": "^0.5.3",
|
||||
"@backstage/plugin-search-backend-node": "^0.6.2",
|
||||
"@backstage/plugin-search-backend-module-elasticsearch": "^0.1.5",
|
||||
"@backstage/plugin-search-backend-module-pg": "^0.3.4",
|
||||
"@backstage/plugin-techdocs-backend": "^1.1.2",
|
||||
"@backstage/plugin-tech-insights-backend": "^0.4.1",
|
||||
"@backstage/plugin-tech-insights-node": "^0.3.1",
|
||||
"@backstage/plugin-tech-insights-backend-module-jsonfc": "^0.1.17",
|
||||
"@backstage/plugin-todo-backend": "^0.1.30",
|
||||
"@backstage/plugin-permission-node": "^0.6.3-next.0",
|
||||
"@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-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",
|
||||
"@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.2",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/express-serve-static-core": "^4.17.5",
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
# @backstage/catalog-client
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/catalog-model@1.1.0-next.0
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/catalog-client",
|
||||
"description": "An isomorphic client for the catalog backend",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4-next.0",
|
||||
"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.0.3",
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/errors": "^1.0.0",
|
||||
"cross-fetch": "^3.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/jest": "^26.0.7",
|
||||
"msw": "^0.42.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
# @backstage/catalog-model
|
||||
|
||||
## 1.1.0-next.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 1380b389dc: Adding an optional type field to entity links to group and categorize links
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c3cfc83af2: Updated JSDoc to be MDX compatible.
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -266,6 +266,36 @@ export { GroupEntityV1alpha1 };
|
||||
// @public
|
||||
export const groupEntityV1alpha1Validator: KindValidator;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isApiEntity(entity: Entity): entity is ApiEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isComponentEntity(
|
||||
entity: Entity,
|
||||
): entity is ComponentEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isDomainEntity(entity: Entity): entity is DomainEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isGroupEntity(entity: Entity): entity is GroupEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isLocationEntity(
|
||||
entity: Entity,
|
||||
): entity is LocationEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isResourceEntity(
|
||||
entity: Entity,
|
||||
): entity is ResourceEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isSystemEntity(entity: Entity): entity is SystemEntityV1alpha1;
|
||||
|
||||
// @public (undocumented)
|
||||
export function isUserEntity(entity: Entity): entity is UserEntityV1alpha1;
|
||||
|
||||
// @public
|
||||
export type KindValidator = {
|
||||
check(entity: Entity): Promise<boolean>;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/catalog-model",
|
||||
"description": "Types and validators that help describe the model of a Backstage Catalog",
|
||||
"version": "1.0.3",
|
||||
"version": "1.1.0-next.0",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -43,7 +43,7 @@
|
||||
"uuid": "^8.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/json-schema": "^7.0.5",
|
||||
"@types/lodash": "^4.14.151",
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
/*
|
||||
* 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 {
|
||||
isApiEntity,
|
||||
isComponentEntity,
|
||||
isDomainEntity,
|
||||
isGroupEntity,
|
||||
isLocationEntity,
|
||||
isResourceEntity,
|
||||
isSystemEntity,
|
||||
isUserEntity,
|
||||
} from './conditions';
|
||||
|
||||
const apiEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'api',
|
||||
metadata: { name: 'api' },
|
||||
};
|
||||
const componentEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'component',
|
||||
metadata: { name: 'Component' },
|
||||
};
|
||||
const domainEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'domain',
|
||||
metadata: { name: 'Domain' },
|
||||
};
|
||||
const groupEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'group',
|
||||
metadata: { name: 'Group' },
|
||||
};
|
||||
const locationEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'location',
|
||||
metadata: { name: 'Location' },
|
||||
};
|
||||
const resourceEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'resource',
|
||||
metadata: { name: 'Resource' },
|
||||
};
|
||||
const systemEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'system',
|
||||
metadata: { name: 'System' },
|
||||
};
|
||||
const userEntity: Entity = {
|
||||
apiVersion: '',
|
||||
kind: 'user',
|
||||
metadata: { name: 'User' },
|
||||
};
|
||||
|
||||
describe('isApiEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isApiEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isApiEntity(apiEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isComponentEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isComponentEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isComponentEntity(componentEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isDomainEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isDomainEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isDomainEntity(domainEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isGroupEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isGroupEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isGroupEntity(groupEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isLocationEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isLocationEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isLocationEntity(locationEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isResourceEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isResourceEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isResourceEntity(resourceEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isSystemEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isSystemEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(userEntity)).not.toBeTruthy();
|
||||
expect(isSystemEntity(systemEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe('isUserEntity', () => {
|
||||
it('should check for the intended type', () => {
|
||||
expect(isUserEntity(apiEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(componentEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(domainEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(groupEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(locationEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(resourceEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(systemEntity)).not.toBeTruthy();
|
||||
expect(isUserEntity(userEntity)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright 2020 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 {
|
||||
ApiEntity,
|
||||
ComponentEntity,
|
||||
DomainEntity,
|
||||
GroupEntity,
|
||||
LocationEntity,
|
||||
ResourceEntity,
|
||||
SystemEntity,
|
||||
UserEntity,
|
||||
} from '../kinds';
|
||||
import { Entity } from './Entity';
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isApiEntity(entity: Entity): entity is ApiEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'API';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isComponentEntity(entity: Entity): entity is ComponentEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'COMPONENT';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isDomainEntity(entity: Entity): entity is DomainEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'DOMAIN';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isGroupEntity(entity: Entity): entity is GroupEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'GROUP';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isLocationEntity(entity: Entity): entity is LocationEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'LOCATION';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isResourceEntity(entity: Entity): entity is ResourceEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'RESOURCE';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isSystemEntity(entity: Entity): entity is SystemEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'SYSTEM';
|
||||
}
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isUserEntity(entity: Entity): entity is UserEntity {
|
||||
return entity.kind.toLocaleUpperCase('en-US') === 'USER';
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './conditions';
|
||||
export {
|
||||
DEFAULT_NAMESPACE,
|
||||
ANNOTATION_EDIT_URL,
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.17.3-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- d2256c0384: Fix `webpack-dev-server` deprecations.
|
||||
|
||||
## 0.17.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.17.2",
|
||||
"version": "0.17.3-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -43,7 +43,7 @@
|
||||
"@octokit/request": "^5.4.12",
|
||||
"@rollup/plugin-commonjs": "^22.0.0",
|
||||
"@rollup/plugin-json": "^4.1.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.6",
|
||||
"@rollup/plugin-yaml": "^3.1.0",
|
||||
"@spotify/eslint-config-base": "^13.0.0",
|
||||
"@spotify/eslint-config-react": "^13.0.0",
|
||||
@@ -110,7 +110,7 @@
|
||||
"rollup-plugin-esbuild": "^4.7.2",
|
||||
"rollup-plugin-postcss": "^4.0.0",
|
||||
"rollup-pluginutils": "^2.8.2",
|
||||
"run-script-webpack-plugin": "^0.0.14",
|
||||
"run-script-webpack-plugin": "^0.1.0",
|
||||
"semver": "^7.3.2",
|
||||
"style-loader": "^3.3.1",
|
||||
"sucrase": "^3.20.2",
|
||||
@@ -126,13 +126,13 @@
|
||||
"zod": "^3.11.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.14.0",
|
||||
"@backstage/backend-common": "^0.14.1-next.0",
|
||||
"@backstage/config": "^1.0.1",
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/core-components": "^0.9.5",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/dev-utils": "^1.0.3",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/dev-utils": "^1.0.4-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@types/diff": "^5.0.0",
|
||||
"@types/express": "^4.17.6",
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 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 fs from 'fs-extra';
|
||||
import { OptionValues } from 'commander';
|
||||
import { buildBundle } from '../../lib/bundler';
|
||||
import { getEnvironmentParallelism } from '../../lib/parallel';
|
||||
import { loadCliConfig } from '../../lib/config';
|
||||
import { paths } from '../../lib/paths';
|
||||
|
||||
export default async (opts: OptionValues) => {
|
||||
const { name } = await fs.readJson(paths.resolveTarget('package.json'));
|
||||
await buildBundle({
|
||||
entry: 'src/index',
|
||||
parallelism: getEnvironmentParallelism(),
|
||||
statsJsonEnabled: opts.stats,
|
||||
...(await loadCliConfig({
|
||||
args: opts.config,
|
||||
fromPackage: name,
|
||||
})),
|
||||
});
|
||||
};
|
||||
@@ -1,92 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 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 fs from 'fs-extra';
|
||||
import chalk from 'chalk';
|
||||
import uniq from 'lodash/uniq';
|
||||
import { OptionValues } from 'commander';
|
||||
import { serveBundle } from '../../lib/bundler';
|
||||
import { loadCliConfig } from '../../lib/config';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { Lockfile } from '../../lib/versioning';
|
||||
import { forbiddenDuplicatesFilter, includedFilter } from '../versions/lint';
|
||||
|
||||
export default async (opts: OptionValues) => {
|
||||
const lockFilePath = paths.resolveTargetRoot('yarn.lock');
|
||||
if (fs.existsSync(lockFilePath)) {
|
||||
try {
|
||||
const lockfile = await Lockfile.load(lockFilePath);
|
||||
const result = lockfile.analyze({
|
||||
filter: includedFilter,
|
||||
});
|
||||
const problemPackages = [...result.newVersions, ...result.newRanges]
|
||||
.map(({ name }) => name)
|
||||
.filter(name => forbiddenDuplicatesFilter(name));
|
||||
|
||||
if (problemPackages.length > 0) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`⚠️ Some of the following packages may be outdated or have duplicate installations:
|
||||
|
||||
${uniq(problemPackages).join(', ')}
|
||||
`,
|
||||
),
|
||||
);
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`⚠️ The following command may fix the issue, but it could also be an issue within one of your dependencies:
|
||||
|
||||
yarn backstage-cli versions:check --fix
|
||||
`,
|
||||
),
|
||||
);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`⚠️ Unable to parse yarn.lock file properly:
|
||||
|
||||
${error}
|
||||
|
||||
skipping analyzer for outdated or duplicate installations
|
||||
`,
|
||||
),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
chalk.yellow(
|
||||
`⚠️ Unable to find yarn.lock file:
|
||||
|
||||
skipping analyzer for outdated or duplicate installations
|
||||
`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
const { name } = await fs.readJson(paths.resolveTarget('package.json'));
|
||||
const waitForExit = await serveBundle({
|
||||
entry: 'src/index',
|
||||
checksEnabled: opts.check,
|
||||
...(await loadCliConfig({
|
||||
args: opts.config,
|
||||
fromPackage: name,
|
||||
withFilteredKeys: true,
|
||||
})),
|
||||
});
|
||||
|
||||
await waitForExit();
|
||||
};
|
||||
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 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 os from 'os';
|
||||
import fs from 'fs-extra';
|
||||
import { resolve as resolvePath } from 'path';
|
||||
import tar, { CreateOptions } from 'tar';
|
||||
import { OptionValues } from 'commander';
|
||||
import { createDistWorkspace } from '../../lib/packager';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { getEnvironmentParallelism } from '../../lib/parallel';
|
||||
import { buildPackage, Output } from '../../lib/builder';
|
||||
|
||||
const BUNDLE_FILE = 'bundle.tar.gz';
|
||||
const SKELETON_FILE = 'skeleton.tar.gz';
|
||||
|
||||
export default async (opts: OptionValues) => {
|
||||
const targetDir = paths.resolveTarget('dist');
|
||||
const pkg = await fs.readJson(paths.resolveTarget('package.json'));
|
||||
|
||||
// We build the target package without generating type declarations.
|
||||
await buildPackage({ outputs: new Set([Output.cjs]) });
|
||||
|
||||
const tmpDir = await fs.mkdtemp(resolvePath(os.tmpdir(), 'backstage-bundle'));
|
||||
try {
|
||||
await createDistWorkspace([pkg.name], {
|
||||
targetDir: tmpDir,
|
||||
buildDependencies: Boolean(opts.buildDependencies),
|
||||
buildExcludes: [pkg.name],
|
||||
parallelism: getEnvironmentParallelism(),
|
||||
skeleton: SKELETON_FILE,
|
||||
});
|
||||
|
||||
// We built the target backend package using the regular build process, but the result of
|
||||
// that has now been packed into the dist workspace, so clean up the dist dir.
|
||||
await fs.remove(targetDir);
|
||||
await fs.mkdir(targetDir);
|
||||
|
||||
// Move out skeleton.tar.gz before we create the main bundle, no point having that included up twice.
|
||||
await fs.move(
|
||||
resolvePath(tmpDir, SKELETON_FILE),
|
||||
resolvePath(targetDir, SKELETON_FILE),
|
||||
);
|
||||
|
||||
// Create main bundle.tar.gz, with some tweaks to make it more likely hit Docker build cache.
|
||||
await tar.create(
|
||||
{
|
||||
file: resolvePath(targetDir, BUNDLE_FILE),
|
||||
cwd: tmpDir,
|
||||
portable: true,
|
||||
noMtime: true,
|
||||
gzip: true,
|
||||
} as CreateOptions & { noMtime: boolean },
|
||||
[''],
|
||||
);
|
||||
} finally {
|
||||
await fs.remove(tmpDir);
|
||||
}
|
||||
};
|
||||
@@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 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 fs from 'fs-extra';
|
||||
import { OptionValues } from 'commander';
|
||||
import { paths } from '../../lib/paths';
|
||||
import { serveBackend } from '../../lib/bundler/backend';
|
||||
|
||||
export default async (opts: OptionValues) => {
|
||||
// Cleaning dist/ before we start the dev process helps work around an issue
|
||||
// where we end up with the entrypoint executing multiple times, causing
|
||||
// a port bind conflict among other things.
|
||||
await fs.remove(paths.resolveTarget('dist'));
|
||||
|
||||
const waitForExit = await serveBackend({
|
||||
entry: 'src/index',
|
||||
checksEnabled: opts.check,
|
||||
inspectEnabled: opts.inspect,
|
||||
inspectBrkEnabled: opts.inspectBrk,
|
||||
});
|
||||
|
||||
await waitForExit();
|
||||
};
|
||||
@@ -183,53 +183,6 @@ export function registerMigrateCommand(program: Command) {
|
||||
}
|
||||
|
||||
export function registerCommands(program: Command) {
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('app:build')
|
||||
.description('Build an app for a production release [DEPRECATED]')
|
||||
.option('--stats', 'Write bundle stats to output directory')
|
||||
.option(...configOption)
|
||||
.action(lazy(() => import('./app/build').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('app:serve')
|
||||
.description('Serve an app for local development [DEPRECATED]')
|
||||
.option('--check', 'Enable type checking and linting')
|
||||
.option(...configOption)
|
||||
.action(lazy(() => import('./app/serve').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('backend:build')
|
||||
.description('Build a backend plugin [DEPRECATED]')
|
||||
.option('--minify', 'Minify the generated code')
|
||||
.option('--experimental-type-build', 'Enable experimental type build')
|
||||
.action(lazy(() => import('./backend/build').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('backend:bundle')
|
||||
.description('Bundle the backend into a deployment archive [DEPRECATED]')
|
||||
.option(
|
||||
'--build-dependencies',
|
||||
'Build all local package dependencies before bundling the backend',
|
||||
)
|
||||
.action(lazy(() => import('./backend/bundle').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('backend:dev')
|
||||
.description(
|
||||
'Start local development server with HMR for the backend [DEPRECATED]',
|
||||
)
|
||||
.option('--check', 'Enable type checking and linting')
|
||||
.option('--inspect', 'Enable debugger')
|
||||
.option('--inspect-brk', 'Enable debugger with await to attach debugger')
|
||||
// We don't actually use the config in the CLI, just pass them on to the NodeJS process
|
||||
.option(...configOption)
|
||||
.action(lazy(() => import('./backend/dev').then(m => m.default)));
|
||||
|
||||
program
|
||||
.command('create')
|
||||
.storeOptionsAsProperties(false)
|
||||
@@ -268,22 +221,6 @@ export function registerCommands(program: Command) {
|
||||
lazy(() => import('./create-plugin/createPlugin').then(m => m.default)),
|
||||
);
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('plugin:build')
|
||||
.description('Build a plugin [DEPRECATED]')
|
||||
.option('--minify', 'Minify the generated code')
|
||||
.option('--experimental-type-build', 'Enable experimental type build')
|
||||
.action(lazy(() => import('./plugin/build').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('plugin:serve')
|
||||
.description('Serves the dev/ folder of a plugin [DEPRECATED]')
|
||||
.option('--check', 'Enable type checking and linting')
|
||||
.option(...configOption)
|
||||
.action(lazy(() => import('./plugin/serve').then(m => m.default)));
|
||||
|
||||
program
|
||||
.command('plugin:diff')
|
||||
.option('--check', 'Fail if changes are required')
|
||||
@@ -291,27 +228,6 @@ export function registerCommands(program: Command) {
|
||||
.description('Diff an existing plugin with the creation template')
|
||||
.action(lazy(() => import('./plugin/diff').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('build')
|
||||
.description('Build a package for publishing [DEPRECATED]')
|
||||
.option('--outputs <formats>', 'List of formats to output [types,cjs,esm]')
|
||||
.option('--minify', 'Minify the generated code')
|
||||
.option('--experimental-type-build', 'Enable experimental type build')
|
||||
.action(lazy(() => import('./oldBuild').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('lint [directories...]')
|
||||
.option(
|
||||
'--format <format>',
|
||||
'Lint report output format',
|
||||
'eslint-formatter-friendly',
|
||||
)
|
||||
.option('--fix', 'Attempt to automatically fix violations')
|
||||
.description('Lint a package [DEPRECATED]')
|
||||
.action(lazy(() => import('./lint').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('test')
|
||||
@@ -400,22 +316,6 @@ export function registerCommands(program: Command) {
|
||||
.description('Check Backstage package versioning')
|
||||
.action(lazy(() => import('./versions/lint').then(m => m.default)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('prepack')
|
||||
.description(
|
||||
'Prepares a package for packaging before publishing [DEPRECATED]',
|
||||
)
|
||||
.action(lazy(() => import('./pack').then(m => m.pre)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('postpack')
|
||||
.description(
|
||||
'Restores the changes made by the prepack command [DEPRECATED]',
|
||||
)
|
||||
.action(lazy(() => import('./pack').then(m => m.post)));
|
||||
|
||||
// TODO(Rugvip): Deprecate in favor of package variant
|
||||
program
|
||||
.command('clean')
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright 2020 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 { buildPackage, Output } from '../lib/builder';
|
||||
import { OptionValues } from 'commander';
|
||||
|
||||
export default async (opts: OptionValues) => {
|
||||
let outputs = new Set<Output>();
|
||||
|
||||
const { outputs: outputsStr } = opts as { outputs?: string };
|
||||
if (outputsStr) {
|
||||
for (const output of outputsStr.split(',') as (keyof typeof Output)[]) {
|
||||
if (output in Output) {
|
||||
outputs.add(Output[output]);
|
||||
} else {
|
||||
throw new Error(`Unknown output format: ${output}`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
outputs = new Set([Output.types, Output.esm, Output.cjs]);
|
||||
}
|
||||
|
||||
await buildPackage({
|
||||
outputs,
|
||||
minify: opts.minify,
|
||||
useApiExtractor: opts.experimentalTypeBuild,
|
||||
});
|
||||
};
|
||||
@@ -37,7 +37,7 @@
|
||||
"lodash": "^4.17.21"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/test-utils": "^1.1.1-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @backstage/core-app-api
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 8fe2357101: The `signOut` method of the `IdentityApi` will now navigate the user back to the base URL of the app as indicated by the `app.baseUrl` config.
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-app-api",
|
||||
"description": "Core app API used by Backstage apps",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -49,8 +49,8 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @backstage/core-components
|
||||
|
||||
## 0.9.6-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- c3cfc83af2: Updated JSDoc to be MDX compatible.
|
||||
|
||||
## 0.9.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1110,6 +1110,7 @@ export type SidebarSubmenuItemDropdownItem = {
|
||||
// @public
|
||||
export type SidebarSubmenuItemProps = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
to?: string;
|
||||
icon?: IconComponent;
|
||||
dropdownItems?: SidebarSubmenuItemDropdownItem[];
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/core-components",
|
||||
"description": "Core components used by Backstage plugins and apps",
|
||||
"version": "0.9.5",
|
||||
"version": "0.9.6-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -79,9 +79,9 @@
|
||||
"react-dom": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -59,6 +59,13 @@ const useStyles = makeStyles<BackstageTheme>(
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
lineHeight: 1,
|
||||
},
|
||||
subtitle: {
|
||||
fontSize: 10,
|
||||
whiteSpace: 'nowrap',
|
||||
overflow: 'hidden',
|
||||
'text-overflow': 'ellipsis',
|
||||
},
|
||||
dropdownArrow: {
|
||||
position: 'absolute',
|
||||
@@ -105,6 +112,7 @@ export type SidebarSubmenuItemDropdownItem = {
|
||||
* Holds submenu item content.
|
||||
*
|
||||
* title: Text content of submenu item
|
||||
* subtitle: A subtitle displayed under the main title
|
||||
* to: Path to navigate to when item is clicked
|
||||
* icon: Icon displayed on the left of text content
|
||||
* dropdownItems: Optional array of dropdown items displayed when submenu item is clicked.
|
||||
@@ -113,6 +121,7 @@ export type SidebarSubmenuItemDropdownItem = {
|
||||
*/
|
||||
export type SidebarSubmenuItemProps = {
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
to?: string;
|
||||
icon?: IconComponent;
|
||||
dropdownItems?: SidebarSubmenuItemDropdownItem[];
|
||||
@@ -124,7 +133,7 @@ export type SidebarSubmenuItemProps = {
|
||||
* @public
|
||||
*/
|
||||
export const SidebarSubmenuItem = (props: SidebarSubmenuItemProps) => {
|
||||
const { title, to, icon: Icon, dropdownItems } = props;
|
||||
const { title, subtitle, to, icon: Icon, dropdownItems } = props;
|
||||
const classes = useStyles();
|
||||
const { setIsHoveredOn } = useContext(SidebarItemWithSubmenuContext);
|
||||
const closeSubmenu = () => {
|
||||
@@ -158,6 +167,12 @@ export const SidebarSubmenuItem = (props: SidebarSubmenuItemProps) => {
|
||||
{Icon && <Icon fontSize="small" />}
|
||||
<Typography variant="subtitle1" className={classes.label}>
|
||||
{title}
|
||||
<br />
|
||||
{subtitle && (
|
||||
<Typography variant="caption" className={classes.subtitle}>
|
||||
{subtitle}
|
||||
</Typography>
|
||||
)}
|
||||
</Typography>
|
||||
{showDropDown ? (
|
||||
<ArrowDropUpIcon className={classes.dropdownArrow} />
|
||||
@@ -210,6 +225,12 @@ export const SidebarSubmenuItem = (props: SidebarSubmenuItemProps) => {
|
||||
{Icon && <Icon fontSize="small" />}
|
||||
<Typography variant="subtitle1" className={classes.label}>
|
||||
{title}
|
||||
<br />
|
||||
{subtitle && (
|
||||
<Typography variant="caption" className={classes.subtitle}>
|
||||
{subtitle}
|
||||
</Typography>
|
||||
)}
|
||||
</Typography>
|
||||
</Link>
|
||||
</Tooltip>
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
"react": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@testing-library/jest-dom": "^5.10.1",
|
||||
"@testing-library/react": "^12.1.3",
|
||||
"@testing-library/react-hooks": "^8.0.0",
|
||||
|
||||
@@ -1,5 +1,19 @@
|
||||
# @backstage/create-app
|
||||
|
||||
## 0.4.29-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- bc87604c26: Added an explicit `node-gyp` dependency to the root `package.json`. This is to work around a bug in older versions of `node-gyp` that causes Python execution to fail on macOS.
|
||||
|
||||
You can add this workaround to your existing project by adding `node-gyp` as a `devDependency` in your root `package.json` file:
|
||||
|
||||
```diff
|
||||
"devDependencies": {
|
||||
+ "node-gyp": "^9.0.0"
|
||||
},
|
||||
```
|
||||
|
||||
## 0.4.28
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/create-app",
|
||||
"description": "A CLI that helps you create your own Backstage app",
|
||||
"version": "0.4.28",
|
||||
"version": "0.4.29-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
# @backstage/dev-utils
|
||||
|
||||
## 1.0.4-next.0
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- Updated dependencies
|
||||
- @backstage/catalog-model@1.1.0-next.0
|
||||
- @backstage/core-components@0.9.6-next.0
|
||||
- @backstage/core-app-api@1.0.4-next.0
|
||||
- @backstage/plugin-catalog-react@1.1.2-next.0
|
||||
- @backstage/app-defaults@1.0.4-next.0
|
||||
- @backstage/integration-react@1.1.2-next.0
|
||||
- @backstage/test-utils@1.1.2-next.0
|
||||
|
||||
## 1.0.3
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/dev-utils",
|
||||
"description": "Utilities for developing Backstage plugins.",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4-next.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
@@ -33,14 +33,14 @@
|
||||
"start": "backstage-cli package start"
|
||||
},
|
||||
"dependencies": {
|
||||
"@backstage/app-defaults": "^1.0.3",
|
||||
"@backstage/core-app-api": "^1.0.3",
|
||||
"@backstage/core-components": "^0.9.5",
|
||||
"@backstage/app-defaults": "^1.0.4-next.0",
|
||||
"@backstage/core-app-api": "^1.0.4-next.0",
|
||||
"@backstage/core-components": "^0.9.6-next.0",
|
||||
"@backstage/core-plugin-api": "^1.0.3",
|
||||
"@backstage/catalog-model": "^1.0.3",
|
||||
"@backstage/integration-react": "^1.1.1",
|
||||
"@backstage/plugin-catalog-react": "^1.1.1",
|
||||
"@backstage/test-utils": "^1.1.1",
|
||||
"@backstage/catalog-model": "^1.1.0-next.0",
|
||||
"@backstage/integration-react": "^1.1.2-next.0",
|
||||
"@backstage/plugin-catalog-react": "^1.1.2-next.0",
|
||||
"@backstage/test-utils": "^1.1.2-next.0",
|
||||
"@backstage/theme": "^0.2.15",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
@@ -59,7 +59,7 @@
|
||||
"react-dom": "^16.13.1 || ^17.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/jest": "^26.0.7",
|
||||
"@types/node": "^16.0.0"
|
||||
},
|
||||
|
||||
@@ -14,6 +14,17 @@ export class AuthenticationError extends CustomErrorBase {}
|
||||
// @public
|
||||
export class ConflictError extends CustomErrorBase {}
|
||||
|
||||
// @public
|
||||
export type ConsumedResponse = {
|
||||
readonly headers: Headers;
|
||||
readonly ok: boolean;
|
||||
readonly redirected: boolean;
|
||||
readonly status: number;
|
||||
readonly statusText: string;
|
||||
readonly type: ResponseType;
|
||||
readonly url: string;
|
||||
};
|
||||
|
||||
// @public
|
||||
export class CustomErrorBase extends Error {
|
||||
constructor(message?: string, cause?: Error | unknown);
|
||||
@@ -67,15 +78,21 @@ export class NotModifiedError extends CustomErrorBase {}
|
||||
|
||||
// @public
|
||||
export function parseErrorResponseBody(
|
||||
response: Response,
|
||||
response: ConsumedResponse & {
|
||||
text(): Promise<string>;
|
||||
},
|
||||
): Promise<ErrorResponseBody>;
|
||||
|
||||
// @public
|
||||
export class ResponseError extends Error {
|
||||
readonly body: ErrorResponseBody;
|
||||
readonly cause: Error;
|
||||
static fromResponse(response: Response): Promise<ResponseError>;
|
||||
readonly response: Response;
|
||||
static fromResponse(
|
||||
response: ConsumedResponse & {
|
||||
text(): Promise<string>;
|
||||
},
|
||||
): Promise<ResponseError>;
|
||||
readonly response: ConsumedResponse;
|
||||
}
|
||||
|
||||
// @public
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"serialize-error": "^8.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/cli": "^0.17.2-next.0",
|
||||
"@backstage/cli": "^0.17.3-next.0",
|
||||
"@types/jest": "^26.0.7"
|
||||
},
|
||||
"files": [
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
ErrorResponseBody,
|
||||
parseErrorResponseBody,
|
||||
} from '../serialization/response';
|
||||
import { ConsumedResponse } from './types';
|
||||
|
||||
/**
|
||||
* An error thrown as the result of a failed server request.
|
||||
@@ -34,7 +35,7 @@ export class ResponseError extends Error {
|
||||
* Note that the body of this response is always consumed. Its parsed form is
|
||||
* in the `body` field.
|
||||
*/
|
||||
readonly response: Response;
|
||||
readonly response: ConsumedResponse;
|
||||
|
||||
/**
|
||||
* The parsed JSON error body, as sent by the server.
|
||||
@@ -59,7 +60,9 @@ export class ResponseError extends Error {
|
||||
* function consumes the body of the response, and assumes that it hasn't
|
||||
* been consumed before.
|
||||
*/
|
||||
static async fromResponse(response: Response): Promise<ResponseError> {
|
||||
static async fromResponse(
|
||||
response: ConsumedResponse & { text(): Promise<string> },
|
||||
): Promise<ResponseError> {
|
||||
const data = await parseErrorResponseBody(response);
|
||||
|
||||
const status = data.response.statusCode || response.status;
|
||||
@@ -77,7 +80,7 @@ export class ResponseError extends Error {
|
||||
|
||||
private constructor(props: {
|
||||
message: string;
|
||||
response: Response;
|
||||
response: ConsumedResponse;
|
||||
data: ErrorResponseBody;
|
||||
cause: Error;
|
||||
}) {
|
||||
|
||||
@@ -27,3 +27,4 @@ export {
|
||||
} from './common';
|
||||
export { CustomErrorBase } from './CustomErrorBase';
|
||||
export { ResponseError } from './ResponseError';
|
||||
export type { ConsumedResponse } from './types';
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* ConsumedResponse represents a Response that is known to have been consumed.
|
||||
* The methods and properties used to read the body contents are therefore omitted.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type ConsumedResponse = {
|
||||
readonly headers: Headers;
|
||||
readonly ok: boolean;
|
||||
readonly redirected: boolean;
|
||||
readonly status: number;
|
||||
readonly statusText: string;
|
||||
readonly type: ResponseType;
|
||||
readonly url: string;
|
||||
};
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ConsumedResponse } from '../errors/types';
|
||||
import { SerializedError } from './error';
|
||||
|
||||
/**
|
||||
@@ -53,7 +54,7 @@ export type ErrorResponseBody = {
|
||||
* @param response - The response of a failed request
|
||||
*/
|
||||
export async function parseErrorResponseBody(
|
||||
response: Response,
|
||||
response: ConsumedResponse & { text(): Promise<string> },
|
||||
): Promise<ErrorResponseBody> {
|
||||
try {
|
||||
const text = await response.text();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user