1 | import { FileDescriptions, StrykerOptions } from '@stryker-mutator/api/core';
|
2 | import { LoggerFactoryMethod } from '@stryker-mutator/api/logging';
|
3 | import { commonTokens, tokens } from '@stryker-mutator/api/plugin';
|
4 |
|
5 | import { IdGenerator } from '../child-proxy/id-generator.js';
|
6 |
|
7 | import { coreTokens } from '../di/index.js';
|
8 | import { LoggingClientContext } from '../logging/logging-client-context.js';
|
9 |
|
10 | import { CheckerChildProcessProxy } from './checker-child-process-proxy.js';
|
11 | import { CheckerFacade } from './checker-facade.js';
|
12 | import { CheckerRetryDecorator } from './checker-retry-decorator.js';
|
13 |
|
14 | createCheckerFactory.inject = tokens(
|
15 | commonTokens.options,
|
16 | commonTokens.fileDescriptions,
|
17 | coreTokens.loggingContext,
|
18 | coreTokens.pluginModulePaths,
|
19 | commonTokens.getLogger,
|
20 | coreTokens.workerIdGenerator
|
21 | );
|
22 | export function createCheckerFactory(
|
23 | options: StrykerOptions,
|
24 | fileDescriptions: FileDescriptions,
|
25 | loggingContext: LoggingClientContext,
|
26 | pluginModulePaths: readonly string[],
|
27 | getLogger: LoggerFactoryMethod,
|
28 | idGenerator: IdGenerator
|
29 | ): () => CheckerFacade {
|
30 | return () =>
|
31 | new CheckerFacade(
|
32 | () =>
|
33 | new CheckerRetryDecorator(
|
34 | () => new CheckerChildProcessProxy(options, fileDescriptions, pluginModulePaths, loggingContext, idGenerator),
|
35 | getLogger(CheckerRetryDecorator.name)
|
36 | )
|
37 | );
|
38 | }
|