chore: config to rootConfig
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -108,7 +108,7 @@ export function makeLegacyPlugin<
|
||||
export const legacyPlugin = makeLegacyPlugin(
|
||||
{
|
||||
cache: coreServices.cache,
|
||||
config: coreServices.config,
|
||||
config: coreServices.rootConfig,
|
||||
database: coreServices.database,
|
||||
discovery: coreServices.discovery,
|
||||
logger: coreServices.logger,
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import {
|
||||
Backend,
|
||||
cacheServiceFactory,
|
||||
configServiceFactory,
|
||||
rootConfigServiceFactory,
|
||||
createSpecializedBackend,
|
||||
databaseServiceFactory,
|
||||
discoveryServiceFactory,
|
||||
@@ -40,7 +40,7 @@ import {
|
||||
|
||||
export const defaultServiceFactories = [
|
||||
cacheServiceFactory(),
|
||||
configServiceFactory(),
|
||||
rootConfigServiceFactory(),
|
||||
databaseServiceFactory(),
|
||||
discoveryServiceFactory(),
|
||||
httpRouterServiceFactory(),
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
ConfigService,
|
||||
RootConfigService,
|
||||
coreServices,
|
||||
createServiceFactory,
|
||||
IdentityService,
|
||||
@@ -61,13 +61,13 @@ function simpleFactory<
|
||||
* @public
|
||||
*/
|
||||
export namespace mockServices {
|
||||
export function config(options?: config.Options): ConfigService {
|
||||
export function config(options?: config.Options): RootConfigService {
|
||||
return new ConfigReader(options?.data, 'mock-config');
|
||||
}
|
||||
export namespace config {
|
||||
export type Options = { data?: JsonObject };
|
||||
|
||||
export const factory = simpleFactory(coreServices.config, config);
|
||||
export const factory = simpleFactory(coreServices.rootConfig, config);
|
||||
}
|
||||
|
||||
export function rootLogger(options?: rootLogger.Options): LoggerService {
|
||||
|
||||
@@ -168,7 +168,7 @@ describe('TestBackend', () => {
|
||||
env.registerInit({
|
||||
deps: {
|
||||
cache: coreServices.cache,
|
||||
config: coreServices.config,
|
||||
config: coreServices.rootConfig,
|
||||
database: coreServices.database,
|
||||
discovery: coreServices.discovery,
|
||||
httpRouter: coreServices.httpRouter,
|
||||
|
||||
@@ -108,7 +108,7 @@ export async function startTestBackend<
|
||||
const rootHttpRouterFactory = createServiceFactory({
|
||||
service: coreServices.rootHttpRouter,
|
||||
deps: {
|
||||
config: coreServices.config,
|
||||
config: coreServices.rootConfig,
|
||||
lifecycle: coreServices.rootLifecycle,
|
||||
rootLogger: coreServices.rootLogger,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user