-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix unsecure dependencies * Replace eslint by standard * Update serverless version * Add SQS support to README and provide examples * Update dependencies * Add IoT support * Add integration tests * Add unit tests * Add Github templates * Add husky hooks * Adjust travis node versions to match Lambda runtimes
- Loading branch information
Showing
38 changed files
with
6,847 additions
and
1,911 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
(Thanks for reporting an issue! Please, then fill out the blanks below.) | ||
|
||
What are the steps to reproduce this issue? | ||
------------------------------------------- | ||
1. … | ||
2. … | ||
3. … | ||
|
||
What happens? | ||
------------- | ||
… | ||
|
||
What were you expecting to happen? | ||
---------------------------------- | ||
… | ||
|
||
Any logs, error output, etc? | ||
---------------------------- | ||
(If it’s long, please paste to https://pastebin.com/ and insert the link here.) | ||
|
||
|
||
Any other comments? | ||
------------------- | ||
… | ||
|
||
What versions of software are you using? | ||
---------------------------------------- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
## Proposed changes | ||
|
||
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue. | ||
|
||
## Types of changes | ||
|
||
What types of changes does your code introduce to the plugin? | ||
_Put an `x` in the boxes that apply_ | ||
|
||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
|
||
## Checklist | ||
|
||
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._ | ||
|
||
- [ ] Lint and unit tests pass locally with my changes | ||
- [ ] I have added tests that prove my fix is effective or that my feature works | ||
- [ ] I have added necessary documentation (if appropriate) | ||
|
||
## Further comments | ||
|
||
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ node_modules | |
.serverless_plugins | ||
mappings.json | ||
serverless-plugin-canary-deployments*.tgz | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
module.exports.hello = (event, context, callback) => { | ||
if ((event.queryStringParameters || {}).error) callback(new Error('Oh no!')); | ||
console.log('The first version'); | ||
if ((event.queryStringParameters || {}).error) callback(new Error('Oh no!')) | ||
console.log('The first version') | ||
const response = { | ||
statusCode: 200, | ||
body: JSON.stringify({ | ||
message: 'The first version' | ||
}) | ||
}; | ||
return callback(null, response); | ||
}; | ||
} | ||
return callback(null, response) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
const aws = require('aws-sdk'); | ||
const codedeploy = new aws.CodeDeploy({apiVersion: '2014-10-06'}); | ||
const aws = require('aws-sdk') | ||
const codedeploy = new aws.CodeDeploy({ apiVersion: '2014-10-06' }) | ||
|
||
module.exports.pre = (event, context, callback) => { | ||
var deploymentId = event.DeploymentId; | ||
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId; | ||
var deploymentId = event.DeploymentId | ||
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId | ||
|
||
console.log('Check some stuff before shifting traffic...'); | ||
console.log('Check some stuff before shifting traffic...') | ||
|
||
var params = { | ||
deploymentId: deploymentId, | ||
lifecycleEventHookExecutionId: lifecycleEventHookExecutionId, | ||
status: 'Succeeded' // status can be 'Succeeded' or 'Failed' | ||
}; | ||
deploymentId: deploymentId, | ||
lifecycleEventHookExecutionId: lifecycleEventHookExecutionId, | ||
status: 'Succeeded' // status can be 'Succeeded' or 'Failed' | ||
} | ||
|
||
return codedeploy.putLifecycleEventHookExecutionStatus(params).promise() | ||
.then(data => callback(null, 'Validation test succeeded')) | ||
.catch(err => callback('Validation test failed')); | ||
}; | ||
.catch(() => callback(new Error('Validation test failed'))) | ||
} | ||
|
||
module.exports.post = (event, context, callback) => { | ||
var deploymentId = event.DeploymentId; | ||
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId; | ||
var deploymentId = event.DeploymentId | ||
var lifecycleEventHookExecutionId = event.LifecycleEventHookExecutionId | ||
|
||
console.log('Check some stuff after shifting traffic...'); | ||
console.log('Check some stuff after shifting traffic...') | ||
|
||
var params = { | ||
deploymentId: deploymentId, | ||
lifecycleEventHookExecutionId: lifecycleEventHookExecutionId, | ||
status: 'Succeeded' // status can be 'Succeeded' or 'Failed' | ||
}; | ||
deploymentId: deploymentId, | ||
lifecycleEventHookExecutionId: lifecycleEventHookExecutionId, | ||
status: 'Succeeded' // status can be 'Succeeded' or 'Failed' | ||
} | ||
|
||
return codedeploy.putLifecycleEventHookExecutionStatus(params).promise() | ||
.then(data => callback(null, 'Validation test succeeded')) | ||
.catch(err => callback('Validation test failed')); | ||
}; | ||
.catch(() => callback(new Error('Validation test failed'))) | ||
} |
Oops, something went wrong.