File tree Expand file tree Collapse file tree 16 files changed +218
-392
lines changed Expand file tree Collapse file tree 16 files changed +218
-392
lines changed Original file line number Diff line number Diff line change
1
+ ## [ 3.3.1-upgrade-gts-4.1] ( https://github.com/tibber/tibber-express-utils/compare/v3.3.0...v3.3.1-upgrade-gts-4.1 ) (2022-08-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * upgrade gts to avoid got vulnerability ([ b29d6e3] ( https://github.com/tibber/tibber-express-utils/commit/b29d6e3a7152c086a257512c9669b32c6819af42 ) )
7
+
1
8
# [ 3.3.0] ( https://github.com/tibber/tibber-express-utils/compare/v3.2.0...v3.3.0 ) (2022-08-15)
2
9
3
10
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tibber-express-utils" ,
3
- "version" : " 3.3.0 " ,
3
+ "version" : " 3.3.1-upgrade-gts-4.1 " ,
4
4
"description" : " " ,
5
5
"main" : " ./dist/src/index.js" ,
6
6
"scripts" : {
36
36
"conventional-commits" : " ^1.6.0" ,
37
37
"cz-conventional-changelog" : " ^3.3.0" ,
38
38
"dotenv-cli" : " ^6.0.0" ,
39
- "eslint" : " 7.14.0" ,
40
39
"eslint-plugin-jest" : " ^26.8.2" ,
41
40
"eslint-plugin-node" : " ^11.1.0" ,
42
41
"express" : " ^4.18.1" ,
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import {
8
8
Logger ,
9
9
} from '../types' ;
10
10
11
- export const jsonDelete = < TContext > (
12
- jsonRouter : JsonRouter < TContext > ,
13
- _contextSelector : ContextSelector < TContext > ,
14
- logger ?: Logger
15
- ) => < TPayload > (
16
- path : PathParams ,
17
- handler : JsonRequestHandler < TContext , TPayload >
18
- ) =>
19
- jsonRouter . delete (
20
- path ,
21
- jsonMiddleware (
22
- NoContentIfNoCodeOtherwiseOk ,
23
- _contextSelector ,
24
- handler ,
25
- logger
26
- )
27
- ) ;
11
+ export const jsonDelete =
12
+ < TContext > (
13
+ jsonRouter : JsonRouter < TContext > ,
14
+ _contextSelector : ContextSelector < TContext > ,
15
+ logger ?: Logger
16
+ ) =>
17
+ < TPayload > (
18
+ path : PathParams ,
19
+ handler : JsonRequestHandler < TContext , TPayload >
20
+ ) =>
21
+ jsonRouter . delete (
22
+ path ,
23
+ jsonMiddleware (
24
+ NoContentIfNoCodeOtherwiseOk ,
25
+ _contextSelector ,
26
+ handler ,
27
+ logger
28
+ )
29
+ ) ;
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import {
8
8
Logger ,
9
9
} from '../types' ;
10
10
11
- export const jsonGet = < TContext > (
12
- jsonRouter : JsonRouter < TContext > ,
13
- _contextSelector : ContextSelector < TContext > ,
14
- logger ?: Logger
15
- ) => < TPayload > (
16
- path : PathParams ,
17
- handler : JsonRequestHandler < TContext , TPayload >
18
- ) =>
19
- jsonRouter . get (
20
- path ,
21
- jsonMiddleware (
22
- NotFoundIfNoCodeOtherwiseOk ,
23
- _contextSelector ,
24
- handler ,
25
- logger
26
- )
27
- ) ;
11
+ export const jsonGet =
12
+ < TContext > (
13
+ jsonRouter : JsonRouter < TContext > ,
14
+ _contextSelector : ContextSelector < TContext > ,
15
+ logger ?: Logger
16
+ ) =>
17
+ < TPayload > (
18
+ path : PathParams ,
19
+ handler : JsonRequestHandler < TContext , TPayload >
20
+ ) =>
21
+ jsonRouter . get (
22
+ path ,
23
+ jsonMiddleware (
24
+ NotFoundIfNoCodeOtherwiseOk ,
25
+ _contextSelector ,
26
+ handler ,
27
+ logger
28
+ )
29
+ ) ;
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import {
8
8
Logger ,
9
9
} from '../types' ;
10
10
11
- export const jsonPatch = < TContext > (
12
- jsonRouter : JsonRouter < TContext > ,
13
- _contextSelector : ContextSelector < TContext > ,
14
- logger ?: Logger
15
- ) => < TPayload > (
16
- path : PathParams ,
17
- handler : JsonRequestHandler < TContext , TPayload >
18
- ) =>
19
- jsonRouter . patch (
20
- path ,
21
- jsonMiddleware (
22
- NoContentIfNoCodeOtherwiseOk ,
23
- _contextSelector ,
24
- handler ,
25
- logger
26
- )
27
- ) ;
11
+ export const jsonPatch =
12
+ < TContext > (
13
+ jsonRouter : JsonRouter < TContext > ,
14
+ _contextSelector : ContextSelector < TContext > ,
15
+ logger ?: Logger
16
+ ) =>
17
+ < TPayload > (
18
+ path : PathParams ,
19
+ handler : JsonRequestHandler < TContext , TPayload >
20
+ ) =>
21
+ jsonRouter . patch (
22
+ path ,
23
+ jsonMiddleware (
24
+ NoContentIfNoCodeOtherwiseOk ,
25
+ _contextSelector ,
26
+ handler ,
27
+ logger
28
+ )
29
+ ) ;
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import {
8
8
Logger ,
9
9
} from '../types' ;
10
10
11
- export const jsonPost = < TContext > (
12
- jsonRouter : JsonRouter < TContext > ,
13
- _contextSelector : ContextSelector < TContext > ,
14
- logger ?: Logger
15
- ) => < TPayload > (
16
- path : PathParams ,
17
- handler : JsonRequestHandler < TContext , TPayload >
18
- ) =>
19
- jsonRouter . post (
20
- path ,
21
- jsonMiddleware (
22
- NoContentIfNoCodeOtherwiseOk ,
23
- _contextSelector ,
24
- handler ,
25
- logger
26
- )
27
- ) ;
11
+ export const jsonPost =
12
+ < TContext > (
13
+ jsonRouter : JsonRouter < TContext > ,
14
+ _contextSelector : ContextSelector < TContext > ,
15
+ logger ?: Logger
16
+ ) =>
17
+ < TPayload > (
18
+ path : PathParams ,
19
+ handler : JsonRequestHandler < TContext , TPayload >
20
+ ) =>
21
+ jsonRouter . post (
22
+ path ,
23
+ jsonMiddleware (
24
+ NoContentIfNoCodeOtherwiseOk ,
25
+ _contextSelector ,
26
+ handler ,
27
+ logger
28
+ )
29
+ ) ;
Original file line number Diff line number Diff line change @@ -8,20 +8,22 @@ import {
8
8
Logger ,
9
9
} from '../types' ;
10
10
11
- export const jsonPut = < TContext > (
12
- jsonRouter : JsonRouter < TContext > ,
13
- _contextSelector : ContextSelector < TContext > ,
14
- logger ?: Logger
15
- ) => < TPayload > (
16
- path : PathParams ,
17
- handler : JsonRequestHandler < TContext , TPayload >
18
- ) =>
19
- jsonRouter . put (
20
- path ,
21
- jsonMiddleware (
22
- NoContentIfNoCodeOtherwiseOk ,
23
- _contextSelector ,
24
- handler ,
25
- logger
26
- )
27
- ) ;
11
+ export const jsonPut =
12
+ < TContext > (
13
+ jsonRouter : JsonRouter < TContext > ,
14
+ _contextSelector : ContextSelector < TContext > ,
15
+ logger ?: Logger
16
+ ) =>
17
+ < TPayload > (
18
+ path : PathParams ,
19
+ handler : JsonRequestHandler < TContext , TPayload >
20
+ ) =>
21
+ jsonRouter . put (
22
+ path ,
23
+ jsonMiddleware (
24
+ NoContentIfNoCodeOtherwiseOk ,
25
+ _contextSelector ,
26
+ handler ,
27
+ logger
28
+ )
29
+ ) ;
Original file line number Diff line number Diff line change 1
1
export * from './HttpResult' ;
2
- export * from './jsonRouting' ;
3
- export * from './jsonMiddleware' ;
4
2
export * as Errors from './errors' ;
3
+ export * from './jsonMiddleware' ;
4
+ export * from './jsonRouting' ;
5
5
export * from './types' ;
Original file line number Diff line number Diff line change @@ -4,6 +4,5 @@ import {ContextSelector} from '../types';
4
4
* Given a concrete ContextSelector function, infers the type of the context
5
5
* that it selects.
6
6
*/
7
- export type ContextOf <
8
- TContextSelector extends ContextSelector < unknown >
9
- > = TContextSelector extends ContextSelector < infer U > ? U : never ;
7
+ export type ContextOf < TContextSelector extends ContextSelector < unknown > > =
8
+ TContextSelector extends ContextSelector < infer U > ? U : never ;
Original file line number Diff line number Diff line change @@ -11,6 +11,6 @@ export const hasOwnProperty = <
11
11
> (
12
12
target : TTarget ,
13
13
propertyKey : TPropertyKey
14
- ) : target is TTarget & Record < TPropertyKey , unknown > => {
14
+ ) : target is Record < TPropertyKey , unknown > & TTarget => {
15
15
return Object . prototype . hasOwnProperty . call ( target , propertyKey ) ;
16
16
} ;
You can’t perform that action at this time.
0 commit comments