@antora/ui-loader
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -15,4 +15,3 @@ 'use strict' | ||
strict: false, | ||
uniqueBy: (m) => m, | ||
}, | ||
}) |
@@ -356,8 +356,7 @@ 'use strict' | ||
function srcFs (cwd) { | ||
const relpathStart = cwd.length + 1 | ||
return new Promise((resolve, reject, cache = Object.create(null), files = new Map()) => | ||
return new Promise((resolve, reject, cache = Object.create(null), files = new Map(), relpathStart = cwd.length + 1) => | ||
pipeline( | ||
globStream(UI_SRC_GLOB, Object.assign({ cache, cwd }, UI_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 | ||
@@ -367,7 +366,7 @@ 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 | ||
const relpathPosix = posixify ? posixify(relpath) : relpath | ||
fsp.readFile(abspath).then( | ||
(contents) => { | ||
const path_ = posixify ? posixify(relpath) : relpath | ||
files.set(path_, new File({ cwd, path: path_, contents, stat, local: true })) | ||
files.set(relpathPosix, new File({ cwd, path: relpathPosix, contents, stat, local: true })) | ||
done() | ||
@@ -374,0 +373,0 @@ }, |
{ | ||
"name": "@antora/ui-loader", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Downloads a UI bundle, if necessary, and loads the files into a UI catalog for use in an Antora documentation pipeline.", | ||
@@ -5,0 +5,0 @@ "license": "MPL-2.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
21255
486