serverless-api-gateway-throttling
Advanced tools
Comparing version 2.0.0 to 2.0.1-rc1
{ | ||
"name": "serverless-api-gateway-throttling", | ||
"version": "2.0.0", | ||
"version": "2.0.1-rc1", | ||
"description": "A plugin for the Serverless framework which configures throttling for API Gateway endpoints.", | ||
@@ -5,0 +5,0 @@ "main": "src/apiGatewayThrottlingPlugin.js", |
@@ -0,0 +0,0 @@ # serverless-api-gateway-throttling |
'use strict'; | ||
const ApiGatewayThrottlingSettings = require('./ApiGatewayThrottlingSettings'); | ||
const updateStageThrottling = require('./updateStageThrottling'); | ||
const { restApiExists, outputRestApiIdTo } = require('./restApiId'); | ||
const { httpApiExists, outputHttpApiIdTo } = require('./httpApiId'); | ||
const resetEndpointSpecificSettings = require('./resetEndpointSpecificSettings'); | ||
const { updateRestApi } = require('./updateRestApiStageThrottling'); | ||
const { updateHttpApi } = require('./updateHttpApiStageThrottling'); | ||
@@ -60,8 +61,10 @@ class ApiGatewayThrottlingPlugin { | ||
this.thereIsARestApi = await restApiExists(this.serverless, this.settings); | ||
if (!this.thereIsARestApi) { | ||
this.serverless.cli.log('[serverless-api-gateway-throttling] No Rest API found. Throttling settings will be ignored.'); | ||
return; | ||
this.thereIsAHttpApi = await httpApiExists(this.serverless, this.settings); | ||
if (this.thereIsARestApi) { | ||
await updateRestApi(this.settings, this.serverless); | ||
} | ||
await updateStageThrottling(this.serverless, this.settings); | ||
if (this.thereIsAHttpApi) { | ||
await updateHttpApi(this.settings, this.serverless); | ||
} | ||
} | ||
@@ -68,0 +71,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ String.prototype.replaceAll = function (search, replacement) { |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ const isEmpty = require('lodash.isempty'); |
@@ -0,0 +0,0 @@ const isEmpty = require('lodash.isempty'); |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
30396
11
625
2