32 lines
747 B
TypeScript
32 lines
747 B
TypeScript
|
import * as plugins from './smartnpm.plugins';
|
||
|
|
||
|
export interface IVersionData {
|
||
|
name: string;
|
||
|
version: string;
|
||
|
dependencies: { [key: string]: string };
|
||
|
devDependencies: { [key: string]: string };
|
||
|
dist: {
|
||
|
integrity: string;
|
||
|
shasum: string;
|
||
|
tarball: string;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export class PackageVersion implements IVersionData {
|
||
|
public static createFromVersionData(versionDataArg: IVersionData) {
|
||
|
const packageVersion = new PackageVersion();
|
||
|
Object.assign(packageVersion, versionDataArg);
|
||
|
return packageVersion;
|
||
|
}
|
||
|
|
||
|
name: string;
|
||
|
version: string;
|
||
|
dependencies: { [key: string]: string };
|
||
|
devDependencies: { [key: string]: string };
|
||
|
dist: {
|
||
|
integrity: string;
|
||
|
shasum: string;
|
||
|
tarball: string;
|
||
|
};
|
||
|
}
|