Socket
Socket
Sign inDemoInstall

add-custom-resource

Package Overview
Dependencies
40
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.1 to 3.1.2

6

add-custom-resource.js

@@ -35,3 +35,3 @@ 'use strict';

return functionId;
return { functionId, logGroupId };
});

@@ -47,6 +47,6 @@ }

return ensureFunctionResources(template, config)
.then(functionId => {
template.Resources[resourceId] = makeResource(resourceName, functionId, config.resource);
.then(({ functionId, logGroupId }) => {
template.Resources[resourceId] = makeResource(resourceName, functionId, logGroupId, config.resource);
return resourceId;
});
};
'use strict';
module.exports = function makeLogGroup(functionName, retentionInDays) {
module.exports = function makeLogGroup(functionId, retentionInDays) {
const logGroup = {

@@ -10,7 +10,8 @@ Type: 'AWS::Logs::LogGroup',

'/aws/lambda/',
{ Ref: functionName }
{ Ref: functionId }
]
]
}
}
},
DependsOn: [functionId]
};

@@ -17,0 +18,0 @@

'use strict';
module.exports = function makeResource(name, functionName, resourceOptions) {
module.exports = function makeResource(name, functionId, logGroupId, resourceOptions) {
const options = resourceOptions || {};
const dependencies = options.dependencies ? [].concat(options.dependencies) : [];
dependencies.push(functionName);
dependencies.push(functionId, logGroupId);

@@ -13,3 +13,3 @@ return {

ServiceToken: {
'Fn::GetAtt': [functionName, 'Arn']
'Fn::GetAtt': [functionId, 'Arn']
}

@@ -16,0 +16,0 @@ }),

{
"name": "add-custom-resource",
"version": "3.1.1",
"version": "3.1.2",
"description": "A helper library to add custom resources to a CloudFormation template",

@@ -5,0 +5,0 @@ "main": "add-custom-resource.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc