refactor: start deprecating legacy service helpers

Signed-off-by: Camila Belo <camilaibs@gmail.com>
This commit is contained in:
Camila Belo
2024-05-16 09:18:24 +02:00
parent 2c2a8f8b14
commit 819754e57e
7 changed files with 28 additions and 8 deletions
@@ -25,10 +25,11 @@ export const cacheServiceFactory = createServiceFactory({
service: coreServices.cache,
deps: {
config: coreServices.rootConfig,
logger: coreServices.rootLogger,
plugin: coreServices.pluginMetadata,
},
async createRootContext({ config }) {
return CacheManager.fromConfig(config);
async createRootContext({ config, logger }) {
return CacheManager.fromConfig(config, { logger });
},
async factory({ plugin }, manager) {
return manager.forPlugin(plugin.getId()).getClient();