import * as fs from 'graceful-fs'; import lockfile = require('lockfile'); import Touch = require('touch'); import { ConfigJson, DependencyTree, DependencyBranch } from '../interfaces'; export declare type Stats = fs.Stats; export declare type LockOp = (path: string, options?: lockfile.Options) => Promise; export declare type TouchOp = (path: string, options?: Touch.Options) => Promise; export declare type ReadFileOp = (path: string, encoding: string) => Promise; export declare type WriteFileOp = (path: string, contents: string | Buffer) => Promise; export declare type PathOp = (path: string) => Promise; export declare const touch: TouchOp; export declare const stat: PathOp; export declare const readFile: ReadFileOp; export declare const writeFile: WriteFileOp; export declare const mkdirp: PathOp; export declare const unlink: PathOp; export declare const lock: LockOp; export declare const unlock: PathOp; export declare const rimraf: PathOp; export declare const readdir: PathOp; export declare const rmdir: PathOp; export declare function rmdirUntil(path: string, until: string): Promise; export declare function isFile(path: string): Promise; export declare function readJson(path: string, allowEmpty?: boolean): Promise; export declare function writeJson(path: string, json: any, indent?: string | number, eol?: string): Promise; export declare function readConfig(path: string): Promise; export declare function readConfigFrom(path: string): Promise; export declare function parseConfig(config: ConfigJson, path: string): ConfigJson; export declare const proxy: (urlStr: string) => void; export declare const readHttp: (url: string) => Promise; export declare function readFileFrom(from: string): Promise; export declare function readJsonFrom(from: string, allowEmpty?: boolean): Promise; export declare function stringifyJson(json: any, indent?: number | string, eol?: string): string; export declare function parseJson(contents: string, path: string, allowEmpty: boolean): any; export declare function transformFile(path: string, transform: (contents: string) => string | Promise): Promise; export declare function transformJson(path: string, transform: (json: T) => T, allowEmpty?: boolean): Promise; export declare function transformConfig(cwd: string, transform: (config: ConfigJson) => ConfigJson): Promise; export declare function transformDtsFile(path: string, transform: (typings: string[]) => string[] | Promise): Promise; export declare function treeToJson(tree: DependencyTree): DependencyTree & { parent: any; dependencies: DependencyBranch; devDependencies: DependencyBranch; peerDependencies: DependencyBranch; globalDependencies: DependencyBranch; globalDevDependencies: DependencyBranch; }; export declare function dependenciesToJson(dependencies: DependencyBranch): DependencyBranch;