pandora
Version:
A powerful and lightweight application manager for Node.js applications powered by TypeScript.
67 lines (66 loc) • 1.79 kB
TypeScript
import { State } from './const';
export declare type ProcessScale = number | 'auto';
export declare type CategoryReg = string | 'all' | 'weak-all';
export declare type Entry = string | {
new (...x: any[]): any;
};
export interface EntryClass {
new (...x: any[]): any;
}
export interface ApplicationRepresentation {
appName: string;
appDir: string;
scale?: ProcessScale;
globalEnv?: any;
globalExecArgv?: any[];
globalArgs?: any[];
inspector?: true | {
setPortOnly?: boolean;
port?: number;
host?: string;
};
}
export interface ProcessRepresentation extends ApplicationRepresentation {
processName: string;
offset?: number;
order?: number;
scale?: ProcessScale;
env?: any;
execArgv?: any[];
args?: any[];
entryFileBaseDir?: string;
entryFile?: string;
}
export interface ApplicationStructureRepresentation extends ApplicationRepresentation {
process: Array<ProcessRepresentation>;
}
export interface ApplicationIntrospectionResult {
state: State;
appName: string;
appDir: string;
appId: string;
pids: number[];
startCount: number;
restartCount: number;
uptime: number;
representation?: ApplicationRepresentation;
complex?: ApplicationStructureRepresentation;
structure?: ApplicationStructureRepresentation;
stdoutLogPath?: string;
}
export declare type VersionsIntrospectionResult = typeof process.versions & {
pandora: string;
};
export interface DaemonIntrospectionResult {
versions: VersionsIntrospectionResult;
cwd: string;
pid: number;
uptime: number;
loadedGlobalConfigPaths: string[];
loadedEndPoints: string[];
loadedReporters: string[];
}
export interface Monitor {
start(): any;
stop(): any;
}