@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 +1 -1
- package/src/common-hooks.mjs +1 -1
- package/src/server.mjs +5 -1
package/package.json
CHANGED
package/src/common-hooks.mjs
CHANGED
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
|
-
|
|
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 {
|