@nxtedition/lib 23.17.9 → 23.17.11
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/app.js +8 -8
- package/package.json +1 -1
package/app.js
CHANGED
|
@@ -234,7 +234,7 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
for (const { reason: err } of await Promise.allSettled(
|
|
237
|
-
destroyers.filter(Boolean).map((fn) => destroy(fn)),
|
|
237
|
+
destroyers.filter(Boolean).map(async (fn) => destroy(fn)),
|
|
238
238
|
)) {
|
|
239
239
|
if (err) {
|
|
240
240
|
logger.error({ err }, 'shutdown error')
|
|
@@ -242,7 +242,7 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
242
242
|
}
|
|
243
243
|
|
|
244
244
|
for (const { reason: err } of await Promise.allSettled(
|
|
245
|
-
appDestroyers.filter(Boolean).map((fn) => destroy(fn)),
|
|
245
|
+
appDestroyers.filter(Boolean).map(async (fn) => destroy(fn)),
|
|
246
246
|
)) {
|
|
247
247
|
if (err) {
|
|
248
248
|
logger.error({ err }, 'shutdown error')
|
|
@@ -904,19 +904,19 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
904
904
|
const loggerSubscription = status$
|
|
905
905
|
.pipe(rx.pluck('messages'), rx.startWith([]), rx.pairwise())
|
|
906
906
|
.subscribe(([prev, next]) => {
|
|
907
|
-
for (const { level, msg, ...message } of fp.differenceBy('id', next, prev)) {
|
|
907
|
+
for (const { level, msg: status, ...message } of fp.differenceBy('id', next, prev)) {
|
|
908
908
|
if (level >= 50) {
|
|
909
|
-
logger.error(message, `status added
|
|
909
|
+
logger.error({ ...message, status }, `status added`)
|
|
910
910
|
} else if (level >= 40) {
|
|
911
|
-
logger.warn(message, `status added
|
|
911
|
+
logger.warn({ ...message, status }, `status added`)
|
|
912
912
|
} else {
|
|
913
|
-
logger.info(message, `status added
|
|
913
|
+
logger.info({ ...message, status }, `status added`)
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
-
for (const { level, msg, ...message } of fp.differenceBy('id', prev, next)) {
|
|
917
|
+
for (const { level, msg: status, ...message } of fp.differenceBy('id', prev, next)) {
|
|
918
918
|
if (level >= 40) {
|
|
919
|
-
logger.info(message, `status removed
|
|
919
|
+
logger.info({ ...message, status }, `status removed`)
|
|
920
920
|
}
|
|
921
921
|
}
|
|
922
922
|
})
|