smartnpm/ts/smartnpm.classes.packageversion.ts
2022-04-04 23:21:49 +02:00

32 lines
750 B
TypeScript

import * as plugins from './smartnpm.plugins.js';
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;
};
}