@iobroker/db-states-file
Advanced tools
Comparing version 1.1.4 to 1.2.0
/** | ||
* States DB in memory - Server | ||
* | ||
* Copyright 2013-2018 bluefox <dogafox@gmail.com> | ||
* Copyright 2013-2021 bluefox <dogafox@gmail.com> | ||
* | ||
@@ -6,0 +6,0 @@ * MIT License |
/** | ||
* States DB in memory - Server with Redis protocol | ||
* | ||
* Copyright 2013-2020 bluefox <dogafox@gmail.com> | ||
* Copyright 2013-2021 bluefox <dogafox@gmail.com> | ||
* | ||
@@ -6,0 +6,0 @@ * MIT License |
/** | ||
* States DB in memory - Server with Redis protocol | ||
* | ||
* Copyright 2013-2020 bluefox <dogafox@gmail.com> | ||
* Copyright 2013-2021 bluefox <dogafox@gmail.com> | ||
* | ||
@@ -68,3 +68,3 @@ * MIT License | ||
}).then(() => { | ||
this.log.debug(this.namespace + ' ' + (settings.secure ? 'Secure ' : '') + ' Redis inMem-states listening on port ' + (this.settings.port || 9000)); | ||
this.log.debug(`${this.namespace} ${settings.secure ? 'Secure ' : ''} Redis inMem-states listening on port ${this.settings.port || 9000}`); | ||
@@ -75,3 +75,3 @@ if (typeof this.settings.connected === 'function') { | ||
}).catch(e => { | ||
this.log.error(this.namespace + ' Cannot start inMem-states on port ' + (this.settings.port || 9000) + ': ' + e.message); | ||
this.log.error(`${this.namespace} Cannot start inMem-states on port ${this.settings.port || 9000}: ${e.message}`); | ||
process.exit(24); // todo: replace it with exitcode | ||
@@ -205,3 +205,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('MGET-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`MGET-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -232,3 +232,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('GET-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`GET-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -252,6 +252,6 @@ }); | ||
} catch (err) { | ||
handler.sendError(responseId, new Error('ERROR setState id=' + id + ': ' + err.message)); | ||
handler.sendError(responseId, new Error(`ERROR setState id=${id}: ${err.message}`)); | ||
} | ||
} else { | ||
handler.sendError(responseId, new Error('SET-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`SET-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -273,3 +273,3 @@ }); | ||
if (isNaN(expire)) { | ||
return void handler.sendError(responseId, new Error('ERROR parsing expire value ' + data[1].toString('utf-8'))); | ||
return void handler.sendError(responseId, new Error(`ERROR parsing expire value ${data[1].toString('utf-8')}`)); | ||
} | ||
@@ -279,3 +279,3 @@ this._setStateDirect(id, state, expire); | ||
} catch (err) { | ||
handler.sendError(responseId, new Error('ERROR setStateEx id=' + id + ': ' + err.message)); | ||
handler.sendError(responseId, new Error(`ERROR setStateEx id=${id}: ${err.message}`)); | ||
} | ||
@@ -287,3 +287,3 @@ } else if (namespace === this.namespaceSession) { | ||
if (isNaN(expire)) { | ||
return void handler.sendError(responseId, new Error('ERROR parsing expire value ' + data[1].toString('utf-8'))); | ||
return void handler.sendError(responseId, new Error(`ERROR parsing expire value ${data[1].toString('utf-8')}`)); | ||
} | ||
@@ -293,6 +293,6 @@ this._setSession(id, expire, state); | ||
} catch (err) { | ||
handler.sendError(responseId, new Error('ERROR _setSession ' + id + ': ' + err.message)); | ||
handler.sendError(responseId, new Error(`ERROR _setSession ${id}: ${err.message}`)); | ||
} | ||
} else { | ||
handler.sendError(responseId, new Error('SETEX-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`SETEX-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -311,3 +311,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('DEL-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`DEL-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -332,3 +332,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('KEYS-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`KEYS-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -350,3 +350,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('PSUBSCRIBE-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`PSUBSCRIBE-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -368,3 +368,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('PUNSUBSCRIBE-UNSUPPORTED for namespace ' + namespace + ': Data=' + JSON.stringify(data))); | ||
handler.sendError(responseId, new Error(`PUNSUBSCRIBE-UNSUPPORTED for namespace ${namespace}: Data=${JSON.stringify(data)}`)); | ||
} | ||
@@ -379,3 +379,3 @@ }); | ||
} else { | ||
handler.sendError(responseId, new Error('SUBSCRIBE-UNSUPPORTED for ' + data[0])); | ||
handler.sendError(responseId, new Error(`SUBSCRIBE-UNSUPPORTED for ${data[0]}`)); | ||
} | ||
@@ -456,3 +456,3 @@ }); | ||
_initSocket(socket) { | ||
this.settings.connection.enhancedLogging && this.log.silly(this.namespace + ' Handling new Redis States connection'); | ||
this.settings.connection.enhancedLogging && this.log.silly(`${this.namespace} Handling new Redis States connection`); | ||
@@ -459,0 +459,0 @@ const options = { |
{ | ||
"name": "@iobroker/db-states-file", | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"engines": { | ||
@@ -8,4 +8,4 @@ "node": ">=10.0.0" | ||
"dependencies": { | ||
"@iobroker/db-base": "1.1.4", | ||
"@iobroker/db-states-redis": "1.1.4" | ||
"@iobroker/db-base": "1.2.0", | ||
"@iobroker/db-states-redis": "1.2.0" | ||
}, | ||
@@ -33,3 +33,3 @@ "keywords": [ | ||
}, | ||
"gitHead": "6c53b763a000e4acb0b73ffcff327e051f60373f" | ||
"gitHead": "31a8cce837dc360eec0f40f6ac6f50247c4fac9a" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34336
+ Added@iobroker/db-base@1.2.0(transitive)
+ Added@iobroker/db-states-redis@1.2.0(transitive)
- Removed@iobroker/db-base@1.1.4(transitive)
- Removed@iobroker/db-states-redis@1.1.4(transitive)
Updated@iobroker/db-base@1.2.0