@middy/util 2.4.3 → 2.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -0
- package/package.json +3 -3
package/index.d.ts
CHANGED
|
@@ -14,6 +14,14 @@ interface Options<Client, ClientOptions> {
|
|
|
14
14
|
setToContext?: boolean
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
type HttpError = Error & {
|
|
18
|
+
status: number
|
|
19
|
+
statusCode: number
|
|
20
|
+
expose: boolean
|
|
21
|
+
[key: string]: any
|
|
22
|
+
[key: number]: any
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
declare function createPrefetchClient<Client, ClientOptions> (options: Options<Client, ClientOptions>): Client
|
|
18
26
|
|
|
19
27
|
declare function createClient<Client, ClientOptions> (options: Options<Client, ClientOptions>, request: middy.Request): Client
|
|
@@ -33,3 +41,7 @@ declare function clearCache (keys?: string | string[] | null): void
|
|
|
33
41
|
declare function jsonSafeParse (string: string, reviver?: (key: string, value: any) => any): any
|
|
34
42
|
|
|
35
43
|
declare function normalizeHttpResponse (response: any, fallbackResponse?: any): any
|
|
44
|
+
|
|
45
|
+
declare function createError (code: number, message: string, properties?: Record<string, any>): HttpError
|
|
46
|
+
|
|
47
|
+
declare function modifyCache (cacheKey: string, value: any): void
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@middy/util",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.3",
|
|
4
4
|
"description": "🛵 The stylish Node.js middleware engine for AWS Lambda (util package)",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"engines": {
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"url": "https://github.com/middyjs/middy/issues"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@middy/core": "^2.
|
|
47
|
+
"@middy/core": "^2.5.3",
|
|
48
48
|
"@types/aws-lambda": "^8.10.76",
|
|
49
49
|
"@types/node": "^16.0.0",
|
|
50
50
|
"aws-sdk": "^2.939.0",
|
|
51
51
|
"aws-xray-sdk": "^3.3.3"
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://github.com/middyjs/middy#readme",
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "690884d43b9cd632aeca9a5eba1612160b987cd4"
|
|
55
55
|
}
|