From 595b2328cdf868bda991e568919d4805cf3b55de Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Mon, 4 Jul 2022 23:39:05 -0400 Subject: [PATCH] ci: improve `settings.example.json` generation --- source/app/web/settings.example.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/web/settings.example.json b/source/app/web/settings.example.json index 032ff5ff..f278a8f2 100644 --- a/source/app/web/settings.example.json +++ b/source/app/web/settings.example.json @@ -36,7 +36,7 @@ "plugins": { "//": "Global plugin configuration", <% for (const name of Object.keys(plugins).filter(v => !["base", "core"].includes(v))) { -%> "<%= name %>":{ - <%- JSON.stringify(Object.fromEntries(Object.entries(plugins[name].inputs).filter(([key, {type}]) => type === "token").map(([key, {description:value}]) => [key.replace(new RegExp(`^plugin_${name}_`), ""), value])), null, 6).replace(/^[{]/gm, "").replace(/^\s*[}]$/gm, "").replace(/": "/gm, `${'": null,'.padEnd(22)} "//":"`).replace(/"$/gm, '",').trimStart().replace(/\n$/gm, "\n ") %>"enabled": false, "//": "<%= plugins[name].inputs[`plugin_${name}`].description %>" + <%- JSON.stringify(Object.fromEntries(Object.entries(plugins[name].inputs).filter(([key, {type}]) => type === "token").map(([key, {description:value}]) => [key.replace(new RegExp(`^plugin_${name}_`), ""), value.split("\n")[0].trim()])), null, 6).replace(/^[{]/gm, "").replace(/^\s*[}]$/gm, "").replace(/": "/gm, `${'": null,'.padEnd(22)} "//": "`).replace(/"$/gm, '",').trimStart().replace(/\n$/gm, "\n ") %>"enabled": false, "//": "<%= plugins[name].inputs[`plugin_${name}`].description.trim() %>" }, <% } %>"//": "" }