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.9.0 to 0.10.0

4

CHANGELOG.md

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

# 0.10.0
* Renamed `Options` to `SyncOptions`.
# 0.9.0

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

2

dist/changeStreamToIterator.js

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

const debug_1 = __importDefault(require("debug"));
const debug = (0, debug_1.default)('connectors:mongodbChangeStream');
const debug = (0, debug_1.default)('mongoChangeStream');
const changeStreamToIterator = (collection, pipeline, options) => {

@@ -10,0 +10,0 @@ const changeStream = collection.watch(pipeline, options);

import _ from 'lodash/fp.js';
import { Collection, ObjectId } from 'mongodb';
import { Options, ProcessRecord, ProcessRecords, ScanOptions } from './types.js';
import { SyncOptions, ProcessRecord, ProcessRecords, ScanOptions } from './types.js';
import type { default as Redis } from 'ioredis';

@@ -19,3 +19,3 @@ import { QueueOptions } from 'prom-utils';

};
export declare const initSync: (redis: Redis, options?: Options) => {
export declare const initSync: (redis: Redis, options?: SyncOptions) => {
runInitialScan: (collection: Collection, processRecords: ProcessRecords, options?: QueueOptions & ScanOptions) => Promise<void>;

@@ -22,0 +22,0 @@ processChangeStream: (collection: Collection, processRecord: ProcessRecord, pipeline?: Document[]) => Promise<void>;

import { ChangeStreamDocument, ChangeStreamInsertDocument } from 'mongodb';
export declare type ProcessRecord = (doc: ChangeStreamDocument) => void | Promise<void>;
export declare type ProcessRecords = (doc: ChangeStreamInsertDocument[]) => void | Promise<void>;
export interface Options {
export interface SyncOptions {
omit?: string[];

@@ -6,0 +6,0 @@ }

{
"name": "mongochangestream",
"version": "0.9.0",
"version": "0.10.0",
"description": "Sync MongoDB collections via change streams into any database.",

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

@@ -9,3 +9,3 @@ import {

const debug = _debug('connectors:mongodbChangeStream')
const debug = _debug('mongoChangeStream')

@@ -12,0 +12,0 @@ const changeStreamToIterator = (

import _ from 'lodash/fp.js'
import { ChangeStreamInsertDocument, Collection, ObjectId } from 'mongodb'
import changeStreamToIterator from './changeStreamToIterator.js'
import { Options, ProcessRecord, ProcessRecords, ScanOptions } from './types.js'
import {
SyncOptions,
ProcessRecord,
ProcessRecords,
ScanOptions,
} from './types.js'
import _debug from 'debug'

@@ -39,3 +44,3 @@ import type { default as Redis } from 'ioredis'

export const initSync = (redis: Redis, options?: Options) => {
export const initSync = (redis: Redis, options?: SyncOptions) => {
const omit = options?.omit

@@ -42,0 +47,0 @@ const defaultPipeline = omit ? generatePipelineFromOmit(omit) : []

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

export interface Options {
export interface SyncOptions {
omit?: string[]

@@ -12,0 +12,0 @@ }

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