serverless-api-gateway-caching
Advanced tools
Comparing version 1.3.6 to 1.3.8
{ | ||
"name": "serverless-api-gateway-caching", | ||
"version": "1.3.6", | ||
"version": "1.3.8", | ||
"description": "A plugin for the serverless framework which helps with configuring caching for API Gateway endpoints.", | ||
@@ -5,0 +5,0 @@ "main": "src/apiGatewayCachingPlugin.js", |
@@ -55,3 +55,7 @@ const split = require('lodash.split'); | ||
method.Properties.RequestParameters[`method.${cacheKeyParameter.name}`] = (existingValue == null || existingValue == undefined) ? {} : existingValue; | ||
method.Properties.Integration.RequestParameters[`integration.${cacheKeyParameter.name}`] = `method.${cacheKeyParameter.name}`; | ||
if (method.Properties.Integration.Type !== 'AWS_PROXY') { | ||
method.Properties.Integration.RequestParameters[`integration.${cacheKeyParameter.name}`] = `method.${cacheKeyParameter.name}`; | ||
} | ||
method.Properties.Integration.CacheKeyParameters.push(`method.${cacheKeyParameter.name}`); | ||
@@ -58,0 +62,0 @@ } |
@@ -155,3 +155,3 @@ const isEmpty = require('lodash.isempty'); | ||
for (let index in paramsInChunks) { | ||
serverless.cli.log(`[serverless-api-gateway-caching] Updating API Gateway cache settings (${index + 1} of ${paramsInChunks.length}).`); | ||
serverless.cli.log(`[serverless-api-gateway-caching] Updating API Gateway cache settings (${parseInt(index) + 1} of ${paramsInChunks.length}).`); | ||
await serverless.providers.aws.request('APIGateway', 'updateStage', paramsInChunks[index], stage, region); | ||
@@ -158,0 +158,0 @@ } |
23479
433