Update index.mjs

This commit is contained in:
lowlighter
2021-06-07 23:09:03 +02:00
parent 235903527c
commit 3ca64abb27

View File

@@ -62,6 +62,12 @@ export default async function({login, q, imports, data, graphql, queries, accoun
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