@jaypie/express 1.0.8 → 1.0.9
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/module.cjs +4 -1
- package/dist/module.esm.js +4 -1
- package/package.json +2 -2
- package/src/expressHandler.js +4 -1
package/dist/module.cjs
CHANGED
|
@@ -190,6 +190,9 @@ const expressHandler = (
|
|
|
190
190
|
return async (req, res, ...params) => {
|
|
191
191
|
// * This is the first line of code that runs when a request is received
|
|
192
192
|
|
|
193
|
+
// Re-init the logger
|
|
194
|
+
core.log.init();
|
|
195
|
+
|
|
193
196
|
// Update the public logger with the request ID
|
|
194
197
|
const invokeUuid = getCurrentInvokeUuid();
|
|
195
198
|
if (invokeUuid) {
|
|
@@ -266,9 +269,9 @@ const expressHandler = (
|
|
|
266
269
|
const keys = Object.keys(locals);
|
|
267
270
|
if (keys.length > 0) {
|
|
268
271
|
const localsSetup = async () => {
|
|
269
|
-
libLogger.trace("[jaypie] Locals");
|
|
270
272
|
for (let i = 0; i < keys.length; i += 1) {
|
|
271
273
|
const key = keys[i];
|
|
274
|
+
libLogger.trace(`[jaypie] Locals: ${key}`);
|
|
272
275
|
if (typeof locals[key] === "function") {
|
|
273
276
|
// eslint-disable-next-line no-await-in-loop
|
|
274
277
|
req.locals[key] = await locals[key](req, res);
|
package/dist/module.esm.js
CHANGED
|
@@ -188,6 +188,9 @@ const expressHandler = (
|
|
|
188
188
|
return async (req, res, ...params) => {
|
|
189
189
|
// * This is the first line of code that runs when a request is received
|
|
190
190
|
|
|
191
|
+
// Re-init the logger
|
|
192
|
+
log.init();
|
|
193
|
+
|
|
191
194
|
// Update the public logger with the request ID
|
|
192
195
|
const invokeUuid = getCurrentInvokeUuid();
|
|
193
196
|
if (invokeUuid) {
|
|
@@ -264,9 +267,9 @@ const expressHandler = (
|
|
|
264
267
|
const keys = Object.keys(locals);
|
|
265
268
|
if (keys.length > 0) {
|
|
266
269
|
const localsSetup = async () => {
|
|
267
|
-
libLogger.trace("[jaypie] Locals");
|
|
268
270
|
for (let i = 0; i < keys.length; i += 1) {
|
|
269
271
|
const key = keys[i];
|
|
272
|
+
libLogger.trace(`[jaypie] Locals: ${key}`);
|
|
270
273
|
if (typeof locals[key] === "function") {
|
|
271
274
|
// eslint-disable-next-line no-await-in-loop
|
|
272
275
|
req.locals[key] = await locals[key](req, res);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaypie/express",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"author": "Finlayson Studio",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@codegenie/serverless-express": "^4.14.1",
|
|
45
|
-
"@jaypie/core": "^1.0.
|
|
45
|
+
"@jaypie/core": "^1.0.41"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@jaypie/testkit": "^1.0.19",
|
package/src/expressHandler.js
CHANGED
|
@@ -41,6 +41,9 @@ const expressHandler = (
|
|
|
41
41
|
return async (req, res, ...params) => {
|
|
42
42
|
// * This is the first line of code that runs when a request is received
|
|
43
43
|
|
|
44
|
+
// Re-init the logger
|
|
45
|
+
publicLogger.init();
|
|
46
|
+
|
|
44
47
|
// Update the public logger with the request ID
|
|
45
48
|
const invokeUuid = getCurrentInvokeUuid();
|
|
46
49
|
if (invokeUuid) {
|
|
@@ -117,9 +120,9 @@ const expressHandler = (
|
|
|
117
120
|
const keys = Object.keys(locals);
|
|
118
121
|
if (keys.length > 0) {
|
|
119
122
|
const localsSetup = async () => {
|
|
120
|
-
libLogger.trace("[jaypie] Locals");
|
|
121
123
|
for (let i = 0; i < keys.length; i += 1) {
|
|
122
124
|
const key = keys[i];
|
|
125
|
+
libLogger.trace(`[jaypie] Locals: ${key}`);
|
|
123
126
|
if (typeof locals[key] === "function") {
|
|
124
127
|
// eslint-disable-next-line no-await-in-loop
|
|
125
128
|
req.locals[key] = await locals[key](req, res);
|