Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grunt-aws

Package Overview
Dependencies
Maintainers
2
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-aws - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

2

package.json
{
"name": "grunt-aws",
"description": "A Grunt interface into the Amazon Node.JS SDK",
"version": "0.5.2",
"version": "0.5.3",
"homepage": "https://github.com/jpillora/grunt-aws",

@@ -6,0 +6,0 @@ "author": {

@@ -165,3 +165,3 @@ # grunt-aws

* `ContentEncoding`
* `CacheControl` (converts numbers into strings as `max-age=<num>, public`)
* `CacheControl` (accepts a string or converts numbers into header as `max-age=<num>, public`)
* `Expires` (converts dates to strings with `toUTCString()`)

@@ -317,2 +317,12 @@ * `GrantFullControl`

//upload the public/ folder with a custom Cache-control header
longTym: {
options: {
headers: {
CacheControl: 'max-age=900, public, must-revalidate'
}
}
src: "public/**"
},
//upload the public/ folder with a 2 year cache time

@@ -327,2 +337,3 @@ longTym: {

},
//upload the public/ folder with a specific expiry date

@@ -329,0 +340,0 @@ beryLongTym: {

@@ -51,5 +51,2 @@ var AWS = require("aws-sdk"),

if(!files.length)
return grunt.log.ok("No files matched");
//mark as async

@@ -170,6 +167,7 @@ var done = this.async();

if(!opts.cache)
if(!opts.cache && files.length)
subtasks.push(getFileList);
subtasks.push(copyAllFiles);
if(files.length)
subtasks.push(copyAllFiles);

@@ -217,8 +215,14 @@ //start!

function enableWebHosting(callback) {
var defaultWebOptions = {
"grunt-overwrite": false,
IndexDocument: { Suffix : 'index.html' }
};
var webOptions = _.isObject(opts.enableWeb) ? opts.enableWeb : defaultWebOptions;
S3.getBucketWebsite({ Bucket:opts.bucket }, function(err){
if (err && err.name === 'NoSuchWebsiteConfiguration'){
if ((err && err.name === 'NoSuchWebsiteConfiguration') || webOptions["grunt-overwrite"]){
delete webOptions["grunt-overwrite"];
//opts.enableWeb can be the params for WebsiteRedirectLocation.
//Otherwise, just set the index.html as default suffix
grunt.log.writeln('Enabling website configuration on ' + opts.bucket + '...');
var webOptions = _.isObject(opts.enableWeb) ? opts.enableWeb : { IndexDocument: { Suffix : 'index.html' }};
if (opts.dryRun) return callback();

@@ -225,0 +229,0 @@ S3.putBucketWebsite({

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc