@laconia/core
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "@laconia/core", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Micro dependency injection framework", | ||
@@ -26,4 +26,7 @@ "keywords": [ | ||
}, | ||
"dependencies": { | ||
"@types/aws-lambda": "8.10.31" | ||
}, | ||
"devDependencies": { | ||
"@laconia/test-helper": "^1.3.0" | ||
"@laconia/test-helper": "^1.4.0" | ||
}, | ||
@@ -39,3 +42,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "fe5ff54724512662a0f9408b0cd46f7acd6b9f90" | ||
"gitHead": "c263e43fd30041b1b86b170f96bd1a0601df0797" | ||
} |
@@ -1,26 +0,31 @@ | ||
declare type FactoryCacheOptions = { | ||
enabled?: boolean; | ||
maxAge?: number; | ||
}; | ||
import { Handler, Context } from "aws-lambda"; | ||
declare type FactoryOptions = { cache?: FactoryCacheOptions }; | ||
declare namespace laconia { | ||
type FactoryCacheOptions = { | ||
enabled?: boolean; | ||
maxAge?: number; | ||
}; | ||
declare type LaconiaContext = { | ||
[key: string]: any; | ||
}; | ||
type FactoryOptions = { cache?: FactoryCacheOptions }; | ||
declare type LaconiaFactory<Dependencies = any> = ( | ||
laconiaContext: LaconiaContext | ||
) => Promise<Dependencies> | Dependencies; | ||
type LaconiaContext = { | ||
[key: string]: any; | ||
event?: any; | ||
context?: Context; | ||
}; | ||
declare interface LaconiaHandler { | ||
register( | ||
factory: LaconiaFactory | LaconiaFactory[], | ||
options?: FactoryOptions | ||
): LaconiaHandler; | ||
(event: any, context: any, callback: any): any; | ||
type LaconiaFactory<Dependencies = any> = ( | ||
laconiaContext: LaconiaContext | ||
) => Promise<Dependencies> | Dependencies; | ||
interface LaconiaHandler extends Handler { | ||
register( | ||
factory: LaconiaFactory | LaconiaFactory[], | ||
options?: FactoryOptions | ||
): LaconiaHandler; | ||
} | ||
} | ||
declare function laconia(app: Function): LaconiaHandler; | ||
declare function laconia(app: Function): laconia.LaconiaHandler; | ||
export = laconia; |
@@ -21,2 +21,4 @@ const prefixKeys = (prefix, object) => { | ||
"Symbol(util.inspect.custom)", | ||
// For Node10.x | ||
"Symbol(nodejs.util.inspect.custom)", | ||
"Symbol(Symbol.iterator)", | ||
@@ -23,0 +25,0 @@ "Symbol(Symbol.toStringTag)" |
19648
236
2
+ Added@types/aws-lambda@8.10.31
+ Added@types/aws-lambda@8.10.31(transitive)