UNPKG

@wocker/mariadb-plugin

Version:
30 lines (29 loc) 959 B
import { FileSystem, PickProperties } from "@wocker/core"; import { Service, ServiceProps } from "./Service"; type AdminConfig = { enabled?: boolean; hostname: string; }; export type ConfigProps = Omit<PickProperties<Config>, "services"> & { enableAdmin?: boolean; adminHostname?: string; services?: ServiceProps[]; }; export declare abstract class Config { default?: string; admin: AdminConfig; services: Service[]; constructor(data: ConfigProps); hasService(name: string): boolean; getService(name: string): Service; hasDefaultService(): boolean; getDefaultService(): Service; getServiceOrDefault(name?: string): Service; setService(service: Service): void; updateService(name: string, service: Partial<ServiceProps>): void; unsetService(name: string): void; abstract save(): void; toObject(): ConfigProps; static make(fs: FileSystem, configPath: string): Config; } export {};