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

sharedb

Package Overview
Dependencies
Maintainers
1
Versions
141
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sharedb - npm Package Compare versions

Comparing version 0.11.12 to 0.11.13

56

lib/backend.js

@@ -227,2 +227,10 @@ var async = require('async');

var backend = this;
var request = {
agent: agent,
index: index,
collection: collection,
id: id,
from: from,
to: to
};
backend.db.getOps(collection, id, from, to, function(err, ops) {

@@ -232,3 +240,3 @@ if (err) return callback(err);

if (err) return callback(err);
backend.emit('timing', 'getOps', Date.now() - start);
backend.emit('timing', 'getOps', Date.now() - start, request);
callback(err, ops);

@@ -244,2 +252,9 @@ });

var backend = this;
var request = {
agent: agent,
index: index,
collection: collection,
fromMap: fromMap,
toMap: toMap
};
backend.db.getOpsBulk(collection, fromMap, toMap, function(err, opsMap) {

@@ -249,3 +264,3 @@ if (err) return callback(err);

if (err) return callback(err);
backend.emit('timing', 'getOpsBulk', Date.now() - start);
backend.emit('timing', 'getOpsBulk', Date.now() - start, request);
callback(err, opsMap);

@@ -262,2 +277,8 @@ });

var backend = this;
var request = {
agent: agent,
index: index,
collection: collection,
id: id
};
backend.db.getSnapshot(collection, id, fields, function(err, snapshot) {

@@ -268,3 +289,3 @@ if (err) return callback(err);

if (err) return callback(err);
backend.emit('timing', 'fetch', Date.now() - start);
backend.emit('timing', 'fetch', Date.now() - start, request);
callback(null, snapshot);

@@ -281,2 +302,8 @@ });

var backend = this;
var request = {
agent: agent,
index: index,
collection: collection,
ids: ids
};
backend.db.getSnapshotBulk(collection, ids, fields, function(err, snapshotMap) {

@@ -287,3 +314,3 @@ if (err) return callback(err);

if (err) return callback(err);
backend.emit('timing', 'fetchBulk', Date.now() - start);
backend.emit('timing', 'fetchBulk', Date.now() - start, request);
callback(null, snapshotMap);

@@ -301,2 +328,9 @@ });

var backend = this;
var request = {
agent: agent,
index: index,
collection: collection,
id: id,
version: version
};
backend.pubsub.subscribe(channel, function(err, stream) {

@@ -310,3 +344,3 @@ if (err) return callback(err);

if (err) return callback(err);
backend.emit('timing', 'subscribe.snapshot', Date.now() - start);
backend.emit('timing', 'subscribe.snapshot', Date.now() - start, request);
callback(null, stream, snapshot);

@@ -318,3 +352,3 @@ });

stream.pushOps(ops);
backend.emit('timing', 'subscribe.ops', Date.now() - start);
backend.emit('timing', 'subscribe.ops', Date.now() - start, request);
callback(null, stream);

@@ -334,2 +368,8 @@ });

var ids = (doFetch) ? versions : Object.keys(versions);
var request = {
agent: agent,
index: index,
collection: collection,
versions: versions
};
async.each(ids, function(id, eachCb) {

@@ -355,3 +395,3 @@ var channel = backend.getDocChannel(collection, id);

}
backend.emit('timing', 'subscribeBulk.snapshot', Date.now() - start);
backend.emit('timing', 'subscribeBulk.snapshot', Date.now() - start, request);
callback(null, streams, snapshotMap);

@@ -370,3 +410,3 @@ });

}
backend.emit('timing', 'subscribeBulk.ops', Date.now() - start);
backend.emit('timing', 'subscribeBulk.ops', Date.now() - start, request);
callback(null, streams);

@@ -373,0 +413,0 @@ });

2

package.json
{
"name": "sharedb",
"version": "0.11.12",
"version": "0.11.13",
"description": "JSON OT database backend",

@@ -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