@antora/ui-loader 3.1.0 → 3.2.0-alpha.1
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/constants.js +0 -1
- package/lib/load-ui.js +5 -6
- package/package.json +2 -2
package/lib/constants.js
CHANGED
package/lib/load-ui.js
CHANGED
|
@@ -353,21 +353,20 @@ function resolveOut (file, outputDir = '_') {
|
|
|
353
353
|
}
|
|
354
354
|
|
|
355
355
|
function srcFs (cwd) {
|
|
356
|
-
|
|
357
|
-
return new Promise((resolve, reject, cache = Object.create(null), files = new Map()) =>
|
|
356
|
+
return new Promise((resolve, reject, cache = Object.create(null), files = new Map(), relpathStart = cwd.length + 1) =>
|
|
358
357
|
pipeline(
|
|
359
358
|
globStream(UI_SRC_GLOB, Object.assign({ cache, cwd }, UI_SRC_OPTS)),
|
|
360
359
|
forEach(({ path: abspathPosix }, _, done) => {
|
|
361
|
-
if (
|
|
360
|
+
if ((cache[abspathPosix] || {}).constructor === Array) return done() // detects some directories
|
|
362
361
|
const abspath = posixify ? ospath.normalize(abspathPosix) : abspathPosix
|
|
363
362
|
const relpath = abspath.substr(relpathStart)
|
|
364
363
|
symlinkAwareStat(abspath).then(
|
|
365
364
|
(stat) => {
|
|
366
|
-
if (stat.isDirectory()) return done() // detects
|
|
365
|
+
if (stat.isDirectory()) return done() // detects directories that slipped through cache check
|
|
366
|
+
const relpathPosix = posixify ? posixify(relpath) : relpath
|
|
367
367
|
fsp.readFile(abspath).then(
|
|
368
368
|
(contents) => {
|
|
369
|
-
|
|
370
|
-
files.set(path_, new File({ cwd, path: path_, contents, stat, local: true }))
|
|
369
|
+
files.set(relpathPosix, new File({ cwd, path: relpathPosix, contents, stat, local: true }))
|
|
371
370
|
done()
|
|
372
371
|
},
|
|
373
372
|
(readErr) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/ui-loader",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.0-alpha.1",
|
|
4
4
|
"description": "Downloads a UI bundle, if necessary, and loads the files into a UI catalog for use in an Antora documentation pipeline.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"author": "OpenDevise Inc. (https://opendevise.com)",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"cache-directory": "~2.0",
|
|
31
31
|
"glob-stream": "~7.0",
|
|
32
32
|
"gulp-vinyl-zip": "~2.5",
|
|
33
|
-
"hpagent": "~1.
|
|
33
|
+
"hpagent": "~1.1",
|
|
34
34
|
"js-yaml": "~4.1",
|
|
35
35
|
"picomatch": "~2.3",
|
|
36
36
|
"should-proxy": "~1.0",
|