s3-npm-cache
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -13,4 +13,4 @@ var s3 = require('aws2js') | ||
var uploadFileToS3 = function (fileName) { | ||
s3.putFile('/' + fileName, fileName, 'bucket-owner-full-control', {}, function (err) { | ||
var uploadFileToS3 = function (fileName, zipBuffer) { | ||
s3.putBuffer('/' + fileName, zipBuffer, 'bucket-owner-full-control', { 'Content-Type': 'application/zip' }, function (err) { | ||
if (err) { | ||
@@ -45,2 +45,3 @@ console.error('Failed to upload file', err); | ||
newZip.writeZip(zipName); | ||
return newZip.toBuffer(); | ||
}; | ||
@@ -47,0 +48,0 @@ |
{ | ||
"name": "s3-npm-cache", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"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.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -22,5 +22,5 @@ /* | ||
console.log('Node modules installed.'); | ||
helpers.createZip(nodeModulesFolder, s3PackageName); | ||
var zipBuffer = helpers.createZip(nodeModulesFolder, s3PackageName); | ||
console.log('Zip created.'); | ||
helpers.uploadFileToS3(s3PackageName); | ||
helpers.uploadFileToS3(s3PackageName, zipBuffer); | ||
}; | ||
@@ -27,0 +27,0 @@ |
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
5294
93