refactor(app/web): new features (#1124) [skip ci]

This commit is contained in:
Simon Lecoq
2022-07-06 04:37:39 +02:00
committed by GitHub
parent 7379fb21a8
commit 130c74b266
80 changed files with 1304 additions and 1103 deletions

View File

@@ -1,9 +1,9 @@
//Setup
export default async function({login, data, imports, q, account}, {enabled = false} = {}) {
export default async function({login, data, imports, q, account}, {enabled = false, extras = false} = {}) {
//Plugin execution
try {
//Check if plugin is enabled and requirements are met
if ((!enabled) || (!q.topics))
if ((!enabled) || (!q.topics) || (!imports.metadata.plugins.topics.extras("enabled", {extras})))
return null
//Load inputs
@@ -88,8 +88,6 @@ export default async function({login, data, imports, q, account}, {enabled = fal
}
//Handle errors
catch (error) {
if (error.error?.message)
throw error
throw {error: {message: "An error occured", instance: error}}
throw imports.format.error(error)
}
}

View File

@@ -18,6 +18,8 @@ inputs:
Enable topics plugin
type: boolean
default: no
extras:
- metrics.run.puppeteer.scrapping
plugin_topics_mode:
description: |