lambda-essentials-ts 4.1.0 → 4.1.4
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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
|
|
7
|
+
## [4.1.2] - 2021-12-02
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
Expose the `Location`, `Access-Control-Allow-Origin` and `orion-correlation-id-root` headers
|
|
12
|
+
|
|
13
|
+
## [4.1.1] - 2021-11-22
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- `ApiResponse` default content-type header was renamed to `Content-Type` to overwrite the default header
|
|
18
|
+
of [openapi-factory.js](https://github.com/Rhosys/openapi-factory.js/blob/release/5.2/src/response.js#L15)
|
|
19
|
+
- Also upgraded `openapi-factory.js` to get support of over-writing response headers
|
|
20
|
+
|
|
7
21
|
## [4.1.0] - 2021-11-22
|
|
8
22
|
|
|
9
23
|
### Changed
|
|
@@ -13,6 +13,7 @@ export interface ApiRequest<Body = any, Query = any> {
|
|
|
13
13
|
headers: Record<string, string>;
|
|
14
14
|
pathParameters: Record<string, string>;
|
|
15
15
|
queryStringParameters?: Query;
|
|
16
|
+
multiValueQueryStringParameters?: any;
|
|
16
17
|
}
|
|
17
18
|
export interface PostRequest<Body = any, Query = any> extends ApiRequest<Body, Query> {
|
|
18
19
|
body: Body;
|
|
@@ -6,7 +6,11 @@ class ApiResponse {
|
|
|
6
6
|
constructor(statusCode, body, headers) {
|
|
7
7
|
this.body = body;
|
|
8
8
|
this.statusCode = statusCode;
|
|
9
|
-
this.headers = {
|
|
9
|
+
this.headers = {
|
|
10
|
+
'Access-Control-Expose-Headers': 'Location, Access-Control-Allow-Origin, orion-correlation-id-root',
|
|
11
|
+
'Content-Type': 'application/hal+json',
|
|
12
|
+
...headers,
|
|
13
|
+
};
|
|
10
14
|
}
|
|
11
15
|
withCorrelationId(correlationId) {
|
|
12
16
|
this.headers[shared_1.orionCorrelationIdRoot] = correlationId;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lambda-essentials-ts",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.4",
|
|
4
4
|
"description": "A selection of the finest modules supporting authorization, API routing, error handling, logging and sending HTTP requests.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"is-error": "2.2.2",
|
|
34
34
|
"jsonwebtoken": "8.5.1",
|
|
35
35
|
"md5": "2.3.0",
|
|
36
|
-
"openapi-factory": "
|
|
36
|
+
"openapi-factory": "5.2.17",
|
|
37
37
|
"retry-axios": "2.6.0",
|
|
38
38
|
"uuid": "8.3.2"
|
|
39
39
|
},
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
"collectCoverage": false
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
75
|
+
"node": ">=12.0.0"
|
|
76
76
|
}
|
|
77
77
|
}
|