feat(infra): standard lifecycle service (#5564)

This commit is contained in:
EYHN
2024-01-30 06:31:18 +00:00
parent b3a8e62984
commit 88cd83fed1
4 changed files with 40 additions and 0 deletions
+14
View File
@@ -5,3 +5,17 @@ export * from './command';
export * from './di';
export * from './livedata';
export * from './storage';
import type { ServiceCollection } from './di';
import { CleanupService } from './lifecycle';
import { GlobalCache, GlobalState, MemoryMemento } from './storage';
export function configureInfraServices(services: ServiceCollection) {
services.add(CleanupService);
}
export function configureTestingInfraServices(services: ServiceCollection) {
configureInfraServices(services);
services.addImpl(GlobalCache, MemoryMemento);
services.addImpl(GlobalState, MemoryMemento);
}