@antora/playbook-builder 3.1.7 → 3.1.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.
@@ -17,7 +17,8 @@ module.exports = {
17
17
  extensions: {
18
18
  doc:
19
19
  'A list of extensions that listen for lifecycle events. ' +
20
- 'Each extension is specified as a require request string or an object with a require key.',
20
+ 'Each extension is specified as a require request string or an object with a require key. ' +
21
+ 'May be specified multiple times.',
21
22
  format: 'require-array',
22
23
  default: [],
23
24
  arg: 'extension',
@@ -54,8 +54,15 @@ function registerFormats (convict) {
54
54
  let match
55
55
  ARGS_SCANNER_RX.lastIndex = 0
56
56
  while ((match = ARGS_SCANNER_RX.exec(val))) {
57
- const [, k, v] = match
58
- if (k) accum[k] = v ? (v === '-' ? '-' : yaml.load(v, { schema: yaml.CORE_SCHEMA })) : ''
57
+ const [, k, v = ''] = match
58
+ if (!k) continue
59
+ let parsed = v
60
+ if (parsed && parsed !== '-') {
61
+ try {
62
+ parsed = yaml.load(v, { schema: yaml.CORE_SCHEMA })
63
+ } catch {}
64
+ }
65
+ accum[k] = parsed
59
66
  }
60
67
  return accum
61
68
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/playbook-builder",
3
- "version": "3.1.7",
3
+ "version": "3.1.9",
4
4
  "description": "Builds a playbook object from user input for configuring successive documentation components in an Antora pipeline.",
5
5
  "license": "MPL-2.0",
6
6
  "author": "OpenDevise Inc. (https://opendevise.com)",