chore: code formatting
This commit is contained in:
@@ -8,8 +8,8 @@ import paths from "path"
|
|||||||
import sgit from "simple-git"
|
import sgit from "simple-git"
|
||||||
import mocks from "../../../tests/mocks/index.mjs"
|
import mocks from "../../../tests/mocks/index.mjs"
|
||||||
import metrics from "../metrics/index.mjs"
|
import metrics from "../metrics/index.mjs"
|
||||||
import setup from "../metrics/setup.mjs"
|
|
||||||
import presets from "../metrics/presets.mjs"
|
import presets from "../metrics/presets.mjs"
|
||||||
|
import setup from "../metrics/setup.mjs"
|
||||||
process.on("unhandledRejection", error => {
|
process.on("unhandledRejection", error => {
|
||||||
throw error
|
throw error
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -228,7 +228,12 @@ metadata.plugin = async function({__plugins, __templates, name, logger}) {
|
|||||||
key,
|
key,
|
||||||
{
|
{
|
||||||
comment:comments[key] ?? `# ${value.description}`,
|
comment:comments[key] ?? `# ${value.description}`,
|
||||||
descriptor:yaml.dump({[key]:Object.fromEntries(Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)).map(([k, v]) => k === "description" ? [k, v.split("\n")[0]] : k === "default" ? [k, /^\$\{\{[\s\S]+\}\}$/.test(v) ? v : "<default-value>"] : [k, v]))}, {quotingType:'"', noCompatMode:true}),
|
descriptor:yaml.dump({
|
||||||
|
[key]:Object.fromEntries(
|
||||||
|
Object.entries(value).filter(([key]) => ["description", "default", "required"].includes(key)).map(([k, v]) => k === "description" ? [k, v.split("\n")[0]] : k === "default" ? [k, /^\$\{\{[\s\S]+\}\}$/.test(v) ? v : "<default-value>"] : [k, v]
|
||||||
|
),
|
||||||
|
),
|
||||||
|
}, {quotingType:'"', noCompatMode:true}),
|
||||||
},
|
},
|
||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user