Update licensed

This commit is contained in:
lowlighter
2021-06-08 00:02:16 +02:00
parent 02afa00d10
commit 46dbf145a8
2 changed files with 1 additions and 13 deletions

View File

@@ -20,7 +20,7 @@ RUN chmod +x /metrics/source/app/action/index.mjs \
&& apt-get install -y ruby-full \ && apt-get install -y ruby-full \
&& apt-get install -y git g++ cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \ && apt-get install -y git g++ cmake pkg-config libicu-dev zlib1g-dev libcurl4-openssl-dev libssl-dev ruby-dev \
&& gem install github-linguist \ && gem install github-linguist \
&& gem install licensed \ && gem install licensed -v 2.15.2 \
# Install python for node-gyp # Install python for node-gyp
&& apt-get install -y python3 \ && apt-get install -y python3 \
# Install node modules # Install node modules

View File

@@ -56,18 +56,6 @@ export default async function({login, q, imports, data, graphql, queries, accoun
//Spawn licensed process //Spawn licensed process
console.debug(`metrics/compute/${login}/plugins > licenses > running licensed`) console.debug(`metrics/compute/${login}/plugins > licenses > running licensed`)
try {
console.debug(await imports.run("npm list --production --all", {cwd:path}))
}
catch (error) {
console.debug(error)
}
try {
console.debug(await imports.run("npm list", {cwd:path}))
}
catch (error) {
console.debug(error)
}
JSON.parse(await imports.run("licensed list --format=json --licenses", {cwd:path})).apps JSON.parse(await imports.run("licensed list --format=json --licenses", {cwd:path})).apps
.map(({sources}) => sources?.flatMap(source => source.dependencies?.map(({dependency, license}) => { .map(({sources}) => sources?.flatMap(source => source.dependencies?.map(({dependency, license}) => {
used[license] = (used[license] ?? 0) + 1 used[license] = (used[license] ?? 0) + 1