mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
commit
1f0a4523f0
3 changed files with 21 additions and 3 deletions
|
@ -6,14 +6,18 @@ module.exports = function (grunt) {
|
|||
'MIT*',
|
||||
'MIT License',
|
||||
'MIT/X11',
|
||||
'OFL-1.1 AND MIT',
|
||||
'new BSD, and MIT',
|
||||
'(MIT OR Apache-2.0)',
|
||||
'BSD',
|
||||
'BSD*',
|
||||
'BSD New',
|
||||
'BSD-like',
|
||||
'BSD-2-Clause',
|
||||
'(BSD-2-Clause OR MIT OR Apache-2.0)',
|
||||
'BSD-3-Clause',
|
||||
'CC-BY',
|
||||
'CC-BY-4.0',
|
||||
'Apache',
|
||||
'Apache*',
|
||||
'Apache v2',
|
||||
|
@ -29,9 +33,10 @@ module.exports = function (grunt) {
|
|||
],
|
||||
overrides: {
|
||||
'amdefine@1.0.0': ['BSD-3-Clause', 'MIT'],
|
||||
'angular-bootstrap@0.10.0': ['MIT'],
|
||||
'@spalger/angular-bootstrap@0.12.1': ['MIT'],
|
||||
'angular-ui-ace@0.2.3': ['MIT'],
|
||||
'assert-plus@0.1.5': ['MIT'],
|
||||
'buffers@0.1.1': ['MIT/X11'],
|
||||
'color-name@1.0.0': ['UNLICENSE'],
|
||||
'commander@2.2.0': ['MIT'],
|
||||
'css-color-names@0.0.1': ['MIT'],
|
||||
|
@ -39,15 +44,23 @@ module.exports = function (grunt) {
|
|||
'css-stringify@1.0.5': ['MIT'],
|
||||
'css@1.0.8': ['MIT'],
|
||||
'cycle@1.0.3': ['Public-Domain'],
|
||||
'delegate@3.0.1': ['MIT'],
|
||||
'FileSaver@1.1.0': ['MIT'],
|
||||
'flatten@0.0.1': ['MIT'],
|
||||
'indexof@0.0.1': ['MIT'],
|
||||
'inherits@1.0.0': ['ISC'],
|
||||
'is-buffer@1.1.2': ['MIT'],
|
||||
'jsonpointer@1.1.0': ['MIT'],
|
||||
'lazy-cache@1.0.3': ['MIT'],
|
||||
'leaflet@0.7.2': ['BSD-2-Clause'],
|
||||
'Nonsense@0.1.2': ['Public-Domain'],
|
||||
'pkginfo@0.2.3': ['MIT'],
|
||||
'readable-stream@2.0.5': ['MIT'],
|
||||
'repeat-string@1.5.2': ['MIT'],
|
||||
'ripemd160@0.2.0': ['MIT'],
|
||||
'select@1.0.6': ['MIT'],
|
||||
'uglify-js@2.2.5': ['BSD'],
|
||||
'tweetnacl@0.14.3': ['Public-Domain'],
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -13,11 +13,15 @@ module.exports = function (grunt) {
|
|||
var options = { start: process.cwd(), json: true };
|
||||
var checkQueueLength = 2;
|
||||
|
||||
function getLicenses(info, dependency) {
|
||||
if (config.overrides[dependency]) return config.overrides[dependency];
|
||||
if (info && info.licenses) return _.flatten([info.licenses]);
|
||||
}
|
||||
|
||||
function processPackage(info, dependency) {
|
||||
var pkgInfo = {};
|
||||
pkgInfo.name = dependency;
|
||||
pkgInfo.licenses = config.overrides[dependency] || (info && info.licenses);
|
||||
pkgInfo.licenses = _.isArray(pkgInfo.licenses) ? pkgInfo.licenses : [pkgInfo.licenses];
|
||||
pkgInfo.licenses = getLicenses(info, dependency);
|
||||
pkgInfo.valid = (function () {
|
||||
if (_.intersection(pkgInfo.licenses, config.licenses).length > 0) {
|
||||
return true;
|
||||
|
|
|
@ -60,6 +60,7 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.task.run(_.compact([
|
||||
!grunt.option('quick') && 'eslint:source',
|
||||
'licenses',
|
||||
'test:quick'
|
||||
]));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue