backend-app-api: keep ServiceRegistry immutable

Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
Vincenzo Scamporlino
2023-08-15 00:08:19 +02:00
committed by Patrik Oldsberg
parent 0c1f57b6b6
commit 263f6be4f6
2 changed files with 0 additions and 9 deletions
@@ -82,13 +82,6 @@ export class ServiceRegistry implements EnumerableServiceHolder {
this.#implementations = new Map();
}
add(serviceFactory: ServiceFactory) {
this.#providedFactories.set(
serviceFactory.service.id,
toInternalServiceFactory(serviceFactory),
);
}
#resolveFactory(
ref: ServiceRef<unknown>,
pluginId: string,
@@ -19,7 +19,6 @@ import {
ExtensionPoint,
ServiceRef,
ServiceFactoryOrFunction,
ServiceFactory,
} from '@backstage/backend-plugin-api';
/**
@@ -40,7 +39,6 @@ export interface CreateSpecializedBackendOptions {
export interface ServiceHolder {
get<T>(api: ServiceRef<T>, pluginId: string): Promise<T> | undefined;
add(serviceFactory: ServiceFactory): void;
}
/**