s3-npm-cache
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -12,2 +12,5 @@ var AWS = require('aws-sdk'); | ||
AdmZip = require('adm-zip'), | ||
fs = require('fs'), | ||
walk = require('fs-walk'), | ||
path = require('path'), | ||
q = require('q'); | ||
@@ -61,4 +64,12 @@ | ||
var unzip = function (buffer, location) { | ||
var zip = new AdmZip(buffer); | ||
zip.extractAllTo(location, true); | ||
try { | ||
var zip = new AdmZip(buffer); | ||
zip.extractAllTo(location, true); | ||
walk.walkSync(location, function (basedir, filename, stat, next) { | ||
var perm = stat.isDirectory() ? 0755 : 0644; | ||
fs.chmodSync(path.join(basedir, filename), perm, next); | ||
}); | ||
} catch (err) { | ||
console.log('Error unzipping', err); | ||
} | ||
}; | ||
@@ -65,0 +76,0 @@ |
{ | ||
"name": "s3-npm-cache", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "Forget lengthy npm install processes in your build pipeline. This script allows your build pipeline to cache your node_modules in S3 if your package.json hasn't changed.", | ||
@@ -34,2 +34,3 @@ "license": "MIT", | ||
"aws-sdk": "^2.11.0", | ||
"fs-walk": "0.0.1", | ||
"md5-file": "^3.1.1", | ||
@@ -36,0 +37,0 @@ "q": "^1.4.1", |
@@ -6,2 +6,3 @@ /* | ||
var md5 = require('md5-file'), | ||
path = require('path'), | ||
helpers = require('./helpers.js'); | ||
@@ -29,3 +30,3 @@ | ||
// Lift off! | ||
console.log('Attempting to retrieve ZIP file from S3 -', s3BucketName, '/', s3PackageName); | ||
console.log('Attempting to retrieve ZIP file from S3 -', path.join(s3BucketName, s3PackageName)); | ||
@@ -32,0 +33,0 @@ helpers.setS3BucketName(s3BucketName); |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances 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
5791
115
6
2
+ Addedfs-walk@0.0.1
+ Addedasync@3.2.6(transitive)
+ Addedfs-walk@0.0.1(transitive)