@antora/content-aggregator
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -462,8 +462,7 @@ 'use strict' | ||
function srcFs (cwd, origin) { | ||
const relpathStart = cwd.length + 1 | ||
return new Promise((resolve, reject, cache = Object.create(null), files = []) => | ||
return new Promise((resolve, reject, cache = Object.create(null), files = [], relpathStart = cwd.length + 1) => | ||
pipeline( | ||
globStream(CONTENT_SRC_GLOB, Object.assign({ cache, cwd }, CONTENT_SRC_OPTS)), | ||
forEach(({ path: abspathPosix }, _, done) => { | ||
if (Array.isArray(cache[abspathPosix])) return done() // detects some directories, but not all | ||
if ((cache[abspathPosix] || {}).constructor === Array) return done() // detects some directories | ||
const abspath = posixify ? ospath.normalize(abspathPosix) : abspathPosix | ||
@@ -473,3 +472,3 @@ const relpath = abspath.substr(relpathStart) | ||
(stat) => { | ||
if (stat.isDirectory()) return done() // detects remaining directories | ||
if (stat.isDirectory()) return done() // detects directories that slipped through cache check | ||
fsp.readFile(abspath).then( | ||
@@ -857,9 +856,5 @@ (contents) => { | ||
function generateCloneFolderName (url) { | ||
let normalizedUrl = url.toLowerCase() | ||
if (posixify) normalizedUrl = posixify(normalizedUrl) | ||
normalizedUrl = removeGitSuffix(normalizedUrl) | ||
const normalizedUrl = removeGitSuffix(posixify ? posixify(url.toLowerCase()) : url.toLowerCase()) | ||
const basename = normalizedUrl.split(ANY_SEPARATOR_RX).pop() | ||
const hash = createHash('sha1') | ||
hash.update(normalizedUrl) | ||
return basename + '-' + hash.digest('hex') + '.git' | ||
return basename + '-' + createHash('sha1').update(normalizedUrl).digest('hex') + '.git' | ||
} | ||
@@ -866,0 +861,0 @@ |
@@ -7,3 +7,3 @@ 'use strict' | ||
CONTENT_SRC_GLOB: '**/*[!~]', | ||
CONTENT_SRC_OPTS: { follow: true, nomount: true, nosort: true, nounique: true, strict: false, uniqueBy: (m) => m }, | ||
CONTENT_SRC_OPTS: { follow: true, nomount: true, nosort: true, nounique: true, strict: false }, | ||
FILE_MODES: { 100644: 0o100666 & ~process.umask(), 100755: 0o100777 & ~process.umask() }, | ||
@@ -10,0 +10,0 @@ GIT_CORE: 'antora', |
{ | ||
"name": "@antora/content-aggregator", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Fetches and aggregates content from distributed sources for use in an Antora documentation pipeline.", | ||
@@ -32,3 +32,3 @@ "license": "MPL-2.0", | ||
"@antora/expand-path-helper": "~2.0", | ||
"@antora/logger": "3.1.0", | ||
"@antora/logger": "3.1.1", | ||
"@antora/user-require-helper": "~2.0", | ||
@@ -35,0 +35,0 @@ "braces": "~3.0", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66346
1493
+ Added@antora/logger@3.1.1(transitive)
- Removed@antora/logger@3.1.0(transitive)
Updated@antora/logger@3.1.1