@storyous/common-utils
Advanced tools
Comparing version 15.1.0 to 15.2.0
@@ -15,3 +15,3 @@ export = fetch; | ||
parseResponseAs?: "json" | "text" | undefined; | ||
} | undefined): Promise<any | string | any>; | ||
} | undefined): Promise<nodeFetch.Response | string | any>; | ||
declare namespace fetch { | ||
@@ -21,1 +21,2 @@ function json(url: string, options?: Object | undefined): Promise<any>; | ||
} | ||
import nodeFetch = require("node-fetch"); |
@@ -147,3 +147,7 @@ 'use strict'; | ||
logger.initKoa = () => clsAdapter.getKoaMiddleware(); | ||
/** | ||
* Returns current correlationId if it is specified by KoaMiddleware | ||
*/ | ||
logger.getCorrelationId = () => clsAdapter.getCorrelationId(); | ||
module.exports = logger; | ||
//# sourceMappingURL=log.js.map |
{ | ||
"name": "@storyous/common-utils", | ||
"version": "15.1.0", | ||
"version": "15.2.0", | ||
"description": "Common utils for storyous microservices", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -0,0 +0,0 @@ # Common JS utils |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -200,3 +200,8 @@ 'use strict'; | ||
/** | ||
* Returns current correlationId if it is specified by KoaMiddleware | ||
*/ | ||
logger.getCorrelationId = () => clsAdapter.getCorrelationId(); | ||
module.exports = logger; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -0,0 +0,0 @@ 'use strict'; |
@@ -21,3 +21,6 @@ 'use strict'; | ||
await new Promise((resolve) => setTimeout(resolve, 100)); | ||
log.info('Inside function still have same correlationId', { something }); | ||
log.info('Inside function still have same correlationId', { | ||
something, | ||
customGetCorrelationId: log.getCorrelationId() | ||
}); | ||
} | ||
@@ -115,2 +118,3 @@ | ||
message: 'Inside function still have same correlationId', | ||
customGetCorrelationId: correlationId, | ||
level: 'info', | ||
@@ -158,2 +162,3 @@ something: 1 | ||
correlationId: 'myCorrelationId', | ||
customGetCorrelationId: 'myCorrelationId', | ||
sessionId: 'mySessionId', | ||
@@ -224,2 +229,3 @@ message: 'Inside function still have same correlationId', | ||
correlationId: correlationId1, | ||
customGetCorrelationId: correlationId1, | ||
message: 'Inside function still have same correlationId', | ||
@@ -232,2 +238,3 @@ level: 'info' | ||
correlationId: correlationId2, | ||
customGetCorrelationId: correlationId2, | ||
message: 'Inside function still have same correlationId', | ||
@@ -234,0 +241,0 @@ level: 'info' |
{ | ||
"testTranslation": "czech aa" | ||
} |
@@ -0,0 +0,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
334956
7376