@jcbuisson/express-x 1.6.14 → 1.6.16

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.6.14",
3
+ "version": "1.6.16",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "src/index.mjs",
@@ -2,7 +2,7 @@
2
2
  import bcrypt from 'bcryptjs'
3
3
 
4
4
  import { getConnectionDataItem } from './context.mjs'
5
- import { MyCustomError } from '.server.mjs'
5
+ import { MyCustomError } from './server.mjs'
6
6
 
7
7
 
8
8
  // hash password of user record
package/src/server.mjs CHANGED
@@ -24,7 +24,6 @@ export function expressX(prisma, options = {}) {
24
24
  let appHooks = []
25
25
 
26
26
  const cnx2Socket = {}
27
- const cnx2Timer = {}
28
27
 
29
28
  async function createConnection(clientIP) {
30
29
  const connection = await prisma.Connection.create({
@@ -67,15 +66,6 @@ export function expressX(prisma, options = {}) {
67
66
  }
68
67
 
69
68
 
70
- function getTimer(connectionId) {
71
- return cnx2Timer[connectionId]
72
- }
73
-
74
- function setTimer(connectionId, timer) {
75
- cnx2Timer[connectionId] = timer
76
- }
77
-
78
-
79
69
  // logging function - a winston logger must be configured first
80
70
  app.log = (severity, message) => {
81
71
  const logger = app.get('logger')
@@ -374,8 +364,6 @@ export function expressX(prisma, options = {}) {
374
364
  const toConnection = await cloneConnection(to, fromConnection)
375
365
  // associate socket to 'to'
376
366
  setSocket(to, socket)
377
- // transfer timer from 'from' to 'to'
378
- setTimer(to, getTimer(from))
379
367
  // delete 'from'
380
368
  await deleteConnection(from)
381
369
  // send acknowledge to client
@@ -463,7 +451,6 @@ export function expressX(prisma, options = {}) {
463
451
  prisma,
464
452
  options,
465
453
  getSocket, setSocket,
466
- getTimer, setTimer,
467
454
  createDatabaseService,
468
455
  createService,
469
456
  service,