Socket
Socket
Sign inDemoInstall

mongochangestream

Package Overview
Dependencies
Maintainers
1
Versions
56
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.14.0 to 0.15.0

4

CHANGELOG.md

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

# 0.15.0
- Export `getCollectionKey` util.
# 0.14.0

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

5

dist/mongoChangeStream.js

@@ -13,5 +13,4 @@ "use strict";

const util_js_1 = require("./util.js");
const debug = (0, debug_1.default)('mongoChangeStream');
const debug = (0, debug_1.default)('mongochangestream');
const keyPrefix = 'mongoChangeStream';
const getCollectionKey = (collection) => `${collection.dbName}:${collection.collectionName}`;
/**

@@ -21,3 +20,3 @@ * Get Redis keys used for the given collection.

const getKeys = (collection) => {
const collectionKey = getCollectionKey(collection);
const collectionKey = (0, util_js_1.getCollectionKey)(collection);
const scanPrefix = `${keyPrefix}:${collectionKey}`;

@@ -24,0 +23,0 @@ const scanCompletedKey = `${scanPrefix}:initialScanCompletedOn`;

@@ -0,1 +1,2 @@

import { Collection } from 'mongodb';
import _ from 'lodash/fp.js';

@@ -8,1 +9,2 @@ export declare const setDefaults: (keys: string[], val: any) => Record<string, any>;

export declare const omitFieldForUpdate: (omitPaths: string[]) => _.LodashUpdate1x3;
export declare const getCollectionKey: (collection: Collection) => string;

@@ -6,3 +6,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.omitFieldForUpdate = exports.omitFields = exports.generatePipelineFromOmit = exports.setDefaults = void 0;
exports.getCollectionKey = exports.omitFieldForUpdate = exports.omitFields = exports.generatePipelineFromOmit = exports.setDefaults = void 0;
const fp_js_1 = __importDefault(require("lodash/fp.js"));

@@ -29,1 +29,3 @@ const setDefaults = (keys, val) => {

exports.omitFieldForUpdate = omitFieldForUpdate;
const getCollectionKey = (collection) => `${collection.dbName}:${collection.collectionName}`;
exports.getCollectionKey = getCollectionKey;
{
"name": "mongochangestream",
"version": "0.14.0",
"version": "0.15.0",
"description": "Sync MongoDB collections via change streams into any database.",

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

@@ -18,2 +18,8 @@ # Mongo Change Stream

This library uses `debug`. To enable you can do something like:
```
DEBUG=mongochangestream node myfile.js
```
```typescript

@@ -20,0 +26,0 @@ import { ChangeStreamDocument, MongoClient } from 'mongodb'

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

generatePipelineFromOmit,
getCollectionKey,
omitFieldForUpdate,

@@ -25,9 +26,6 @@ setDefaults,

const debug = _debug('mongoChangeStream')
const debug = _debug('mongochangestream')
const keyPrefix = 'mongoChangeStream'
const getCollectionKey = (collection: Collection) =>
`${collection.dbName}:${collection.collectionName}`
/**

@@ -34,0 +32,0 @@ * Get Redis keys used for the given collection.

@@ -0,1 +1,2 @@

import { Collection } from 'mongodb'
import _ from 'lodash/fp.js'

@@ -26,1 +27,4 @@

_.update('updateDescription.updatedFields', omitFields(omitPaths))
export const getCollectionKey = (collection: Collection) =>
`${collection.dbName}:${collection.collectionName}`
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