@spytecgps/lambda-utils 2.3.16 → 2.3.18
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/dist/index.js +2 -1
- package/dist/types.d.ts +3 -0
- package/dist/wrappers/response.d.ts +1 -1
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -270,11 +270,12 @@ const buildResponseBody = (statusCode, message, data) => {
|
|
|
270
270
|
result: typeof data !== 'undefined' ? data : undefined,
|
|
271
271
|
};
|
|
272
272
|
};
|
|
273
|
-
const buildProxyResult = ({ statusCode = 200, message = 'ok', data, headers = {}, rawResult = false, stringifyBody = true, }) => {
|
|
273
|
+
const buildProxyResult = ({ statusCode = 200, message = 'ok', data, headers = {}, multiValueHeaders = {}, rawResult = false, stringifyBody = true, }) => {
|
|
274
274
|
const resp = rawResult ? data : buildResponseBody(statusCode, message, data);
|
|
275
275
|
const body = stringifyBody ? resp && JSON.stringify(resp) : data;
|
|
276
276
|
return {
|
|
277
277
|
headers: { ...baseHeaders, ...headers },
|
|
278
|
+
multiValueHeaders,
|
|
278
279
|
statusCode,
|
|
279
280
|
body,
|
|
280
281
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export declare const buildResponseBody: <T>(statusCode: number, message: string,
|
|
|
5
5
|
message: string;
|
|
6
6
|
result: T | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const buildProxyResult: <R>({ statusCode, message, data, headers, rawResult, stringifyBody, }: HandlerResponse<R>) => APIGatewayProxyResult;
|
|
8
|
+
export declare const buildProxyResult: <R>({ statusCode, message, data, headers, multiValueHeaders, rawResult, stringifyBody, }: HandlerResponse<R>) => APIGatewayProxyResult;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spytecgps/lambda-utils",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.18",
|
|
4
4
|
"description": "Lambda Utils",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
"@middy/http-response-serializer": "^2.5.7",
|
|
34
34
|
"@middy/input-output-logger": "^2.5.7",
|
|
35
35
|
"@middy/sqs-json-body-parser": "^2.5.7",
|
|
36
|
-
"@spytecgps/sdk-logger": "^2.0.8",
|
|
37
36
|
"dayjs": "^1.11.11",
|
|
38
37
|
"deepmerge": "^4.3.1",
|
|
39
38
|
"joi": "^17.13.0",
|
|
40
39
|
"qs": "^6.10.1"
|
|
41
40
|
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"@spytecgps/sdk-logger": "^2.0.8"
|
|
43
|
+
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@aws-sdk/client-lambda": "^3.699.0",
|
|
44
46
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
@@ -46,6 +48,7 @@
|
|
|
46
48
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
47
49
|
"@rollup/plugin-terser": "^0.4.4",
|
|
48
50
|
"@rollup/plugin-typescript": "^9.0.2",
|
|
51
|
+
"@spytecgps/sdk-logger": "^2.0.8",
|
|
49
52
|
"@types/aws-lambda": "^8.10.76",
|
|
50
53
|
"@types/jest": "^29.5.12",
|
|
51
54
|
"@types/joi": "^17.2.3",
|