chore: code formatting

This commit is contained in:
github-actions[bot]
2022-04-23 23:18:43 +00:00
parent 73cd43c18f
commit 4c98629bbc
130 changed files with 1839 additions and 1788 deletions

View File

@@ -7,8 +7,8 @@ import metadata from "./metadata.mjs"
/**Presets parser */
export default async function presets(list, {log = true, core = null} = {}) {
//Init
const {plugins} = await metadata({log:false})
const {"config.presets":files} = plugins.core.inputs({q:{"config.presets":list}, account:"bypass"})
const {plugins} = await metadata({log: false})
const {"config.presets": files} = plugins.core.inputs({q: {"config.presets": list}, account: "bypass"})
const logger = log ? console.debug : () => null
const allowed = Object.entries(metadata.inputs).filter(([_, {type, preset}]) => (type !== "token") && (!/^(?:[Ff]alse|[Oo]ff|[Nn]o|0)$/.test(preset))).map(([key]) => key)
const env = core ? "action" : "web"
@@ -36,7 +36,7 @@ export default async function presets(list, {log = true, core = null} = {}) {
logger(`metrics/presets > ${file} cannot be loaded in current environment ${env}, skipping`)
continue
}
const {schema, with:inputs} = yaml.load(text)
const {schema, with: inputs} = yaml.load(text)
logger(`metrics/presets > ${file} preset schema is ${schema}`)
//Evaluate preset