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.4.2 to 0.5.0

3

example/Gruntfile.js

@@ -30,3 +30,4 @@

]
}
},
invalidate: {}
}

@@ -33,0 +34,0 @@ });

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

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

@@ -5,2 +5,4 @@ # grunt-aws

[![NPM version](https://nodei.co/npm/grunt-aws.png?compact=true)](https://npmjs.org/package/grunt-aws)
## Getting Started

@@ -191,3 +193,3 @@ This plugin requires Grunt `0.4.x`

Define a charset to set on your ContentType. Ie. `utf-8`
Add a charset to your `Content-Type`. For example: `utf-8`.

@@ -453,6 +455,10 @@ #### `mime` (Object)

distributionId: '...',
invalidations: [
'/index.html',
'/pages/whatever.html'
]
},
html: {
options: {
invalidations: [
'/index.html',
'/pages/whatever.html'
]
}
}

@@ -459,0 +465,0 @@ }

@@ -14,3 +14,3 @@ var AWS = require("aws-sdk"),

//cloudfront task
grunt.registerTask("cloudfront", DESC, function() {
grunt.registerMultiTask("cloudfront", DESC, function() {

@@ -17,0 +17,0 @@ //get options

@@ -127,2 +127,15 @@ var AWS = require("aws-sdk"),

baseObject.CacheControl = "max-age="+baseObject.CacheControl+", public";
else if (typeof baseObject.CacheControl === 'object') {
var val = baseObject.CacheControl,
maxage = val.MaxAge || null,
swr = val.StaleWhileRevalidate || null;
if (!maxage) {
grunt.fail.warn("max_age is required for Cache-Control header");
}
if (swr) {
baseObject.CacheControl = "max-age="+maxage+", stale-while-revalidate="+swr+", public";
} else {
baseObject.CacheControl = "max-age="+maxage+", public";
}
}

@@ -129,0 +142,0 @@ if(baseObject.Expires instanceof Date)

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