7.0.6 • Published 3 years ago

aws-lambda-handler-factory v7.0.6

Weekly downloads
31
License
ISC
Repository
-
Last release
3 years ago

SLS handler factory

Some helpers for easily manage AWS Lambda handlers creation.

Prerequisites

Requires aws-sdk package (if executed in AWS Lambda, it is already installed).

npm install --save-dev aws-sdk

Usage

For detailed documentation, look typescript files.

The main class is HandlerFactory, this is a handlers factory, and adds some sugar, as an event emitter, async callbacks and simple async handler manage.

import {HandlerFactory} from 'sls-handler-factory';
const factory = new HandlerFactory();
factory.eventEmitter.on('error', (err) => console.log(err.stack));
factory.callbacks.onSucceeded(async () => {
	// Here you can handle infrastructure, e.g. here you could persist the domain state.
});
export const handle = factory.build(async (input, ctx) => {
	// Here lies your domain logic.
});

npm scripts

Build the js files from typescript:

npm run build

Running tests:

npm run test

Running style check:

npm run style

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

License

This project is licensed under the ISC License - see the LICENSE.md file for details

7.0.6

3 years ago

7.0.5

3 years ago

7.0.3-2

3 years ago

7.0.3-3

3 years ago

7.0.3-4

3 years ago

7.0.3

3 years ago

7.0.3-0

3 years ago

7.0.3-1

3 years ago

6.0.0

3 years ago

7.0.2-0

3 years ago

4.2.0

3 years ago

5.0.0

3 years ago

4.1.3

4 years ago

4.1.2

4 years ago

4.1.1

4 years ago

4.1.0

4 years ago

4.0.1

4 years ago

4.0.2

4 years ago

4.0.0

4 years ago

3.2.0

4 years ago

4.0.0-10

4 years ago

4.0.0-8

4 years ago

4.0.0-9

4 years ago

4.0.0-7

4 years ago

4.0.0-6

4 years ago

4.0.0-5

5 years ago

4.0.0-4

5 years ago

4.0.0-3

5 years ago

4.0.0-2

5 years ago

4.0.0-1

5 years ago

4.0.0-0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.3

5 years ago

2.1.2

5 years ago

2.1.1

5 years ago

2.1.0

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.7.0

5 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.2-0

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-15

5 years ago

1.0.0-14

5 years ago

1.0.0-13

5 years ago

1.0.0-12

5 years ago

1.0.0-11

5 years ago

1.0.0-10

5 years ago

1.0.0-9

5 years ago

1.0.0-8

5 years ago

1.0.0-7

5 years ago

1.0.0-6

5 years ago

1.0.0-5

6 years ago

1.0.0-4

6 years ago

1.0.0-3

6 years ago

1.0.0-2

6 years ago

1.0.0-1

6 years ago

1.0.0-0

6 years ago