@antora/ui-loader 3.1.13 → 3.1.14
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/load-ui.js +2 -1
- package/package.json +1 -1
package/lib/load-ui.js
CHANGED
|
@@ -15,6 +15,7 @@ const { posix: path } = ospath
|
|
|
15
15
|
const picomatch = require('picomatch')
|
|
16
16
|
const posixify = ospath.sep === '\\' ? (p) => p.replace(/\\/g, '/') : undefined
|
|
17
17
|
const { pipeline, PassThrough, Writable } = require('stream')
|
|
18
|
+
const drain = () => new Writable({ objectMode: true, write: (_chunk, _enc, next) => next() })
|
|
18
19
|
const forEach = (write, final) => new Writable({ objectMode: true, write, final })
|
|
19
20
|
const through = () => new PassThrough({ objectMode: true })
|
|
20
21
|
const UiCatalog = require('./ui-catalog')
|
|
@@ -330,7 +331,7 @@ function srcFs (cwd) {
|
|
|
330
331
|
|
|
331
332
|
function srcZip (file, options = {}) {
|
|
332
333
|
const result = options.testOnly
|
|
333
|
-
? forEach((file_, _, done) => (file_.isStream() ? file_.contents
|
|
334
|
+
? forEach((file_, _, done) => (file_.isStream() ? pipeline(file_.contents, through(), drain(), done) : done()))
|
|
334
335
|
: through()
|
|
335
336
|
yauzl[file instanceof Buffer ? 'fromBuffer' : 'open'](file, { lazyEntries: true }, (err, zipFile) => {
|
|
336
337
|
if (err) return result.emit('error', err)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antora/ui-loader",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
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)",
|