Update licensed
This commit is contained in:
@@ -20,7 +20,7 @@ RUN chmod +x /metrics/source/app/action/index.mjs \
|
||||
&& 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 \
|
||||
&& gem install github-linguist \
|
||||
&& gem install licensed \
|
||||
&& gem install licensed -v 2.15.2 \
|
||||
# Install python for node-gyp
|
||||
&& apt-get install -y python3 \
|
||||
# Install node modules
|
||||
|
||||
@@ -56,18 +56,6 @@ export default async function({login, q, imports, data, graphql, queries, accoun
|
||||
|
||||
//Spawn licensed process
|
||||
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
|
||||
.map(({sources}) => sources?.flatMap(source => source.dependencies?.map(({dependency, license}) => {
|
||||
used[license] = (used[license] ?? 0) + 1
|
||||
|
||||
Reference in New Issue
Block a user