@antora/cli
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -8,4 +8,4 @@ #!/usr/bin/env node | ||
const configSchema = require('@antora/playbook-builder/lib/config/schema') | ||
const convict = require('@antora/playbook-builder/lib/solitary-convict') | ||
const ospath = require('path') | ||
const solitaryConvict = require('@antora/playbook-builder/lib/solitary-convict') | ||
@@ -27,4 +27,5 @@ const DOT_RELATIVE_RX = new RegExp(`^\\.{1,2}[/${ospath.sep.replace('/', '').replace('\\', '\\\\')}]`) | ||
function exitWithError (err, showStack, message = undefined) { | ||
console.error(showStack ? err.stack : `error: ${message || err.message}`) | ||
function exitWithError (err, showStack, msg = undefined) { | ||
msg = showStack ? err.stack : `error: ${msg || err.message}\nAdd the --stacktrace option to see the cause.` | ||
console.error(msg) | ||
process.exit(1) | ||
@@ -61,3 +62,3 @@ } | ||
.description('Generate a documentation site specified in <playbook>.') | ||
.optionsFromConvict(solitaryConvict(configSchema), { exclude: 'playbook' }) | ||
.optionsFromConvict(convict(configSchema), { exclude: 'playbook' }) | ||
.action(async (playbookFile, command) => { | ||
@@ -64,0 +65,0 @@ try { |
@@ -12,7 +12,8 @@ 'use strict' | ||
.call(this) | ||
.trimRight() | ||
.split(/^/m) | ||
.reduce((accum, line) => { | ||
if (line === '\n') { | ||
const lastLine = accum[accum.length - 1] | ||
if (lastLine === undefined || !(lastLine === '\n' || lastLine.endsWith(':\n'))) accum.push(line) | ||
const prevLine = accum[accum.length - 1] | ||
if (prevLine === undefined || !(prevLine === '\n' || prevLine.endsWith(':\n'))) accum.push(line) | ||
} else if (line.startsWith(indentation + 'Usage: ') && this.parent) { | ||
@@ -29,2 +30,3 @@ let ancestor = this | ||
.join('') | ||
.concat('\n') | ||
} |
{ | ||
"name": "@antora/cli", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "The command line interface for Antora.", | ||
@@ -21,8 +21,8 @@ "license": "MPL-2.0", | ||
"dependencies": { | ||
"@antora/playbook-builder": "1.0.1", | ||
"commander": "^2.15.1" | ||
"@antora/playbook-builder": "1.0.2", | ||
"commander": "^2.17.0" | ||
}, | ||
"devDependencies": { | ||
"convict": "^4.2.0", | ||
"fs-extra": "^6.0.0", | ||
"convict": "^4.3.2", | ||
"fs-extra": "^7.0.0", | ||
"kapok-js": "^0.10.1" | ||
@@ -29,0 +29,0 @@ }, |
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
10480
186
+ Added@antora/playbook-builder@1.0.2(transitive)
- Removed@antora/playbook-builder@1.0.1(transitive)
Updatedcommander@^2.17.0