chore: code formatting
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user