@antora/ui-loader 3.1.4 → 3.1.6

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.
Files changed (2) hide show
  1. package/lib/load-ui.js +5 -3
  2. package/package.json +2 -2
package/lib/load-ui.js CHANGED
@@ -17,7 +17,7 @@ const forEach = (write, final) => new Writable({ objectMode: true, write, final
17
17
  const map = (transform) => new Transform({ objectMode: true, transform })
18
18
  const UiCatalog = require('./ui-catalog')
19
19
  const yaml = require('js-yaml')
20
- const vzip = require('gulp-vinyl-zip')
20
+ const vzip = require('@vscode/gulp-vinyl-zip')
21
21
 
22
22
  const STATIC_FILE_MATCHER_OPTS = {
23
23
  expandRange: (begin, end, step, opts) => bracesToGroup(opts ? `{${begin}..${end}..${step}}` : `{${begin}..${end}}`),
@@ -194,8 +194,10 @@ function downloadBundle (url, to, agent) {
194
194
  })
195
195
  }).catch((err) => {
196
196
  const errWrapper = new Error(`${err.summary || 'Failed to download UI bundle'}: ${url}`)
197
- errWrapper.stack += `\nCaused by: ${err.stack || 'unknown'}`
198
- throw errWrapper
197
+ if (err.code === 'ECONNRESET' || (err.message || '').toLowerCase() === 'request timed out') {
198
+ errWrapper.recoverable = true
199
+ }
200
+ throw Object.assign(errWrapper, { stack: `${errWrapper.stack}\nCaused by: ${err.stack || 'unknown'}` })
199
201
  })
200
202
  }
201
203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antora/ui-loader",
3
- "version": "3.1.4",
3
+ "version": "3.1.6",
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)",
@@ -26,10 +26,10 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@antora/expand-path-helper": "~2.0",
29
+ "@vscode/gulp-vinyl-zip": "~2.5",
29
30
  "braces": "~3.0",
30
31
  "cache-directory": "~2.0",
31
32
  "glob-stream": "~7.0",
32
- "gulp-vinyl-zip": "~2.5",
33
33
  "hpagent": "~1.2",
34
34
  "js-yaml": "~4.1",
35
35
  "picomatch": "~2.3",