19 Commits

Author SHA1 Message Date
Frank Schmid d0518a0f99 Fixed v2 unit tests 2017-09-08 17:14:21 +02:00
Frank Schmid 1a116f4044 Fixed unit tests 2017-08-01 21:31:34 +02:00
Gady e7531dcebd Do not add .js extension to entries values (#167)
* Do not add .js extension to entries values

* Find entries extension from filename

* Better filesearch performance

* Add warning for multiple files found

* Do not match directories

* Added unit tests. Throw error if handler is not found.

* Fixed examples

* Use preference sorting to find the most probable handler for multiple hits
2017-07-28 11:40:08 +02:00
Gady ceaf43ca74 Expose service and options for dynamicity (#168)
* Expose service and options for dynamicity

* Expose the whole serverless object

* Added unit tests for new exports.

* Added some notes to the README
2017-07-27 20:38:04 +02:00
Gady f27d1c2aae Fixed package individually:true (#163)
* Fixed package individually:true

* Fixed issue with SLS <1.18. Updated unit tests.

* Removed debug logging
2017-07-27 11:23:11 +02:00
Francisco GuimarĂ£es 22a460d8b1 Integration with deploy package function (#130)
* Deploy  package function

* Listen pipe and reject pipe errors

* using once instead of on

* Fix babel example

* - Adding babel-multiple-statically-entries example
- Renaming multiple-entries-example to multiple-statically-entries

* Exposing entries to lib

*  Adding babel-dynamically-entries examples

* - Updating examples dependencies
- Adding yarn to examples
- Fix typescript example

*  Adding tests

* Removed yarn lock file. yarn should use package-lock.json

* Allow handlers in arbitrary paths. Use lodash and SLS functions.

* Adapted unit tests

* Mention new entry resolution in README

* Bundle names now contain the js ending. Fixed output in examples.
2017-07-26 22:42:15 +02:00
Frank Schmid c7d9cd584a Added tests for cleanup and updated test tools (#160)
* Cleanup compile unit tests. Update test framework.

* Updated test tools. Added unit test for cleanup. Refactored unit tests.

* Added lodash to dependencies

* Updated package-lock.json
2017-07-24 19:42:44 +02:00
daikikohara ba864c08bd Fix naming problem for lambda-proxy
path parameter for lambda-proxy is passed as event.pathParameters
instead of event.path.
2016-12-23 17:19:21 -08:00
Steven Yap 66662cef9a Server to cater to Lambda Proxy response
If lambda proxy is enabled (which is by default in Serverless),
the response returned in the lambda callback must be of the form:

```json
{
  statusCode: 200,
  body: { /** data **/ }
}
```

The current server sends the entire response without separating
the statusCode and body which is what this commit does.

Ideally, we should detect if the lambda is using lambda proxy or not
but I cannot find the flag to detect this setting.
2016-11-29 11:13:58 +08:00
Steven Yap d0df9d2f88 Rename request query as queryStringParameter in API event
AWS API Gateway passes GET query as event.queryStringParameter
instead of event.query. This commit fixes the naming issue.
2016-11-25 16:02:07 +08:00
Janic Duplessis 12032180af Properly send CORS headers for options request 2016-08-27 18:27:25 -04:00
Nicola Peduzzi be51640b67 Covered serve module 2016-08-19 17:59:31 +02:00
Nicola Peduzzi 8c10bee00c Adding tests for part of serve module 2016-08-19 15:25:48 +02:00
Nicola Peduzzi 6940c496bd Use serverless cli consoleLog 2016-08-19 14:21:32 +02:00
Nicola Peduzzi 62f9cda2cc Fix run tests for new multiple-entrypoints 2016-08-19 12:55:28 +02:00
Nicola Peduzzi 0db7b745df Covered run module 2016-08-19 11:54:42 +02:00
Nicola Peduzzi 78a8b39499 Covered compile module 2016-08-19 01:13:04 +02:00
Nicola Peduzzi 8e0a5edc82 Covered validate module 2016-08-19 00:28:38 +02:00
Nicola Peduzzi 01ab3ca06b Setup tests 2016-08-18 18:24:00 +02:00