import express from 'express'; import http from 'http'; import https from 'https'; import yargs from 'yargs/yargs'; import DI from './di.js'; import type { Express, Router, ErrorRequestHandler } from 'express'; import type Command from './commands/interface.js'; import type { EngineLike, EngineMeta } from './di.js'; import type { ServiceProvider } from './services/providers.js'; import type Config from './services/config.js'; import type Logger from './services/logger.js'; import type Namespace from './services/namespace.js'; export declare const MODES: { WEB: string; CLI: string; }; export { DI, express, yargs }; type YargsArgv = { $0: string; [key: string]: unknown; }; type CommandClass = typeof Command; type CommandModule = Record; export default class EvaEngine { server: http.Server | https.Server | null; commands: CommandModule; command: Command | null; commandName: string | null; port: number | string | boolean; defaultErrorHandler: ErrorRequestHandler | null; serverErrorHandler: ((error: NodeJS.ErrnoException) => void) | null; uncaughtExceptionHandler: ((error: Error) => void) | null; crontabJobHandlers: Array<{ clear(): unknown; } | NodeJS.Timeout>; meta: EngineMeta; logger: Logger; config: Config; namespace: Namespace; constructor({ projectRoot, configPath, sourceRoot, config, logger, namespace, port }: { projectRoot: string; configPath?: string; sourceRoot?: string; config?: Config; logger?: Logger; namespace?: Namespace; port?: number | string; }, mode?: string); getMeta(): EngineMeta; getDI(): typeof DI; static getApp(): Express; static createRouter(): Router; getCLI(commandNameInput?: string): YargsArgv; static setBaseServiceProviders(providers: Array ServiceProvider>): void; static getBaseServiceProviders(): Array ServiceProvider>; static getServiceProvidersForWeb(): Array ServiceProvider>; static setServiceProvidersForWeb(providers: Array ServiceProvider>): void; static getMiddlewareProviders(): Array ServiceProvider>; static setMiddlewareProviders(providers: Array ServiceProvider>): void; static getServiceProvidersForCLI(): Array ServiceProvider>; static setServiceProvidersForCLI(providers: Array ServiceProvider>): void; registerServiceProviders(providers?: Array ServiceProvider>): void; registerService(ProviderClass: new (engine: EngineLike) => ServiceProvider): void; registerCommands(commands: CommandModule | CommandModule[] | CommandModule[][]): this; getCommand(): Command | null; getCommands(): CommandModule; clearCommands(): void; clearCrontabs(): void; getCommandName(): string | null; setDefaultErrorHandler(handler: ErrorRequestHandler): this; getDefaultErrorHandler(): ErrorRequestHandler; setUncaughtExceptionHandler(handler: (error: Error) => void): this; getUncaughtExceptionHandler(): (error: Error) => void; setServerErrorHandler(handler: (error: NodeJS.ErrnoException) => void): this; getServerErrorHandler(): (error: NodeJS.ErrnoException) => void; bootstrap(): this; use: Express['use']; run(port?: number | string): this; runHttps(port?: number | string, options?: https.ServerOptions): this; getServer(): http.Server | https.Server | null; static getVersion(): string; runCLI(inputCommandName?: string): Promise; runCrontab(sequence: string, commandString: string, useSeconds?: boolean): void; runCommand(commandString: string): Promise; }