feat(plugins/core): add debug_print option
This commit is contained in:
4
action.yml
generated
4
action.yml
generated
@@ -195,6 +195,10 @@ inputs:
|
||||
description: Debug flags
|
||||
default: <default-value>
|
||||
|
||||
debug_print:
|
||||
description: Print output in console
|
||||
default: <default-value>
|
||||
|
||||
dryrun:
|
||||
description: Dry-run
|
||||
default: <default-value>
|
||||
|
||||
@@ -109,6 +109,7 @@ async function retry(func, {retries = 1, delay = 0} = {}) {
|
||||
"markdown.cache":_markdown_cache,
|
||||
debug,
|
||||
"debug.flags":dflags,
|
||||
"debug.print":dprint,
|
||||
"use.mocked.data":mocked,
|
||||
dryrun,
|
||||
"plugins.errors.fatal":die,
|
||||
@@ -343,6 +344,13 @@ async function retry(func, {retries = 1, delay = 0} = {}) {
|
||||
throw new Error("Could not render metrics")
|
||||
info("Status", "complete")
|
||||
|
||||
//Debug print
|
||||
if (dprint) {
|
||||
info.break()
|
||||
info.section("Debug print")
|
||||
console.log(rendered)
|
||||
}
|
||||
|
||||
//Output condition
|
||||
info.break()
|
||||
info.section("Saving")
|
||||
|
||||
@@ -420,6 +420,13 @@ inputs:
|
||||
testing: yes
|
||||
preset: no
|
||||
|
||||
debug_print:
|
||||
description: Print output in console
|
||||
type: boolean
|
||||
default: no
|
||||
testing: yes
|
||||
preset: no
|
||||
|
||||
dryrun:
|
||||
description: |
|
||||
Dry-run
|
||||
|
||||
Reference in New Issue
Block a user