Version Packages

This commit is contained in:
github-actions[bot]
2023-01-17 11:50:48 +00:00
parent 097eb6e9e0
commit 6d46667727
508 changed files with 5775 additions and 1846 deletions
+80
View File
@@ -1,5 +1,85 @@
# @backstage/backend-plugin-api
## 0.3.0
### Minor Changes
- 8e06f3cf00: Moved `loggerToWinstonLogger` to `@backstage/backend-common`.
- ecbec4ec4c: Updated all factory function creators to accept options as a top-level callback rather than extra parameter to the main factory function.
### Patch Changes
- 6cfd4d7073: Added `RootLifecycleService` and `rootLifecycleServiceRef`, as well as added a `logger` option to the existing `LifecycleServiceShutdownHook`.
- ecc6bfe4c9: Added `ServiceFactoryOrFunction` type, for use when either a `ServiceFactory` or `() => ServiceFactory` can be used.
- 5b7bcd3c5e: Added `createSharedEnvironment` for creating a shared environment containing commonly used services in a split backend setup of the backend.
- 02b119ff93: Added a new `rootHttpRouterServiceRef` and `RootHttpRouterService` interface.
- 5e2cebe9a3: Migrate `UrlReader` into this package to gradually remove the dependency on backend-common.
- 843a0a158c: Added new core identity service.
- 5437fe488f: Migrated types related to `TokenManagerService`, `CacheService` and `DatabaseService` into backend-plugin-api.
- 6f02d23b01: Moved `PluginEndpointDiscovery` type from backend-common to backend-plugin-api.
- 483e907eaf: The `createServiceFactory` function has been updated to no longer use a duplicate callback pattern for plugin scoped services. The outer callback is now replaced by an optional `createRootContext` method. This change was made in order to support TypeScript 4.9, but it also simplifies the API surface a bit, especially for plugin scoped service factories that don't need to create a root context. In addition, the factory and root context functions can now be synchronous.
A factory that previously would have looked like this:
```ts
createServiceFactory({
service: coreServices.cache,
deps: {
config: coreServices.config,
plugin: coreServices.pluginMetadata,
},
async factory({ config }) {
const cacheManager = CacheManager.fromConfig(config);
return async ({ plugin }) => {
return cacheManager.forPlugin(plugin.getId());
};
},
});
```
Now instead looks like this:
```ts
createServiceFactory({
service: coreServices.cache,
deps: {
config: coreServices.config,
plugin: coreServices.pluginMetadata,
},
async createRootContext({ config }) {
return CacheManager.fromConfig(config);
},
async factory({ plugin }, manager) {
return manager.forPlugin(plugin.getId());
},
});
```
Although in many cases the `createRootContext` isn't needed, for example:
```ts
createServiceFactory({
service: coreServices.logger,
deps: {
rootLogger: coreServices.rootLogger,
plugin: coreServices.pluginMetadata,
},
factory({ rootLogger, plugin }) {
return rootLogger.child({ plugin: plugin.getId() });
},
});
```
- 16054afdec: Documented `coreServices` an all of its members.
- 0e63aab311: Updated the `RootLoggerService` to also have an `addRedactions` method.
- 62b04bb865: Updates all `create*` methods to simplify their type definitions and ensure they all have configuration interfaces.
- Updated dependencies
- @backstage/backend-tasks@0.4.1
- @backstage/config@1.0.6
- @backstage/types@1.0.2
- @backstage/plugin-auth-node@0.2.9
- @backstage/plugin-permission-common@0.7.3
## 0.3.0-next.1
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@backstage/backend-plugin-api",
"description": "Core API used by Backstage backend plugins",
"version": "0.3.0-next.1",
"version": "0.3.0",
"main": "src/index.ts",
"types": "src/index.ts",
"publishConfig": {