UNPKG

mira

Version:

NearForm Accelerator for Cloud Native Serverless AWS

48 lines (47 loc) 1.93 kB
/** * MiraVersion checks the CDK version consistency across the Mira packge and the * applications using Mira. It is capable of force-patching package.json files * and running the NPM install. */ export declare class MiraVersion { static instance: MiraVersion; cdkVersion: string; constructor(); /** * Checks a particular dependency CDK version. */ checkApplicationDependencyCDKVersion(pkg: any, pkgDeps: { [key: string]: string; }, dep: string, autoFix?: boolean): boolean; /** * Gets the version of CDK used by an application. If there is a version * mismatch, then modifies the package.json file of the application, informs * the user and exits. */ checkApplicationCDKVersion(autoFix?: boolean): void; /** * Checks a dependency such that it has no wildcards in use. Optionally * checks against an otherVersion. */ checkDependency(version: string, dep?: string, otherVersion?: string, otherDep?: string): boolean; /** * Checks the local Mira dependencies when Mira has been installed as part * of an app such that all Mira CDK deps should be installed as peer deps * and also checks that any leftover CDK deps within Mira (not present in * the app) are the same expected version as Mira specifies. */ checkLocalMiraCDKDependencies(version: string, pkg: any): void; /** * Checks that the file within node_modules matches what is expected for * the dependency provided and the version. If any of these checks fails, * an error is thrown. */ checkNodeModuleDependency(dep: string, version: string): void; /** * Gets the CDK version within this local version of Mira. If there are * any version range operators used, throws an error. */ getLocalMiraCDKVersion(): string | boolean; } declare const _default: MiraVersion; export default _default;