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

@mapbox/cloudfriend

Package Overview
Dependencies
Maintainers
28
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mapbox/cloudfriend - npm Package Compare versions

Comparing version 7.3.0-5 to 7.3.0-6

.nyc_output/541ae060-2e88-4f15-a797-36f90bbf7afd.json

2

.nyc_output/processinfo/index.json

@@ -1,1 +0,1 @@

{"processes":{"11f7164b-7ffe-482b-97df-1421dd64f11d":{"parent":"1fd23852-2043-434f-bb39-a9052f67b4a6","children":[]},"1fd23852-2043-434f-bb39-a9052f67b4a6":{"parent":null,"children":["11f7164b-7ffe-482b-97df-1421dd64f11d"]}},"files":{"/Users/bilindhajer/cloudfriend/bin/build-template.js":["11f7164b-7ffe-482b-97df-1421dd64f11d"],"/Users/bilindhajer/cloudfriend/index.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/intrinsic.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/conditions.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/rules.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/pseudo.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/build.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/validate.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/merge.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/index.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/service-role.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/role.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/scheduled-lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/event-lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue-lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/stream-lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/cross-account-role.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/kinesis-firehose-base.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-database.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-table.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-json-table.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-orc-table.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-parquet-table.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-presto-view.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-spark-view.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/hookshot.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/log-subscription-lambda.js":["11f7164b-7ffe-482b-97df-1421dd64f11d","1fd23852-2043-434f-bb39-a9052f67b4a6"]},"externalIds":{}}
{"processes":{"541ae060-2e88-4f15-a797-36f90bbf7afd":{"parent":null,"children":["8f68394f-90ec-4f8c-8339-6c1c9278c571"]},"8f68394f-90ec-4f8c-8339-6c1c9278c571":{"parent":"541ae060-2e88-4f15-a797-36f90bbf7afd","children":[]}},"files":{"/Users/bilindhajer/cloudfriend/index.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/intrinsic.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/conditions.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/rules.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/pseudo.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/build.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/validate.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/merge.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/index.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/service-role.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/role.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/scheduled-lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/event-lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue-lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/stream-lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/cross-account-role.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/queue.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/s3-kinesis-firehose.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/kinesis-firehose-base.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-database.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-table.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-json-table.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-orc-table.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-parquet-table.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-presto-view.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/glue-spark-view.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/hookshot.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/lib/shortcuts/log-subscription-lambda.js":["541ae060-2e88-4f15-a797-36f90bbf7afd","8f68394f-90ec-4f8c-8339-6c1c9278c571"],"/Users/bilindhajer/cloudfriend/bin/build-template.js":["8f68394f-90ec-4f8c-8339-6c1c9278c571"]},"externalIds":{}}
'use strict';
const Lambda = require('./lambda');
const merge = require('../merge');
const ServiceRole = require('./service-role');

@@ -36,2 +38,3 @@ /**

const {
ScheduleRoleArn,
ScheduleExpression,

@@ -61,29 +64,30 @@ State = 'ENABLED'

},
Target: [
Target: {
Arn: {
'Fn::GetAtt': [this.LogicalName, 'Arn']
}
}
}
};
if (ScheduleRoleArn) {
this.Resources[`${this.LogicalName}EventBridgeSchedule`].Properties.Target.RoleArn = ScheduleRoleArn;
} else {
const serviceRole = new ServiceRole({
LogicalName: `${this.LogicalName}EventBridgeScheduleRole`,
Service: 'scheduler.amazonaws.com',
Condition: this.Condition,
Statement: [
{
Id: this.FunctionName,
Arn: {
'Fn::GetAtt': [this.LogicalName, 'Arn']
Effect: 'Allow',
Action: 'lambda:InvokeLambda',
Resource: {
'Fn::GetAtt': [`${this.LogicalName}Logs`, 'Arn']
}
}
]
}
};
this.Resources[`${this.LogicalName}Permission`] = {
Type: 'AWS::Lambda::Permission',
Condition: this.Condition,
Properties: {
Action: 'lambda:InvokeFunction',
FunctionName: {
'Fn::GetAtt': [this.LogicalName, 'Arn']
},
Principal: {
'Fn::Sub': 'events.${AWS::URLSuffix}'
},
SourceArn: {
'Fn::GetAtt': [`${this.LogicalName}EventBridgeSchedule`, 'Arn']
}
}
};
});
this.Resources[`${this.LogicalName}EventBridgeSchedule`].Properties.Target.RoleArn = { 'Fn::GetAtt': [`${this.LogicalName}EventBridgeScheduleRole`, 'Arn'] };
this.Resources = merge(this, serviceRole).Resources;
}
}

@@ -90,0 +94,0 @@ }

{
"name": "@mapbox/cloudfriend",
"version": "7.3.0-5",
"version": "7.3.0-6",
"description": "Helper functions for assembling CloudFormation templates in JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -31,3 +31,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -51,3 +51,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -54,0 +54,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -56,3 +56,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -59,0 +59,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -27,3 +27,3 @@ {

"DeploymentId": {
"Ref": "PassDeployment01229d54"
"Ref": "PassDeployment474705f9"
},

@@ -47,3 +47,3 @@ "StageName": "hookshot",

},
"PassDeployment01229d54": {
"PassDeployment474705f9": {
"Type": "AWS::ApiGateway::Deployment",

@@ -50,0 +50,0 @@ "DependsOn": "PassMethod",

@@ -131,3 +131,3 @@ {

},
"MyLambdaSchedule": {
"MyLambdaEventBridgeSchedule": {
"Type": "AWS::Scheduler::Schedule",

@@ -153,36 +153,54 @@ "Properties": {

},
"Target": [
{
"Id": {
"Fn::Sub": "${AWS::StackName}-MyLambda"
},
"Arn": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
]
}
"Target": {
"Arn": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
]
},
"RoleArn": {
"Fn::GetAtt": [
"MyLambdaEventBridgeScheduleRole",
"Arn"
]
}
]
}
}
},
"MyLambdaPermission": {
"Type": "AWS::Lambda::Permission",
"MyLambdaEventBridgeScheduleRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
"AssumeRolePolicyDocument": {
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Principal": {
"Service": {
"Fn::Sub": "scheduler.${AWS::URLSuffix}"
}
}
}
]
},
"Principal": {
"Fn::Sub": "events.${AWS::URLSuffix}"
},
"SourceArn": {
"Fn::GetAtt": [
"MyLambdaSchedule",
"Arn"
]
}
"Policies": [
{
"PolicyName": "main",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "lambda:InvokeLambda",
"Resource": {
"Fn::GetAtt": [
"MyLambdaLogs",
"Arn"
]
}
}
]
}
}
]
}

@@ -189,0 +207,0 @@ }

@@ -131,3 +131,3 @@ {

},
"MyLambdaSchedule": {
"MyLambdaEventBridgeSchedule": {
"Type": "AWS::Scheduler::Schedule",

@@ -153,36 +153,54 @@ "Properties": {

},
"Target": [
{
"Id": {
"Fn::Sub": "${AWS::StackName}-MyLambda"
},
"Arn": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
]
}
"Target": {
"Arn": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
]
},
"RoleArn": {
"Fn::GetAtt": [
"MyLambdaEventBridgeScheduleRole",
"Arn"
]
}
]
}
}
},
"MyLambdaPermission": {
"Type": "AWS::Lambda::Permission",
"MyLambdaEventBridgeScheduleRole": {
"Type": "AWS::IAM::Role",
"Properties": {
"Action": "lambda:InvokeFunction",
"FunctionName": {
"Fn::GetAtt": [
"MyLambda",
"Arn"
"AssumeRolePolicyDocument": {
"Statement": [
{
"Effect": "Allow",
"Action": "sts:AssumeRole",
"Principal": {
"Service": {
"Fn::Sub": "scheduler.${AWS::URLSuffix}"
}
}
}
]
},
"Principal": {
"Fn::Sub": "events.${AWS::URLSuffix}"
},
"SourceArn": {
"Fn::GetAtt": [
"MyLambdaSchedule",
"Arn"
]
}
"Policies": [
{
"PolicyName": "main",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "lambda:InvokeLambda",
"Resource": {
"Fn::GetAtt": [
"MyLambdaLogs",
"Arn"
]
}
}
]
}
}
]
}

@@ -189,0 +207,0 @@ }

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

},
ScheduledRoleArn: 'arn:aws:iam::012345678901:role/MyCoolRole',
ScheduleExpression: 'rate(1 hour)',

@@ -339,0 +340,0 @@ State: 'DISABLED'

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