Skip to content

Update to pass callback for nodejs4.3 runtime#74

Merged
DeviaVir merged 8 commits intomotdotla:masterfrom
briandonahue:master
Apr 12, 2016
Merged

Update to pass callback for nodejs4.3 runtime#74
DeviaVir merged 8 commits intomotdotla:masterfrom
briandonahue:master

Conversation

@briandonahue
Copy link
Contributor

Fixes #70 - Passing along runtime to run method" and using a callback to handle success/fail/done scenarios. Added deprecation warning for context.[succeed,fail,done]() calls.

* Also output deprecation warning for older runtime
lib/main.js Outdated
succeed: function (result) {
console.log('succeed: ' + JSON.stringify(result));
process.exit(0);
if(isNode43) console.log('context.succeed() is deprecated with Node.js 4.3 runtime');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rewrite this as if (isNode43) { and the corresponding } on a newline?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also not entirely clear; it is deprecated, but can you still use it? Should we kill succeed/fail/done for anything isNode43?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeviaVir
Copy link
Collaborator

Would you mind updating https://github.com/motdotla/node-lambda/blob/master/README.md#run with this extra parameter as well? And perhaps make a note of what runtimes are currently available for both?

Greatly appreciating this work so far!

@briandonahue
Copy link
Contributor Author

OK, I also changed the default runtime to nodejs4.3 since that is now the recommended version, and I added some detail to the README. Not sure if we want to put a note in the README somewhere pointing to the docs re: the version differences?

@DeviaVir
Copy link
Collaborator

@briandonahue That would be great actually, could you add a new paragraph below https://github.com/motdotla/node-lambda#custom-environment-variables ?
Will merge this when that's in!

@DeviaVir DeviaVir merged commit 883aa60 into motdotla:master Apr 12, 2016
@DeviaVir
Copy link
Collaborator

Thanks @briandonahue!

@briandonahue
Copy link
Contributor Author

Sure thing - thanks to all the contributors, node-lambda has made playing with AWS Lambda stuff much easier!

DeviaVir added a commit that referenced this pull request Apr 18, 2016
* Added package command to create a local zip.

Exclude *.env files from being uploaded to amazon.
Exclude .git* to exclude .gitignore.
Exclude test from zip.
Exclude packageDirectory from zip if specified.

* added test for refactored _archive method.

* Add -e to not escape \n when echo'ing

* VpcConfig support:
- http://docs.aws.amazon.com/lambda/latest/dg/API_VpcConfig.html
- http://docs.aws.amazon.com/lambda/latest/dg/vpc.html
This allows users to place their Lambda functions in specific subnets with specific security groups.

* Use AWS API 2015-03-31:
- Check if the function exists, if it does update else create new
- This API provides compatibility with VpcConfig

* Only ignore deploy.env by default

* Updated readme: MODE is no longer a thing

* Throw on failures

* - Fix rsync namespaced error
- Add editorconfig
- Ignore editorconfig

* Update to pass callback for nodejs4.3 runtime (#74)

* Update to pass callback for nodejs4.3 runtime
* Default to recommended runtime
* Add note about runtimes
* Added note on how to target v0.10.36

* Runhandler: Hotfixes

* Runhandler: Hotfixes (#75)

* Post install script second atttempt

* Post install script

* Add '-x' / '--excludeGlobs' args for general file exclusion on deploy. (2) (#80)

This lets me e.g. exclude not only `.env` but by `.env.prod` / `.env.dev`
and any other junky / sample files that happen to live in the method's
directory.  Or for that matter to move all those files into a sub-
directory and exclude that.  Less policy, more flexibility.

* Excludes: Ignore *.swp (#81)

* Ignore .swp files by default. Remove redundant deploy.env ignore from the examples.

* Add option to create a sample file with a custom filename and fix the run command when running with a custom event file (#51)

* Feature/context file (#82)

* Add context.json example
* Add contextFile -x --contextFile parameter
* fix contextFile example filename
* update setup log message
* Runhandler: Hotfixes
* Reformat to match existing whitespace
*  more reformating to match existing whitespace
* revert version back to 0.7.1
* Fix indenting

* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants