fix(core): update

This commit is contained in:
Philipp Kunz 2020-03-08 19:34:36 +00:00
parent 7075d7b36f
commit 54db436174
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,8 @@
import * as plugins from './smartnpm.plugins';
import { NpmRegistry } from './smartnpm.classes.npmregistry';
export class NpmPackage {
public static async createFromFullMetadata(fullMetadata: plugins.packageJson.FullMetadata) {
public static async createFromFullMetadata(npmRegistry: NpmRegistry, fullMetadata: plugins.packageJson.FullMetadata) {
const npmPackage = new NpmPackage();
Object.assign(npmPackage, fullMetadata);
return npmPackage;

View File

@ -30,7 +30,7 @@ export class NpmRegistry {
registryUrl: this.options.npmRegistryUrl,
fullMetadata: true
});
const npmPackage = await NpmPackage.createFromFullMetadata(fullMetadata);
const npmPackage = await NpmPackage.createFromFullMetadata(this, fullMetadata);
return npmPackage;
}