@antora/playbook-builder 3.2.0-alpha.3 → 3.2.0-alpha.5
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/build-playbook.js +2 -2
- package/lib/config/schema.js +7 -1
- package/lib/solitary-convict.js +9 -2
- package/package.json +2 -2
package/lib/build-playbook.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const convict = require('./solitary-convict')
|
|
4
4
|
const defaultSchema = require('./config/schema')
|
|
5
|
-
const fs = require('fs')
|
|
6
|
-
const ospath = require('path')
|
|
5
|
+
const fs = require('node:fs')
|
|
6
|
+
const ospath = require('node:path')
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Builds a playbook object according to the provided schema from the specified
|
package/lib/config/schema.js
CHANGED
|
@@ -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',
|
|
@@ -169,6 +170,11 @@ module.exports = {
|
|
|
169
170
|
format: 'int',
|
|
170
171
|
default: 1,
|
|
171
172
|
},
|
|
173
|
+
fetch_depth: {
|
|
174
|
+
doc: 'Preferred number of commits to fetch from remote repository. 0 indicates full history.',
|
|
175
|
+
format: 'int',
|
|
176
|
+
default: 1,
|
|
177
|
+
},
|
|
172
178
|
plugins: {
|
|
173
179
|
credential_manager: {
|
|
174
180
|
doc: 'A require request for a plugin to replace the built-in credential manager used by the git client.',
|
package/lib/solitary-convict.js
CHANGED
|
@@ -54,8 +54,15 @@ function registerFormats (convict) {
|
|
|
54
54
|
let match
|
|
55
55
|
const scanner = new RegExp(ARGS_SCANNER_RX)
|
|
56
56
|
while ((match = scanner.exec(val))) {
|
|
57
|
-
const [, k, v] = match
|
|
58
|
-
if (k)
|
|
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.2.0-alpha.
|
|
3
|
+
"version": "3.2.0-alpha.5",
|
|
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)",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"json5": "~2.2"
|
|
30
30
|
},
|
|
31
31
|
"engines": {
|
|
32
|
-
"node": ">=
|
|
32
|
+
"node": ">=18.0.0"
|
|
33
33
|
},
|
|
34
34
|
"files": [
|
|
35
35
|
"lib/"
|