@paimaexample/npm-avail-node 0.3.43 → 0.3.45

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/binary.js +9 -3
  2. package/package.json +1 -1
package/binary.js CHANGED
@@ -50,6 +50,10 @@ const getBinaryKey = () => {
50
50
  return
51
51
  }
52
52
 
53
+ if (name.toLowerCase() === 'pop') {
54
+ // ubuntu binaries work for popos
55
+ name = 'ubuntu'
56
+ }
53
57
  const distroKey = `${arch}-${name.toLowerCase()}-${version.replace('.', '')}`
54
58
  resolve(distroKey)
55
59
  })
@@ -87,14 +91,16 @@ const downloadBinary = async (distroKey) => {
87
91
  tar.x({
88
92
  file: tarPath,
89
93
  cwd: binDir,
90
- strip: 1,
94
+ strip: 0,
91
95
  }).then(() => {
92
- console.log('Extraction complete.');
93
96
  const binaryPath = path.join(binDir, 'avail-node')
94
97
  fs.chmodSync(binaryPath, '755')
95
98
  fs.unlinkSync(tarPath);
96
99
  resolve(binaryPath);
97
- }).catch(reject);
100
+ }).catch((e) => {
101
+ console.log("error", e);
102
+ reject(e);
103
+ });
98
104
  });
99
105
  dest.on('error', reject);
100
106
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paimaexample/npm-avail-node",
3
- "version": "0.3.43",
3
+ "version": "0.3.45",
4
4
  "description": "A wrapper for the Avail node binary",
5
5
  "main": "index.js",
6
6
  "bin": {