Socket
Socket
Sign inDemoInstall

sharedb-access

Package Overview
Dependencies
Maintainers
4
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharedb-access - npm Package Compare versions

Comparing version 4.2.0 to 5.0.0

21

lib/index.js

@@ -30,3 +30,3 @@ const _ = require('lodash')

backend.use('doc', this.docHandler.bind(this))
backend.use('readSnapshots', this.readSnapshotsHandler.bind(this))
backend.use('apply', this.applyHandler.bind(this))

@@ -171,9 +171,18 @@ backend.use('commit', this.commitHandler.bind(this))

ShareDBAccess.prototype.docHandler = function (shareRequest, done){
this.docHandlerAsync(shareRequest)
.then((res) => done(res))
.catch((err) => done(err))
ShareDBAccess.prototype.readSnapshotsHandler = function (shareRequest, done){
Promise.all(shareRequest.snapshots.map(snapshot => {
return this.docHandlerAsync({
index: shareRequest.index,
collection: shareRequest.collection,
id: snapshot.id,
snapshot: snapshot,
agent: shareRequest.agent
})
}))
.then(reasons => {
done(reasons.find(reason => reason))
})
.catch(err => done(err))
}
ShareDBAccess.prototype.docHandlerAsync = async function (shareRequest){

@@ -180,0 +189,0 @@ // ++++++++++++++++++++++++++++++++ READ ++++++++++++++++++++++++++++++++++

{
"name": "sharedb-access",
"version": "4.2.0",
"version": "5.0.0",
"description": "Sharedb access-control midleware",

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

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