@antora/content-aggregator 3.2.0-alpha.1 → 3.2.0-alpha.2
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/README.md +1 -1
- package/lib/aggregate-content.js +14 -13
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,4 +9,4 @@ Its site generator aggregates documents from versioned content repositories and
|
|
|
9
9
|
|
|
10
10
|
Copyright (C) 2017-present [OpenDevise Inc.](https://opendevise.com) and the [Antora Project](https://antora.org).
|
|
11
11
|
|
|
12
|
-
Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0).
|
|
12
|
+
Use of this software is granted under the terms of the [Mozilla Public License Version 2.0](https://www.mozilla.org/en-US/MPL/2.0/) (MPL-2.0).
|
package/lib/aggregate-content.js
CHANGED
|
@@ -297,11 +297,14 @@ async function selectReferences (source, repo, remote) {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
-
if (
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
300
|
+
if (
|
|
301
|
+
!branchPatterns ||
|
|
302
|
+
!(branchPatterns = Array.isArray(branchPatterns)
|
|
303
|
+
? branchPatterns.map((pattern) => String(pattern))
|
|
304
|
+
: splitRefPatterns(String(branchPatterns))).length
|
|
305
|
+
) {
|
|
306
|
+
return [...refs.values()]
|
|
307
|
+
}
|
|
305
308
|
const worktreeName = repo.worktreeName // possibly switch to worktree property ({ name, dir}) in future
|
|
306
309
|
if (worktreeName) branchPatterns = branchPatterns.map((it) => (it === 'HEAD' ? 'HEAD@' + worktreeName : it))
|
|
307
310
|
if (worktreePatterns) {
|
|
@@ -1035,22 +1038,20 @@ function coerceToString (value) {
|
|
|
1035
1038
|
return value == null ? '' : String(value)
|
|
1036
1039
|
}
|
|
1037
1040
|
|
|
1038
|
-
|
|
1041
|
+
function resolveRepositoryFromWorktree (repo) {
|
|
1039
1042
|
return fsp
|
|
1040
1043
|
.readFile(repo.gitdir, 'utf8')
|
|
1041
1044
|
.then((contents) => contents.trimRight().substr(8))
|
|
1042
|
-
.then((worktreeGitdir) =>
|
|
1043
|
-
|
|
1044
|
-
return fsp.readFile(ospath.join(worktreeGitdir, 'commondir'), 'utf8').then(
|
|
1045
|
+
.then((worktreeGitdir) =>
|
|
1046
|
+
fsp.readFile(ospath.join(worktreeGitdir, 'commondir'), 'utf8').then(
|
|
1045
1047
|
(contents) => {
|
|
1046
1048
|
const gitdir = ospath.join(worktreeGitdir, contents.trimRight())
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
: Object.assign(repo, { dir: gitdir, gitdir, worktreeName })
|
|
1049
|
+
const dir = ospath.basename(gitdir) === '.git' ? ospath.dirname(gitdir) : gitdir
|
|
1050
|
+
return Object.assign(repo, { dir, gitdir, worktreeName: ospath.basename(worktreeGitdir) })
|
|
1050
1051
|
},
|
|
1051
1052
|
() => repo
|
|
1052
1053
|
)
|
|
1053
|
-
|
|
1054
|
+
)
|
|
1054
1055
|
}
|
|
1055
1056
|
|
|
1056
1057
|
function findWorktrees (repo, patterns) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/content-aggregator",
|
|
3
|
-
"version": "3.2.0-alpha.
|
|
3
|
+
"version": "3.2.0-alpha.2",
|
|
4
4
|
"description": "Fetches and aggregates content from distributed sources for use in an Antora documentation pipeline.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "OpenDevise Inc. (https://opendevise.com)",
|
|
@@ -29,12 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@antora/expand-path-helper": "~2.0",
|
|
32
|
-
"@antora/logger": "3.2.0-alpha.
|
|
32
|
+
"@antora/logger": "3.2.0-alpha.2",
|
|
33
33
|
"@antora/user-require-helper": "~2.0",
|
|
34
34
|
"braces": "~3.0",
|
|
35
35
|
"cache-directory": "~2.0",
|
|
36
36
|
"glob-stream": "~7.0",
|
|
37
|
-
"hpagent": "~1.
|
|
37
|
+
"hpagent": "~1.2",
|
|
38
38
|
"isomorphic-git": "~1.21",
|
|
39
39
|
"js-yaml": "~4.1",
|
|
40
40
|
"multi-progress": "~4.0",
|