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
316
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.2.9 to 0.2.10

33

lib/runtime/Service.js

@@ -197,2 +197,3 @@ const Model = require("./Model.js")

this.emittedEvents = new Map()
this.commited = false
}

@@ -218,6 +219,11 @@

}
let events = this.emittedEvents.get(service)
if(!events) {
let events
if(!this.commited) {
events = this.emittedEvents.get(service)
if(!events) {
events = []
this.emittedEvents.set(service, events)
}
} else {
events = []
this.emittedEvents.set(service, events)
}

@@ -231,2 +237,6 @@ if(Array.isArray(event)) {

}
if(this.commited) {
this.service.dao.request(['database', 'putLog'], this.service.databaseName,
this.service.name+'_events', { type: 'bucket', events, ...this.flags })
}
}

@@ -236,2 +246,3 @@

let promises = []
this.commited = true
for(const [service, events] of this.emittedEvents.keys()) {

@@ -250,2 +261,3 @@ promises.push(this.service.dao.request(['database', 'putLog'], this.service.databaseName,

this.emittedEvents = []
this.commited = false
}

@@ -258,12 +270,23 @@

}
let events
if(!this.commited) {
events = this.emittedEvents
} else {
events = []
}
if(Array.isArray(event)) {
for(let ev of event) if(!ev.service) ev.service = service
this.emittedEvents.push(...event)
events.push(...event)
} else {
if(!event.service) event.service = service
this.emittedEvents.push(event)
events.push(event)
}
if(this.commited) {
this.service.dao.request(['database', 'putLog'], this.service.databaseName,
'events', { type: 'bucket', events, ...this.flags })
}
}
async commit() {
this.commited = true
return this.service.dao.request(['database', 'putLog'], this.service.databaseName,

@@ -270,0 +293,0 @@ 'events', { type: 'bucket', events: this.emittedEvents, ...this.flags })

2

package.json
{
"name": "@live-change/framework",
"version": "0.2.9",
"version": "0.2.10",
"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