@antora/playbook-builder
Advanced tools
Comparing version 3.0.0-alpha.6 to 3.0.0-alpha.7
@@ -90,5 +90,12 @@ 'use strict' | ||
playbook.dir = playbook.playbook ? ospath.dirname((playbook.file = playbook.playbook)) : process.cwd() | ||
const runtime = (playbook.runtime || false).constructor === Object && playbook.runtime | ||
if (runtime) { | ||
const log = (runtime.log || false).constructor === Object && runtime.log | ||
if (runtime.silent) { | ||
if (runtime.quiet === false) runtime.quiet = true | ||
if (log && 'level' in log) log.level = 'silent' | ||
} | ||
if (log) configureLogger(log, playbook.dir) | ||
} | ||
delete playbook.playbook | ||
const log = (playbook.runtime || {}).log | ||
if (log) configureLogger(playbook.runtime.silent ? (log.level = 'silent') && log : log) | ||
return freeze(playbook) | ||
@@ -95,0 +102,0 @@ } |
@@ -122,2 +122,8 @@ 'use strict' | ||
}, | ||
sourcemap: { | ||
doc: 'Enables the sourcemap option on the AsciiDoc processor, which adds file and line information to blocks.', | ||
format: Boolean, | ||
default: false, | ||
arg: 'asciidoc-sourcemap', | ||
}, | ||
}, | ||
@@ -203,7 +209,14 @@ git: { | ||
}, | ||
level_format: { | ||
doc: 'Set the format to use for the log level in structured log messages.', | ||
format: ['number', 'label'], | ||
default: 'label', | ||
arg: 'log-level-format', | ||
env: 'ANTORA_LOG_LEVEL_FORMAT', | ||
}, | ||
failure_level: { | ||
doc: 'Set the log level tolerance that, when exceeded, will cause the application to fail on exit.', | ||
format: ['all', 'debug', 'info', 'warn', 'error', 'fatal', 'silent'], | ||
default: undefined, | ||
arg: 'failure-level', | ||
format: ['warn', 'error', 'fatal', 'none'], | ||
default: 'fatal', | ||
arg: 'log-failure-level', | ||
env: 'ANTORA_LOG_FAILURE_LEVEL', | ||
@@ -213,4 +226,4 @@ }, | ||
{ | ||
doc: 'Set the format of log messages. (default: structured if CI=true, pretty otherwise)', | ||
format: ['pretty', 'structured', 'json'], | ||
doc: 'Set the format of log messages. Defaults to json if CI=true, pretty otherwise.', | ||
format: ['json', 'pretty'], | ||
default: undefined, | ||
@@ -222,10 +235,31 @@ arg: 'log-format', | ||
get (target, property) { | ||
return property === 'default' | ||
? process.env.CI === 'true' || process.env.NODE_ENV === 'test' | ||
? 'structured' | ||
: 'pretty' | ||
: target[property] | ||
if (property !== 'default') return target[property] | ||
return process.env.CI === 'true' || process.env.NODE_ENV === 'test' ? 'json' : 'pretty' | ||
}, | ||
} | ||
), | ||
destination: { | ||
file: { | ||
doc: 'Write log messages to this file or stream. Defaults to stderr if format is pretty, stdout otherwise.', | ||
format: String, | ||
default: undefined, | ||
arg: 'log-file', | ||
env: 'ANTORA_LOG_FILE', | ||
}, | ||
append: { | ||
doc: 'Whether to append messages to the log file if it already exists.', | ||
format: Boolean, | ||
default: true, | ||
}, | ||
buffer_size: { | ||
doc: 'The size of the log buffer that must be exceeded before writing a chunk to the destination.', | ||
format: Number, | ||
default: 0, | ||
}, | ||
sync: { | ||
doc: 'Whether to immediately flush messages to the destination when the buffer size is exceeded.', | ||
format: Boolean, | ||
default: true, | ||
}, | ||
}, | ||
}, | ||
@@ -232,0 +266,0 @@ }, |
{ | ||
"name": "@antora/playbook-builder", | ||
"version": "3.0.0-alpha.6", | ||
"version": "3.0.0-alpha.7", | ||
"description": "Builds a playbook object from user input for configuring successive documentation components in an Antora pipeline.", | ||
@@ -19,3 +19,3 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/logger": "3.0.0-alpha.6", | ||
"@antora/logger": "3.0.0-alpha.7", | ||
"@iarna/toml": "~2.2", | ||
@@ -41,3 +41,3 @@ "camelcase-keys": "~6.2", | ||
], | ||
"gitHead": "38ec002e88eede3ce5c401a6e226d1a0356945c5" | ||
"gitHead": "fbd597b3680474f2083cda8a7facf1e2848c08e0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36771
545
+ Added@antora/expand-path-helper@1.0.0(transitive)
+ Added@antora/logger@3.0.0-alpha.7(transitive)
+ Addedjoycon@3.1.1(transitive)
+ Addedpino-pretty@5.1.3(transitive)
- Removed@antora/logger@3.0.0-alpha.6(transitive)
- Removedjoycon@2.2.5(transitive)
- Removedpino-pretty@4.8.0(transitive)
Updated@antora/logger@3.0.0-alpha.7