MainEventHandlerMiddleware(
context: BlueprintContext<IBlueprint, ClassType>,
next: NextPipe<BlueprintContext<IBlueprint, ClassType>, IBlueprint>,
): Promise<IBlueprint>
The configuration context containing modules and blueprint.
The next function in the pipeline.
The updated blueprint.
Middleware to set the main event handler in the blueprint.
This middleware identifies the module marked as the main application and sets it in the blueprint as the main event handler. If no entry point is found, an error is thrown.
Note: This middleware is executed in a way to set a default event handler if none is provided by third-party modules.