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

serverless-pseudo-parameters

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-pseudo-parameters - npm Package Compare versions

Comparing version 1.1.5 to 1.2.5

17

lib/index.js

@@ -14,2 +14,3 @@ 'use strict';

};
this.skipRegionReplace = _.get(serverless.service, 'custom.pseudoParameters.skipRegionReplace', false)
}

@@ -20,3 +21,11 @@

const template = this.serverless.service.provider.compiledCloudFormationTemplate;
const skipRegionReplace = this.skipRegionReplace;
const consoleLog = this.serverless.cli.consoleLog;
consoleLog(`${chalk.yellow.underline('AWS Pseudo Parameters')}`);
if (skipRegionReplace) {
consoleLog('Skipping automatic replacement of regions with account region!');
}
// loop through all resources, and check all (string) properties for any #{AWS::}

@@ -55,7 +64,7 @@ // reference. If found, replace the value with an Fn::Sub reference

function replaceChildNodes(dictionary, name){
function replaceChildNodes(dictionary, name) {
_.forEach(dictionary, function(value, key){
// if a region name is mentioned, replace it with a reference
if(typeof value === 'string' && containsRegion(value)) {
// if a region name is mentioned, replace it with a reference (unless we are skipping automatic replacements)
if(typeof value === 'string' && !skipRegionReplace && containsRegion(value)) {
var regionFinder = new RegExp(regions().join("|"));

@@ -80,3 +89,3 @@ value = value.replace(regionFinder, '#{AWS::Region}');

// this.serverless.cli.consoleLog(message);
console.info('AWS Pseudo Parameter: ' + msg)
consoleLog('AWS Pseudo Parameter: ' + msg)
}

@@ -83,0 +92,0 @@ } while (m);

{
"name": "serverless-pseudo-parameters",
"version": "1.1.5",
"version": "1.2.5",
"devDependencies": {},

@@ -5,0 +5,0 @@ "license": "MIT",

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