UNPKG

@wocker/core

Version:
60 lines (59 loc) 1.93 kB
import { AppConfig } from "../makes/AppConfig"; import { PresetSource, PresetRef, ProjectRef, PluginRef } from "../types"; import { AppFileSystemService } from "./AppFileSystemService"; import { ProcessService } from "./ProcessService"; type TypeMap = { [type: string]: string; }; export declare class AppConfigService { readonly version: string; protected readonly processService: ProcessService; readonly fs: AppFileSystemService; protected _pwd: string; protected _config?: AppConfig; protected readonly mapTypes: TypeMap; constructor(version: string, processService: ProcessService, fs: AppFileSystemService); get experimentalFeatures(): string[]; get debug(): boolean; set debug(debug: boolean); get config(): AppConfig; get presets(): PresetRef[]; get projects(): ProjectRef[]; get plugins(): PluginRef[]; /** * @deprecated */ isVersionGTE(version: string): boolean; /** * @deprecated */ pwd(...parts: string[]): string; /** * @deprecated */ setPWD(pwd: string): void; /** * @deprecated */ dataPath(...args: string[]): string; /** * @deprecated */ getConfig(): AppConfig; addProject(name: string, path: string): void; removeProject(name: string): void; registerPreset(name: string, source: PresetSource, path?: string): void; unregisterPreset(name: string): void; addPlugin(name: string, env?: PluginRef["env"]): void; removePlugin(name: string): void; setEnv(name: string, value: string): void; unsetEnv(name: string): void; getMeta(name: string, byDefault?: string): string | undefined; getMeta(name: string, byDefault: string): string; setMeta(name: string, value: string): void; unsetMeta(name: string): void; isExperimentalEnabled(key: string): boolean; getProjectTypes(): TypeMap; save(): void; } export {};