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

@live-change/db

Package Overview
Dependencies
Maintainers
1
Versions
284
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@live-change/db - npm Package Compare versions

Comparing version 0.3.38 to 0.3.39

13

lib/Database.js

@@ -11,3 +11,4 @@ const Table = require('./Table.js')

class Database {
constructor(config, storeFactory, saveConfig, deleteStore) {
constructor(config, storeFactory, saveConfig, deleteStore, name) {
this.name = name
this.config = {

@@ -263,4 +264,14 @@ tables: {},

}
handleUnhandledRejectionInIndex(name, reason, promise) {
const config = this.config.indexes[name]
console.error("INDEX", name, "unhandledRejection", reason, "CODE:\n", config.code)
console.error("DELETING INDEX", name)
delete this.config.indexes[name]
this.indexesListObservable.remove(name)
if(this.onAutoRemoveIndex) this.onAutoRemoveIndex(name, config.uid)
this.saveConfig(this.config)
}
}
module.exports = Database

3

lib/Index.js

@@ -366,2 +366,3 @@ const IntervalTree = require('node-interval-tree').default

super(database, name, config)
this.database = database
this.codeObservable = new ReactiveDao.ObservableValue(code)

@@ -376,3 +377,3 @@ this.params = params

})
const queryFunction = this.scriptContext.run(this.code, 'query')
const queryFunction = this.scriptContext.run(this.code,`userCode:${this.database.name}/indexes/${name}`)
this.codeFunction = (input, output) => queryFunction(input, output, this.params)

@@ -379,0 +380,0 @@ this.writer = new IndexWriter(this)

{
"name": "@live-change/db",
"version": "0.3.38",
"version": "0.3.39",
"description": "Database with observable data for live queries",

@@ -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