@cfn-modules/lambda-function
Advanced tools
| env: | ||
| es6: true | ||
| node: true | ||
| extends: 'eslint:recommended' | ||
| parserOptions: | ||
| ecmaVersion: 2017 | ||
| rules: | ||
| no-console: 0 | ||
| indent: | ||
| - error | ||
| - 2 | ||
| linebreak-style: | ||
| - error | ||
| - unix | ||
| quotes: | ||
| - error | ||
| - single | ||
| semi: | ||
| - error | ||
| - always |
| --- | ||
| AWSTemplateFormatVersion: '2010-09-09' | ||
| Description: 'cfn-modules test' | ||
| Resources: | ||
| Function: | ||
| Type: 'AWS::CloudFormation::Stack' | ||
| Properties: | ||
| Parameters: | ||
| Handler: 'defaults.handler' | ||
| Runtime: 'nodejs8.10' | ||
| TemplateURL: './node_modules/@cfn-modules/lambda-function/module.yml' |
| exports.handler = async function(event) { | ||
| console.log(JSON.stringify(event)); | ||
| return true; | ||
| }; |
| { | ||
| "private": true, | ||
| "dependencies": { | ||
| "eslint": "5.6.0", | ||
| "ava": "0.25.0", | ||
| "@cfn-modules/test": "0.2.0", | ||
| "@cfn-modules/lambda-function": "file:../" | ||
| }, | ||
| "scripts": { | ||
| "test": "eslint . && ava -c 4 *.js" | ||
| } | ||
| } |
+13
| const test = require('ava'); | ||
| const cfntest = require('@cfn-modules/test'); | ||
| test('defaults', async t => { | ||
| const stackName = cfntest.stackName(); | ||
| try { | ||
| t.log(await cfntest.createStack(`${__dirname}/defaults.yml`, stackName, {})); | ||
| // what could we test here? | ||
| } finally { | ||
| t.log(await cfntest.deleteStack(stackName)); | ||
| t.pass(); | ||
| } | ||
| }); |
+1
-1
@@ -10,3 +10,3 @@ --- | ||
| - 'yamllint module.yml' | ||
| - 'cfn-lint -i E3002 E2507 -t module.yml' # TODO false positives in rules E3002 E2507 | ||
| - 'cfn-lint -i W3002 -t module.yml' | ||
| - 'grep -q "LICENSE-2.0" module.yml' |
+1
-1
@@ -242,3 +242,3 @@ --- | ||
| ModuleVersion: | ||
| Value: '0.0.20' | ||
| Value: '1.0.0' | ||
| StackName: | ||
@@ -245,0 +245,0 @@ Value: !Ref 'AWS::StackName' |
+1
-1
| { | ||
| "name": "@cfn-modules/lambda-function", | ||
| "version": "0.0.20", | ||
| "version": "1.0.0", | ||
| "description": "AWS Lambda function with automated IAM policy generation, encryption, log group and alerting", | ||
@@ -5,0 +5,0 @@ "author": "Michael Wittig <michael@widdix.de>", |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
30931
4.05%12
71.43%16
Infinity%0
-100%0
-100%