fix(core): update
This commit is contained in:
@ -1,9 +1,9 @@
|
||||
import { IModuleLicenseResult } from "./interfaces";
|
||||
import { IModuleLicenseResult } from './interfaces';
|
||||
|
||||
export class CheckResult {
|
||||
passingModules: IModuleLicenseResult[] = [];
|
||||
failingModules: IModuleLicenseResult[] = [];
|
||||
|
||||
|
||||
public addPassing(moduleResultArg: IModuleLicenseResult) {
|
||||
this.passingModules.push(moduleResultArg);
|
||||
}
|
||||
@ -11,4 +11,4 @@ export class CheckResult {
|
||||
public addFailing(moduleResultArg: IModuleLicenseResult) {
|
||||
this.failingModules.push(moduleResultArg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ export class LicenseChecker {
|
||||
async excludeLicenseWithinPath(pathArg: string, licenseArrayArg: string[]) {
|
||||
const checkResult = new CheckResult();
|
||||
const plainResultArray = await this.createPlainResultArray(pathArg);
|
||||
plainResultArray.forEach(licenseResult => {
|
||||
plainResultArray.forEach((licenseResult) => {
|
||||
if (licenseArrayArg.indexOf(licenseResult.license) === -1) {
|
||||
checkResult.addPassing(licenseResult);
|
||||
} else {
|
||||
@ -20,7 +20,7 @@ export class LicenseChecker {
|
||||
async includeLicencesWithinPath(pathArg: string, licenseArrayArg: string[]) {
|
||||
const checkResult = new CheckResult();
|
||||
const plainResultArray = await this.createPlainResultArray(pathArg);
|
||||
plainResultArray.forEach(licenseResult => {
|
||||
plainResultArray.forEach((licenseResult) => {
|
||||
if (licenseArrayArg.indexOf(licenseResult.license) !== -1) {
|
||||
checkResult.addPassing(licenseResult);
|
||||
} else {
|
||||
@ -42,7 +42,7 @@ export class LicenseChecker {
|
||||
license: refObject.licenses,
|
||||
path: refObject.path,
|
||||
publisher: refObject.publisher,
|
||||
repository: refObject.repository
|
||||
repository: refObject.repository,
|
||||
});
|
||||
}
|
||||
return resultArray;
|
||||
@ -52,7 +52,7 @@ export class LicenseChecker {
|
||||
const done = plugins.smartpromise.defer<any>();
|
||||
licenseChecker.init(
|
||||
{
|
||||
start: checkPathArg
|
||||
start: checkPathArg,
|
||||
},
|
||||
(err, licenseJson) => {
|
||||
if (err) {
|
||||
|
@ -6,4 +6,4 @@ export interface IModuleLicenseResult {
|
||||
email: string;
|
||||
path: string;
|
||||
licenseFile: string;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user