@iobroker/db-objects-jsonl 4.0.3 → 4.0.5-alpha.2-20220208-ac4cf51e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -45,8 +45,8 @@ const ObjectsInMemoryJsonlDB = require('./objectsInMemJsonlDB');
|
|
|
45
45
|
//
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
|
-
* This class inherits
|
|
49
|
-
* to access the methods via
|
|
48
|
+
* This class inherits statesInMemoryJsonlDB class and adds redis communication layer
|
|
49
|
+
* to access the methods via redis protocol
|
|
50
50
|
**/
|
|
51
51
|
class ObjectsInMemoryServer extends ObjectsInMemoryJsonlDB {
|
|
52
52
|
/**
|
|
@@ -841,28 +841,25 @@ class ObjectsInMemoryServer extends ObjectsInMemoryJsonlDB {
|
|
|
841
841
|
* Destructor of the class. Called by shutting down.
|
|
842
842
|
*/
|
|
843
843
|
async destroy() {
|
|
844
|
-
await super.destroy();
|
|
845
|
-
|
|
846
844
|
if (this.server) {
|
|
847
845
|
Object.keys(this.serverConnections).forEach(s => {
|
|
848
846
|
this.serverConnections[s].close();
|
|
849
847
|
delete this.serverConnections[s];
|
|
850
848
|
});
|
|
851
849
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
})
|
|
864
|
-
);
|
|
850
|
+
await new Promise(resolve => {
|
|
851
|
+
if (!this.server) {
|
|
852
|
+
return void resolve();
|
|
853
|
+
}
|
|
854
|
+
try {
|
|
855
|
+
this.server.close(() => resolve());
|
|
856
|
+
} catch (e) {
|
|
857
|
+
console.log(e.message);
|
|
858
|
+
resolve();
|
|
859
|
+
}
|
|
860
|
+
});
|
|
865
861
|
}
|
|
862
|
+
await super.destroy();
|
|
866
863
|
}
|
|
867
864
|
|
|
868
865
|
/**
|
|
@@ -977,7 +974,7 @@ class ObjectsInMemoryServer extends ObjectsInMemoryJsonlDB {
|
|
|
977
974
|
_initRedisServer(settings) {
|
|
978
975
|
return new Promise((resolve, reject) => {
|
|
979
976
|
if (settings.secure) {
|
|
980
|
-
reject(new Error('Secure Redis unsupported for
|
|
977
|
+
reject(new Error('Secure Redis unsupported for JSONL-DB'));
|
|
981
978
|
}
|
|
982
979
|
try {
|
|
983
980
|
this.server = net.createServer();
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/db-objects-jsonl",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@alcalzone/jsonl-db": "~2.4.1",
|
|
9
|
-
"@iobroker/db-base": "4.0.
|
|
10
|
-
"@iobroker/db-objects-file": "4.0.
|
|
11
|
-
"@iobroker/db-objects-redis": "4.0.
|
|
9
|
+
"@iobroker/db-base": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
10
|
+
"@iobroker/db-objects-file": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
11
|
+
"@iobroker/db-objects-redis": "4.0.5-alpha.2-20220208-ac4cf51e",
|
|
12
12
|
"deep-clone": "^3.0.3",
|
|
13
13
|
"fs-extra": "^10.0.0"
|
|
14
14
|
},
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"lib/",
|
|
38
38
|
"index.js"
|
|
39
39
|
],
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "164e97c24ac7094a4442a3d44268e2b480db1171"
|
|
41
41
|
}
|