lambda-essentials-ts 5.2.0 → 5.2.1
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.
|
@@ -40,6 +40,10 @@ class OpenApiWrapper {
|
|
|
40
40
|
this.userPrincipal = this.notSet;
|
|
41
41
|
this.requestId = this.notSet;
|
|
42
42
|
this.correlationId = this.notSet;
|
|
43
|
+
if (config === null || config === void 0 ? void 0 : config.enableNewRelicTracking) {
|
|
44
|
+
// eslint-disable-next-line global-require
|
|
45
|
+
this.newrelic = require('newrelic');
|
|
46
|
+
}
|
|
43
47
|
// @ts-ignore Later Use the options Type from OpenApiFactory
|
|
44
48
|
this.api = new openapi_factory_1.default({
|
|
45
49
|
requestMiddleware: async (request) => {
|
|
@@ -68,9 +72,6 @@ class OpenApiWrapper {
|
|
|
68
72
|
query: request.multiValueQueryStringParameters,
|
|
69
73
|
});
|
|
70
74
|
if (config === null || config === void 0 ? void 0 : config.enableNewRelicTracking) {
|
|
71
|
-
if (!this.newrelic) {
|
|
72
|
-
this.newrelic = await Promise.resolve().then(() => __importStar(require('newrelic')));
|
|
73
|
-
}
|
|
74
75
|
this.newrelic.addCustomAttributes({
|
|
75
76
|
canonicalId: this.userPrincipal,
|
|
76
77
|
correlationId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lambda-essentials-ts",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.1",
|
|
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,
|