Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-cross-cursor

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-cross-cursor - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

24

dist/index.js

@@ -42,10 +42,20 @@ "use strict";

return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
const cmd = yield this.client.db(this.namespace).command({
getMore: (0, utils_1.stringToLong)(this.sharedCursor.cursorId),
collection: "articles",
batchSize: this.batchSize
}, {
session: (0, utils_1.fakeSessionBuilder)(this.sharedCursor.sessionId)
return Promise.resolve()
.then(() => {
return this.client.db(this.namespace).command({
getMore: (0, utils_1.stringToLong)(this.sharedCursor.cursorId),
collection: "articles",
batchSize: this.batchSize
}, {
session: (0, utils_1.fakeSessionBuilder)(this.sharedCursor.sessionId)
});
}).then((result) => {
return result.cursor.nextBatch || [];
}).catch((error) => {
var _a;
if (((_a = error === null || error === void 0 ? void 0 : error.message) === null || _a === void 0 ? void 0 : _a.indexOf("cursor id")) !== -1) {
return Promise.resolve([]);
}
return Promise.reject(error);
});
return cmd.cursor.nextBatch;
});

@@ -52,0 +62,0 @@ }

{
"name": "mongodb-cross-cursor",
"version": "1.0.2",
"version": "1.0.3",
"author": "Baptiste Jamin <baptiste@crisp.chat> (https://crisp.chat)",

@@ -5,0 +5,0 @@ "description": "A mongodb driver extension allowing to consume MongoDB cursors accross multiple instances",

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