UNPKG

node-pluginsmanager-plugin

Version:
58 lines (57 loc) 2.14 kB
import MediatorUser from "./MediatorUser"; import Server from "./Server"; import type { IncomingMessage } from "node:http"; import type { Server as SocketIOServer } from "socket.io"; import type { Server as WebSocketServer } from "ws"; import type { iServerResponse } from "./Server"; import type { tLogger, tEventMap, iEventsMinimal } from "./DescriptorUser"; export interface iOrchestratorOptions { "externalRessourcesDirectory": string; "packageFile": string; "descriptorFile": string; "mediatorFile": string; "serverFile": string; "logger"?: tLogger; } export default class Orchestrator<T extends tEventMap<T> = iEventsMinimal> extends MediatorUser<T> { protected _Server: Server | null; protected _socketServer: WebSocketServer | SocketIOServer | null; protected _checkParameters: boolean; protected _checkResponse: boolean; protected _packageFile: string; protected _descriptorFile: string; protected _mediatorFile: string; protected _serverFile: string; protected _extended: string[]; enabled: boolean; authors: string[]; description: string; dependencies: object | null; devDependencies: object | null; engines: object | null; license: string; main: string; name: string; scripts: object | null; version: string; constructor(options: iOrchestratorOptions); checkConf(): Promise<void>; isEnable(): Promise<void>; checkFiles(): Promise<void>; checkServer(): Promise<void>; disableCheckParameters(): this; enableCheckParameters(): this; disableCheckResponse(): this; enableCheckResponse(): this; disableCors(): this; enableCors(): this; appMiddleware(req: IncomingMessage, res: iServerResponse, next: () => void): void; socketMiddleware(server: WebSocketServer | SocketIOServer): void; load(...data: any): Promise<void>; destroy(...data: any): Promise<void>; init(...data: any): Promise<void>; release(...data: any): Promise<void>; install(...data: any): Promise<void>; update(...data: any): Promise<void>; uninstall(...data: any): Promise<void>; }