/// import * as readPkg from 'read-pkg'; import { IEngine } from './engine'; import { IPJSON } from './pjson'; export declare type PlatformTypes = 'darwin' | 'linux' | 'win32' | 'aix' | 'freebsd' | 'openbsd' | 'sunos'; export declare type ArchTypes = 'arm' | 'arm64' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' | 'x86'; export interface IConfig { _base: string; root: string; arch: string; bin: string; cacheDir: string; commandsDir: string | undefined; configDir: string; dataDir: string; dirname: string; errlog: string; home: string; hooks: { [k: string]: string[]; }; name: string; pjson: IPJSON; platform: string; shell: string; tsconfig: TSConfig | undefined; userAgent: string; version: string; windows: boolean; debug: number; engine?: IEngine; npmRegistry: string; } export interface ICLIConfig extends IConfig { engine: IEngine; } export interface TSConfig { compilerOptions: { rootDirs?: string[]; outDir?: string; }; } export interface ConfigOptions { name?: string; root?: string; baseConfig?: IConfig; } export declare class Config { /** * registers ts-node for reading typescript source (./src) instead of compiled js files (./lib) * there are likely issues doing this any the tsconfig.json files are not compatible with others */ readonly _base: string; arch: string; bin: string; cacheDir: string; configDir: string; dataDir: string; dirname: string; errlog: string; home: string; name: string; pjson: any; platform: string; root: string; shell: string; version: string; windows: boolean; userAgent: string; commandsDir: string | undefined; tsconfig: TSConfig | undefined; debug: number; hooks: { [k: string]: string[]; }; engine?: IEngine; npmRegistry: string; constructor(); load(root: string, pjson: readPkg.Package, baseConfig?: IConfig): Promise; scopedEnvVar(k: string): string | undefined; scopedEnvVarTrue(k: string): boolean; scopedEnvVarKey(k: string): string; private dir(category); private windowsHome(); private windowsHomedriveHome(); private windowsUserprofileHome(); private macosCacheDir(); private _tsConfig(); /** * convert a path from the compiled ./lib files to the ./src typescript source * this is for developing typescript plugins/CLIs * if there is a tsconfig and the original sources exist, it attempts to require ts- */ private _libToSrcPath(orig); private _hooks(); private _shell(); private _debug(); } export declare function isIConfig(o: any): o is IConfig; export declare function read({name, root, baseConfig}?: ConfigOptions): Promise;