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

@gesdisc/mongo-stream

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gesdisc/mongo-stream - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4

2

config/default.json

@@ -26,3 +26,3 @@ {

"index": "test",
"type": "$self",
"type": "_doc",
"parent": "parentCollectionName",

@@ -29,0 +29,0 @@ "parentId": "childFieldPointingToParent",

@@ -88,4 +88,2 @@ const logger = new (require('service-logger'))(__filename);

logger.debug('bulk op for collection ', CollectionManager.elasticManager.mappings[this.collectionName])
bulkOp.push({

@@ -92,0 +90,0 @@ index: {

@@ -89,4 +89,2 @@ const elasticsearch = require('elasticsearch');

logger.debug('delete doc in collection ', this.mappings[changeStreamObj.ns.coll])
this.bulkOp.push({

@@ -106,4 +104,2 @@ delete: {

try {
logger.debug('get existing doc in collection ', this.mappings[collectionName])
const doc = await this.esClient.search({

@@ -130,3 +126,2 @@ index: this.getESIndexName(collectionName),

try {
logger.debug('delete elastic collection ' ,this.mappings[collectionName])
// First get a count for all ES docs of the specified type

@@ -153,4 +148,2 @@ searchResponse = await this.esClient.search({

for (let j = 0; j < dumpDocs.length; j++) {
log.debug('Trying to delete docs in collection ', this.mappings[collectionName])
bulkDelete.push({

@@ -204,3 +197,7 @@ delete: {

logger.info(JSON.stringify(bulkOp))
try {
logger.info(JSON.stringify(bulkOp[0].index))
} catch (err) {
logger.info("Failed to look at index")
}

@@ -207,0 +204,0 @@ return this.esClient.bulk({

{
"name": "@gesdisc/mongo-stream",
"version": "0.1.3",
"version": "0.1.4",
"description": "Sync data from Mongodb to Elasticsearch",

@@ -5,0 +5,0 @@ "main": "server.js",

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