Version Packages
This commit is contained in:
@@ -1,5 +1,72 @@
|
||||
# @backstage/create-app
|
||||
|
||||
## 0.4.6
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 24d2ce03f3: Search Modal now relies on the Search Context to access state and state setter. If you use the SidebarSearchModal as described in the [getting started documentation](https://backstage.io/docs/features/search/getting-started#using-the-search-modal), make sure to update your code with the SearchContextProvider.
|
||||
|
||||
```diff
|
||||
export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
<SidebarLogo />
|
||||
- <SidebarSearchModal />
|
||||
+ <SearchContextProvider>
|
||||
+ <SidebarSearchModal />
|
||||
+ </SearchContextProvider>
|
||||
<SidebarDivider />
|
||||
...
|
||||
```
|
||||
|
||||
- 905dd952ac: Incorporate usage of the tokenManager into the backend created using `create-app`.
|
||||
|
||||
In existing backends, update the `PluginEnvironment` to include a `tokenManager`:
|
||||
|
||||
```diff
|
||||
// packages/backend/src/types.ts
|
||||
|
||||
...
|
||||
import {
|
||||
...
|
||||
+ TokenManager,
|
||||
} from '@backstage/backend-common';
|
||||
|
||||
export type PluginEnvironment = {
|
||||
...
|
||||
+ tokenManager: TokenManager;
|
||||
};
|
||||
```
|
||||
|
||||
Then, create a `ServerTokenManager`. This can either be a `noop` that requires no secret and validates all requests by default, or one that uses a secret from your `app-config.yaml` to generate and validate tokens.
|
||||
|
||||
```diff
|
||||
// packages/backend/src/index.ts
|
||||
|
||||
...
|
||||
import {
|
||||
...
|
||||
+ ServerTokenManager,
|
||||
} from '@backstage/backend-common';
|
||||
...
|
||||
|
||||
function makeCreateEnv(config: Config) {
|
||||
...
|
||||
// CHOOSE ONE
|
||||
// TokenManager not requiring a secret
|
||||
+ const tokenManager = ServerTokenManager.noop();
|
||||
// OR TokenManager requiring a secret
|
||||
+ const tokenManager = ServerTokenManager.fromConfig(config);
|
||||
|
||||
...
|
||||
return (plugin: string): PluginEnvironment => {
|
||||
...
|
||||
- return { logger, cache, database, config, reader, discovery };
|
||||
+ return { logger, cache, database, config, reader, discovery, tokenManager };
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## 0.4.5
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/create-app",
|
||||
"description": "A CLI that helps you create your own Backstage app",
|
||||
"version": "0.4.5",
|
||||
"version": "0.4.6",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
||||
Reference in New Issue
Block a user