Replace all instances of "categorie" with "category" (#340)

This commit is contained in:
Nixinova
2021-05-29 10:56:22 +12:00
committed by GitHub
parent 8efbc753a4
commit f5d3883308
42 changed files with 50 additions and 50 deletions

View File

@@ -30,7 +30,7 @@ export default async function metadata({log = true} = {}) {
}
//Reorder keys
const {base, core, ...plugins} = Plugins //eslint-disable-line no-unused-vars
Plugins = Object.fromEntries(Object.entries(Plugins).sort(([_an, a], [_bn, b]) => a.categorie === b.categorie ? (a.index ?? Infinity) - (b.index ?? Infinity) : categories.indexOf(a.categorie) - categories.indexOf(b.categorie)))
Plugins = Object.fromEntries(Object.entries(Plugins).sort(([_an, a], [_bn, b]) => a.category === b.category ? (a.index ?? Infinity) - (b.index ?? Infinity) : categories.indexOf(a.category) - categories.indexOf(b.category)))
logger(`metrics/metadata > loaded [${Object.keys(Plugins).join(", ")}]`)
//Load templates metadata
let Templates = {}
@@ -64,9 +64,9 @@ metadata.plugin = async function({__plugins, name, logger}) {
const raw = `${await fs.promises.readFile(path.join(__plugins, name, "metadata.yml"), "utf-8")}`
const {inputs, ...meta} = yaml.load(raw)
//Categorie
if (!categories.includes(meta.categorie))
meta.categorie = "other"
//category
if (!categories.includes(meta.category))
meta.category = "other"
//Inputs parser
{