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

gulf

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulf - npm Package Compare versions

Comparing version 4.1.1 to 4.1.2

plans.txt

4

lib/Document.js

@@ -258,3 +258,5 @@ /**

})
.forEach(fromLink.sendEdit.bind(fromLink))
.forEach(function(edit) {
fromLink.sendEdit(edit)
})
}.bind(this))

@@ -261,0 +263,0 @@

@@ -39,2 +39,3 @@ /**

this.queue
this.linkBuffer = ''

@@ -88,3 +89,3 @@ Duplex.call(this, {allowHalfOpen: false, objectMode: true})

clearTimeout(edit.timeout)
cb && cb.apply(null, arguments)
if (cb) cb.apply(null, arguments)
}

@@ -96,3 +97,3 @@ msg[1] = edit.pack()

debug('->', data)
this.push(data)
this.push(data+'\n')
}.bind(this))

@@ -102,15 +103,15 @@ }

Link.prototype.sendUnauthenticated = function() {
this.push(JSON.stringify(['unauthenticated']))
this.push(JSON.stringify(['unauthenticated'])+'\n')
}
Link.prototype.sendAuthenticate = function() {
this.push(JSON.stringify(['authenticate', this.credentials]))
this.push(JSON.stringify(['authenticate', this.credentials])+'\n')
}
Link.prototype.sendAuthenticated = function(status) {
this.push(JSON.stringify(['authenticated', status]))
this.push(JSON.stringify(['authenticated', status])+'\n')
}
Link.prototype.sendUnauthorized = function() {
this.push(JSON.stringify(['unauthorized']))
this.push(JSON.stringify(['unauthorized'])+'\n')
}

@@ -161,5 +162,23 @@

Link.prototype._write = function(buf, enc, cb) {
debug('<- _write:', buf.toString())
var args = JSON.parse(buf.toString())
this.linkBuffer += buf.toString()
var idx = this.linkBuffer.indexOf('\n')
if (idx === -1) return cb()
var msgs = []
while (idx !== -1) {
msgs.push(this.linkBuffer.substr(0, idx))
this.linkBuffer = this.linkBuffer.substr(idx+1)
idx = this.linkBuffer.indexOf('\n')
}
iterate.apply(this)
function iterate(er) {
if (er) return cb(er)
if (!msgs.length) return cb()
this.onwrite(msgs.shift(), iterate.bind(this))
}
}
Link.prototype.onwrite = function(data, cb) {
debug('<- _write:', data)
var args = JSON.parse(data)
// ['authenticate', Mixed]

@@ -166,0 +185,0 @@ if(args[0] === 'authenticate') {

{
"name": "gulf",
"version": "4.1.1",
"version": "4.1.2",
"description": "transport-agnostic operational transformation control layer",

@@ -5,0 +5,0 @@ "repository": {

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