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

mongochangestream

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongochangestream - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

dist/util.d.ts

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.7.0
* `omit` option for excluding undesired fields.
# 0.6.0

@@ -2,0 +6,0 @@

4

dist/mongoChangeStream.js

@@ -12,2 +12,3 @@ "use strict";

const prom_utils_1 = require("prom-utils");
const util_js_1 = require("./util.js");
const debug = (0, debug_1.default)('mongodbChangeStream');

@@ -43,2 +44,3 @@ const keyPrefix = 'mongodbChangeStream';

const sortField = options?.sortField || exports.defaultSortField;
const omit = options?.omit;
// Redis keys

@@ -73,3 +75,3 @@ const { scanCompletedKey, lastScanIdKey } = getKeys(collection);

? { [sortField.field]: { $gt: sortField.deserialize(lastId) } }
: {})
: {}, omit ? { projection: (0, util_js_1.setDefaults)(omit, 0) } : {})
.sort({ [sortField.field]: 1 });

@@ -76,0 +78,0 @@ const ns = { db: collection.dbName, coll: collection.collectionName };

@@ -10,2 +10,3 @@ import { ChangeStreamDocument, ChangeStreamInsertDocument } from 'mongodb';

};
omit?: string[];
}
{
"name": "mongochangestream",
"version": "0.6.0",
"version": "0.7.0",
"description": "Sync MongoDB collections via change streams into any database.",

@@ -5,0 +5,0 @@ "author": "GovSpend",

@@ -8,2 +8,3 @@ import _ from 'lodash/fp.js'

import { batchQueue, QueueOptions } from 'prom-utils'
import { setDefaults } from './util.js'

@@ -50,2 +51,3 @@ const debug = _debug('mongodbChangeStream')

const sortField = options?.sortField || defaultSortField
const omit = options?.omit
// Redis keys

@@ -81,3 +83,4 @@ const { scanCompletedKey, lastScanIdKey } = getKeys(collection)

? { [sortField.field]: { $gt: sortField.deserialize(lastId) } }
: {}
: {},
omit ? { projection: setDefaults(omit, 0) } : {}
)

@@ -84,0 +87,0 @@ .sort({ [sortField.field]: 1 })

@@ -15,2 +15,3 @@ import { ChangeStreamDocument, ChangeStreamInsertDocument } from 'mongodb'

}
omit?: string[]
}
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