@iobroker/db-states-file
Advanced tools
Comparing version 4.0.0-alpha.2-20210830-d7e31ee8 to 4.0.0-alpha.20-20211202-7f48f5ea
@@ -24,18 +24,3 @@ /** | ||
settings.autoConnect = false; // delay Client connection to when we need it | ||
// hack around testing problem where subscribe was called before connect | ||
// Should be removed for a later release | ||
const origConnected = settings.connected; | ||
settings.connected = () => { | ||
this.clientConnected = true; | ||
if (Array.isArray(this.storedSubscribes) && this.storedSubscribes.length) { | ||
this.log.warn(`${this.namespace} Replay ${this.storedSubscribes.length} subscription calls for States Server that were done before the client was connected initially`); | ||
this.storedSubscribes.forEach((s => this.subscribe(s.pattern, s.options, s.callback))); | ||
this.storedSubscribes = []; | ||
} | ||
origConnected(); | ||
}; | ||
super(settings); | ||
this.clientConnected = false; | ||
this.storedSubscribes = []; | ||
@@ -62,12 +47,4 @@ const serverSettings = { | ||
} | ||
async subscribe(pattern, options, callback) { | ||
if (!this.clientConnected) { | ||
this.storedSubscribes.push({pattern, options, callback}); // we ignore the promise return because not used for this testing issue we work around here | ||
} else { | ||
await super.subscribe(pattern, options, callback); | ||
} | ||
} | ||
} | ||
module.exports = StatesInMemoryServerClass; |
{ | ||
"name": "@iobroker/db-states-file", | ||
"version": "4.0.0-alpha.2-20210830-d7e31ee8", | ||
"version": "4.0.0-alpha.20-20211202-7f48f5ea", | ||
"engines": { | ||
@@ -8,4 +8,4 @@ "node": ">=12.0.0" | ||
"dependencies": { | ||
"@iobroker/db-base": "4.0.0-alpha.2-20210830-d7e31ee8", | ||
"@iobroker/db-states-redis": "4.0.0-alpha.2-20210830-d7e31ee8" | ||
"@iobroker/db-base": "4.0.0-alpha.20-20211202-7f48f5ea", | ||
"@iobroker/db-states-redis": "4.0.0-alpha.20-20211202-7f48f5ea" | ||
}, | ||
@@ -33,3 +33,7 @@ "keywords": [ | ||
}, | ||
"gitHead": "8d222d1c77eb9647893d26267d899cc0e9571bf9" | ||
"files": [ | ||
"lib/", | ||
"index.js" | ||
], | ||
"gitHead": "c83735f4ad024f449335f45897c1aa68b88e372d" | ||
} |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
33352
747
+ Added@alcalzone/pak@0.7.0(transitive)
+ Added@iobroker/db-base@4.0.0-alpha.20-20211202-7f48f5ea(transitive)
+ Added@iobroker/db-states-redis@4.0.0-alpha.20-20211202-7f48f5ea(transitive)
+ Added@iobroker/js-controller-common@4.0.0-alpha.20-20211202-7f48f5ea(transitive)
+ Addedci-info@3.9.0(transitive)
- Removed@alcalzone/pak@0.6.0(transitive)
- Removed@iobroker/db-base@4.0.0-alpha.2-20210830-d7e31ee8(transitive)
- Removed@iobroker/db-states-redis@4.0.0-alpha.2-20210830-d7e31ee8(transitive)
- Removed@iobroker/js-controller-common@4.0.0-alpha.2-20210830-d7e31ee8(transitive)
Updated@iobroker/db-states-redis@4.0.0-alpha.20-20211202-7f48f5ea