@foxpage/foxpage-node-sdk
Version:
foxpage node sdk
81 lines (80 loc) • 1.65 kB
TypeScript
import { LOGGER_LEVEL } from '../logger';
/**
* Foxpage Node SDK default config
*/
declare const defaultConfig: {
apps: {
appId: string;
options: {};
}[];
dataService: {
host: string;
path: string;
};
pm2: {
enable: boolean;
name: string;
};
plugins: string[];
commonPluginDir: string;
logger: {
level: LOGGER_LEVEL;
};
reporter: {
enable: boolean;
};
};
export type FoxpageConfig = typeof defaultConfig;
declare const config: {
init(): Promise<void>;
get<K extends "apps" | "dataService" | "pm2" | "plugins" | "commonPluginDir" | "logger" | "reporter">(key: K): {
apps: {
appId: string;
options: {};
}[];
dataService: {
host: string;
path: string;
};
pm2: {
enable: boolean;
name: string;
};
plugins: string[];
commonPluginDir: string;
logger: {
level: LOGGER_LEVEL;
};
reporter: {
enable: boolean;
};
}[K];
};
/**
* define config
* @param config custom configs
*/
export declare const defineConfig: (config: FoxpageConfig) => {
apps: {
appId: string;
options: {};
}[];
dataService: {
host: string;
path: string;
};
pm2: {
enable: boolean;
name: string;
};
plugins: string[];
commonPluginDir: string;
logger: {
level: LOGGER_LEVEL;
};
reporter: {
enable: boolean;
};
};
export { config };
export default config;