New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wyseman

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wyseman - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

lib/client_msg.js

9

lib/index.js

@@ -5,5 +5,8 @@ //Copyright WyattERP.org; See license in root of this package

module.exports = {
Wyseman: require('./wyseman.js'),
dbClient: require('./dbclient.js'),
Client: require('./client.js')
Wyseman: require('./wyseman.js'),
dbClient: require('./dbclient.js'),
ClientWs: require('./client_ws.js'),
ClientNP: require('./client_np.js'),
ClientMessage: require('./client_msg.js'),
Encrypt: require('./encrypt.js'),
}

@@ -33,7 +33,7 @@ //Manage the connection between a User Interface and the backend database

, { port, credentials, delta } = websock
, server = credentials ? Https.createServer(credentials) : Http.createServer() //websocket rides on this server
, wsport = port
, wsport = port || 54320
this.server = credentials ? Https.createServer(credentials) : Http.createServer() //websocket rides on this server
this.log = dbConf.log || sockConf.log || adminConf.log || require('./log') //Try to find a logger
this.adminDB = new DbClient(adminConf) //Open Admin connection to the DB
this.maxDelta = delta
this.maxDelta = delta || 60000

@@ -45,4 +45,4 @@ //For future noise-protocol connection:

if (wsport) {
let wss = new Ws.Server({ //Initiate a new websocket server
server,
this.wss = new Ws.Server({ //Initiate a new websocket server
server: this.server,
clientTracking: true,

@@ -55,7 +55,7 @@ verifyClient: (info, cb) => {

})
if (!this.wss) return
this.log.info("Wyseman listening on websocket:", wsport)
if (!wss) return
server.listen(wsport)
wss.on('connection', (ws, req) => { //When connection from view client is open
this.server.listen(wsport)
this.wss.on('connection', (ws, req) => { //When connection from view client is open
let payload = req.WysemanPayload

@@ -92,3 +92,3 @@ , config = Object.assign({}, dbConf, payload) //user,listen was passed to us from verifyClient

})
this.log.debug("Connected clients: ", wss.clients.size)
this.log.debug("Connected clients: ", this.wss.clients.size)
}) //wss.on connection

@@ -98,2 +98,11 @@ } //if (wsport)

//Close this server instance
// -----------------------------------------------------------------------------
close() {
this.log.trace("Closing wyseman: ", this.wss.clients.size)
this.wss.close()
this.server.close()
this.adminDB.disconnect()
}
//Validate a user who is presenting a one-time connection token

@@ -100,0 +109,0 @@ // -----------------------------------------------------------------------------

{
"name": "wyseman",
"version": "1.1.4",
"version": "1.1.5",
"description": "PostgreSQL Schema Manager with Javascript, Ruby, TCL API",

@@ -34,5 +34,9 @@ "main": "lib/index.js",

"dependencies": {
"b64u-lite": "^1.1.0",
"buffer": "^6.0.3",
"node-fetch": "^2.6.2",
"pg": "^8.7.3",
"pg-format": "^1.0.4",
"web-encoding": "^1.1.5",
"winston": "^3.8.2",
"ws": "^7.5.5"

@@ -39,0 +43,0 @@ },

@@ -17,2 +17,4 @@ //Run all tests in order

require('./client.js')
after('Delete history, delta, schema files', function() {

@@ -19,0 +21,0 @@ Fs.rmSync(Path.join(SchemaDir, 'Wyseman.delta'))

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc