mongochangestream
Advanced tools
Comparing version 0.9.0 to 0.10.0
@@ -0,1 +1,5 @@ | ||
# 0.10.0 | ||
* Renamed `Options` to `SyncOptions`. | ||
# 0.9.0 | ||
@@ -2,0 +6,0 @@ |
@@ -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 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24074
506