-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework internals around environment and logging (#2460)
- Loading branch information
1 parent
46a5a78
commit cdbce95
Showing
38 changed files
with
178 additions
and
201 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,41 @@ | ||
import { PluginManager } from '../plugin' | ||
import publishPlugin from '../publish' | ||
import { ILogger } from '../logger' | ||
import filterPlugin from '../filter' | ||
import { | ||
IRunConfiguration, | ||
IRunEnvironment, | ||
ISourcesCoordinates, | ||
} from './types' | ||
import { UsableEnvironment } from '../environment' | ||
import { IRunConfiguration, ISourcesCoordinates } from './types' | ||
|
||
export async function initializeForLoadSources( | ||
logger: ILogger, | ||
coordinates: ISourcesCoordinates, | ||
environment: Required<IRunEnvironment> | ||
environment: UsableEnvironment | ||
): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new PluginManager() | ||
await pluginManager.initCoordinator( | ||
'loadSources', | ||
filterPlugin, | ||
coordinates, | ||
logger, | ||
environment | ||
) | ||
const pluginManager = new PluginManager(environment) | ||
await pluginManager.initCoordinator('loadSources', filterPlugin, coordinates) | ||
return pluginManager | ||
} | ||
|
||
export async function initializeForLoadSupport(): Promise<PluginManager> { | ||
export async function initializeForLoadSupport( | ||
environment: UsableEnvironment | ||
): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
return new PluginManager() | ||
return new PluginManager(environment) | ||
} | ||
|
||
export async function initializeForRunCucumber( | ||
logger: ILogger, | ||
configuration: IRunConfiguration, | ||
environment: Required<IRunEnvironment> | ||
environment: UsableEnvironment | ||
): Promise<PluginManager> { | ||
// eventually we'll load plugin packages here | ||
const pluginManager = new PluginManager() | ||
const pluginManager = new PluginManager(environment) | ||
await pluginManager.initCoordinator( | ||
'runCucumber', | ||
publishPlugin, | ||
configuration.formats.publish, | ||
logger, | ||
environment | ||
configuration.formats.publish | ||
) | ||
await pluginManager.initCoordinator( | ||
'runCucumber', | ||
filterPlugin, | ||
configuration.sources, | ||
logger, | ||
environment | ||
configuration.sources | ||
) | ||
return pluginManager | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.