@effing/ffmpeg 0.6.1 → 0.7.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.
Files changed (2) hide show
  1. package/install.mjs +8 -2
  2. package/package.json +1 -1
package/install.mjs CHANGED
@@ -74,12 +74,18 @@ function get(url, redirects = 0) {
74
74
  return new Promise((resolve, reject) => {
75
75
  https
76
76
  .get(url, (res) => {
77
- if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
77
+ if (
78
+ res.statusCode >= 300 &&
79
+ res.statusCode < 400 &&
80
+ res.headers.location
81
+ ) {
78
82
  res.resume(); // discard body
79
83
  resolve(get(res.headers.location, redirects + 1));
80
84
  } else if (res.statusCode !== 200) {
81
85
  res.resume();
82
- reject(new Error(`Download failed: HTTP ${res.statusCode} for ${url}`));
86
+ reject(
87
+ new Error(`Download failed: HTTP ${res.statusCode} for ${url}`),
88
+ );
83
89
  } else {
84
90
  resolve(res);
85
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effing/ffmpeg",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "FFmpeg binary downloader for Effing",
5
5
  "type": "module",
6
6
  "exports": {