fix(app/action): community templates

This commit is contained in:
lowlighter
2022-07-07 18:07:59 -04:00
parent affdca0afe
commit 4f60759fca
2 changed files with 3 additions and 3 deletions

View File

@@ -96,7 +96,7 @@ function quit(reason) {
}
//Load configuration
const {conf, Plugins, Templates} = await setup({log: false, community: {templates: core.getInput("setup_community_templates")}})
const {conf, Plugins, Templates} = await setup({log: false, community: {templates: core.getInput("setup_community_templates")}, extras: true})
const {metadata} = conf
conf.settings.extras = {default: true}
info("Setup", "complete")

View File

@@ -13,7 +13,7 @@ const Templates = {}
const Plugins = {}
/**Setup */
export default async function({log = true, sandbox = false, community = {}} = {}) {
export default async function({log = true, sandbox = false, community = {}, extras = false} = {}) {
//Paths
const __metrics = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "../../..")
const __statics = path.join(__metrics, "source/app/web/statics")
@@ -78,7 +78,7 @@ export default async function({log = true, sandbox = false, community = {}} = {}
logger("metrics/setup > load package.json > success")
//Load community templates
if ((conf.settings.extras?.features?.includes("metrics.setup.community.templates")) || (conf.settings.extras?.features === true) || (conf.settings.extras?.default) || (sandbox)) {
if ((conf.settings.extras?.features?.includes("metrics.setup.community.templates")) || (conf.settings.extras?.features === true) || (conf.settings.extras?.default) || (extras) || (sandbox)) {
if ((typeof conf.settings.community.templates === "string") && (conf.settings.community.templates.length)) {
logger("metrics/setup > parsing community templates list")
conf.settings.community.templates = [...new Set([...decodeURIComponent(conf.settings.community.templates).split(",").map(v => v.trim().toLocaleLowerCase()).filter(v => v)])]