Update licenses plugin
This commit is contained in:
@@ -57,16 +57,10 @@ 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.log(await imports.run("npm list --production --all", {cwd:path}))
|
||||
console.debug(await imports.run("npm list --production --all", {cwd:path}))
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error)
|
||||
}
|
||||
try {
|
||||
console.log(await imports.run("licensed list --format=json --licenses", {cwd:path}))
|
||||
}
|
||||
catch (error) {
|
||||
console.log(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}) => {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#- name: Licenses plugin (complete)
|
||||
# uses: lowlighter/metrics@latest
|
||||
# with:
|
||||
# token: MOCKED_TOKEN
|
||||
# template: repository
|
||||
# repo: metrics
|
||||
# plugin_licenses: yes
|
||||
# plugin_licenses_setup: npm ci
|
||||
# plugin_licenses_ratio: yes
|
||||
# plugin_licenses_legal: yes
|
||||
# timeout: 1800000
|
||||
# modes:
|
||||
# - action
|
||||
- name: Licenses plugin (complete)
|
||||
uses: lowlighter/metrics@latest
|
||||
with:
|
||||
token: MOCKED_TOKEN
|
||||
template: repository
|
||||
repo: metrics
|
||||
plugin_licenses: yes
|
||||
plugin_licenses_setup: npm ci
|
||||
plugin_licenses_ratio: yes
|
||||
plugin_licenses_legal: yes
|
||||
timeout: 1800000
|
||||
modes:
|
||||
- action
|
||||
Reference in New Issue
Block a user