@jcbuisson/express-x 1.8.2 → 1.8.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcbuisson/express-x",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
@@ -1,7 +1,7 @@
1
1
 
2
2
  import bcrypt from 'bcryptjs'
3
3
 
4
- import { getConnectionDataItem } from './context.mjs'
4
+ import { getConnectionDataItem, resetConnection } from './context.mjs'
5
5
 
6
6
 
7
7
  /*
package/src/server.mjs CHANGED
@@ -6,6 +6,9 @@ import express from 'express'
6
6
  /*
7
7
  * Enhance `app` express application with services and real-time features
8
8
  */
9
+
10
+ // export function expressX(prisma, connectionAdapter, options) {
11
+
9
12
  export function expressX(prisma, config) {
10
13
 
11
14
  const app = express()
@@ -384,7 +387,8 @@ export function expressX(prisma, config) {
384
387
  * Emit in return a 'client-response' message
385
388
  */
386
389
  socket.on('client-request', async ({ uid, name, action, args }) => {
387
- app.log('verbose', `client-request ${connection.id} ${uid} ${name} ${action} ${JSON.stringify(args)}`)
390
+ const trimmedArgs = args ? JSON.stringify(args).slice(0, 300) : ''
391
+ app.log('verbose', `client-request ${connection.id} ${uid} ${name} ${action} ${trimmedArgs}`)
388
392
  if (name in services) {
389
393
  const service = services[name]
390
394
  try {