New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@everymundo/data-integration-framework

Package Overview
Dependencies
Maintainers
27
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@everymundo/data-integration-framework - npm Package Compare versions

Comparing version 0.3.3 to 0.4.0

35

lib/mongodb.js

@@ -55,2 +55,10 @@ 'use strict'

const results = await Promise.all(promises)
const newDocs = []
results.forEach((r, i) => {
if (r.modifiedCount || r.upsertedCount) {
newDocs.push(toShortFare(prices[i]).mongoDoc)
}
})
logr.info(`${results.length} updates completed!`)

@@ -66,3 +74,28 @@

return results
if (process.env.KINESIS_STREAM && process.env.AWS_REGION) {
const Kinesis = require('aws-sdk/clients/kinesis')
const kinesisClient = new Kinesis({ region: process.env.AWS_REGION })
const Records = newDocs.map((newDoc, i) => ({
Data: JSON.stringify(newDoc),
PartitionKey: '1'
}))
if (Records.length === 0) {
return console.log('Nothing to do with Kinesis')
}
console.log(`Publishing ${Records.length} Records to Kinesis`)
return kinesisClient.putRecords({
Records,
StreamName: process.env.KINESIS_STREAM
}).promise()
.then((res) => {
console.log('KINESIS UPDATE WORKED', res)
})
.catch((err) => {
console.log('KINESIS DID NOT WORK', err)
})
}
return { results, newDocs }
}

@@ -69,0 +102,0 @@

3

package.json
{
"name": "@everymundo/data-integration-framework",
"version": "0.3.3",
"version": "0.4.0",
"description": "Common logic shared across data integration applications",

@@ -34,2 +34,3 @@ "main": "index.js",

"devDependencies": {
"aws-sdk": "^2.493.0",
"chai": "^4.2.0",

@@ -36,0 +37,0 @@ "dotenv": "^8.0.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