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

@live-change/framework

Package Overview
Dependencies
Maintainers
1
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/framework - npm Package Compare versions

Comparing version 0.3.15 to 0.3.16

48

lib/runtime/SearchIndexer.js

@@ -269,27 +269,29 @@

console.log(`WRITING ${rows.length} ROWS`)
let operations = new Array(rows.length*2)
for(let i = 0; i < rows.length; i++) {
operations[i * 2] = { index: { _id: rows[i].id } }
this.prepareObject(rows[i])
operations[i * 2 + 1] = rows[i]
}
await search.bulk({
index: this.indexName,
body: operations
}).then(result => {
if(result.body.errors) {
for(const item of result.body.items) {
if(item.index && item.index.error) {
console.error("ES ERROR:", item.index.error)
console.error("WHEN INDEXING", rows.find(row => row.id == item.index._id))
if(rows.length > 0) {
console.log(`WRITING ${rows.length} ROWS`)
let operations = new Array(rows.length * 2)
for(let i = 0; i < rows.length; i++) {
operations[i * 2] = { index: { _id: rows[i].id } }
this.prepareObject(rows[i])
operations[i * 2 + 1] = rows[i]
}
await search.bulk({
index: this.indexName,
body: operations
}).then(result => {
if(result.body.errors) {
for(const item of result.body.items) {
if(item.index && item.index.error) {
console.error("ES ERROR:", item.index.error)
console.error("WHEN INDEXING", rows.find(row => row.id == item.index._id))
}
}
throw new Error("ES ERRORS")
}
throw new Error("ES ERRORS")
}
}).catch(error => {
error = (error && error.meta && error.meta.body && error.meta.body.error) || error
console.error("ES ERROR:", error)
throw error
})
}).catch(error => {
error = (error && error.meta && error.meta.body && error.meta.body.error) || error
console.error("ES ERROR:", error)
throw error
})
}
console.log("ES INDEXED!")

@@ -296,0 +298,0 @@

{
"name": "@live-change/framework",
"version": "0.3.15",
"version": "0.3.16",
"description": "Live Change Framework - ultimate solution for real time mobile/web apps",

@@ -5,0 +5,0 @@ "main": "index.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