@serverless/aws-cloudfront
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -26,3 +26,3 @@ const parseInputOrigins = require('./parseInputOrigins') | ||
CallerReference: String(Date.now()), | ||
Comment: '', | ||
Comment: inputs.comment, | ||
Aliases: { | ||
@@ -37,3 +37,3 @@ Quantity: 0, | ||
PriceClass: 'PriceClass_All', | ||
Enabled: inputs.enabled === false ? false : true, | ||
Enabled: inputs.enabled, | ||
HttpVersion: 'http2' | ||
@@ -98,3 +98,4 @@ } | ||
params.DistributionConfig.Enabled = inputs.enabled === false ? false : true | ||
params.DistributionConfig.Enabled = inputs.enabled | ||
params.DistributionConfig.Comment = inputs.comment | ||
@@ -101,0 +102,0 @@ let s3CanonicalUserId |
{ | ||
"name": "@serverless/aws-cloudfront", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"main": "./serverless.js", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -53,2 +53,3 @@ # aws-cloudfront | ||
enabled: true # optional | ||
comment: 'My distribution' # optional | ||
defaults: # optional | ||
@@ -55,0 +56,0 @@ ttl: 15 |
@@ -23,2 +23,5 @@ const aws = require('aws-sdk') | ||
inputs.region = inputs.region || 'us-east-1' | ||
inputs.enabled = inputs.enabled === false ? false : true | ||
inputs.comment = | ||
inputs.comment === null || inputs.comment === undefined ? '' : String(inputs.comment) | ||
@@ -42,3 +45,5 @@ this.context.debug( | ||
!equals(this.state.origins, inputs.origins) || | ||
!equals(this.state.defaults, inputs.defaults) | ||
!equals(this.state.defaults, inputs.defaults) || | ||
!equals(this.state.enabled, inputs.enabled) || | ||
!equals(this.state.comment, inputs.comment) | ||
) { | ||
@@ -54,2 +59,4 @@ this.context.debug(`Updating CloudFront distribution of ID ${this.state.id}.`) | ||
this.state.region = inputs.region | ||
this.state.enabled = inputs.enabled | ||
this.state.comment = inputs.comment | ||
this.state.origins = inputs.origins | ||
@@ -56,0 +63,0 @@ this.state.defaults = inputs.defaults |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
86808
34
1212
143