-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate NOTICE.xml file by running 'yarn update-licenses' command
- Loading branch information
Showing
11 changed files
with
3,321 additions
and
16,996 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ coverage/ | |
/e2e_tests/videos/ | ||
mvn/ | ||
dist/ | ||
NOTICE.xml |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
NOTICE_FILE="./NOTICE.txt" | ||
NOTICE_FILE_XML="./NOTICE.xml" | ||
LICENSES_FILE="./LICENSES.txt" | ||
|
||
# Generate NOTICE.txt with list of dependencies and their license | ||
# Limit to runtime dependencies | ||
cat ./scripts/static_data/NOTICE_HEADER.txt > $NOTICE_FILE && yarn licenses list --production >> $NOTICE_FILE; | ||
cat ./scripts/static_data/NOTICE_XML_HEADER.txt > $NOTICE_FILE_XML && yarn licenses list --production --json --no-progress | node ./scripts/generate_licenses_xml.js >> $NOTICE_FILE_XML; | ||
|
||
# Generate LICENSES.txt with list of full text version of the licenses that dependecies use | ||
# Limit to runtime licenses | ||
cat ./scripts/static_data/LICENSES_HEADER.txt > $LICENSES_FILE && yarn licenses generate-disclaimer --production >> $LICENSES_FILE; | ||
|
||
exit 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/* | ||
* Copyright (c) 2002-2018 "Neo4j, Inc" | ||
* Network Engine for Objects in Lund AB [http://neotechnology.com] | ||
* | ||
* This file is part of Neo4j. | ||
* | ||
* Neo4j is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
const js2xmlparser = require('js2xmlparser') | ||
const externalDependencies = require('./static_data/external_dependencies') | ||
|
||
process.stdin.setEncoding('utf8') | ||
|
||
let data = '' | ||
|
||
process.stdin.on('readable', () => { | ||
const chunk = process.stdin.read() | ||
if (chunk !== null) { | ||
data += chunk | ||
} | ||
}) | ||
|
||
process.stdin.on('end', () => { | ||
let packagesList = parseJson(data) | ||
|
||
process.stdout.write(packagesList) | ||
process.exit(1) | ||
}) | ||
|
||
function buildDependencyObject (id, name, license) { | ||
const tempObj = { '@': { id: '', name: '' }, license: '' } | ||
tempObj['@']['id'] = id | ||
tempObj['@']['name'] = name | ||
tempObj['license'] = license | ||
|
||
return tempObj | ||
} | ||
|
||
function parseJson (data) { | ||
let parsedObj = JSON.parse(data).data.body | ||
|
||
const resArr = [ | ||
...externalDependencies.map(dep => | ||
buildDependencyObject(dep[0], dep[1], dep[2]) | ||
), | ||
...parsedObj.map(dep => buildDependencyObject(dep[0], dep[0], dep[2])) | ||
] | ||
|
||
let res = { | ||
'missing-artifact': { | ||
artifact: resArr | ||
} | ||
} | ||
|
||
let js2xmlparseOptions = { declaration: { include: false } } | ||
|
||
return js2xmlparser.parse('licensing-requirements', res, js2xmlparseOptions) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This file contains the full license text of the included third party | ||
libraries. For an overview of the licenses see the NOTICE.txt file. | ||
|
||
|
||
----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Copyright © 2002-2018 Network Engine for Objects in Lund AB (referred to | ||
in this notice as "Neo Technology") | ||
[http://neotechnology.com] | ||
|
||
This product includes software ("Software") developed by Neo Technology. | ||
|
||
The copyright in the bundled Neo4j graph database (including the | ||
Software) is owned by Neo Technology. The Software developed and owned | ||
by Neo Technology is licensed under the GNU GENERAL PUBLIC LICENSE | ||
Version 3 (http://www.fsf.org/licensing/licenses/gpl-3.0.html) ("GPL") | ||
to all third parties and that license, as required by the GPL, is | ||
included in the LICENSE.txt file. | ||
|
||
However, if you have executed an End User Software License and Services | ||
Agreement or an OEM Software License and Support Services Agreement, or | ||
another commercial license agreement with Neo Technology or one of its | ||
affiliates (each, a "Commercial Agreement"), the terms of the license in | ||
such Commercial Agreement will supersede the GPL and you may use the | ||
software solely pursuant to the terms of the relevant Commercial | ||
Agreement. | ||
|
||
Full license texts are found in LICENSES.txt. | ||
|
||
Third-party licenses | ||
-------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
Copyright (c) 2002-2018 "Neo Technology," | ||
Network Engine for Objects in Lund AB [http://neotechnology.com] | ||
|
||
This file is part of Neo4j. | ||
|
||
Neo4j is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Affero General Public License as | ||
published by the Free Software Foundation, either version 3 of the | ||
License, or (at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Affero General Public License for more details. | ||
|
||
You should have received a copy of the GNU Affero General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = [ | ||
['font-awesome', 'Font Awesome', 'SIL OFL 1.1'], | ||
['font-awesome-css', 'Font Awesome CSS', 'MIT'], | ||
['bootstrap', 'bootstrap', 'MIT'], | ||
['inconsolata', 'Inconsolata Font', 'SIL OFL 1.1'], | ||
['open-sans', 'Open Sans Font', 'SIL OFL 1.1'], | ||
['canvg', 'canvg', 'MIT'], | ||
['d3', 'D3.js', 'BSD License'] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters