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
333
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.5.12 to 0.5.13

2

lib/App.js

@@ -76,3 +76,3 @@ const { uidGenerator, randomString } = require('@live-change/uid')

this.instanceId = randomString(4)
this.uidGenerator = uidGenerator(this.instanceId)
this.uidGenerator = uidGenerator(this.instanceId, this.config.uidBorders)

@@ -79,0 +79,0 @@ this.activeTimeouts = new Set()

@@ -31,20 +31,20 @@ const LcDao = require("@live-change/dao")

let credentials = { ...credentialsp, ip, roles: [] }
const allAuthenticators = []
if(this.config.authenticators) {
const auth = Array.isArray(this.config.authenticators)
? this.config.authenticators : [this.config.authenticators]
for(const authenticator of auth) {
if(authenticator && authenticator.prepareCredentials)
await authenticator.prepareCredentials(credentials, this.config)
}
allAuthenticators.push(...auth.filter(a => !!a))
}
for(const service of this.config.services) {
console.log("SERIVCE AUTH", service.name, service.authenticators)
//console.log("SERIVCE AUTH", service.name, service.authenticators)
if(service.authenticators) {
for(const authenticator of service.authenticators) {
if(authenticator && authenticator.prepareCredentials)
await authenticator.prepareCredentials(credentials, this.config)
}
allAuthenticators.push(...service.authenticators.filter(a => !!a))
}
}
const dao = new this.DaoConstructor(this.config, { ...credentials })
for(const authenticator of allAuthenticators) {
if(authenticator.prepareCredentials) {
await authenticator.prepareCredentials(credentials, this.config)
}
}
const dao = new this.DaoConstructor({ ...this.config, authenticators: allAuthenticators }, { ...credentials })
await dao.start()

@@ -51,0 +51,0 @@ return dao

@@ -14,18 +14,4 @@ const LcDao = require("@live-change/dao")

if(this.config.authenticators) {
const auth = Array.isArray(this.config.authenticators)
? this.config.authenticators : [this.config.authenticators]
for(const authenticator of auth) {
if(authenticator && authenticator.authenticatorObservable)
this.authenticators.push(authenticator)
}
this.authenticators = this.config.authenticators.filter(a => a.credentialsObservable)
}
for(const service of this.config.services) {
console.log("SERIVCE AUTH", service.name, service.authenticators)
if(service.authenticators) {
for(const authenticator of service.authenticators) {
if(authenticator && authenticator.authenticatorObservable)
this.authenticators.push(authenticator)
}
}
}

@@ -52,4 +38,4 @@ this.currentDao = null

...credentials,
...credentialsObservers.credentials,
roles: [...credentials.roles, ...credentialsObserver.credentials.roles]
...credentialsObserver.credentials,
roles: [...credentials.roles, ...(credentialsObserver.credentials.roles || [])]
}

@@ -62,9 +48,17 @@ }

this.credentialsObservations = this.authenticators.map(authenticator => {
const observable = authenticator.authenticatorObservable(this.initialCredentials)
const result = authenticator.credentialsObservable(this.initialCredentials)
const observable = result.then ? new LcDao.ObservablePromiseProxy(result) : result
const observer = {
set: (newCredentials) => {
state.credentials = newCredentials
set: (data) => {
console.log("NEW CREDENTIALS", data)
if(data) {
const { id, ...newCredentials } = data
state.credentials = newCredentials
} else {
state.credentials = {}
}
this.refreshCredentials()
}
}
observable.observe(observer)
const promise = waitForSignal(observable)

@@ -71,0 +65,0 @@ const state = {

{
"name": "@live-change/framework",
"version": "0.5.12",
"version": "0.5.13",
"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