@iobroker/db-objects-redis 1.2.6 → 4.0.0-alpha.11-20211118-e40274a2

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.
@@ -299,19 +299,20 @@ class ObjectsInRedisClient {
299
299
  !ready && typeof this.settings.connected === 'function' && this.settings.connected();
300
300
  ready = true;
301
301
  }
302
- // subscribe on system.config only if js-controller
303
- if (this.settings.controller) {
304
- try {
305
- await this.subSystem.psubscribe(`${this.objNamespace}system.config`);
306
- } catch {
307
- // ignore
308
- }
302
+ // subscribe on system.config anytime because also adapters need stuff like defaultNewAcl (especially admin)
303
+ try {
304
+ this.subSystem && await this.subSystem.psubscribe(`${this.objNamespace}system.config`);
305
+ } catch {
306
+ // ignore
309
307
  }
310
- for (const sub of Object.keys(this.subSystem.ioBrokerSubscriptions)) {
311
- try {
312
- await this.subSystem.psubscribe(sub);
313
- } catch {
314
- // ignore
308
+
309
+ if (this.subSystem) {
310
+ for (const sub of Object.keys(this.subSystem.ioBrokerSubscriptions)) {
311
+ try {
312
+ await this.subSystem.psubscribe(sub);
313
+ } catch {
314
+ // ignore
315
+ }
315
316
  }
316
317
  }
317
318
  });
@@ -3209,7 +3210,7 @@ class ObjectsInRedisClient {
3209
3210
  } catch {
3210
3211
  //ignore
3211
3212
  }
3212
- // eslint-disable-next-line no-unused-vars
3213
+
3213
3214
  const _emit_ = (id, obj) => {
3214
3215
  result.rows.push({id: id, value: obj});
3215
3216
  };
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@iobroker/db-objects-redis",
3
- "version": "1.2.6",
3
+ "version": "4.0.0-alpha.11-20211118-e40274a2",
4
4
  "engines": {
5
- "node": ">=10.0.0"
5
+ "node": ">=12.0.0"
6
6
  },
7
7
  "dependencies": {
8
- "@iobroker/db-base": "1.2.4",
8
+ "@iobroker/db-base": "4.0.0-alpha.11-20211118-e40274a2",
9
9
  "deep-clone": "^3.0.3",
10
- "ioredis": "^4.27.3",
10
+ "ioredis": "^4.28.0",
11
11
  "node.extend": "^2.0.2"
12
12
  },
13
13
  "keywords": [
@@ -19,11 +19,11 @@
19
19
  "contributors": [
20
20
  "bluefox <dogafox@gmail.com>",
21
21
  "Apollon77 <iobroker@fischer-ka.de>",
22
- "foxriver76"
22
+ "foxriver76 <moritz.heusinger@gmail.com>"
23
23
  ],
24
24
  "repository": {
25
25
  "type": "git",
26
- "url": "https://github.com/ioBroker/ioBroker.objects-redis"
26
+ "url": "https://github.com/ioBroker/ioBroker.js-controller/packages/db-objects-redis"
27
27
  },
28
28
  "scripts": {},
29
29
  "main": "index.js",
@@ -31,5 +31,9 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "20816e582c8b92a9eb9f4bf7e90d12cba566a143"
34
+ "files": [
35
+ "lib/",
36
+ "index.js"
37
+ ],
38
+ "gitHead": "077e48fdd1ea959e255de613bcd88f6a4cfd9dc5"
35
39
  }
package/CHANGELOG_OLD.md DELETED
@@ -1,285 +0,0 @@
1
- # Changelog objects-redis
2
-
3
- This changelog is from the time before we moved to the Mono-Repo of DB classes.
4
-
5
- ### 5.0.0 (2020-07-29)
6
- * (bluefox) Change the license to Apache 2.0
7
-
8
- ### 4.0.4 (2020-06-19)
9
- * (foxriver76) use connection name to allow CLIENT SETNAME
10
-
11
- ### 4.0.3 (2020-06-08)
12
- * (foxriver76) throw error on writeFile without Meta object
13
- * (foxriver76) add objectExist method
14
- * (foxriver76) change some callbacks to maybeCb
15
-
16
- ### 4.0.2 (2020-06-01)
17
- * (foxriver76) using promises for all redis calls
18
-
19
- ### 4.0.1 (2020-05-27)
20
- * (foxriver76) add maybeCallback(WithError) helper methods
21
-
22
- ### 4.0.0 (2020-05-27)
23
- * (foxriver76) use redis scan command instead keys
24
-
25
- ### 3.3.9 (2020-05-24)
26
- * (Apollon77) re-add fileExists method
27
- * (bluefox) use auth_pass as redis password if provided
28
-
29
- ### 3.3.8 (2020-05-09)
30
- * (Apollon77) check that data is existing for writeFile
31
-
32
- ### 3.3.7 (2020-05-04)
33
- * (foxriver76) Added fileExists function
34
-
35
- ### 3.3.6 (2020-05-03)
36
- * (foxriver76) change logging for invalid readFile's to debug
37
-
38
- ### 3.3.5 (2020-05-01)
39
- * (foxriver76) fix logging in some places
40
-
41
- ### 3.3.4 (2020-04-28)
42
- * (Apollon77) Fixed one callback typo
43
-
44
- ### 3.3.3 (2020-04-26)
45
- * (bluefox) Catch some errors if no callback defined
46
-
47
- ### 3.3.2 (2020-04-17)
48
- * (Apollon77) make sure when db connection is closed while reading view data it is handled correctly
49
-
50
- ### 3.3.1 (2020-04-15)
51
- * (Apollon77) baseline version to generate map files for official js.controller 3 latest release
52
-
53
- ### 3.3.0 (2020-04-11)
54
- * (Apollon77) use deep-clone and isDeepStrictEqual
55
- * (Apollon77) implement Async methods for all relevant methods
56
-
57
- ### 3.2.1 (2020-04-06)
58
- * (Apollon77) Adjust invalid protocol error message
59
-
60
- ### 3.2.0 (2020-04-06)
61
- * (foxriver76) make sure all internal paths for file store are linux style
62
- * (foxriver76) add check and warning logs when file actions are tried without a proper meta object
63
-
64
- ### 3.1.1 (2020-04-03)
65
- * (Apollon77) Fix some Objects File checks
66
-
67
- ### 3.1.0 (2020-04-01)
68
- * (Apollon77) Make sure methods that call callback async (e.g. because of db communication) always do that async
69
-
70
- ### 3.0.0 (2020-03-28)
71
- * (foxriver76) Performance increase: adjust lua scripts and JS code to use SCAN for filter scripts
72
- * (foxriver76) code formatting
73
-
74
- ### 2.0.5 (2020-03-21)
75
- * (Apollon77) fix type in alias check
76
- * (Apollon77) update ioredis dependency
77
-
78
- ### 2.0.4 (2020-01-17)
79
- * (Apollon77) Do not have ioredis autoResubscribe because we do it by our own
80
-
81
- ### 2.0.3 (2019-12-31)
82
- * (Apollon77) Simplify logic and convert customs directly here. Corresponding change in controller make sure it works
83
-
84
- ### 2.0.2 (2019-12-31)
85
- * (Apollon77) Add check for pot. null object when getting Object list
86
-
87
- ### 2.0.1 (2019-12-26)
88
- * (Apollon77) Remove socket.io Fallback ... now it is breaking and worth 2.0 :-)
89
-
90
- ### 2.0.0 (2019-12-26)
91
- * (Apollon77) Split system and user/adapter subscribes; lift to 2.0 to prevent potential backward compatibility issues
92
-
93
- ### 1.2.12 (2019-12-11)
94
- * (bluefox) Fixed: merge of custom settings is wrong
95
-
96
- ### 1.2.10 (2019-12-06)
97
- * (bluefox) Fixed: when connection was destroyed while trying to register lua scripts an exception could have happened
98
-
99
- ### 1.2.9 (2019-11-29)
100
- * (bluefox) Fixed: new objects were created with "admin" as owner and not with current user
101
-
102
- ### 1.2.8 (2019-11-22)
103
- * (Apollon77) fix potential crash
104
-
105
- ### 1.2.7 (2019-11-18)
106
- * (Apollon77) prevent pot. "sandboxed" objects from being wrong used in extendObject
107
-
108
- ### 1.2.6 (2019-11-14)
109
- * (Apollon77) code refactoring and some roe error checks for disconnect cases
110
-
111
- ### 1.2.3 (2019-11-12)
112
- * (bluefox) add logging
113
-
114
- ### 1.2.2 (2019-11-10)
115
- * (bluefox) formatting and some sanity checks
116
-
117
- ### 1.2.1 (2019-11-07)
118
- * (Apollon77) prevent callbacks from being called multiple times when (un)subscribing using an array
119
-
120
- ### 1.2.0 (2019-11-05)
121
- * (bluefox) fix applyViewFunc if the start and the end key are equal
122
-
123
- ### 1.1.50 (2019-10-28)
124
- * (Apollon77) fix common.name filtering with empty names to work as before
125
-
126
- ### 1.1.49 (2019-10-27)
127
- * (Apollon77) also allow numbers as first character
128
-
129
- ### 1.1.48 (2019-10-26)
130
- * (Apollon77) Handle invalid file path as not found, only log debug
131
-
132
- ### 1.1.47 (2019-10-25)
133
- * (Apollon77) Enhance logging
134
-
135
- ### 1.1.46 (2019-10-24)
136
- * (Apollon77) Add some more logic to prevent access with invalid ids
137
-
138
- ### 1.1.45 (2019-10-19)
139
- * (Apollon77) Adjust "enhancedLogging" to be per DB
140
- * (bluefox) Formatting
141
-
142
- ### 1.1.43 (2019-10-19)
143
- * (Apollon77) Adjust "enhancedLogging" to be per DB
144
-
145
- ### 1.1.42 (2019-10-19)
146
- * (Apollon77) No need to copy the Buffer when returning files
147
-
148
- ### 1.1.41 (2019-10-19)
149
- * (Apollon77) Allow to use Redis password as "pass" parameter
150
-
151
- ### 1.1.40 (2019-10-17)
152
- * (Apollon77) set all currently used "preserveSettings" manually till real solution in 2.1
153
-
154
- ### 1.1.39 (2019-10-16)
155
- * (Apollon77) work on reconnection delays
156
-
157
- ### 1.1.38 (2019-10-14)
158
- * (bluefox) Check empty objects
159
-
160
- ### 1.1.37 (2019-10-14)
161
- * (Apollon77) Reconnection enhancements
162
-
163
- ### 1.1.36 (2019-10-14)
164
- * (Apollon77) Reconnection enhancements
165
-
166
- ### 1.1.35 (2019-10-13)
167
- * (Apollon77) Check setObject that argument is an object
168
- * (Apollon77) make sure also objects with _ are allowed
169
-
170
- ### 1.1.34 (2019-10-13)
171
- * (Apollon77) Enhance one error message
172
-
173
- ### 1.1.33 (2019-10-09)
174
- * (Apollon77) Also allow objects with capital letters as first letter in name
175
-
176
- ### 1.1.32 (2019-10-07)
177
- * (Apollon77) increase LUA script timeout to 10s for now till real fix for ObjectViews in js-controller 2.1
178
-
179
- ### 1.1.30 (2019-10-06)
180
- * (Apollon77) make sure ioredis do not throw errors on unhandled promises when closing the connection
181
-
182
- ### 1.1.28 (2019-10-04)
183
- * (Apollon77) try to optimize run performance a bit, especially run callbacks and onchange handlings on next tick
184
-
185
- ### 1.1.26 (2019-10-04)
186
- * (Apollon77) sanitize file path the same for redis as for file
187
-
188
- ### 1.1.25 (2019-10-03)
189
- * (Apollon77) adjust object namespace regex and handling
190
-
191
- ### 1.1.24 (2019-10-01)
192
- * (Apollon77) allow to set Redis DB and network family, defaults to 0
193
-
194
- ### 1.1.23 (2019-09-30)
195
- * (Apollon77) small optimizations
196
-
197
- ### 1.1.22 (2019-09-27)
198
- * (Apollon77) fix fallback handling with old style "emit"
199
-
200
- ### 1.1.21 (2019-09-26)
201
- * (Apollon77) getting States with wildcard not at the end is not working well in lua, simulate it for now
202
-
203
- ### 1.1.20 (2019-09-26)
204
- * (Apollon77) only use quit from redid and let ioredis handle the disconnect
205
-
206
- ### 1.1.19 (2019-09-24)
207
- * (Apollon77) optimize communication processes by calling quit instead of just disconnecting
208
-
209
- ### 1.1.18 (2019-09-22)
210
- * (Apollon77) optimize handling for directories to be more compatible with socket.io before
211
-
212
- ### 1.1.17 (2019-09-21)
213
- * (Apollon77) normalize filenames to prevent problems with multiple slashes in the path
214
-
215
- ### 1.1.15 (2019-09-16)
216
- * (Apollon77) enhance some error messages
217
-
218
- ### 1.1.14 (2019-09-15)
219
- * (Apollon77) fix getObjectView for "custom" because it was returning null values
220
-
221
- ### 1.1.13 (2019-09-15)
222
- * (Apollon77) latest fixes, add some more edge case handling
223
-
224
- ### 1.1.12 (2019-09-15)
225
- * (Apollon77) fix and enhance rename method
226
-
227
- ### 1.1.11 (2019-09-14)
228
- * (Apollon77) fix chmod, chown and special file functions
229
-
230
- ### 1.1.10 (2019-09-10)
231
- * (Apollon77) fix unlink to be compatible to socket.io
232
-
233
- ### 1.1.8 (2019-09-09)
234
- * (Apollon77) fix readDir to be compatible to before and some other file stuff
235
-
236
- ### 1.1.7 (2019-09-08)
237
- * (Apollon77) fix some special object views
238
-
239
- ### 1.1.6 (2019-08-30)
240
- * (Apollon77) correct logging message
241
-
242
- ### 1.1.5 (2019-08-19)
243
- * (Apollon77) enhance logging to always contain the namespace
244
-
245
- ### 1.1.4 (2019-08-11)
246
- * (Apollon77) enhance filter view queries to work more generic
247
-
248
- ### 1.1.3 (2019-08-07)
249
- * (Apollon77) fix redis initializations
250
-
251
- ### 1.1.2 (2019-08-06)
252
- * (Apollon77) optimize code
253
-
254
- ### 1.1.1 (2019-07-28)
255
- * (Apollon77) handle error case for not existing keys
256
-
257
- ### 1.1.0 (2019-07-19)
258
- * (Apollon77) Add Redis Sentinel Support
259
-
260
- ### 1.0.3 (2019-06-25)
261
- * (bluefox) Add aliases
262
-
263
- ### 1.0.1 (2019-05-23)
264
- * (bluefox) catch parse errors
265
-
266
- ### 0.4.4 (2019-05-10)
267
- * (Apollon77) Remove additional logging and finalize for now, one bug left
268
-
269
- ### 0.4.0-3 (2019-05-07)
270
- * (Apollon77) switch to ioredis as library and add some debug
271
-
272
- ### 0.3.3-8 (2019-05-05)
273
- * (Apollon77) fixes and optimizations
274
-
275
- ### 0.3.2 (2019-05-05)
276
- * (bluefox) remove objectsUtils.js
277
-
278
- ### 0.3.1 (2019-05-05)
279
- * (Apollon77) fixes for Redis-In-Mem-Servers
280
-
281
- ### 0.3.0 (2019-04-12)
282
- * (Apollon77) prepare for use with Redis-In-Mem-Servers
283
-
284
- ### 0.2.8 (2018-12-31)
285
- * (bluefox) allow array for subscribeForeignObjects and subscribeObjects