mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
fix: revert composition root (#6492)
This commit is contained in:
parent
0cf7b324a5
commit
c841e72244
@ -111,10 +111,9 @@ import {
|
||||
import { InactiveUsersService } from '../users/inactive/inactive-users-service';
|
||||
import { SegmentReadModel } from '../features/segment/segment-read-model';
|
||||
import { FakeSegmentReadModel } from '../features/segment/fake-segment-read-model';
|
||||
import {
|
||||
createFakeProxyService,
|
||||
createProxyService,
|
||||
} from '../proxy/createProxyService';
|
||||
import ClientFeatureToggleReadModel from '../proxy/client-feature-toggle-read-model';
|
||||
import FakeClientFeatureToggleReadModel from '../proxy/fake-client-feature-toggle-read-model';
|
||||
import { GlobalFrontendApiCache } from '../proxy/global-frontend-api-cache';
|
||||
|
||||
export const createServices = (
|
||||
stores: IUnleashStores,
|
||||
@ -297,9 +296,27 @@ export const createServices = (
|
||||
? createClientFeatureToggleService(db, config)
|
||||
: createFakeClientFeatureToggleService(config);
|
||||
|
||||
const proxyService = db
|
||||
? createProxyService(db, config, clientMetricsServiceV2)
|
||||
: createFakeProxyService(config, clientMetricsServiceV2);
|
||||
const clientFeatureToggleReadModel = db
|
||||
? new ClientFeatureToggleReadModel(db, config.eventBus)
|
||||
: new FakeClientFeatureToggleReadModel();
|
||||
const globalFrontendApiCache = new GlobalFrontendApiCache(
|
||||
config,
|
||||
segmentReadModel,
|
||||
clientFeatureToggleReadModel,
|
||||
configurationRevisionService,
|
||||
);
|
||||
|
||||
const proxyService = new ProxyService(
|
||||
config,
|
||||
stores,
|
||||
{
|
||||
featureToggleServiceV2,
|
||||
clientMetricsServiceV2,
|
||||
settingService,
|
||||
configurationRevisionService,
|
||||
},
|
||||
globalFrontendApiCache,
|
||||
);
|
||||
|
||||
const edgeService = new EdgeService({ apiTokenService }, config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user