lambda-wrap
Advanced tools
Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3
@@ -46,6 +46,31 @@ | ||
function lambdaHandler (event: Object, context: Object, callback: Function) : void | ||
function lambdaHandler (event: Object, context: Object, callback: Function): void | ||
function wrapFn (wrapperFunction: (event: ServerlessLambdaEvent, context: Object) => Promise) : lambdaHandler; | ||
interface wrapperFunctionType { (event: ServerlessLambdaEvent, context: Object): any } | ||
interface Logger { | ||
log (...args:any[]): any | ||
error (...args:any[]): any | ||
warn (...args:any[]): any | ||
} | ||
export function lambdaWrap(options: LambdaWrapOptions) : wrapFn; | ||
interface responseHandlerType { (data: Object, event: ServerlessLambdaEvent, context: Object, callback: Function, logger?: Logger, options?: LambdaWrapOptions): any } | ||
interface errorResponseHandlerType { (error: Error, event: ServerlessLambdaEvent, context: Object, callback: Function, logger?: Logger, options?: LambdaWrapOptions): any } | ||
interface beforeMiddlewareType { (event: ServerlessLambdaEvent, context?: Object): any } | ||
interface catchMiddlewareType { (error: Error, event?: ServerlessLambdaEvent, context?: Object): any } | ||
interface finallyMiddlewareType { (error?: Error, response?: Object, event?: ServerlessLambdaEvent, context?: Object): any } | ||
interface wrapFn { | ||
(wrapperFunction: wrapperFunctionType): lambdaHandler | ||
logger: Logger | ||
responseHandler: responseHandler | ||
errorResponseHandler: responseHandler | ||
before (beforeMiddleware: beforeMiddlewareType): void | ||
catch (catchMiddleware: catchMiddlewareType): void | ||
finally (finallyMiddleware: finallyMiddlewareType): void | ||
}; | ||
export function lambdaWrap(options: LambdaWrapOptions): wrapFn; |
{ | ||
"name": "lambda-wrap", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0-alpha.3", | ||
"description": "AWS Serverless wrapper for async generators", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32259
663