fix(core): update
This commit is contained in:
parent
7075d7b36f
commit
54db436174
@ -1,7 +1,8 @@
|
|||||||
import * as plugins from './smartnpm.plugins';
|
import * as plugins from './smartnpm.plugins';
|
||||||
|
import { NpmRegistry } from './smartnpm.classes.npmregistry';
|
||||||
|
|
||||||
export class NpmPackage {
|
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();
|
const npmPackage = new NpmPackage();
|
||||||
Object.assign(npmPackage, fullMetadata);
|
Object.assign(npmPackage, fullMetadata);
|
||||||
return npmPackage;
|
return npmPackage;
|
||||||
|
@ -30,7 +30,7 @@ export class NpmRegistry {
|
|||||||
registryUrl: this.options.npmRegistryUrl,
|
registryUrl: this.options.npmRegistryUrl,
|
||||||
fullMetadata: true
|
fullMetadata: true
|
||||||
});
|
});
|
||||||
const npmPackage = await NpmPackage.createFromFullMetadata(fullMetadata);
|
const npmPackage = await NpmPackage.createFromFullMetadata(this, fullMetadata);
|
||||||
return npmPackage;
|
return npmPackage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user