Update licensed
This commit is contained in:
@@ -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