Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@antora/cli

Package Overview
Dependencies
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@antora/cli - npm Package Compare versions

Comparing version 2.3.0-alpha.1 to 2.3.0-alpha.2

2

lib/cli.js

@@ -50,3 +50,3 @@ #!/usr/bin/env node

.name('antora')
.version(VERSION, '-v, --version')
.version(VERSION, '-v, --version', 'Output the version number.')
.description('A modular, multi-repository documentation site generator for AsciiDoc.')

@@ -53,0 +53,0 @@ .usage('[options] [[command] [args]]')

@@ -6,15 +6,11 @@ 'use strict'

const helpInformation = Command.prototype.helpInformation
const stringify = JSON.stringify
const QUOTED_DEFAULT_VALUE_RX = / \(default: "([^"]+)"\)/
// TODO include common options when outputting help for a (sub)command
Command.prototype.helpInformation = function () {
return helpInformation
.call(this)
.split(/^/m)
.reduce((accum, line) => {
~line.indexOf('"') ? accum.push(line.replace(QUOTED_DEFAULT_VALUE_RX, ' (default: $1)')) : accum.push(line)
return accum
}, [])
.join('')
// NOTE override stringify to coerce to string normally
JSON.stringify = (val) => `${val}`
const helpInfo = helpInformation.call(this)
JSON.stringify = stringify
return helpInfo
}

@@ -9,5 +9,3 @@ 'use strict'

getOptions(convictConfig).forEach((option) => {
if (!(exclude && exclude.includes(option.name))) {
this.option(option.form, option.description, option.default)
}
if (!(exclude && exclude.includes(option.name))) this.option(option.form, option.description, option.default)
})

@@ -31,5 +29,4 @@ return this

if (Array.isArray(format)) {
option.form += ` <${format.join('|')}>`
//option.form += ` <${arg.substr(arg.lastIndexOf('-') + 1, arg.length)}>`
//option.description += ` (${format.join(', ')})`
option.form += ' <option>'
option.description += ` (options: ${format.join(', ').replace(/, ([^,]+)$/, ', or $1')})`
} else if (format !== 'boolean') {

@@ -39,3 +36,3 @@ option.form += ` <${arg.substr(arg.lastIndexOf('-') + 1, arg.length)}>`

if (default_ === null) {
option.mandatory = true
//option.mandatory = true
option.description += ' (required)'

@@ -42,0 +39,0 @@ } else if (default_ && (typeof default_ !== 'object' || default_.toString() !== '[object Object]')) {

{
"name": "@antora/cli",
"version": "2.3.0-alpha.1",
"version": "2.3.0-alpha.2",
"description": "The command line interface for Antora.",

@@ -21,4 +21,4 @@ "license": "MPL-2.0",

"dependencies": {
"@antora/playbook-builder": "2.3.0-alpha.1",
"commander": "~3.0"
"@antora/playbook-builder": "2.3.0-alpha.2",
"commander": "~4.0"
},

@@ -25,0 +25,0 @@ "devDependencies": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc