remove PluginDatabaseManager and PluginEndpointDiscovery

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2024-12-21 20:41:08 +01:00
parent d9d62ef90c
commit 8379bf4a80
25 changed files with 105 additions and 115 deletions
@@ -14,11 +14,11 @@
* limitations under the License.
*/
import { DatabaseManager } from '@backstage/backend-common';
import {
DatabaseManager,
PluginDatabaseManager,
} from '@backstage/backend-common';
import { resolvePackagePath } from '@backstage/backend-plugin-api';
DatabaseService,
resolvePackagePath,
} from '@backstage/backend-plugin-api';
import { ConfigReader } from '@backstage/config';
import { Knex } from 'knex';
@@ -32,10 +32,10 @@ const migrationsDir = resolvePackagePath(
* asked for, and runs migrations.
*/
export class AuthDatabase {
readonly #database: PluginDatabaseManager;
readonly #database: DatabaseService;
#promise: Promise<Knex> | undefined;
static create(database: PluginDatabaseManager): AuthDatabase {
static create(database: DatabaseService): AuthDatabase {
return new AuthDatabase(database);
}
@@ -60,7 +60,7 @@ export class AuthDatabase {
});
}
private constructor(database: PluginDatabaseManager) {
private constructor(database: DatabaseService) {
this.#database = database;
}
+3 -5
View File
@@ -14,12 +14,10 @@
* limitations under the License.
*/
import {
PluginEndpointDiscovery,
TokenManager,
} from '@backstage/backend-common';
import { TokenManager } from '@backstage/backend-common';
import {
AuthService,
DiscoveryService,
HttpAuthService,
LoggerService,
} from '@backstage/backend-plugin-api';
@@ -47,7 +45,7 @@ export function bindProviderRouters(
baseUrl: string;
config: Config;
logger: LoggerService;
discovery: PluginEndpointDiscovery;
discovery: DiscoveryService;
auth: AuthService;
httpAuth: HttpAuthService;
tokenManager?: TokenManager;