1 | /*eslint no-console: "off" */
|
2 | const checker = require('gb-license-check');
|
3 |
|
4 | const PACKAGE_WHITELIST = {
|
5 | 'commander': ['^2.3.0'], // MIT license https://github.com/tj/commander.js/blob/master/LICENSE
|
6 | 'flexbuffer': ['^0.0.6'], // Has MIT license https://github.com/mercadolibre/flexbuffer-node/blob/master/LICENSE
|
7 | 'log-driver': ['^1.2.5'], // Has ISC license https://github.com/cainus/logdriver/blob/master/LICENSE
|
8 | 'tweetnacl': ['^0.14.3'], // Has unlimited license https://github.com/dchest/tweetnacl-js/blob/master/COPYING.txt
|
9 | 'callsite': ['1.0.0'], // Has MIT license at https://github.com/tj/callsite/blob/master/LICENSE
|
10 | 'amdefine': ['^1.0.1'], // Has MIT license at https://github.com/jrburke/amdefine
|
11 | 'atob': ['^2.1.0'], // Has MIT license at git://git.coolaj86.com/coolaj86/atob.js
|
12 | 'inherits': ['^1.0.2'], // Has MIT license at https://github.com/isaacs/inherits
|
13 | 'path-is-inside': ['^1.0.2'] // Has MIT license at https://github.com/domenic/path-is-inside
|
14 | };
|
15 |
|
16 | checker.run(PACKAGE_WHITELIST, (err) => {
|
17 | if (err) {
|
18 | console.error('ERROR: Unknown licenses found');
|
19 | process.exit(1);
|
20 | }
|
21 |
|
22 | console.log('License check successful');
|
23 | }); |
\ | No newline at end of file |