Merge branch 'master' into catalog-filter-accordion

This commit is contained in:
Philipp Hugenroth
2021-07-12 17:40:30 +02:00
371 changed files with 6251 additions and 8989 deletions
+16
View File
@@ -0,0 +1,16 @@
---
'@backstage/backend-common': patch
---
Support a `ensureExists` config option to skip ensuring a configured database exists. This allows deployment scenarios where
limited permissions are given for provisioned databases without privileges to create new databases. If set to `false`, the
database connection will not be validated prior to use which means the backend will not attempt to create the database if it
doesn't exist. You can configure this in your app-config.yaml:
```yaml
backend:
database:
ensureExists: false
```
This defaults to `true` if unspecified. You can also configure this per plugin connection and will override the base option.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/integration': patch
---
Do not throw in `ScmIntegration` `byUrl` for invalid URLs
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Improve UX of the Sidebar by adding SidebarScrollWrapper component allowing the user to scroll through Plugins & Shortcuts on smaller screens. Prevent the Sidebar from opening on click on small devices
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-pagerduty': patch
---
Update README
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
add default branch property for publish GitLab, Bitbucket and Azure actions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Store filter values set in `EntityListProvider` in query parameters. This allows selected filters to be restored when returning to pages that list catalog entities.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Added filesystem remove/rename built-in actions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-import': patch
---
More helpful error message when trying to import by folder from non-github
-7
View File
@@ -1,7 +0,0 @@
---
'@backstage/core-components': patch
'@backstage/plugin-explore': patch
---
- Enhanced core `Button` component to open external links in new tab.
- Replaced the use of `Button` component from material by `core-components` in tools card.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/catalog-model': minor
---
Changed the regex to validate names following the Kubernetes validation rule, this allow to be more permissive validating the name of the object in Backstage.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/techdocs-common': patch
---
Fix openStack swift publisher encoding issue. Remove utf8 forced encoding on binary files
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
Fix `EntityTypeFilter` so it produces unique case-insensitive set of available types
+10
View File
@@ -0,0 +1,10 @@
---
'@backstage/plugin-catalog-react': minor
'@backstage/plugin-scaffolder': patch
---
Updated the software templates list page (`ScaffolderPage`) to use the `useEntityListProvider` hook from #5643. This reduces the code footprint, making it easier to customize the display of this page, and consolidates duplicate approaches to querying the catalog with filters.
- The `useEntityTypeFilter` hook has been updated along with the underlying `EntityTypeFilter` to work with multiple values, to allow more flexibility for different user interfaces. It's unlikely that this change affects you; however, if you're using either of these directly, you'll need to update your usage.
- `SearchToolbar` was renamed to `EntitySearchBar` and moved to `catalog-react` to be usable by other entity list pages
- `UserListPicker` now has an `availableTypes` prop to restrict which user-related options to present
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog': patch
---
Change catalog page layout to use Grid components to improve responsiveness
-54
View File
@@ -1,54 +0,0 @@
---
'@backstage/backend-common': patch
---
Added a `readUrl` method to the `UrlReader` interface that allows for complex response objects and is intended to replace the `read` method. This new method is currently optional to implement which allows for a soft migration to `readUrl` instead of `read` in the future.
The main use case for `readUrl` returning an object instead of solely a read buffer is to allow for additional metadata such as ETag, which is a requirement for more efficient catalog processing.
The `GithubUrlReader` and `GitlabUrlReader` readers fully implement `readUrl`. The other existing readers implement the new method but do not propagate or return ETags.
While the `readUrl` method is not yet required, it will be in the future, and we already log deprecation warnings when custom `UrlReader` implementations that do not implement `readUrl` are used. We therefore recommend that any existing custom implementations are migrated to implement `readUrl`.
The old `read` and the new `readUrl` methods can easily be implemented using one another, but we recommend moving the chunk of the implementation to the new `readUrl` method as `read` is being removed, for example this:
```ts
class CustomUrlReader implements UrlReader {
read(url: string): Promise<Buffer> {
const res = await fetch(url);
if (!res.ok) {
// error handling ...
}
return Buffer.from(await res.text());
}
}
```
Can be migrated to something like this:
```ts
class CustomUrlReader implements UrlReader {
read(url: string): Promise<Buffer> {
const res = await this.readUrl(url);
return res.buffer();
}
async readUrl(
url: string,
_options?: ReadUrlOptions,
): Promise<ReadUrlResponse> {
const res = await fetch(url);
if (!res.ok) {
// error handling ...
}
const buffer = Buffer.from(await res.text());
return { buffer: async () => buffer };
}
}
```
While there is no usage of the ETag capability yet in the main Backstage packages, you can already add it to your custom implementations. To do so, refer to the documentation of the `readUrl` method and surrounding types, and the existing implementation in `packages/backend-common/src/reading/GithubUrlReader.ts`.
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/plugin-catalog-backend-module-ldap': minor
---
Add extension points to the `LdapOrgReaderProcessor` to make it possible to do more advanced modifications
of the ingested users and groups.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Show scroll bar of the sidebar wrapper only on hover
+9
View File
@@ -0,0 +1,9 @@
---
'@backstage/plugin-catalog-backend': patch
---
The codeowners processor extracts the username of the primary owner and uses this as the owner field.
Given the kind isn't specified this is assumed to be a group and so the link to the owner in the about card
doesn't work. This change specifies the kind where the entity is a user. e.g:
`@iain-b` -> `user:iain-b`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': minor
---
Exported and renamed components from the `@backstage/plugin-user-settings` plugin , to be able to use it in the consumer side and customize the `SettingPage`
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Add new `fetch:template` action which handles the same responsibilities as `fetch:cookiecutter` without the external dependency on `cookiecutter`. For information on migrating from `fetch:cookiecutter` to `fetch:template`, see the [migration guide](https://backstage.io/docs/features/software-templates/builtin-actions#migrating-from-fetch-cookiecutter-to-fetch-template) in the docs.
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
Scaffolder: Added an 'eq' handlebars helper for use in software template YAML files. This can be used to execute a step depending on the value of an input, e.g.:
```yaml
steps:
id: 'conditional-step'
action: 'custom-action'
if: '{{ eq parameters.myvalue "custom" }}',
```
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-ilert': patch
---
chore: bump `@date-io/luxon` from 1.3.13 to 2.10.11
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-catalog-backend': patch
---
Make use of the new `readUrl` method on `UrlReader` from `@backstage/backend-common`.
+6
View File
@@ -0,0 +1,6 @@
---
'@backstage/plugin-search-backend-node': minor
---
Change return value of `SearchEngine.index` to `Promise<void>` to support
implementation of external search engines.
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/integration': patch
---
Fix downloads from repositories located at bitbucket.org
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend-module-ldap': patch
---
Expose missing types used by the custom transformers
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/create-app': patch
---
Use SidebarScrollWrapper to improve responsiveness of the current sidebar. Change: Wrap a section of SidebarItems with this component to enable scroll for smaller screens. It can also be used in sidebar plugins (see shortcuts plugin for an example).
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Fix error in error panel, and console warnings about DOM nesting pre inside p
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/core-components': patch
'@backstage/plugin-org': patch
---
Add edit button to Group Profile Card
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder': patch
---
Pass through the `idToken` in `Authorization` Header for `listActions` request
-6
View File
@@ -1,6 +0,0 @@
---
'@backstage/backend-common': patch
'@backstage/plugin-scaffolder-backend': patch
---
add defaultBranch property for publish GitHub action
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-scaffolder-backend': patch
---
removing mandatory of protection for the default branch, that could be handled by the GitHub automation in async manner, thus throwing floating errors
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/core-components': patch
---
Add custom styles to scroll bar of the sidebar wrapper to fix flaky behaviour
+2
View File
@@ -169,6 +169,7 @@ nohoist
nonces
noop
npm
nunjucks
nvarchar
nvm
OAuth
@@ -274,6 +275,7 @@ touchpoints
transpilation
transpiled
truthy
typeahead
ui
unbreak
unmanaged
+1 -1
View File
@@ -60,6 +60,6 @@ Check out [the documentation](https://backstage.io/docs/getting-started) on how
## License
Copyright 2020-2021 © Backstage Project Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage
Copyright 2020-2021 © The Backstage Authors. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page: https://www.linuxfoundation.org/trademark-usage
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
+4
View File
@@ -250,6 +250,10 @@ catalog:
target: ../catalog-model/examples/acme-corp.yaml
scaffolder:
# Use to customize default commit author info used when new components are created
# defaultAuthor:
# name: Scaffolder
# email: scaffolder@backstage.io
github:
token: ${GITHUB_TOKEN}
visibility: public # or 'internal' or 'private'
+5 -7
View File
@@ -142,7 +142,6 @@ export default async function createPlugin({
const indexBuilder = new IndexBuilder({ logger, searchEngine });
indexBuilder.addCollator({
type: 'software-catalog',
defaultRefreshIntervalSeconds: 600,
collator: new DefaultCatalogCollator({ discovery }),
});
@@ -262,21 +261,21 @@ const indexBuilder = new IndexBuilder({ logger, searchEngine });
```
Backstage Search can be used to power search of anything! Plugins like the
Catalog offer default [collators](./concepts.md#collators) which are responsible
for providing documents [to be indexed](./concepts.md#documents-and-indices).
You can register any number of collators with the `IndexBuilder` like this:
Catalog offer default [collators](./concepts.md#collators) (e.g.
[DefaultCatalogCollator](https://github.com/backstage/backstage/blob/df12cc25aa4934a98bc42ed03c07f64a1a0a9d72/plugins/catalog-backend/src/search/DefaultCatalogCollator.ts))
which are responsible for providing documents
[to be indexed](./concepts.md#documents-and-indices). You can register any
number of collators with the `IndexBuilder` like this:
```typescript
const indexBuilder = new IndexBuilder({ logger, searchEngine });
indexBuilder.addCollator({
type: 'software-catalog',
defaultRefreshIntervalSeconds: 600,
collator: new DefaultCatalogCollator({ discovery }),
});
indexBuilder.addCollator({
type: 'my-custom-stuff',
defaultRefreshIntervalSeconds: 3600,
collator: new MyCustomCollator(),
});
@@ -290,7 +289,6 @@ its `defaultRefreshIntervalSeconds` value, like this:
```typescript {3}
indexBuilder.addCollator({
type: 'software-catalog',
defaultRefreshIntervalSeconds: 600,
collator: new DefaultCatalogCollator({ discovery }),
});
@@ -654,7 +654,7 @@ spec:
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
action: fetch:template
input:
url: ./template
values:
@@ -51,7 +51,7 @@ spec:
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
action: fetch:template
input:
url: ./template
values:
@@ -14,3 +14,54 @@ Azure, GitLab and Bitbucket.
A list of all registered actions can be found under `/create/actions`. For local
development you should be able to reach them at
`http://localhost:3000/create/actions`.
### Migrating from `fetch:cookiecutter` to `fetch:template`
The `fetch:template` action is a new action with a similar API to
`fetch:cookiecutter` but no dependency on `cookiecutter`. There are two options
for migrating templates that use `fetch:cookiecutter` to use `fetch:template`:
#### Using `cookiecutterCompat` mode
The new `fetch:template` action has a `cookiecutterCompat` flag which should
allow most templates built for `fetch:cookiecutter` to work without any changes.
1. Update action name in `template.yaml`. The name should be changed from
`fetch:cookiecutter` to `fetch:template`.
2. Set `cookiecutterCompat` to `true` in the `fetch:template` step input in
`template.yaml`.
```diff
steps:
- id: fetch-base
name: Fetch Base
- action: fetch:cookiecutter
+ action: fetch:template
input:
url: ./skeleton
+ cookiecutterCompat: true
values:
```
#### Manual migration
If you prefer, you can manually migrate your templates to avoid the need for
enabling cookiecutter compatibility mode, which will result in slightly less
verbose template variables expressions.
1. Update action name in `template.yaml`. The name should be changed from
`fetch:cookiecutter` to `fetch:template`.
2. Update variable syntax in file names and content. `fetch:cookiecutter`
expects variables to be enclosed in `{{` `}}` and prefixed with
`cookiecutter.`, while `fetch:template` expects variables to be enclosed in
`${{` `}}` and prefixed with `values.`. For example, a reference to variable
`myInputVariable` would need to be migrated from
`{{ cookiecutter.myInputVariable }}` to `${{ values.myInputVariable }}`.
3. Replace uses of `jsonify` with `dump`. The
[`jsonify` filter](https://cookiecutter.readthedocs.io/en/latest/advanced/template_extensions.html#jsonify-extension)
is built in to `cookiecutter`, and is not available by default when using
`fetch:template`. The
[`dump` filter](https://mozilla.github.io/nunjucks/templating.html#dump) is
the equivalent filter in nunjucks, so an expression like
`{{ cookiecutter.myAwesomeList | jsonify }}` should be migrated to
`${{ values.myAwesomeList | dump }}`.
@@ -101,9 +101,7 @@ should have something similar to the below in
```ts
return await createRouter({
preparers,
templaters,
publishers,
containerRunner,
logger,
config,
database,
@@ -118,9 +116,7 @@ will set the available actions that the scaffolder has access to.
```ts
const actions = [createNewFileAction()];
return await createRouter({
preparers,
templaters,
publishers,
containerRunner,
logger,
config,
database,
@@ -137,18 +133,17 @@ want to have those as well as your new one, you'll need to do the following:
import { createBuiltinActions } from '@backstage/plugin-scaffolder-backend';
const builtInActions = createBuiltinActions({
containerRunner,
integrations,
config,
catalogClient,
templaters,
reader,
});
const actions = [...builtInActions, createNewFileAction()];
return await createRouter({
preparers,
templaters,
publishers,
containerRunner,
logger,
config,
database,
@@ -62,7 +62,7 @@ spec:
steps:
- id: fetch-base
name: Fetch Base
action: fetch:cookiecutter
action: fetch:template
input:
url: ./template
values:
@@ -289,8 +289,8 @@ template. These follow the same standard format:
- id: fetch-base # A unique id for the step
name: Fetch Base # A title displayed in the frontend
if: '{{ parameters.name }}' # Optional condition, skip the step if not truthy
action: fetch:cookiecutter # an action to call
input: # input that is passed as arguments to the action handler
action: fetch:template # An action to call
input: # Input that is passed as arguments to the action handler
url: ./template
values:
name: '{{ parameters.name }}'
@@ -317,20 +317,20 @@ output:
### The templating syntax
You might have noticed in the examples that there are `{{ }}`, and these are a
`handlebars` templates for linking and glueing all these different parts of
`yaml` together. All the form inputs from the `parameters` section, when passed
to the steps will be available by using the template syntax
`{{ parameters.something }}`. This is great for passing the values from the form
into different steps and reusing these input variables. To pass arrays or
objects use the syntax `{{ json paramaters.something }}` where
`paramaters.something` is of type `object` or `array` in the `jsonSchema`, such
as the `nicknames` parameter in the previous example.
You might have noticed variables wrapped in `{{ }}` in the examples. These are
`handlebars` template strings for linking and gluing the different parts of the
template together. All the form inputs from the `parameters` section will be
available by using this template syntax (for example,
`{{ parameters.firstName }}` inserts the value of `firstName` from the
parameters). This is great for passing the values from the form into different
steps and reusing these input variables. To pass arrays or objects use the
`json` custom [helper](https://handlebarsjs.com/guide/expressions.html#helpers).
For example, `{{ json parameters.nicknames }}` will insert the result of calling
`JSON.stringify` on the value of the `nicknames` parameter.
As you can see above in the `Outputs` section, `actions` and `steps` can also
output things. So you can grab that output by using
`steps.$stepId.output.$property`.
output things. You can grab that output using `steps.$stepId.output.$property`.
You can read more about all the `inputs` and `outputs` defined in the actions in
code part of the `JSONSchema` or you can read more about our built in ones
code part of the `JSONSchema`, or you can read more about our built in ones
[here](./builtin-actions.md).
@@ -132,4 +132,4 @@ Integrating infrastructure of this size and complexity can seem overwhelming. It
## More questions about adopting Backstage?
[Contact the Backstage team at Spotify.](https://calendly.com/spotify-backstage) Well share more about what weve learned from our experience here at Spotify — and from other companies who are already using Backstage to transform their developer experience.
[Contact the Backstage team at Spotify.](https://backstage.spotify.com/) Well share more about what weve learned from our experience here at Spotify — and from other companies who are already using Backstage to transform their developer experience.
@@ -0,0 +1,9 @@
---
title: Scaffolder Backend Module Rails
author: Rogerio Angeliski
authorUrl: https://angeliski.com.br/
category: Scaffolder
description: Here you can find all Rails related features to improve your scaffolder.
documentation: https://github.com/backstage/backstage/blob/master/plugins/scaffolder-backend-module-rails/README.md
iconUrl: img/rails-icon.png
npmPackageName: '@backstage/plugin-scaffolder-backend-module-rails'
+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:1.25px}</style></defs><polyline points="79.08 24.38 79.08 218.83 79.08 245.06" class="cls-1"/><polyline points="63.67 235.75 63.67 209.52 63.67 24.38" class="cls-1"/><path d="M189.83,220h0l0,0Z" class="cls-1"/><path d="M145.5,88.07c-16.61-12.31-5.42-21.25-22-33.56s-27.8-3.37-44.4-15.68v116.3c16.6,12.31,27.79,3.37,44.4,15.68s5.41,21.25,22,33.56,27.76,3.38,44.33,15.63l0-116.27C173.28,91.43,162.09,100.37,145.5,88.07Zm-7.78,66.36v0a23.17,23.17,0,0,1-16.43-6.81l-7,7,7-7a23.16,23.16,0,0,1-6.8-16.43h0a23.18,23.18,0,0,1,6.8-16.43l-7-7,7,7a23.2,23.2,0,0,1,16.43-6.8v0a23.16,23.16,0,0,1,16.43,6.8l7-7-7,7A23.15,23.15,0,0,1,161,131.19h0a23.13,23.13,0,0,1-6.81,16.43l7,7-7-7A23.13,23.13,0,0,1,137.72,154.43Z" class="cls-1"/><path d="M137.72,124.67V108a23.2,23.2,0,0,0-16.43,6.8l11.82,11.82A6.5,6.5,0,0,1,137.72,124.67Z" class="cls-1"/><path d="M144.24,131.19H161a23.15,23.15,0,0,0-6.81-16.43l-11.82,11.82A6.5,6.5,0,0,1,144.24,131.19Z" class="cls-1"/><path d="M133.11,126.58l-11.82-11.82a23.18,23.18,0,0,0-6.8,16.43H131.2A6.5,6.5,0,0,1,133.11,126.58Z" class="cls-1"/><path d="M142.33,126.58l11.82-11.82a23.16,23.16,0,0,0-16.43-6.8v16.71A6.5,6.5,0,0,1,142.33,126.58Z" class="cls-1"/><path d="M131.2,131.19H114.49a23.16,23.16,0,0,0,6.8,16.43l11.82-11.82A6.5,6.5,0,0,1,131.2,131.19Z" class="cls-1"/><path d="M137.72,137.71v16.72a23.13,23.13,0,0,0,16.43-6.81L142.33,135.8A6.5,6.5,0,0,1,137.72,137.71Z" class="cls-1"/><path d="M161,131.19H144.24a6.5,6.5,0,0,1-1.91,4.61l11.82,11.82A23.13,23.13,0,0,0,161,131.19Z" class="cls-1"/><path d="M133.11,135.8l-11.82,11.82a23.17,23.17,0,0,0,16.43,6.81V137.71A6.5,6.5,0,0,1,133.11,135.8Z" class="cls-1"/><path d="M82.63,16.19a11.26,11.26,0,1,0-19,8.19h0a11.23,11.23,0,0,0,15.41,0h0A11.21,11.21,0,0,0,82.63,16.19Z" class="cls-1"/></svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="250" height="250" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:2.5px;}</style></defs><polyline class="cls-1" points="79.08 24.38 79.08 218.83 79.08 245.06"/><polyline class="cls-1" points="63.67 235.75 63.67 209.52 63.67 24.38"/><path class="cls-1" d="M189.83,220h0l0,0Z"/><path class="cls-1" d="M145.5,88.07c-16.61-12.31-5.42-21.25-22-33.56s-27.8-3.37-44.4-15.68v116.3c16.6,12.31,27.79,3.37,44.4,15.68s5.41,21.25,22,33.56,27.76,3.38,44.33,15.63l0-116.27C173.28,91.43,162.09,100.37,145.5,88.07Z"/><path class="cls-1" d="M137.72,124.67V108a23.2,23.2,0,0,0-16.43,6.8l11.82,11.82A6.5,6.5,0,0,1,137.72,124.67Z"/><path class="cls-1" d="M144.24,131.19H161a23.15,23.15,0,0,0-6.81-16.43l-11.82,11.82A6.5,6.5,0,0,1,144.24,131.19Z"/><path class="cls-1" d="M133.11,126.58l-11.82-11.82a23.18,23.18,0,0,0-6.8,16.43H131.2A6.5,6.5,0,0,1,133.11,126.58Z"/><path class="cls-1" d="M142.33,126.58l11.82-11.82a23.16,23.16,0,0,0-16.43-6.8v16.71A6.5,6.5,0,0,1,142.33,126.58Z"/><path class="cls-1" d="M131.2,131.19H114.49a23.16,23.16,0,0,0,6.8,16.43l11.82-11.82A6.5,6.5,0,0,1,131.2,131.19Z"/><path class="cls-1" d="M137.72,137.71v16.72a23.13,23.13,0,0,0,16.43-6.81L142.33,135.8A6.5,6.5,0,0,1,137.72,137.71Z"/><path class="cls-1" d="M161,131.19H144.24a6.5,6.5,0,0,1-1.91,4.61l11.82,11.82A23.13,23.13,0,0,0,161,131.19Z"/><path class="cls-1" d="M133.11,135.8l-11.82,11.82a23.17,23.17,0,0,0,16.43,6.81V137.71A6.5,6.5,0,0,1,133.11,135.8Z"/><path class="cls-1" d="M82.63,16.19a11.26,11.26,0,1,0-19,8.19h0a11.23,11.23,0,0,0,15.41,0h0A11.21,11.21,0,0,0,82.63,16.19Z"/><line class="cls-1" x1="154.15" y1="147.62" x2="161.15" y2="154.62"/><line class="cls-1" x1="160.96" y1="131.19" x2="170.85" y2="131.19"/><line class="cls-1" x1="154.15" y1="114.76" x2="161.15" y2="107.77"/><line class="cls-1" x1="137.72" y1="107.96" x2="137.72" y2="98.06"/><line class="cls-1" x1="121.29" y1="114.76" x2="114.3" y2="107.77"/><line class="cls-1" x1="114.49" y1="131.19" x2="104.6" y2="131.19"/><line class="cls-1" x1="121.29" y1="147.62" x2="114.3" y2="154.62"/><line class="cls-1" x1="137.72" y1="154.43" x2="137.72" y2="164.32"/></svg>

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 250 250"><defs><style>.cls-1,.cls-2,.cls-3{fill:none;stroke:#7df3e1}.cls-1{stroke-linecap:round}.cls-1,.cls-3{stroke-linejoin:round;stroke-width:1.25px}.cls-2{stroke-miterlimit:10}</style></defs><path d="M22.08,87.32c-1.64-3.26-2-6.12-1-8.45C24.64,70.6,45,70.7,73.39,77.6" class="cls-1"/><circle cx="31.13" cy="100.9" r="15.94" class="cls-2"/><path d="M88,136.33c-17.15-8.82-32-17.87-43.33-26.3" class="cls-1"/><path d="M198.45,131.52c25,16.22,39.43,31.24,35.81,39.61-4.72,10.91-38.57,7.26-81.64-7.33" class="cls-1"/><path d="M91.39,129.7C49,85.89,23.62,45.42,33.42,35.14c6.72-7,28.38,1.71,56.08,20.9" class="cls-1"/><path d="M193,153c23.35,29.29,36,54.36,28.87,61.87-8.5,8.92-40.94-7.48-79.25-38.28" class="cls-1"/><path d="M128.76,182.48c20.74,32.14,40.49,51.49,50,46.81" class="cls-3"/><path d="M76.52,20.71C64.08,26.81,73.27,71.5,96.9,123.56" class="cls-3"/><circle cx="111.23" cy="46.18" r="23.7" class="cls-2"/><path d="M133.76,53.58a71,71,0,1,1-39.92,8.47" class="cls-3"/><path d="M128.76,182.48c20.74,32.14,40.49,51.49,50,46.81,8.24-4,7-25-1.67-53.87" class="cls-3"/><path d="M95.51,28.62c-7.92-7.07-14.56-10.08-19-7.91C64.08,26.81,73.27,71.5,96.9,123.56" class="cls-3"/><circle cx="120.99" cy="148.62" r="34.89" class="cls-2"/></svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="250" height="250" viewBox="0 0 250 250"><defs><style>.cls-1,.cls-2,.cls-3{fill:none;stroke:#7df3e1;stroke-width:2.5px;}.cls-1{stroke-linecap:round;}.cls-1,.cls-3{stroke-linejoin:round;}.cls-2{stroke-miterlimit:10;}</style></defs><path class="cls-1" d="M22.08,87.32c-1.64-3.26-2-6.12-1-8.45C24.64,70.6,45,70.7,73.39,77.6"/><circle class="cls-2" cx="31.13" cy="100.9" r="15.94"/><path class="cls-1" d="M88,136.33c-17.15-8.82-32-17.87-43.33-26.3"/><path class="cls-1" d="M198.45,131.52c25,16.22,39.43,31.24,35.81,39.61-4.72,10.91-38.57,7.26-81.64-7.33"/><path class="cls-1" d="M91.39,129.7C49,85.89,23.62,45.42,33.42,35.14c6.72-7,28.38,1.71,56.08,20.9"/><path class="cls-1" d="M193,153c23.35,29.29,36,54.36,28.87,61.87-8.5,8.92-40.94-7.48-79.25-38.28"/><path class="cls-3" d="M128.76,182.48c20.74,32.14,40.49,51.49,50,46.81"/><path class="cls-3" d="M76.52,20.71C64.08,26.81,73.27,71.5,96.9,123.56"/><circle class="cls-2" cx="111.23" cy="46.18" r="23.7"/><path class="cls-3" d="M133.76,53.58a71,71,0,1,1-39.92,8.47"/><path class="cls-3" d="M128.76,182.48c20.74,32.14,40.49,51.49,50,46.81,8.24-4,7-25-1.67-53.87"/><path class="cls-3" d="M95.51,28.62c-7.92-7.07-14.56-10.08-19-7.91C64.08,26.81,73.27,71.5,96.9,123.56"/><circle class="cls-2" cx="120.99" cy="148.62" r="34.89"/></svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:1.25px}</style></defs><path d="M157.82,203.89a5.28,5.28,0,0,1-.67,3.09c-3.75,6.21-21.45,2.39-39.54-8.53C101.87,189,91,177.23,90.93,170.25c-7.27-.67-12.6.66-14.77,4.26-5.58,9.25,11.76,29.94,38.74,46.21s53.36,22,58.94,12.72C177.61,227.18,170.9,215.7,157.82,203.89Z" class="cls-1"/><path d="M157.82,203.89c-.3-5.42-6.78-13.52-16.86-21.24,0,0,0,.09-.05.13C139,185.93,130,184,120.77,178.43c-6.92-4.17-12-9.2-13.27-12.78-7.89-2-13.88-1.51-15.88,1.81a5.24,5.24,0,0,0-.69,2.79" class="cls-1"/><path d="M90.93,170.25c.09,7,10.94,18.71,26.68,28.2,18.09,10.92,35.79,14.74,39.54,8.53a5.28,5.28,0,0,0,.67-3.09" class="cls-1"/><path d="M141,182.65c1.69-3.22-4.19-10.17-13.28-15.66s-18.23-7.5-20.14-4.34a3.49,3.49,0,0,0,0,3" class="cls-1"/><path d="M107.5,165.65c1.29,3.58,6.35,8.61,13.27,12.78,9.22,5.56,18.23,7.5,20.14,4.35,0,0,0-.09.05-.13" class="cls-1"/><path d="M117.79,126a6.09,6.09,0,0,0,0,2.58l6.36,27,7.2-21.89a9.86,9.86,0,0,0,.45-4.26" class="cls-1"/><path d="M154.88,109V75.86a82.39,82.39,0,0,0-28-61.9l-2.08-1.83A45.42,45.42,0,0,0,94.7,54.89V94h0c-.64,9.87,5.75,21.3,17.08,28.72a44.56,44.56,0,0,0,6,3.28,6.16,6.16,0,0,1,9.26-4.09h0a10.13,10.13,0,0,1,4.8,7.57c8.51.37,16.05-2.61,20.12-8.83a18.2,18.2,0,0,0,2.88-8.6h0v-.38A20,20,0,0,0,154.88,109Z" class="cls-1"/><path d="M131.85,129.49a10.13,10.13,0,0,0-4.8-7.57h0a6.16,6.16,0,0,0-9.26,4.09" class="cls-1"/><path d="M173.76,96.66V86.55h0c.19-3.07-1.79-6.62-5.32-8.93-4.67-3.06-10.27-2.77-12.5.64a5.58,5.58,0,0,0-.89,2.68h0V81a5.89,5.89,0,0,0,0,.84v3.26h0v21.36h0v10.11h0c-.2,3.08,1.79,6.63,5.31,8.94,4.67,3.06,10.27,2.77,12.5-.64a5.71,5.71,0,0,0,.9-2.68h0v-.12c0-.27,0-.55,0-.83V118h0V96.66Z" class="cls-1"/><path d="M94.66,59.93a5.75,5.75,0,0,0,0-.83V59h0a5.63,5.63,0,0,0-.9-2.67c-2.23-3.41-7.83-3.7-12.5-.65-3.52,2.31-5.51,5.87-5.31,8.94h0v1.19s0,.07,0,.1V93.64s0,.07,0,.1v1.19h0c-.2,3.08,1.79,6.63,5.31,8.94,4.67,3.06,10.27,2.77,12.5-.64a5.71,5.71,0,0,0,.9-2.68h0v-.12a5.75,5.75,0,0,0,0-.83V95.9h0V59.94Z" class="cls-1"/><ellipse cx="122.77" cy="62.49" class="cls-1" rx="10.06" ry="11.36"/></svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="250" height="250" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:2.5px;}</style></defs><path class="cls-1" d="M157.82,203.89a5.28,5.28,0,0,1-.67,3.09c-3.75,6.21-21.45,2.39-39.54-8.53C101.87,189,91,177.23,90.93,170.25c-7.27-.67-12.6.66-14.77,4.26-5.58,9.25,11.76,29.94,38.74,46.21s53.36,22,58.94,12.72C177.61,227.18,170.9,215.7,157.82,203.89Z"/><path class="cls-1" d="M157.82,203.89c-.3-5.42-6.78-13.52-16.86-21.24,0,0,0,.09-.05.13C139,185.93,130,184,120.77,178.43c-6.92-4.17-12-9.2-13.27-12.78-7.89-2-13.88-1.51-15.88,1.81a5.24,5.24,0,0,0-.69,2.79"/><path class="cls-1" d="M90.93,170.25c.09,7,10.94,18.71,26.68,28.2,18.09,10.92,35.79,14.74,39.54,8.53a5.28,5.28,0,0,0,.67-3.09"/><path class="cls-1" d="M141,182.65c1.69-3.22-4.19-10.17-13.28-15.66s-18.23-7.5-20.14-4.34a3.49,3.49,0,0,0,0,3"/><path class="cls-1" d="M107.5,165.65c1.29,3.58,6.35,8.61,13.27,12.78,9.22,5.56,18.23,7.5,20.14,4.35,0,0,0-.09.05-.13"/><path class="cls-1" d="M117.79,126a6.09,6.09,0,0,0,0,2.58l6.36,27,7.2-21.89a9.86,9.86,0,0,0,.45-4.26"/><path class="cls-1" d="M154.88,109V75.86a82.39,82.39,0,0,0-28-61.9l-2.08-1.83A45.42,45.42,0,0,0,94.7,54.89V94h0c-.64,9.87,5.75,21.3,17.08,28.72a44.56,44.56,0,0,0,6,3.28,6.16,6.16,0,0,1,9.26-4.09h0a10.13,10.13,0,0,1,4.8,7.57c8.51.37,16.05-2.61,20.12-8.83a18.2,18.2,0,0,0,2.88-8.6h0v-.38A20,20,0,0,0,154.88,109Z"/><path class="cls-1" d="M131.85,129.49a10.13,10.13,0,0,0-4.8-7.57h0a6.16,6.16,0,0,0-9.26,4.09"/><path class="cls-1" d="M173.76,96.66V86.55h0c.19-3.07-1.79-6.62-5.32-8.93-4.67-3.06-10.27-2.77-12.5.64a5.58,5.58,0,0,0-.89,2.68h0V81a5.89,5.89,0,0,0,0,.84v3.26h0v21.36h0v10.11h0c-.2,3.08,1.79,6.63,5.31,8.94,4.67,3.06,10.27,2.77,12.5-.64a5.71,5.71,0,0,0,.9-2.68h0v-.12c0-.27,0-.55,0-.83V118h0V96.66Z"/><path class="cls-1" d="M94.66,59.93a5.75,5.75,0,0,0,0-.83V59h0a5.63,5.63,0,0,0-.9-2.67c-2.23-3.41-7.83-3.7-12.5-.65-3.52,2.31-5.51,5.87-5.31,8.94h0v1.19s0,.07,0,.1V93.64s0,.07,0,.1v1.19h0c-.2,3.08,1.79,6.63,5.31,8.94,4.67,3.06,10.27,2.77,12.5-.64a5.71,5.71,0,0,0,.9-2.68h0v-.12a5.75,5.75,0,0,0,0-.83V95.9h0V59.94Z"/><ellipse class="cls-1" cx="122.77" cy="62.49" rx="10.06" ry="11.36"/></svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:1.25px}</style></defs><polygon points="210.2 178.75 210.2 96.75 186.09 44.02 136.67 12.26 136.67 134.08 210.2 178.75" class="cls-1"/><polygon points="113.33 237.75 113.33 118.51 39.8 71.25 39.8 193.07 113.33 237.75" class="cls-1"/><polyline points="69.73 136.22 58.56 147.39 68.59 167.84" class="cls-1"/><polyline points="82.96 176.15 93.08 166.03 82.67 143.81" class="cls-1"/><line x1="159.63" x2="122.15" y1="127.73" y2="165.96" class="cls-1"/><polyline points="136.74 165.96 122.15 165.96 122.15 151.37" class="cls-1"/><line x1="122.15" x2="159.51" y1="115.07" y2="77.07" class="cls-1"/><polyline points="144.92 77.07 159.51 77.07 159.51 91.66" class="cls-1"/><polygon points="186.03 81.26 210.13 96.75 186.03 44.1 186.03 81.26" class="cls-1"/></svg>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="250" height="250" viewBox="0 0 250 250"><defs><style>.cls-1{fill:none;stroke:#7df3e1;stroke-linejoin:round;stroke-width:2.5px;}</style></defs><polygon class="cls-1" points="210.2 178.75 210.2 96.75 186.09 44.02 136.67 12.26 136.67 134.08 210.2 178.75"/><polygon class="cls-1" points="113.33 237.75 113.33 118.51 39.8 71.25 39.8 193.07 113.33 237.75"/><polyline class="cls-1" points="69.73 136.22 58.56 147.39 68.59 167.84"/><polyline class="cls-1" points="82.96 176.15 93.08 166.03 82.67 143.81"/><line class="cls-1" x1="159.63" y1="127.73" x2="122.15" y2="165.96"/><polyline class="cls-1" points="136.74 165.96 122.15 165.96 122.15 151.37"/><line class="cls-1" x1="122.15" y1="115.07" x2="159.51" y2="77.07"/><polyline class="cls-1" points="144.92 77.07 159.51 77.07 159.51 91.66"/><polygon class="cls-1" points="186.03 81.26 210.13 96.75 186.03 44.1 186.03 81.26"/></svg>

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 953 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

+30
View File
@@ -1,5 +1,35 @@
# example-app
## 0.2.36
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
- @backstage/plugin-pagerduty@0.3.7
- @backstage/plugin-catalog-import@0.5.12
- @backstage/plugin-explore@0.3.9
- @backstage/catalog-model@0.9.0
- @backstage/plugin-scaffolder@0.10.0
- @backstage/plugin-catalog@0.6.6
- @backstage/plugin-org@0.3.16
- @backstage/plugin-techdocs@0.9.9
- @backstage/plugin-api-docs@0.6.1
- @backstage/plugin-badges@0.2.4
- @backstage/plugin-catalog-react@0.2.6
- @backstage/plugin-circleci@0.2.18
- @backstage/plugin-cloudbuild@0.2.18
- @backstage/plugin-code-coverage@0.1.6
- @backstage/plugin-github-actions@0.4.12
- @backstage/plugin-jenkins@0.4.7
- @backstage/plugin-kafka@0.2.10
- @backstage/plugin-kubernetes@0.4.7
- @backstage/plugin-lighthouse@0.2.19
- @backstage/plugin-rollbar@0.3.8
- @backstage/plugin-search@0.4.2
- @backstage/plugin-sentry@0.3.14
- @backstage/plugin-todo@0.1.4
## 0.2.34
### Patch Changes
+25 -25
View File
@@ -1,43 +1,43 @@
{
"name": "example-app",
"version": "0.2.34",
"version": "0.2.36",
"private": true,
"bundled": true,
"dependencies": {
"@backstage/catalog-model": "^0.8.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/cli": "^0.7.2",
"@backstage/core-app-api": "^0.1.3",
"@backstage/core-components": "^0.1.3",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/integration-react": "^0.1.4",
"@backstage/plugin-api-docs": "^0.6.0",
"@backstage/plugin-badges": "^0.2.3",
"@backstage/plugin-catalog": "^0.6.4",
"@backstage/plugin-catalog-import": "^0.5.11",
"@backstage/plugin-catalog-react": "^0.2.4",
"@backstage/plugin-circleci": "^0.2.17",
"@backstage/plugin-cloudbuild": "^0.2.17",
"@backstage/plugin-code-coverage": "^0.1.5",
"@backstage/plugin-api-docs": "^0.6.1",
"@backstage/plugin-badges": "^0.2.4",
"@backstage/plugin-catalog": "^0.6.6",
"@backstage/plugin-catalog-import": "^0.5.12",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/plugin-circleci": "^0.2.18",
"@backstage/plugin-cloudbuild": "^0.2.18",
"@backstage/plugin-code-coverage": "^0.1.6",
"@backstage/plugin-cost-insights": "^0.11.0",
"@backstage/plugin-explore": "^0.3.7",
"@backstage/plugin-explore": "^0.3.9",
"@backstage/plugin-gcp-projects": "^0.3.0",
"@backstage/plugin-github-actions": "^0.4.10",
"@backstage/plugin-github-actions": "^0.4.12",
"@backstage/plugin-graphiql": "^0.2.12",
"@backstage/plugin-jenkins": "^0.4.6",
"@backstage/plugin-kafka": "^0.2.9",
"@backstage/plugin-kubernetes": "^0.4.6",
"@backstage/plugin-lighthouse": "^0.2.18",
"@backstage/plugin-jenkins": "^0.4.7",
"@backstage/plugin-kafka": "^0.2.10",
"@backstage/plugin-kubernetes": "^0.4.7",
"@backstage/plugin-lighthouse": "^0.2.19",
"@backstage/plugin-newrelic": "^0.3.0",
"@backstage/plugin-org": "^0.3.15",
"@backstage/plugin-pagerduty": "0.3.6",
"@backstage/plugin-rollbar": "^0.3.7",
"@backstage/plugin-scaffolder": "^0.9.9",
"@backstage/plugin-search": "^0.4.1",
"@backstage/plugin-sentry": "^0.3.13",
"@backstage/plugin-org": "^0.3.16",
"@backstage/plugin-pagerduty": "0.3.7",
"@backstage/plugin-rollbar": "^0.3.8",
"@backstage/plugin-scaffolder": "^0.10.0",
"@backstage/plugin-search": "^0.4.2",
"@backstage/plugin-sentry": "^0.3.14",
"@backstage/plugin-shortcuts": "^0.1.4",
"@backstage/plugin-tech-radar": "^0.4.1",
"@backstage/plugin-techdocs": "^0.9.7",
"@backstage/plugin-todo": "^0.1.3",
"@backstage/plugin-techdocs": "^0.9.9",
"@backstage/plugin-todo": "^0.1.4",
"@backstage/plugin-user-settings": "^0.2.12",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
+60
View File
@@ -1,5 +1,65 @@
# @backstage/backend-common
## 0.8.5
### Patch Changes
- 09d3eb684: Added a `readUrl` method to the `UrlReader` interface that allows for complex response objects and is intended to replace the `read` method. This new method is currently optional to implement which allows for a soft migration to `readUrl` instead of `read` in the future.
The main use case for `readUrl` returning an object instead of solely a read buffer is to allow for additional metadata such as ETag, which is a requirement for more efficient catalog processing.
The `GithubUrlReader` and `GitlabUrlReader` readers fully implement `readUrl`. The other existing readers implement the new method but do not propagate or return ETags.
While the `readUrl` method is not yet required, it will be in the future, and we already log deprecation warnings when custom `UrlReader` implementations that do not implement `readUrl` are used. We therefore recommend that any existing custom implementations are migrated to implement `readUrl`.
The old `read` and the new `readUrl` methods can easily be implemented using one another, but we recommend moving the chunk of the implementation to the new `readUrl` method as `read` is being removed, for example this:
```ts
class CustomUrlReader implements UrlReader {
read(url: string): Promise<Buffer> {
const res = await fetch(url);
if (!res.ok) {
// error handling ...
}
return Buffer.from(await res.text());
}
}
```
Can be migrated to something like this:
```ts
class CustomUrlReader implements UrlReader {
read(url: string): Promise<Buffer> {
const res = await this.readUrl(url);
return res.buffer();
}
async readUrl(
url: string,
_options?: ReadUrlOptions,
): Promise<ReadUrlResponse> {
const res = await fetch(url);
if (!res.ok) {
// error handling ...
}
const buffer = Buffer.from(await res.text());
return { buffer: async () => buffer };
}
}
```
While there is no usage of the ETag capability yet in the main Backstage packages, you can already add it to your custom implementations. To do so, refer to the documentation of the `readUrl` method and surrounding types, and the existing implementation in `packages/backend-common/src/reading/GithubUrlReader.ts`.
- 6841e0113: fix minor version of git-url-parse as 11.5.x introduced a bug for Bitbucket Server
- c2db794f5: add defaultBranch property for publish GitHub action
- Updated dependencies
- @backstage/integration@0.5.8
## 0.8.4
### Patch Changes
+5 -5
View File
@@ -19,7 +19,7 @@ import * as http from 'http';
import { isChildPath } from '@backstage/cli-common';
import { JsonValue } from '@backstage/config';
import { Knex } from 'knex';
import { Logger } from 'winston';
import { Logger as Logger_2 } from 'winston';
import { MergeResult } from 'isomorphic-git';
import { PushResult } from 'isomorphic-git';
import { Readable } from 'stream';
@@ -129,7 +129,7 @@ export function errorHandler(options?: ErrorHandlerOptions): ErrorRequestHandler
// @public (undocumented)
export type ErrorHandlerOptions = {
showStackTraces?: boolean;
logger?: Logger;
logger?: Logger_2;
logClientErrors?: boolean;
};
@@ -185,7 +185,7 @@ export class Git {
static fromAuth: ({ username, password, logger, }: {
username?: string | undefined;
password?: string | undefined;
logger?: Logger | undefined;
logger?: Logger_2 | undefined;
}) => Git;
// (undocumented)
init({ dir, defaultBranch, }: {
@@ -301,7 +301,7 @@ export type ReadTreeResponseFile = {
};
// @public
export function requestLoggingHandler(logger?: Logger): RequestHandler;
export function requestLoggingHandler(logger?: Logger_2): RequestHandler;
// @public
export function resolvePackagePath(name: string, ...paths: string[]): string;
@@ -337,7 +337,7 @@ export type ServiceBuilder = {
loadConfig(config: ConfigReader): ServiceBuilder;
setPort(port: number): ServiceBuilder;
setHost(host: string): ServiceBuilder;
setLogger(logger: Logger): ServiceBuilder;
setLogger(logger: Logger_2): ServiceBuilder;
enableCors(options: cors.CorsOptions): ServiceBuilder;
setHttpsSettings(settings: HttpsSettings): ServiceBuilder;
addRouter(root: string, router: Router | RequestHandler): ServiceBuilder;
+10
View File
@@ -64,6 +64,11 @@ export interface Config {
connection: string | object;
/** Database name prefix override */
prefix?: string;
/**
* Whether to ensure the given database exists by creating it if it does not.
* Defaults to true if unspecified.
*/
ensureExists?: boolean;
/** Plugin specific database configuration and client override */
plugin?: {
[pluginId: string]: {
@@ -74,6 +79,11 @@ export interface Config {
* @secret
*/
connection?: string | object;
/**
* Whether to ensure the given database exists by creating it if it does not.
* Defaults to base config if unspecified.
*/
ensureExists?: boolean;
};
};
};
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-common",
"description": "Common functionality library for Backstage backends",
"version": "0.8.4",
"version": "0.8.5",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -33,7 +33,7 @@
"@backstage/config": "^0.1.5",
"@backstage/config-loader": "^0.6.4",
"@backstage/errors": "^0.1.1",
"@backstage/integration": "^0.5.7",
"@backstage/integration": "^0.5.8",
"@google-cloud/storage": "^5.8.0",
"@octokit/rest": "^18.5.3",
"@types/cors": "^2.8.6",
@@ -48,7 +48,7 @@
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"fs-extra": "^10.0.0",
"git-url-parse": "^11.4.4",
"git-url-parse": "~11.4.4",
"helmet": "^4.0.0",
"isomorphic-git": "^1.8.0",
"keyv": "^4.0.3",
@@ -128,6 +128,14 @@ export class DatabaseManager {
};
}
private getEnsureExistsConfig(pluginId: string): boolean {
const baseConfig = this.config.getOptionalBoolean('ensureExists') ?? true;
return (
this.config.getOptionalBoolean(`${pluginPath(pluginId)}.ensureExists`) ??
baseConfig
);
}
/**
* Provides a Knex connection plugin config by combining base and plugin config.
*
@@ -203,13 +211,15 @@ export class DatabaseManager {
this.getConfigForPlugin(pluginId) as JsonObject,
);
const databaseName = this.getDatabaseName(pluginId);
try {
await ensureDatabaseExists(pluginConfig, databaseName);
} catch (error) {
throw new Error(
`Failed to connect to the database to make sure that '${databaseName}' exists, ${error}`,
);
if (this.getEnsureExistsConfig(pluginId)) {
const databaseName = this.getDatabaseName(pluginId);
try {
await ensureDatabaseExists(pluginConfig, databaseName);
} catch (error) {
throw new Error(
`Failed to connect to the database to make sure that '${databaseName}' exists, ${error}`,
);
}
}
return createDatabaseClient(
+8
View File
@@ -1,5 +1,13 @@
# @backstage/backend-test-utils
## 0.1.4
### Patch Changes
- f7134c368: bump sqlite3 to 5.0.1
- Updated dependencies
- @backstage/backend-common@0.8.5
## 0.1.3
### Patch Changes
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-test-utils",
"description": "Test helpers library for Backstage backends",
"version": "0.1.3",
"version": "0.1.4",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -30,13 +30,13 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.8.3",
"@backstage/backend-common": "^0.8.5",
"@backstage/cli": "^0.7.1",
"@backstage/config": "^0.1.5",
"knex": "^0.95.1",
"mysql2": "^2.2.5",
"pg": "^8.3.0",
"sqlite3": "^5.0.0",
"sqlite3": "^5.0.1",
"testcontainers": "^7.10.0",
"uuid": "^8.0.0"
},
+23
View File
@@ -1,5 +1,28 @@
# example-backend
## 0.2.36
### Patch Changes
- Updated dependencies
- @backstage/integration@0.5.8
- @backstage/plugin-scaffolder-backend@0.13.0
- @backstage/catalog-model@0.9.0
- @backstage/plugin-catalog-backend@0.12.0
- @backstage/backend-common@0.8.5
- @backstage/plugin-search-backend-node@0.3.0
- example-app@0.2.36
- @backstage/plugin-scaffolder-backend-module-rails@0.1.2
- @backstage/catalog-client@0.3.16
- @backstage/plugin-auth-backend@0.3.16
- @backstage/plugin-badges-backend@0.1.8
- @backstage/plugin-code-coverage-backend@0.1.8
- @backstage/plugin-kafka-backend@0.2.8
- @backstage/plugin-kubernetes-backend@0.3.9
- @backstage/plugin-techdocs-backend@0.8.6
- @backstage/plugin-todo-backend@0.1.8
- @backstage/plugin-search-backend@0.2.2
## 0.2.35
### Patch Changes
+10
View File
@@ -39,6 +39,16 @@ You can also, instead of using dummy values for a huge number of environment var
The backend starts up on port 7000 per default.
### Debugging
The backend is a node process that can be inspected to allow breakpoints and live debugging. To enable this, pass the `--inspect` flag to [backend:dev](https://backstage.io/docs/cli/commands#backenddev).
To debug the backend in [Visual Studio Code](https://code.visualstudio.com/):
- Enable Auto Attach (⌘ + Shift + P > Toggle Auto Attach > Only With Flag)
- Open a VSCode terminal (Control + `)
- Run the backend from the VSCode terminal: `yarn start-backend --inspect`
## Populating The Catalog
If you want to use the catalog functionality, you need to add so called
+20 -18
View File
@@ -1,6 +1,6 @@
{
"name": "example-backend",
"version": "0.2.35",
"version": "0.2.36",
"main": "dist/index.cjs.js",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -27,36 +27,38 @@
"migrate:create": "knex migrate:make -x ts"
},
"dependencies": {
"@backstage/backend-common": "^0.8.4",
"@backstage/catalog-client": "^0.3.15",
"@backstage/catalog-model": "^0.8.2",
"@backstage/backend-common": "^0.8.5",
"@backstage/catalog-client": "^0.3.16",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/integration": "^0.5.8",
"@backstage/plugin-app-backend": "^0.3.13",
"@backstage/plugin-auth-backend": "^0.3.15",
"@backstage/plugin-badges-backend": "^0.1.6",
"@backstage/plugin-catalog-backend": "^0.11.0",
"@backstage/plugin-code-coverage-backend": "^0.1.6",
"@backstage/plugin-auth-backend": "^0.3.16",
"@backstage/plugin-badges-backend": "^0.1.8",
"@backstage/plugin-catalog-backend": "^0.12.0",
"@backstage/plugin-code-coverage-backend": "^0.1.8",
"@backstage/plugin-graphql-backend": "^0.1.8",
"@backstage/plugin-kubernetes-backend": "^0.3.8",
"@backstage/plugin-kafka-backend": "^0.2.7",
"@backstage/plugin-kubernetes-backend": "^0.3.9",
"@backstage/plugin-kafka-backend": "^0.2.8",
"@backstage/plugin-proxy-backend": "^0.2.9",
"@backstage/plugin-rollbar-backend": "^0.1.11",
"@backstage/plugin-scaffolder-backend": "^0.12.4",
"@backstage/plugin-search-backend": "^0.2.0",
"@backstage/plugin-search-backend-node": "^0.2.0",
"@backstage/plugin-techdocs-backend": "^0.8.5",
"@backstage/plugin-todo-backend": "^0.1.6",
"@backstage/plugin-scaffolder-backend": "^0.13.0",
"@backstage/plugin-scaffolder-backend-module-rails": "^0.1.2",
"@backstage/plugin-search-backend": "^0.2.2",
"@backstage/plugin-search-backend-node": "^0.3.0",
"@backstage/plugin-techdocs-backend": "^0.8.6",
"@backstage/plugin-todo-backend": "^0.1.8",
"@gitbeaker/node": "^30.2.0",
"@octokit/rest": "^18.5.3",
"azure-devops-node-api": "^10.1.1",
"azure-devops-node-api": "^10.2.2",
"dockerode": "^3.2.1",
"example-app": "^0.2.32",
"example-app": "^0.2.36",
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"knex": "^0.95.1",
"pg": "^8.3.0",
"pg-connection-string": "^2.3.0",
"sqlite3": "^5.0.0",
"sqlite3": "^5.0.1",
"winston": "^3.2.1"
},
"devDependencies": {
+4 -26
View File
@@ -14,19 +14,9 @@
* limitations under the License.
*/
import {
DockerContainerRunner,
SingleHostDiscovery,
} from '@backstage/backend-common';
import { DockerContainerRunner } from '@backstage/backend-common';
import { CatalogClient } from '@backstage/catalog-client';
import {
CookieCutter,
CreateReactAppTemplater,
createRouter,
Preparers,
Publishers,
Templaters,
} from '@backstage/plugin-scaffolder-backend';
import { createRouter } from '@backstage/plugin-scaffolder-backend';
import Docker from 'dockerode';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';
@@ -36,27 +26,15 @@ export default async function createPlugin({
config,
database,
reader,
discovery,
}: PluginEnvironment): Promise<Router> {
const dockerClient = new Docker();
const containerRunner = new DockerContainerRunner({ dockerClient });
const cookiecutterTemplater = new CookieCutter({ containerRunner });
const craTemplater = new CreateReactAppTemplater({ containerRunner });
const templaters = new Templaters();
templaters.register('cookiecutter', cookiecutterTemplater);
templaters.register('cra', craTemplater);
const preparers = await Preparers.fromConfig(config, { logger });
const publishers = await Publishers.fromConfig(config, { logger });
const discovery = SingleHostDiscovery.fromConfig(config);
const catalogClient = new CatalogClient({ discoveryApi: discovery });
return await createRouter({
preparers,
templaters,
publishers,
containerRunner,
logger,
config,
database,
+7
View File
@@ -1,5 +1,12 @@
# @backstage/catalog-client
## 0.3.16
### Patch Changes
- Updated dependencies
- @backstage/catalog-model@0.9.0
## 0.3.15
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-client",
"version": "0.3.15",
"version": "0.3.16",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -29,7 +29,7 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.8.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/errors": "^0.1.1",
"cross-fetch": "^3.0.6"
+66
View File
@@ -1,5 +1,71 @@
# @backstage/catalog-model
## 0.9.0
### Minor Changes
- 77db0c454: Changed the regex to validate names following the Kubernetes validation rule, this allow to be more permissive validating the name of the object in Backstage.
- 60e830222: Support for `Template` kinds with version `backstage.io/v1alpha1` has now been removed. This means that the old method of running templates with `Preparers`, `Templaters` and `Publishers` has also been removed. If you had any logic in these abstractions, they should now be moved to `actions` instead, and you can find out more about those in the [documentation](https://backstage.io/docs/features/software-templates/writing-custom-actions)
If you need any help migrating existing templates, there's a [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1alpha1-to-v1beta2). Reach out to us on Discord in the #support channel if you're having problems.
The `scaffolder-backend` now no longer requires these `Preparers`, `Templaters`, and `Publishers` to be passed in, now all it needs is the `containerRunner`.
Please update your `packages/backend/src/plugins/scaffolder.ts` like the following
```diff
- import {
- DockerContainerRunner,
- SingleHostDiscovery,
- } from '@backstage/backend-common';
+ import { DockerContainerRunner } from '@backstage/backend-common';
import { CatalogClient } from '@backstage/catalog-client';
- import {
- CookieCutter,
- CreateReactAppTemplater,
- createRouter,
- Preparers,
- Publishers,
- Templaters,
- } from '@backstage/plugin-scaffolder-backend';
+ import { createRouter } from '@backstage/plugin-scaffolder-backend';
import Docker from 'dockerode';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';
export default async function createPlugin({
config,
database,
reader,
+ discovery,
}: PluginEnvironment): Promise<Router> {
const dockerClient = new Docker();
const containerRunner = new DockerContainerRunner({ dockerClient });
- const cookiecutterTemplater = new CookieCutter({ containerRunner });
- const craTemplater = new CreateReactAppTemplater({ containerRunner });
- const templaters = new Templaters();
- templaters.register('cookiecutter', cookiecutterTemplater);
- templaters.register('cra', craTemplater);
-
- const preparers = await Preparers.fromConfig(config, { logger });
- const publishers = await Publishers.fromConfig(config, { logger });
- const discovery = SingleHostDiscovery.fromConfig(config);
const catalogClient = new CatalogClient({ discoveryApi: discovery });
return await createRouter({
- preparers,
- templaters,
- publishers,
+ containerRunner,
logger,
config,
database,
```
## 0.8.4
### Patch Changes
-23
View File
@@ -492,29 +492,6 @@ export { SystemEntityV1alpha1 }
// @public (undocumented)
export const systemEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
interface TemplateEntityV1alpha1 extends Entity {
// (undocumented)
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
// (undocumented)
kind: 'Template';
// (undocumented)
spec: {
type: string;
templater: string;
path?: string;
schema: JSONSchema;
owner?: string;
};
}
export { TemplateEntityV1alpha1 as TemplateEntity }
export { TemplateEntityV1alpha1 }
// @public (undocumented)
export const templateEntityV1alpha1Validator: KindValidator;
// @public (undocumented)
export interface TemplateEntityV1beta2 extends Entity {
// (undocumented)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/catalog-model",
"version": "0.8.4",
"version": "0.9.0",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -1,106 +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 {
TemplateEntityV1alpha1,
templateEntityV1alpha1Validator as validator,
} from './TemplateEntityV1alpha1';
describe('templateEntityV1alpha1Validator', () => {
let entity: TemplateEntityV1alpha1;
beforeEach(() => {
entity = {
apiVersion: 'backstage.io/v1alpha1',
kind: 'Template',
metadata: {
name: 'test',
},
spec: {
type: 'website',
templater: 'cookiecutter',
schema: {
$schema: 'http://json-schema.org/draft-07/schema#',
required: ['storePath', 'owner'],
properties: {
owner: {
type: 'string',
title: 'Owner',
description: 'Who is going to own this component',
},
storePath: {
type: 'string',
title: 'Store path',
description: 'GitHub store path in org/repo format',
},
},
},
owner: 'team-a@example.com',
},
};
});
it('happy path: accepts valid data', async () => {
await expect(validator.check(entity)).resolves.toBe(true);
});
it('silently accepts v1beta1 as well', async () => {
(entity as any).apiVersion = 'backstage.io/v1beta1';
await expect(validator.check(entity)).resolves.toBe(true);
});
it('ignores unknown apiVersion', async () => {
(entity as any).apiVersion = 'backstage.io/v1beta0';
await expect(validator.check(entity)).resolves.toBe(false);
});
it('ignores unknown kind', async () => {
(entity as any).kind = 'Wizard';
await expect(validator.check(entity)).resolves.toBe(false);
});
it('rejects missing type', async () => {
delete (entity as any).spec.type;
await expect(validator.check(entity)).rejects.toThrow(/type/);
});
it('accepts any other type', async () => {
(entity as any).spec.type = 'hallo';
await expect(validator.check(entity)).resolves.toBe(true);
});
it('rejects empty type', async () => {
(entity as any).spec.type = '';
await expect(validator.check(entity)).rejects.toThrow(/type/);
});
it('rejects missing templater', async () => {
(entity as any).spec.templater = '';
await expect(validator.check(entity)).rejects.toThrow(/templater/);
});
it('accepts missing owner', async () => {
delete (entity as any).spec.owner;
await expect(validator.check(entity)).resolves.toBe(true);
});
it('rejects empty owner', async () => {
(entity as any).spec.owner = '';
await expect(validator.check(entity)).rejects.toThrow(/owner/);
});
it('rejects wrong type owner', async () => {
(entity as any).spec.owner = 5;
await expect(validator.check(entity)).rejects.toThrow(/owner/);
});
});
@@ -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 type { Entity } from '../entity/Entity';
import schema from '../schema/kinds/Template.v1alpha1.schema.json';
import type { JSONSchema } from '../types';
import { ajvCompiledJsonSchemaValidator } from './util';
export interface TemplateEntityV1alpha1 extends Entity {
apiVersion: 'backstage.io/v1alpha1' | 'backstage.io/v1beta1';
kind: 'Template';
spec: {
type: string;
templater: string;
path?: string;
schema: JSONSchema;
owner?: string;
};
}
export const templateEntityV1alpha1Validator = ajvCompiledJsonSchemaValidator(
schema,
);
@@ -50,11 +50,6 @@ export type {
SystemEntityV1alpha1 as SystemEntity,
SystemEntityV1alpha1,
} from './SystemEntityV1alpha1';
export { templateEntityV1alpha1Validator } from './TemplateEntityV1alpha1';
export type {
TemplateEntityV1alpha1 as TemplateEntity,
TemplateEntityV1alpha1,
} from './TemplateEntityV1alpha1';
export { templateEntityV1beta2Validator } from './TemplateEntityV1beta2';
export type { TemplateEntityV1beta2 } from './TemplateEntityV1beta2';
export type { KindValidator } from './types';
@@ -1,99 +0,0 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "TemplateV1alpha1",
"description": "A Template describes a skeleton for use with the Scaffolder. It is used for describing what templating library is supported, and also for documenting the variables that the template requires using JSON Forms Schema.",
"examples": [
{
"apiVersion": "backstage.io/v1alpha1",
"kind": "Template",
"metadata": {
"name": "react-ssr-template",
"title": "React SSR Template",
"description": "Next.js application skeleton for creating isomorphic web applications.",
"tags": ["recommended", "react"]
},
"spec": {
"owner": "artist-relations-team",
"templater": "cookiecutter",
"type": "website",
"path": ".",
"schema": {
"required": ["component-id", "description"],
"properties": {
"component_id": {
"title": "Name",
"type": "string",
"description": "Unique name of the component"
},
"description": {
"title": "Description",
"type": "string",
"description": "Description of the component"
}
}
}
}
}
],
"allOf": [
{
"$ref": "Entity"
},
{
"type": "object",
"required": ["spec"],
"properties": {
"apiVersion": {
"enum": ["backstage.io/v1alpha1", "backstage.io/v1beta1"]
},
"kind": {
"enum": ["Template"]
},
"metadata": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The nice display name for the template. This field is required as is used to reference the template to the user instead of the metadata.name field.",
"examples": ["React SSR Template"],
"minLength": 1
}
}
},
"spec": {
"type": "object",
"required": ["type", "templater", "schema"],
"properties": {
"type": {
"type": "string",
"description": "The type of component created by the template. The software catalog accepts any type value, but an organization should take great care to establish a proper taxonomy for these. Tools including Backstage itself may read this field and behave differently depending on its value. For example, a website type component may present tooling in the Backstage interface that is specific to just websites.",
"examples": ["service", "website", "library"],
"minLength": 1
},
"templater": {
"type": "string",
"description": "The templating library that is supported by the template skeleton.",
"examples": ["cookiecutter"],
"minLength": 1
},
"path": {
"type": "string",
"description": "The string location where the templater should be run if it is not on the same level as the template.yaml definition.",
"examples": ["./cookiecutter/skeleton"],
"minLength": 1
},
"schema": {
"type": "object",
"description": "The JSONSchema describing the inputs for the template."
},
"owner": {
"type": "string",
"description": "The user (or group) owner of the template",
"minLength": 1
}
}
}
}
}
]
}
+7
View File
@@ -1,5 +1,12 @@
# @backstage/codemods
## 0.1.5
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
## 0.1.4
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/codemods",
"description": "A collection of codemods for Backstage projects",
"version": "0.1.4",
"version": "0.1.5",
"private": false,
"publishConfig": {
"access": "public",
+13
View File
@@ -1,5 +1,18 @@
# @backstage/core-components
## 0.1.5
### Patch Changes
- a446bffdb: Improve UX of the Sidebar by adding SidebarScrollWrapper component allowing the user to scroll through Plugins & Shortcuts on smaller screens. Prevent the Sidebar from opening on click on small devices
- f11e50ea7: - Enhanced core `Button` component to open external links in new tab.
- Replaced the use of `Button` component from material by `core-components` in tools card.
- 76bb7aeda: Show scroll bar of the sidebar wrapper only on hover
- 2a13aa1b7: Handle empty code blocks in markdown files so they don't fail rendering
- 47748c7e6: Fix error in error panel, and console warnings about DOM nesting pre inside p
- 34352a79c: Add edit button to Group Profile Card
- 612e25fd7: Add custom styles to scroll bar of the sidebar wrapper to fix flaky behaviour
## 0.1.4
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/core-components",
"description": "Core components used by Backstage plugins and apps",
"version": "0.1.4",
"version": "0.1.5",
"private": false,
"publishConfig": {
"access": "public",
@@ -17,6 +17,7 @@
import React from 'react';
import { Button, makeStyles, Typography } from '@material-ui/core';
import { BackstageTheme } from '@backstage/theme';
import { Link } from '../Link';
import { EmptyState } from './EmptyState';
import { CodeSnippet } from '../CodeSnippet';
@@ -73,9 +74,9 @@ export const MissingAnnotationEmptyState = ({ annotation }: Props) => {
/>
</div>
<Button
variant="contained"
color="primary"
href="https://backstage.io/docs/features/software-catalog/well-known-annotations"
component={Link}
to="https://backstage.io/docs/features/software-catalog/well-known-annotations"
>
Read more
</Button>
@@ -65,8 +65,8 @@ type Props = {
};
const renderers = {
code: ({ language, value }: { language: string; value: string }) => {
return <CodeSnippet language={language} text={value} />;
code: ({ language, value }: { language: string; value?: string }) => {
return <CodeSnippet language={language} text={value ?? ''} />;
},
};
+68
View File
@@ -1,5 +1,73 @@
# @backstage/create-app
## 0.3.30
### Patch Changes
- 60e830222: Support for `Template` kinds with version `backstage.io/v1alpha1` has now been removed. This means that the old method of running templates with `Preparers`, `Templaters` and `Publishers` has also been removed. If you had any logic in these abstractions, they should now be moved to `actions` instead, and you can find out more about those in the [documentation](https://backstage.io/docs/features/software-templates/writing-custom-actions)
If you need any help migrating existing templates, there's a [migration guide](https://backstage.io/docs/features/software-templates/migrating-from-v1alpha1-to-v1beta2). Reach out to us on Discord in the #support channel if you're having problems.
The `scaffolder-backend` now no longer requires these `Preparers`, `Templaters`, and `Publishers` to be passed in, now all it needs is the `containerRunner`.
Please update your `packages/backend/src/plugins/scaffolder.ts` like the following
```diff
- import {
- DockerContainerRunner,
- SingleHostDiscovery,
- } from '@backstage/backend-common';
+ import { DockerContainerRunner } from '@backstage/backend-common';
import { CatalogClient } from '@backstage/catalog-client';
- import {
- CookieCutter,
- CreateReactAppTemplater,
- createRouter,
- Preparers,
- Publishers,
- Templaters,
- } from '@backstage/plugin-scaffolder-backend';
+ import { createRouter } from '@backstage/plugin-scaffolder-backend';
import Docker from 'dockerode';
import { Router } from 'express';
import type { PluginEnvironment } from '../types';
export default async function createPlugin({
config,
database,
reader,
+ discovery,
}: PluginEnvironment): Promise<Router> {
const dockerClient = new Docker();
const containerRunner = new DockerContainerRunner({ dockerClient });
- const cookiecutterTemplater = new CookieCutter({ containerRunner });
- const craTemplater = new CreateReactAppTemplater({ containerRunner });
- const templaters = new Templaters();
- templaters.register('cookiecutter', cookiecutterTemplater);
- templaters.register('cra', craTemplater);
-
- const preparers = await Preparers.fromConfig(config, { logger });
- const publishers = await Publishers.fromConfig(config, { logger });
- const discovery = SingleHostDiscovery.fromConfig(config);
const catalogClient = new CatalogClient({ discoveryApi: discovery });
return await createRouter({
- preparers,
- templaters,
- publishers,
+ containerRunner,
logger,
config,
database,
```
- f7134c368: bump sqlite3 to 5.0.1
- e4244f94b: Use SidebarScrollWrapper to improve responsiveness of the current sidebar. Change: Wrap a section of SidebarItems with this component to enable scroll for smaller screens. It can also be used in sidebar plugins (see shortcuts plugin for an example).
## 0.3.29
### Patch Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/create-app",
"description": "Create app package for Backstage",
"version": "0.3.29",
"version": "0.3.30",
"private": false,
"publishConfig": {
"access": "public"
@@ -40,7 +40,7 @@
"pg": "^8.3.0",
{{/if}}
{{#if dbTypeSqlite}}
"sqlite3": "^5.0.0",
"sqlite3": "^5.0.1",
{{/if}}
"winston": "^3.2.1"
},
@@ -4,12 +4,7 @@ import {
} from '@backstage/backend-common';
import { CatalogClient } from '@backstage/catalog-client';
import {
CookieCutter,
CreateReactAppTemplater,
createRouter,
Preparers,
Publishers,
Templaters,
} from '@backstage/plugin-scaffolder-backend';
import Docker from 'dockerode';
import { Router } from 'express';
@@ -24,23 +19,11 @@ export default async function createPlugin({
const dockerClient = new Docker();
const containerRunner = new DockerContainerRunner({ dockerClient });
const cookiecutterTemplater = new CookieCutter({ containerRunner });
const craTemplater = new CreateReactAppTemplater({ containerRunner });
const templaters = new Templaters();
templaters.register('cookiecutter', cookiecutterTemplater);
templaters.register('cra', craTemplater);
const preparers = await Preparers.fromConfig(config, { logger });
const publishers = await Publishers.fromConfig(config, { logger });
const discovery = SingleHostDiscovery.fromConfig(config);
const catalogClient = new CatalogClient({ discoveryApi: discovery });
return await createRouter({
preparers,
templaters,
publishers,
containerRunner,
logger,
config,
database,
+9
View File
@@ -1,5 +1,14 @@
# @backstage/dev-utils
## 0.2.1
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
- @backstage/catalog-model@0.9.0
- @backstage/plugin-catalog-react@0.2.6
## 0.2.0
### Minor Changes
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/dev-utils",
"description": "Utilities for developing Backstage plugins.",
"version": "0.2.0",
"version": "0.2.1",
"private": false,
"publishConfig": {
"access": "public",
@@ -30,11 +30,11 @@
},
"dependencies": {
"@backstage/core-app-api": "^0.1.3",
"@backstage/core-components": "^0.1.3",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/catalog-model": "^0.8.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/integration-react": "^0.1.4",
"@backstage/plugin-catalog-react": "^0.2.4",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/test-utils": "^0.1.14",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
+8
View File
@@ -1,5 +1,13 @@
# @backstage/integration
## 0.5.8
### Patch Changes
- 43a4ef644: Do not throw in `ScmIntegration` `byUrl` for invalid URLs
- 6841e0113: fix minor version of git-url-parse as 11.5.x introduced a bug for Bitbucket Server
- b691a938e: Fix downloads from repositories located at bitbucket.org
## 0.5.7
### Patch Changes
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/integration",
"version": "0.5.7",
"version": "0.5.8",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -31,7 +31,7 @@
"dependencies": {
"@backstage/config": "^0.1.5",
"cross-fetch": "^3.0.6",
"git-url-parse": "^11.4.4",
"git-url-parse": "~11.4.4",
"@octokit/rest": "^18.5.3",
"@octokit/auth-app": "^3.4.0",
"luxon": "^1.25.0"
+11
View File
@@ -1,5 +1,16 @@
# @backstage/techdocs-common
## 0.6.7
### Patch Changes
- 683308ecf: Fix openStack swift publisher encoding issue. Remove utf8 forced encoding on binary files
- 6841e0113: fix minor version of git-url-parse as 11.5.x introduced a bug for Bitbucket Server
- Updated dependencies
- @backstage/integration@0.5.8
- @backstage/catalog-model@0.9.0
- @backstage/backend-common@0.8.5
## 0.6.6
### Patch Changes
+10 -10
View File
@@ -12,17 +12,17 @@ import { EntityName } from '@backstage/catalog-model';
import express from 'express';
import { GitHubIntegrationConfig } from '@backstage/integration';
import { GitLabIntegrationConfig } from '@backstage/integration';
import { Logger } from 'winston';
import { Logger as Logger_2 } from 'winston';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { UrlReader } from '@backstage/backend-common';
import { Writable } from 'stream';
// @public (undocumented)
export const checkoutGitRepository: (repoUrl: string, config: Config, logger: Logger) => Promise<string>;
export const checkoutGitRepository: (repoUrl: string, config: Config, logger: Logger_2) => Promise<string>;
// @public (undocumented)
export class CommonGitPreparer implements PreparerBase {
constructor(config: Config, logger: Logger);
constructor(config: Config, logger: Logger_2);
// (undocumented)
prepare(entity: Entity, options?: {
etag?: string;
@@ -31,7 +31,7 @@ export class CommonGitPreparer implements PreparerBase {
// @public (undocumented)
export class DirectoryPreparer implements PreparerBase {
constructor(config: Config, logger: Logger, reader: UrlReader);
constructor(config: Config, logger: Logger_2, reader: UrlReader);
// (undocumented)
prepare(entity: Entity): Promise<PreparerResponse>;
}
@@ -51,7 +51,7 @@ export type GeneratorBuilder = {
export class Generators implements GeneratorBuilder {
// (undocumented)
static fromConfig(config: Config, { logger, containerRunner, }: {
logger: Logger;
logger: Logger_2;
containerRunner: ContainerRunner;
}): Promise<GeneratorBuilder>;
// (undocumented)
@@ -69,7 +69,7 @@ export const getDefaultBranch: (repositoryUrl: string, config: Config) => Promis
// @public (undocumented)
export const getDocFilesFromRepository: (reader: UrlReader, entity: Entity, opts?: {
etag?: string | undefined;
logger?: Logger | undefined;
logger?: Logger_2 | undefined;
} | undefined) => Promise<PreparerResponse>;
// @public (undocumented)
@@ -88,7 +88,7 @@ export const getGitRepositoryTempFolder: (repositoryUrl: string, config: Config)
export function getGitRepoType(url: string): string;
// @public (undocumented)
export const getLastCommitTimestamp: (repositoryLocation: string, logger: Logger) => Promise<number>;
export const getLastCommitTimestamp: (repositoryLocation: string, logger: Logger_2) => Promise<number>;
// @public (undocumented)
export const getLocationForEntity: (entity: Entity) => ParsedLocationAnnotation;
@@ -108,7 +108,7 @@ export const parseReferenceAnnotation: (annotationName: string, entity: Entity)
// @public (undocumented)
export type PreparerBase = {
prepare(entity: Entity, options?: {
logger?: Logger;
logger?: Logger_2;
etag?: string;
}): Promise<PreparerResponse>;
};
@@ -153,7 +153,7 @@ export type RemoteProtocol = 'url' | 'dir' | 'github' | 'gitlab' | 'file' | 'azu
// @public (undocumented)
export class TechdocsGenerator implements GeneratorBase {
constructor({ logger, containerRunner, config, }: {
logger: Logger;
logger: Logger_2;
containerRunner: ContainerRunner;
config: Config;
});
@@ -170,7 +170,7 @@ export type TechDocsMetadata = {
// @public (undocumented)
export class UrlPreparer implements PreparerBase {
constructor(reader: UrlReader, logger: Logger);
constructor(reader: UrlReader, logger: Logger_2);
// (undocumented)
prepare(entity: Entity, options?: {
etag?: string;
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/techdocs-common",
"description": "Common functionalities for TechDocs, to be shared between techdocs-backend plugin and techdocs-cli",
"version": "0.6.6",
"version": "0.6.7",
"main": "src/index.ts",
"types": "src/index.ts",
"private": false,
@@ -38,18 +38,18 @@
"dependencies": {
"@azure/identity": "^1.2.2",
"@azure/storage-blob": "^12.4.0",
"@backstage/backend-common": "^0.8.4",
"@backstage/catalog-model": "^0.8.4",
"@backstage/backend-common": "^0.8.5",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/errors": "^0.1.1",
"@backstage/integration": "^0.5.7",
"@backstage/integration": "^0.5.8",
"@google-cloud/storage": "^5.6.0",
"@types/express": "^4.17.6",
"aws-sdk": "^2.840.0",
"cross-fetch": "^3.0.6",
"express": "^4.17.1",
"fs-extra": "^10.0.0",
"git-url-parse": "^11.4.4",
"git-url-parse": "~11.4.4",
"js-yaml": "^4.0.0",
"json5": "^2.1.3",
"mime-types": "^2.1.27",
+10
View File
@@ -1,5 +1,15 @@
# @backstage/plugin-api-docs
## 0.6.1
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
- @backstage/catalog-model@0.9.0
- @backstage/plugin-catalog@0.6.6
- @backstage/plugin-catalog-react@0.2.6
## 0.6.0
### Minor Changes
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-api-docs",
"version": "0.6.0",
"version": "0.6.1",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,11 +30,11 @@
},
"dependencies": {
"@asyncapi/react-component": "^0.23.0",
"@backstage/catalog-model": "^0.8.4",
"@backstage/core-components": "^0.1.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/plugin-catalog": "^0.6.4",
"@backstage/plugin-catalog-react": "^0.2.4",
"@backstage/plugin-catalog": "^0.6.6",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/theme": "^0.2.8",
"@material-icons/font": "^1.0.2",
"@material-ui/core": "^4.11.0",
@@ -53,7 +53,7 @@
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/core-app-api": "^0.1.4",
"@backstage/dev-utils": "^0.2.0",
"@backstage/dev-utils": "^0.2.1",
"@backstage/test-utils": "^0.1.14",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
+2 -2
View File
@@ -6,7 +6,7 @@
import { Config } from '@backstage/config';
import express from 'express';
import { Logger } from 'winston';
import { Logger as Logger_2 } from 'winston';
// @public (undocumented)
export function createRouter(options: RouterOptions): Promise<express.Router>;
@@ -18,7 +18,7 @@ export interface RouterOptions {
config: Config;
disableConfigInjection?: boolean;
// (undocumented)
logger: Logger;
logger: Logger_2;
staticFallbackHandler?: express.Handler;
}
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-auth-backend
## 0.3.16
### Patch Changes
- Updated dependencies
- @backstage/catalog-model@0.9.0
- @backstage/backend-common@0.8.5
- @backstage/catalog-client@0.3.16
## 0.3.15
### Patch Changes
+3 -3
View File
@@ -9,7 +9,7 @@ import { Config } from '@backstage/config';
import { Entity } from '@backstage/catalog-model';
import express from 'express';
import { JSONWebKey } from 'jose';
import { Logger } from 'winston';
import { Logger as Logger_2 } from 'winston';
import { PluginDatabaseManager } from '@backstage/backend-common';
import { PluginEndpointDiscovery } from '@backstage/backend-common';
import { Profile } from 'passport';
@@ -23,7 +23,7 @@ export type AuthProviderFactoryOptions = {
providerId: string;
globalConfig: AuthProviderConfig;
config: Config;
logger: Logger;
logger: Logger_2;
tokenIssuer: TokenIssuer;
discovery: PluginEndpointDiscovery;
catalogApi: CatalogApi;
@@ -206,7 +206,7 @@ export interface RouterOptions {
// (undocumented)
discovery: PluginEndpointDiscovery;
// (undocumented)
logger: Logger;
logger: Logger_2;
// (undocumented)
providerFactories?: ProviderFactories;
}
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-auth-backend",
"version": "0.3.15",
"version": "0.3.16",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -29,9 +29,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.8.4",
"@backstage/catalog-client": "^0.3.15",
"@backstage/catalog-model": "^0.8.4",
"@backstage/backend-common": "^0.8.5",
"@backstage/catalog-client": "^0.3.16",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/errors": "^0.1.1",
"@backstage/test-utils": "^0.1.14",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-badges-backend
## 0.1.8
### Patch Changes
- Updated dependencies
- @backstage/catalog-model@0.9.0
- @backstage/backend-common@0.8.5
- @backstage/catalog-client@0.3.16
## 0.1.7
### Patch Changes
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-badges-backend",
"version": "0.1.7",
"version": "0.1.8",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -30,9 +30,9 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/backend-common": "^0.8.3",
"@backstage/catalog-client": "^0.3.13",
"@backstage/catalog-model": "^0.8.3",
"@backstage/backend-common": "^0.8.5",
"@backstage/catalog-client": "^0.3.16",
"@backstage/catalog-model": "^0.9.0",
"@backstage/config": "^0.1.5",
"@backstage/errors": "^0.1.1",
"@types/express": "^4.17.6",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-badges
## 0.2.4
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
- @backstage/catalog-model@0.9.0
- @backstage/plugin-catalog-react@0.2.6
## 0.2.3
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-badges",
"version": "0.2.3",
"version": "0.2.4",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,11 +20,11 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.8.4",
"@backstage/core-components": "^0.1.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/errors": "^0.1.1",
"@backstage/plugin-catalog-react": "^0.2.4",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -37,7 +37,7 @@
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/core-app-api": "^0.1.4",
"@backstage/dev-utils": "^0.2.0",
"@backstage/dev-utils": "^0.2.1",
"@backstage/test-utils": "^0.1.14",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",
+9
View File
@@ -1,5 +1,14 @@
# @backstage/plugin-bitrise
## 0.1.6
### Patch Changes
- Updated dependencies
- @backstage/core-components@0.1.5
- @backstage/catalog-model@0.9.0
- @backstage/plugin-catalog-react@0.2.6
## 0.1.5
### Patch Changes
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@backstage/plugin-bitrise",
"version": "0.1.5",
"version": "0.1.6",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
@@ -20,10 +20,10 @@
"clean": "backstage-cli clean"
},
"dependencies": {
"@backstage/catalog-model": "^0.8.4",
"@backstage/core-components": "^0.1.4",
"@backstage/catalog-model": "^0.9.0",
"@backstage/core-components": "^0.1.5",
"@backstage/core-plugin-api": "^0.1.3",
"@backstage/plugin-catalog-react": "^0.2.4",
"@backstage/plugin-catalog-react": "^0.2.6",
"@backstage/theme": "^0.2.8",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -40,7 +40,7 @@
"devDependencies": {
"@backstage/cli": "^0.7.3",
"@backstage/core-app-api": "^0.1.4",
"@backstage/dev-utils": "^0.2.0",
"@backstage/dev-utils": "^0.2.1",
"@backstage/test-utils": "^0.1.14",
"@testing-library/jest-dom": "^5.10.1",
"@testing-library/react": "^11.2.5",

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