@antora/cli 3.2.0-alpha.6 → 3.2.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cli.js CHANGED
@@ -112,7 +112,7 @@ cli
112
112
  .description('Generate a documentation site as specified by <playbook>.')
113
113
  .optionsFromConvict(convict(buildPlaybook.defaultSchema), { exclude: 'playbook' })
114
114
  .trackOptions()
115
- .action(async (playbookFile, options, command) => {
115
+ .action(async (playbookFile, _options, command) => {
116
116
  const errorOpts = { stacktrace: cli.stacktrace, silent: command.silent }
117
117
  const playbookDir = ospath.resolve(playbookFile, '..')
118
118
  const userRequireContext = { dot: playbookDir, paths: [playbookDir, __dirname] }
@@ -152,7 +152,7 @@ cli
152
152
  })
153
153
  .options.sort((a, b) => a.long.localeCompare(b.long))
154
154
 
155
- cli.command('help [command]', { hidden: true }).action((name, options, command) => {
155
+ cli.command('help [command]', { hidden: true }).action((name) => {
156
156
  if (name) {
157
157
  const helpCommand = cli._findCommand(name)
158
158
  if (helpCommand) {
@@ -6,7 +6,7 @@ Command.prototype.optionsFromConvict = function (convictConfig, opts = {}) {
6
6
  let exclude = opts.exclude
7
7
  if (exclude && !Array.isArray(exclude)) exclude = [exclude]
8
8
  getOptions(convictConfig).forEach(({ name, form, description, default: default_, choices }) => {
9
- if (exclude && exclude.includes(name)) return
9
+ if (exclude?.includes(name)) return
10
10
  this.addOption(
11
11
  choices
12
12
  ? this.createOption(form, description).default(default_, default_).choices(choices)
@@ -5,6 +5,7 @@ const { Command } = require('commander')
5
5
  Command.prototype.trackOptions = function () {
6
6
  const optionArgs = (this.optionArgs = [])
7
7
  for (const eventName of this.eventNames().filter((name) => name.startsWith('option:'))) {
8
+ // biome-ignore lint/complexity/useArrowFunction: needed to access arguments
8
9
  this.on(eventName, function () {
9
10
  optionArgs.push(`--${eventName.slice(7)}`)
10
11
  if (arguments.length) optionArgs.push(arguments[0])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/cli",
3
- "version": "3.2.0-alpha.6",
3
+ "version": "3.2.0-alpha.9",
4
4
  "description": "The command line interface for Antora.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "OpenDevise Inc. (https://opendevise.com)",
@@ -9,7 +9,11 @@
9
9
  "Sarah White <sarah@opendevise.com>"
10
10
  ],
11
11
  "homepage": "https://antora.org",
12
- "repository": "gitlab:antora/antora",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://gitlab.com/antora/antora.git",
15
+ "directory": "packages/cli"
16
+ },
13
17
  "bugs": {
14
18
  "url": "https://gitlab.com/antora/antora/issues"
15
19
  },
@@ -25,14 +29,14 @@
25
29
  "antora": "bin/antora"
26
30
  },
27
31
  "dependencies": {
28
- "@antora/logger": "3.2.0-alpha.6",
29
- "@antora/playbook-builder": "3.2.0-alpha.6",
30
- "@antora/user-require-helper": "~2.0",
32
+ "@antora/logger": "3.2.0-alpha.9",
33
+ "@antora/playbook-builder": "3.2.0-alpha.9",
34
+ "@antora/user-require-helper": "~3.0",
31
35
  "commander": "~12.1"
32
36
  },
33
37
  "devDependencies": {
34
- "@antora/site-generator": "3.2.0-alpha.6",
35
- "@antora/site-publisher": "3.2.0-alpha.6",
38
+ "@antora/site-generator": "3.2.0-alpha.9",
39
+ "@antora/site-publisher": "3.2.0-alpha.9",
36
40
  "@asciidoctor/core": "~2.2",
37
41
  "convict": "~6.2",
38
42
  "kapok-js": "~0.10"