fix(app/action): community templates
This commit is contained in:
@@ -96,7 +96,7 @@ function quit(reason) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Load configuration
|
//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
|
const {metadata} = conf
|
||||||
conf.settings.extras = {default: true}
|
conf.settings.extras = {default: true}
|
||||||
info("Setup", "complete")
|
info("Setup", "complete")
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const Templates = {}
|
|||||||
const Plugins = {}
|
const Plugins = {}
|
||||||
|
|
||||||
/**Setup */
|
/**Setup */
|
||||||
export default async function({log = true, sandbox = false, community = {}} = {}) {
|
export default async function({log = true, sandbox = false, community = {}, extras = false} = {}) {
|
||||||
//Paths
|
//Paths
|
||||||
const __metrics = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "../../..")
|
const __metrics = path.join(path.dirname(url.fileURLToPath(import.meta.url)), "../../..")
|
||||||
const __statics = path.join(__metrics, "source/app/web/statics")
|
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")
|
logger("metrics/setup > load package.json > success")
|
||||||
|
|
||||||
//Load community templates
|
//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)) {
|
if ((typeof conf.settings.community.templates === "string") && (conf.settings.community.templates.length)) {
|
||||||
logger("metrics/setup > parsing community templates list")
|
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)])]
|
conf.settings.community.templates = [...new Set([...decodeURIComponent(conf.settings.community.templates).split(",").map(v => v.trim().toLocaleLowerCase()).filter(v => v)])]
|
||||||
|
|||||||
Reference in New Issue
Block a user