New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lambda-error-sns-sender

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambda-error-sns-sender - npm Package Compare versions

Comparing version 0.0.39 to 0.0.40

52

lib/cloudFormationExport.js

@@ -45,9 +45,3 @@ "use strict";

}
const snsErrorFunc = lambdaErrorSnsSender.node.findChild('lambdaSnsError');
// const lambdaPermissions = snsErrorFunc.node
// .findAll()
// .filter(
// (s) => s instanceof lambda.CfnPermission
// ) as lambda.CfnPermission[];
//for (const lambdaPermission of lambdaPermissions) {
const snsErrorFunc = this.node.findChild('lambdaSnsError');
for (const lambdaPermission of snsErrorFunc.permissionsNode.children) {

@@ -91,35 +85,7 @@ if (lambdaPermission instanceof lambda.CfnPermission) {

}
// console.log('statement.resources', statement.resources);
// if (statement && statement.condition.stringEquals) {
// const condition = statement.condition.stringEquals;
// if (
// condition['aws:SourceArn'] &&
// conditionsDict[condition['aws:SourceArn']]
// ) {
// statement.condition = conditionsDict[condition['aws:SourceArn']];
// }
// }
}
// set logical id to override the default logical id of snsErrorFunc
// (snsErrorFunc.node.defaultChild as lambda.CfnFunction).overrideLogicalId(
// 'lambda-sns-error'
// );
//console.log(snsErrorFunc.permissionsNode.children);
setNodeNames(this.node.children);
//let i = 0;
//for (const construct of snsErrorFunc.node.children) {
// for (const construct of snsErrorFunc.permissionsNode.children) {
// if (construct instanceof lambda.CfnPermission) {
// construct.overrideLogicalId(`${snsErrorFunc.node.id}${i}`);
// i++;
// }
// }
lambdaPolicy.policyDocument = {
Statement: newPolicyStatements,
};
// const l = lambdaErrorSnsSender.node.findChild('lambda-sns-error');
// console.log(l);
// (l.node.defaultChild as lambda.CfnFunction).overrideLogicalId(
// 'lambda-sns-error'
// );
setNodeNames(this.node.children);
}

@@ -138,14 +104,4 @@ }

for (const construct of constructs) {
//console.log(construct.node.id);
let newParentName = parentName;
// console.log(' construct instanceof Node = ' + (construct instanceof Node));
// if (construct instanceof Node) {
// console.log(
// ' construct.defaultChild instanceof cdk.CfnElement = ' +
// (construct.defaultChild instanceof cdk.CfnElement)
// );
// }
if (
//construct instanceof Node &&
construct.node.defaultChild instanceof cdk.CfnElement) {
if (construct.node.defaultChild instanceof cdk.CfnElement) {
newParentName = parentName

@@ -163,2 +119,2 @@ ? `${parentName}${construct.node.id}`

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xvdWRGb3JtYXRpb25FeHBvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvY2xvdWRGb3JtYXRpb25FeHBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkNBTXFCO0FBQ3JCLG1DQUFtQztBQUNuQywyQ0FBMkM7QUFDM0MsaURBQWlEO0FBQ2pELDJDQUEyQztBQUUzQyxtQ0FBK0M7QUFFL0MsTUFBYSx5QkFBMEIsU0FBUSxtQkFBSztJQUNsRCxZQUFZLEtBQWdCLEVBQUUsRUFBVSxFQUFFLFFBQW9CLEVBQUU7UUFDOUQsS0FBSyxDQUFDLEtBQUssRUFBRSxFQUFFLEVBQUUsS0FBSyxDQUFDLENBQUM7UUFFeEIsTUFBTSxjQUFjLEdBQUcsQ0FBQyxDQUFDO1FBQ3pCLE1BQU0sU0FBUyxHQUFnQixFQUFFLENBQUM7UUFDbEMsTUFBTSxjQUFjLEdBQXFDLEVBQUUsQ0FBQztRQUU1RCxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLElBQUksY0FBYyxFQUFFLENBQUMsRUFBRSxFQUFFO1lBQ3hDLE1BQU0sZ0JBQWdCLEdBQUcsSUFBSSwwQkFBWSxDQUFDLElBQUksRUFBRSxjQUFjLENBQUMsRUFBRSxFQUFFO2dCQUNqRSxJQUFJLEVBQUUsUUFBUTtn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hbWVzKGNvbnN0cnVjdHM6IElDb25zdHJ1Y3RbXSwgcGFyZW50TmFtZT86IHN0cmluZykge1xuICBsZXQgaSA9IDA7XG4gIGZvciAoY29uc3QgY29uc3RydWN0IG9mIGNvbnN0cnVjdHMpIHtcbiAgICBsZXQgbmV3UGFyZW50TmFtZSA9IHBhcmVudE5hbWU7XG5cbiAgICBpZiAoY29uc3RydWN0Lm5vZGUuZGVmYXVsdENoaWxkIGluc3RhbmNlb2YgY2RrLkNmbkVsZW1lbnQpIHtcbiAgICAgIG5ld1BhcmVudE5hbWUgPSBwYXJlbnROYW1lXG4gICAgICAgID8gYCR7cGFyZW50TmFtZX0ke2NvbnN0cnVjdC5ub2RlLmlkfWBcbiAgICAgICAgOiBjb25zdHJ1Y3Qubm9kZS5pZDtcbiAgICAgIGNvbnN0cnVjdC5ub2RlLmRlZmF1bHRDaGlsZC5vdmVycmlkZUxvZ2ljYWxJZChuZXdQYXJlbnROYW1lKTtcbiAgICB9XG5cbiAgICBpZiAoY29uc3RydWN0IGluc3RhbmNlb2YgbGFtYmRhLkNmblBlcm1pc3Npb24pIHtcbiAgICAgIGNvbnN0cnVjdC5vdmVycmlkZUxvZ2ljYWxJZChgJHtuZXdQYXJlbnROYW1lfVBlcm1pc3Npb24ke2l9YCk7XG4gICAgICBpKys7XG4gICAgfVxuXG4gICAgc2V0Tm9kZU5hbWVzKGNvbnN0cnVjdC5ub2RlLmNoaWxkcmVuLCBuZXdQYXJlbnROYW1lKTtcbiAgfVxufVxuIl19

2

lib/index.js

@@ -59,3 +59,3 @@ "use strict";

_a = JSII_RTTI_SYMBOL_1;
LambdaErrorSnsSender[_a] = { fqn: "lambda-error-sns-sender.LambdaErrorSnsSender", version: "0.0.39" };
LambdaErrorSnsSender[_a] = { fqn: "lambda-error-sns-sender.LambdaErrorSnsSender", version: "0.0.40" };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290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XSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgKSxcbiAgICAgIH07XG5cbiAgICAgIHNuc1RvcGljLmFkZFN1YnNjcmlwdGlvbihcbiAgICAgICAgbmV3IHN1YnNjcmlwdGlvbi5MYW1iZGFTdWJzY3JpcHRpb24oc25zRXJyb3JGdW5jLCB7XG4gICAgICAgICAgZmlsdGVyUG9saWN5V2l0aE1lc3NhZ2VCb2R5OiB7XG4gICAgICAgICAgICBUcmlnZ2VyOiBzbnMuRmlsdGVyT3JQb2xpY3kucG9saWN5KHByb3BzLmZpbHRlciA/PyBkZWZhdWx0RmlsdGVyKSxcbiAgICAgICAgICB9LFxuICAgICAgICB9KSxcbiAgICAgICk7XG5cbiAgICAgIHNuc1RvcGljLmdyYW50UHVibGlzaChzbnNFcnJvckZ1bmMpO1xuICAgIH1cbiAgfVxufVxuIl19

@@ -87,3 +87,3 @@ {

"license": "Apache-2.0",
"version": "0.0.39",
"version": "0.0.40",
"types": "lib/index.d.ts",

@@ -90,0 +90,0 @@ "stability": "stable",

import * as fs from 'fs';
import * as path from 'path';
import * as stream from 'stream';
import { S3Client, PutObjectCommand } from '@aws-sdk/client-s3';

@@ -36,3 +35,3 @@ import * as archiver from 'archiver';

'cdk.out/lambda-error-sns-sender-cf.assets.json',
'utf-8'
'utf-8',
);

@@ -70,3 +69,3 @@ const assets: Assets = JSON.parse(jsonFile);

cloudFromationOutputYamlFileName,
assetsFiles
assetsFiles,
);

@@ -78,3 +77,3 @@ }

objectKey: string,
assetsFiles: string[]
assetsFiles: string[],
) {

@@ -89,5 +88,3 @@ console.log(`Converting to yaml and uploading ${fullPath} to ${objectKey}`);

const resource = json.Resources[key];
//console.log(`** Resource ${key} is ${JSON.stringify(resource)}`);
const s3Key = resource.Properties?.Code?.S3Key;
//console.log(`Checking ${key} for ${s3Key}`);

@@ -97,4 +94,4 @@ if (s3Key && assetsFiles.includes(s3Key)) {

`Replacing ${JSON.stringify(
json.Resources[key].Properties.Code.S3Bucket
)} with ${bucketName} for resource ${s3Key}`
json.Resources[key].Properties.Code.S3Bucket,
)} with ${bucketName} for resource ${s3Key}`,
);

@@ -156,3 +153,3 @@ json.Resources[key].Properties.Code.S3Bucket = bucketName;

sourceFolder: string,
zipFilePath: string
zipFilePath: string,
): Promise<void> {

@@ -159,0 +156,0 @@ const output = fs.createWriteStream(zipFilePath);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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