@nxtedition/lib 23.3.9 → 23.3.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 +6 -2
- package/package.json +1 -1
- package/serializers.js +17 -3
package/app.js
CHANGED
|
@@ -65,8 +65,6 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
65
65
|
const isProduction = process.env.NODE_ENV === 'production'
|
|
66
66
|
const ac = new AbortController()
|
|
67
67
|
|
|
68
|
-
fs.mkdirSync('./.nxt', { recursive: true })
|
|
69
|
-
|
|
70
68
|
// Crash on unhandledRejection
|
|
71
69
|
process.on('unhandledRejection', (err) => {
|
|
72
70
|
throw err
|
|
@@ -271,6 +269,12 @@ export function makeApp(appConfig, onTerminate) {
|
|
|
271
269
|
})
|
|
272
270
|
}
|
|
273
271
|
|
|
272
|
+
try {
|
|
273
|
+
fs.mkdirSync('./.nxt', { recursive: true })
|
|
274
|
+
} catch (err) {
|
|
275
|
+
logger.warn({ err }, 'failed to create ./nxt dir')
|
|
276
|
+
}
|
|
277
|
+
|
|
274
278
|
let toobusy
|
|
275
279
|
|
|
276
280
|
if (appConfig.toobusy) {
|
package/package.json
CHANGED
package/serializers.js
CHANGED
|
@@ -248,6 +248,8 @@ function errSerializer(err) {
|
|
|
248
248
|
if (!Object.prototype.hasOwnProperty.call(val, seen)) {
|
|
249
249
|
_err[key] = errSerializer(val)
|
|
250
250
|
}
|
|
251
|
+
} else if (typeof val === 'bigint') {
|
|
252
|
+
_err[key] = `${val.toString()}`
|
|
251
253
|
} else if (val != null && !/^[A-Z0-9_]+$/.test(key)) {
|
|
252
254
|
_err[key] = val
|
|
253
255
|
}
|
|
@@ -255,15 +257,27 @@ function errSerializer(err) {
|
|
|
255
257
|
}
|
|
256
258
|
|
|
257
259
|
if (_err.data != null && typeof _err.data !== 'string') {
|
|
258
|
-
|
|
260
|
+
try {
|
|
261
|
+
_err.data = JSON.stringify(_err.data, undefined, 2)
|
|
262
|
+
} catch {
|
|
263
|
+
// Do nothing...
|
|
264
|
+
}
|
|
259
265
|
}
|
|
260
266
|
|
|
261
267
|
if (_err.body != null && typeof _err.body !== 'string') {
|
|
262
|
-
|
|
268
|
+
try {
|
|
269
|
+
_err.body = JSON.stringify(_err.body, undefined, 2)
|
|
270
|
+
} catch {
|
|
271
|
+
// Do nothing...
|
|
272
|
+
}
|
|
263
273
|
}
|
|
264
274
|
|
|
265
275
|
if (_err.meta != null && typeof _err.meta !== 'string') {
|
|
266
|
-
|
|
276
|
+
try {
|
|
277
|
+
_err.meta = JSON.stringify(_err.meta, undefined, 2)
|
|
278
|
+
} catch {
|
|
279
|
+
// Do nothing...
|
|
280
|
+
}
|
|
267
281
|
}
|
|
268
282
|
|
|
269
283
|
if (_err.code != null && typeof _err.code !== 'string') {
|