Skip to content

Commit 9c6b988

Browse files
committed
clean readme, update examples
1 parent bd24855 commit 9c6b988

22 files changed

+451
-407
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
66

7+
## [1.0.10]  (2019-09-08)
8+
9+
### Added
10+
11+
- Example projects using the latest version of the library
12+
13+
### Changed
14+
15+
- Clean up documentation
16+
717
## [1.0.9]  (2019-09-07)
818

919
### Changed

README.md

Lines changed: 113 additions & 244 deletions
Large diffs are not rendered by default.

examples/ts/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Lambda Wrapper TypeScript example
2+
3+
### Install dependencies
4+
5+
`npm i`
6+
7+
`yarn install`
8+
9+
### Deploy application
10+
11+
`npm run deploy`
12+
13+
`yarn run deploy`

examples/ts/app/api.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { api } from '@manwaring/lambda-wrapper';
2+
import 'source-map-support/register';
3+
4+
export const handler = api(async ({ event, success, error }) => {
5+
try {
6+
return success(event);
7+
} catch (err) {
8+
return error(err);
9+
}
10+
});

examples/ts/handlers/authorizer.ts renamed to examples/ts/app/authorizer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { authorizer, AuthorizerSignature } from '@manwaring/lambda-wrapper';
1+
import { authorizer } from '@manwaring/lambda-wrapper';
22
import 'source-map-support/register';
33

4-
export const handler = authorizer(async ({ token, valid, invalid, error }: AuthorizerSignature) => {
4+
export const handler = authorizer(async ({ token, valid, invalid, error }) => {
55
try {
66
if (!token) {
77
return invalid('Missing token');

examples/ts/app/cloudformation.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { cloudFormation } from '@manwaring/lambda-wrapper';
2+
import 'source-map-support/register';
3+
4+
export const handler = cloudFormation(async ({ event, success, failure }) => {
5+
try {
6+
return success(event);
7+
} catch (err) {
8+
return failure(err);
9+
}
10+
});

examples/ts/app/dynamodb.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { dynamodbStream } from '@manwaring/lambda-wrapper';
2+
import 'source-map-support/register';
3+
4+
export const handler = dynamodbStream(async ({ newVersions, success, error }) => {
5+
try {
6+
return success(newVersions);
7+
} catch (err) {
8+
return error(err);
9+
}
10+
});

examples/ts/app/generic.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { wrapper } from '@manwaring/lambda-wrapper';
2+
import 'source-map-support/register';
3+
4+
export const handler = wrapper(async ({ event, success, error }) => {
5+
try {
6+
success(event);
7+
} catch (err) {
8+
error(err);
9+
}
10+
});

examples/ts/app/sns.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { sns } from '@manwaring/lambda-wrapper';
2+
import 'source-map-support/register';
3+
4+
export const handler = sns(async ({ success, error }) => {
5+
try {
6+
return success();
7+
} catch (err) {
8+
return error(err);
9+
}
10+
});

examples/ts/handlers/api.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)