mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Adds some missing licenses to the CSV export (#78719)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
b31b658274
commit
5f5ef2b344
1 changed files with 22 additions and 1 deletions
|
@ -20,6 +20,7 @@
|
|||
import { writeFileSync } from 'fs';
|
||||
import { resolve } from 'path';
|
||||
import { getInstalledPackages } from '../src/dev/npm';
|
||||
import { engines } from '../package';
|
||||
import { LICENSE_OVERRIDES } from '../src/dev/license_checker';
|
||||
|
||||
import { isNull, isUndefined } from 'lodash';
|
||||
|
@ -51,7 +52,7 @@ function formatCsvValues(fields, values) {
|
|||
|
||||
export default function licensesCSVReport(grunt) {
|
||||
grunt.registerTask('licenses:csv_report', 'Report of 3rd party dependencies', async function () {
|
||||
const fields = ['name', 'version', 'url', 'license'];
|
||||
const fields = ['name', 'version', 'url', 'license', 'sourceURL'];
|
||||
const done = this.async();
|
||||
|
||||
try {
|
||||
|
@ -65,6 +66,25 @@ export default function licensesCSVReport(grunt) {
|
|||
dev,
|
||||
});
|
||||
|
||||
packages.unshift(
|
||||
{
|
||||
name: 'Node.js',
|
||||
version: engines.node,
|
||||
repository: 'https://nodejs.org',
|
||||
licenses: ['MIT'],
|
||||
},
|
||||
{
|
||||
name: 'Red Hat Universal Base Image minimal',
|
||||
version: '8',
|
||||
repository:
|
||||
'https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8',
|
||||
licenses: [
|
||||
'Custom;https://www.redhat.com/licenses/EULA_Red_Hat_Universal_Base_Image_English_20190422.pdf',
|
||||
],
|
||||
sourceURL: 'https://oss-dependencies.elastic.co/redhat/ubi/ubi-minimal-8-source.tar.gz',
|
||||
}
|
||||
);
|
||||
|
||||
const csv = packages
|
||||
.map((pkg) => {
|
||||
const data = {
|
||||
|
@ -72,6 +92,7 @@ export default function licensesCSVReport(grunt) {
|
|||
version: pkg.version,
|
||||
url: pkg.repository || `https://www.npmjs.com/package/${pkg.name}`,
|
||||
license: pkg.licenses.join(','),
|
||||
sourceURL: pkg.sourceURL,
|
||||
};
|
||||
|
||||
return formatCsvValues(fields, data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue