dynamo-types-stream
Advanced tools
Comparing version 2.0.0 to 2.1.0
export * from "./dynamodb_stream_event"; | ||
export * from "./handler"; | ||
export * from "./lambda_context"; | ||
export * from "./stream_handler"; | ||
export * from "./table_handler"; |
@@ -0,3 +1,3 @@ | ||
import { Context } from "aws-lambda"; | ||
import { DynamoDBStreamEvent } from "./dynamodb_stream_event"; | ||
import { LambdaContext } from "./lambda_context"; | ||
import { TableHandler } from "./table_handler"; | ||
@@ -8,3 +8,3 @@ export declare class StreamHandler { | ||
readonly handler: (event: DynamoDBStreamEvent) => Promise<void>; | ||
readonly lambdaHandler: (event: DynamoDBStreamEvent, context: LambdaContext) => Promise<void>; | ||
readonly lambdaHandler: (event: DynamoDBStreamEvent, context: Context) => Promise<void>; | ||
} | ||
@@ -11,0 +11,0 @@ /** |
@@ -41,3 +41,4 @@ "use strict"; | ||
return async (event, context) => { | ||
await this.handler(event).then(() => context.succeed(), (error) => context.fail(error)); | ||
context.callbackWaitsForEmptyEventLoop = false; | ||
return await this.handler(event); | ||
}; | ||
@@ -44,0 +45,0 @@ } |
{ | ||
"name": "dynamo-types-stream", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "DynamoDB Stream Framework", | ||
@@ -8,9 +8,12 @@ "main": "./dst/index.js", | ||
"scripts": { | ||
"build": "rm -Rf dst && tsc -d && cd src && find . -name '*.json' -type f -exec cp {} ../dst/{} \\; && cd ..", | ||
"clean": "rm -rf dst", | ||
"prebuild": "npm run clean", | ||
"build:copy": "cd src && find . -name '*.json' -type f -exec cp {} ../dst/{} \\; && cd ..", | ||
"build": "tsc && npm run build:copy", | ||
"dynamodb:cleanup": "(test -e $TMPDIR/dynamodb-local.pid && pkill -SIGINT -P $(cat $TMPDIR/dynamodb-local.pid)); rm -f $TMPDIR/dynamodb-local.pid", | ||
"dynamodb:setup": "node $(npm bin)/local-dynamo --port 8000 & echo $! > $TMPDIR/dynamodb-local.pid; sleep 3", | ||
"pretest": "rm -Rf dst && tsc -p ./tsconfig.test.json && cd src && find . -name '*.json' -type f -exec cp {} ../dst/{} \\; && cd .. && npm run dynamodb:cleanup && npm run dynamodb:setup", | ||
"pretest": "tsc -p tsconfig.test.json && npm run build:copy && npm run dynamodb:cleanup && npm run dynamodb:setup", | ||
"test": "AWS_REGION=us-east-1 AWS_ACCESS_KEY_ID=mock AWS_SECRET_ACCESS_KEY=mock DYNAMO_TYPES_ENDPOINT=http://127.0.0.1:8000 mocha -t 20000 dst/**/__test__/**/*.js", | ||
"posttest": "npm run dynamodb:cleanup", | ||
"prepublish": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"lint": "tslint -p tsconfig.json -c tslint.json 'src/**/*.ts'" | ||
@@ -24,6 +27,3 @@ }, | ||
"devDependencies": { | ||
"@types/aws-lambda": "^8.10.27", | ||
"@types/chai": "4.1.7", | ||
"@types/chai-as-promised": "0.0.29", | ||
"@types/cli-color": "0.3.29", | ||
"@types/debug": "4.1.4", | ||
@@ -36,3 +36,3 @@ "@types/faker": "^4.1.5", | ||
"chai": "4.2.0", | ||
"debug": "4.1.1", | ||
"debug": "^4.1.1", | ||
"dynamo-local": "0.0.4", | ||
@@ -47,6 +47,7 @@ "dynamo-types": "^2.7.0", | ||
"peerDependencies": { | ||
"dynamo-types": ">= 2.5.0", | ||
"debug": ">= 3.0.0" | ||
"dynamo-types": ">= 2.5.0" | ||
}, | ||
"dependencies": {} | ||
"dependencies": { | ||
"@types/aws-lambda": "^8.10.27" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
16
25126
17
328
+ Added@types/aws-lambda@^8.10.27
+ Added@types/aws-lambda@8.10.147(transitive)
- Removeddebug@4.4.0(transitive)
- Removedms@2.1.3(transitive)