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

serverless-plugin-stage-variables

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-plugin-stage-variables - npm Package Compare versions

Comparing version 1.0.3 to 1.2.3

2

package.json

@@ -18,3 +18,3 @@ {

"name": "serverless-plugin-stage-variables",
"version": "1.0.3"
"version": "1.2.3"
}

@@ -18,15 +18,20 @@ 'use strict';

addStageVariables: function() {
var template = this._serverless.service.provider.compiledCloudFormationTemplate;
const template = this._serverless.service.provider.compiledCloudFormationTemplate;
config = {
StageName: 'Foobar',
// setup variables, if any are defined
var variables = {};
if (this._serverless.service.custom.stageVariables) {
variables = this._serverless.service.custom.stageVariables;
}
// create a config for the stage
var config = {
StageName: this._serverless.service.provider.stage,
StageDescription: {
StageName: 'Foobar',
Variables: {
"Foo": "Bar"
}
StageName: this._serverless.service.provider.stage,
Variables: variables,
}
}
// find the deployment, and add the stage variables
// find the deployment resource, and add the stage variables
Object.keys(template.Resources).forEach(function(key){

@@ -38,4 +43,4 @@ if (template.Resources[key]['Type'] == 'AWS::ApiGateway::Deployment') {

console.log(template.Resources);
this._serverless.cli.log('Merged stage variables into ApiGateway Deployment');
},
});
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