import { LocalPackageSource } from "./LocalPackageSource"; import { PackageInfo } from "./PackageInfo"; /** * Reads package metadata and loads package information from a local directory * where OpenT2T packages have been npm-installed. */ export declare class InstalledPackageSource extends LocalPackageSource { /** * Path to the directory where packages are cached. In order to enable requiring * modules in these packages without using relative paths, the path should be a * node_modules directory that is included in the search path. */ readonly cacheDirectory: string; /** * Creates a new InstalledPackageSource with a specified cache directory. * * @param {string} cacheDirectory Path to the directory where packages are * npm-installed. */ constructor(cacheDirectory: string); /** * Gets information about all OpenT2T packages currently available from the source. * CAUTION: This is a potentially slow operation. * * @returns {Promise} An array of package information * objects, or an empty array if the cache is empty */ getAllPackageInfoAsync(): Promise; /** * Gets information about an OpenT2T package from the source * (potentially without downloading the whole package). * * @param {string} name Name of the package * @returns {(Promise; /** * Copies a package to a target directory. * * @param {string} name Name of the package * @param {string} targetDirectory Directory where the package is to be copied */ copyPackageAsync(name: string, targetDirectory: string): Promise; }