bajo-extra 0.3.4 → 0.3.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.
@@ -20,7 +20,10 @@ async function download (url, opts = {}, extra = {}) {
20
20
  const file = path.resolve(increment(`${extra.dir}/${extra.fileName}`, { fs: true }))
21
21
  const writer = fs.createWriteStream(file)
22
22
  const { headers, body, ok, status } = await fetch(url, opts, merge({}, extra, { rawResponse: true }))
23
- if (!ok) throw error('Getting %s status', status)
23
+ if (!ok) {
24
+ fs.removeSync(file)
25
+ throw error('Getting %s status', status)
26
+ }
24
27
  const total = headers['content-length'] ?? 0
25
28
  const data = Readable.fromWeb(body)
26
29
  let length = 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bajo-extra",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "description": "Extra package for Bajo Framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -28,12 +28,10 @@
28
28
  "dependencies": {
29
29
  "async": "^3.2.4",
30
30
  "bcrypt": "^5.1.1",
31
- "email-addresses": "^5.0.0",
32
31
  "fast-jwt": "^4.0.1",
33
32
  "fast-xml-parser": "^4.3.6",
34
33
  "numbro": "^2.5.0",
35
34
  "performant-array-to-tree": "^1.11.0",
36
- "query-string": "^8.1.0",
37
35
  "undici": "^6.16.1"
38
36
  }
39
37
  }