put back the types in common

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-08-30 15:16:12 +02:00
parent 85f50d43a1
commit 988c1454bd
4 changed files with 22 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
---
'@backstage/backend-common': minor
---
**BREAKING**: Simplifications and cleanup as part of the Backend System 1.0 work.
- The deprecated `dropDatabase` function has now been removed, without replacement.
-1
View File
@@ -1,5 +1,4 @@
---
'@backstage/backend-common': minor
'@backstage/backend-defaults': minor
---
+6 -1
View File
@@ -143,7 +143,7 @@ export function createStatusCheckRouter(options: {
}): Promise<express.Router>;
// @public @deprecated (undocumented)
export class DatabaseManager {
export class DatabaseManager implements LegacyRootDatabaseService {
// (undocumented)
forPlugin(
pluginId: string,
@@ -365,6 +365,11 @@ export const legacyPlugin: (
}>,
) => BackendFeature;
// @public @deprecated (undocumented)
export type LegacyRootDatabaseService = {
forPlugin(pluginId: string): DatabaseService;
};
// @public @deprecated
export function loadBackendConfig(options: {
logger: LoggerService;
@@ -169,7 +169,7 @@ export type CacheClientOptions = CacheServiceOptions;
* @public
* @deprecated Use `DatabaseManager` from the `@backstage/backend-defaults` package instead
*/
export class DatabaseManager {
export class DatabaseManager implements LegacyRootDatabaseService {
private constructor(
private readonly _databaseManager: _DatabaseManager,
private readonly logger?: LoggerService,
@@ -221,6 +221,14 @@ export type DatabaseManagerOptions = _DatabaseManagerOptions;
*/
export type PluginDatabaseManager = _PluginDatabaseManager;
/**
* @public
* @deprecated Use `DatabaseManager` from `@backstage/backend-defaults/database` instead, or migrate to the new backend system and use `coreServices.database`
*/
export type LegacyRootDatabaseService = {
forPlugin(pluginId: string): DatabaseService;
};
/**
* @public
* @deprecated This function is deprecated and will be removed in a future release, see https://github.com/backstage/backstage/issues/24493.