resourcehacker
Advanced tools
Comparing version 4.0.0 to 4.2.5
{ | ||
"name": "resourcehacker", | ||
"version": "4.0.0", | ||
"version": "4.2.5", | ||
"description": "Node wrapper of Resource Hacker (windows executable resource editor)", | ||
@@ -32,3 +32,3 @@ "main": "lib/ResHacker.js", | ||
"scripts": { | ||
"postinstall" : "node scripts/install.js" | ||
"postinstall": "node scripts/install.js" | ||
}, | ||
@@ -46,4 +46,5 @@ "readmeFilename": "README.md", | ||
"dependencies": { | ||
"adm-zip": "^0.4.7" | ||
"adm-zip": "^0.4.7", | ||
"caw": "^1.2.0" | ||
} | ||
} |
@@ -1,4 +0,2 @@ | ||
var http = require('http'); | ||
var fs = require('fs'); | ||
var AdmZip = require('adm-zip'); | ||
var path = require('path'); | ||
@@ -12,23 +10,29 @@ | ||
if(!fs.existsSync(dir_path)){ | ||
fs.mkdirSync(dir_path); | ||
fs.mkdirSync(dir_path); | ||
} | ||
if(!fs.existsSync(bin_path)) { | ||
console.log('Downloading ResourceHacker by Angus Johnson...') | ||
var file = fs.createWriteStream(zip_path); | ||
var request = http.get(download_url, function(response) { | ||
response.pipe(file); | ||
file.on('finish', function() { | ||
file.close(function(err){ | ||
var zip = new AdmZip(zip_path); | ||
zip.extractAllTo(dir_path, true); | ||
console.log('Download complete'); | ||
process.exit(0); | ||
}); | ||
}); | ||
}).on('error', function(err) { // Handle errors | ||
fs.unlink(zip_path); | ||
console.error(err.message); | ||
process.exit(-1); | ||
if(fs.existsSync(bin_path)) { | ||
return; | ||
} | ||
var http = require('http'); | ||
http.globalAgent = require("caw")(); | ||
var AdmZip = require('adm-zip'); | ||
console.log('Downloading ResourceHacker by Angus Johnson...') | ||
var file = fs.createWriteStream(zip_path); | ||
var request = http.get(download_url, function(response) { | ||
response.pipe(file); | ||
file.on('finish', function() { | ||
file.close(function(err){ | ||
var zip = new AdmZip(zip_path); | ||
zip.extractAllTo(dir_path, true); | ||
console.log('Download complete'); | ||
process.exit(0); | ||
}); | ||
}); | ||
} | ||
}).on('error', function(err) { // Handle errors | ||
fs.unlink(zip_path); | ||
console.error(err.message); | ||
process.exit(-1); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7385
95
2
+ Addedcaw@^1.2.0
+ Addedcaw@1.2.0(transitive)
+ Addeddeep-extend@0.6.0(transitive)
+ Addedget-proxy@1.1.0(transitive)
+ Addedini@1.3.8(transitive)
+ Addedis-obj@1.0.1(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedobject-assign@3.0.0(transitive)
+ Addedrc@1.2.8(transitive)
+ Addedstrip-json-comments@2.0.1(transitive)
+ Addedtunnel-agent@0.4.3(transitive)