1 | /*eslint no-console: "off" */
|
2 | const checker = require('gb-license-check');
|
3 |
|
4 | const PACKAGE_WHITELIST = {
|
5 | 'base64id': ['^0.1.0'], // MIT in package.json
|
6 | 'better-assert': ['^1.0.2'], // MIT at https://github.com/tj/better-assert/blob/master/LICENSE
|
7 | 'callsite': ['^1.0.0'], // MIT at https://github.com/tj/callsite/blob/master/LICENSE
|
8 | 'commander': [
|
9 | '^0.6.1',
|
10 | '^2.3.0'
|
11 | ], // MIT license https://github.com/tj/commander.js/blob/master/LICENSE
|
12 | 'component-bind': ['^1.0.0'], // MIT at https://github.com/component/bind/blob/master/LICENSE
|
13 | 'component-emitter': ['^1.1.2'], // MIT at https://github.com/component/emitter/blob/master/LICENSE
|
14 | 'component-inherit': ['^0.0.3'], // MIT at https://github.com/component/inherit/blob/master/LICENSE
|
15 | 'debug': ['^0.7.4'], // MIT at https://github.com/visionmedia/debug/blob/master/LICENSE
|
16 | 'indexof': ['^0.0.1'], // MIT at https://github.com/component/indexof/blob/master/LICENSE
|
17 | 'ripemd160': ['^0.2.0'], // MIT at https://github.com/crypto-browserify/ripemd160/blob/master/LICENSE.md
|
18 | 'log-driver': ['^1.2.5'], // Has ISC license https://github.com/cainus/logdriver/blob/master/LICENSE
|
19 | 'tweetnacl': ['^0.14.3'] // Has unlimited license https://github.com/dchest/tweetnacl-js/blob/master/COPYING.txt
|
20 | };
|
21 |
|
22 | checker.run(PACKAGE_WHITELIST, (err) => {
|
23 | if (err) {
|
24 | console.error('ERROR: Unknown licenses found');
|
25 | process.exit(1);
|
26 | }
|
27 |
|
28 | console.log('License check successful');
|
29 | });
|