@iobroker/js-controller-adapter 5.0.13 → 5.0.14-alpha.0-20231017-1cfd77e8
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.
- package/build/lib/_Types.d.ts +5 -5
- package/build/lib/_Types.d.ts.map +1 -1
- package/build/lib/adapter/adapter.d.ts +5 -0
- package/build/lib/adapter/adapter.d.ts.map +1 -1
- package/build/lib/adapter/adapter.js +334 -313
- package/build/lib/adapter/adapter.js.map +1 -1
- package/build/lib/adapter/constants.d.ts +1 -1
- package/build/lib/adapter/constants.js +2 -2
- package/build/lib/adapter/constants.js.map +1 -1
- package/build/lib/adapter/validator.d.ts +21 -21
- package/build/lib/adapter/validator.d.ts.map +1 -1
- package/build/lib/adapter/validator.js +27 -27
- package/build/lib/adapter/validator.js.map +1 -1
- package/package.json +10 -10
|
@@ -21,7 +21,7 @@ export declare enum STATE_QUALITY {
|
|
|
21
21
|
BAD = 1,
|
|
22
22
|
/** The instance cannot establish a connection */
|
|
23
23
|
CONNECTION_PROBLEM = 2,
|
|
24
|
-
/** Substitute value from controller
|
|
24
|
+
/** Substitute value from controller. Do not set this in adapters */
|
|
25
25
|
SUBSTITUTE_FROM_CONTROLLER = 16,
|
|
26
26
|
/** Quality for default values */
|
|
27
27
|
SUBSTITUTE_INITIAL_VALUE = 32,
|
|
@@ -25,7 +25,7 @@ var STATE_QUALITY;
|
|
|
25
25
|
STATE_QUALITY[STATE_QUALITY["BAD"] = 1] = "BAD";
|
|
26
26
|
/** The instance cannot establish a connection */
|
|
27
27
|
STATE_QUALITY[STATE_QUALITY["CONNECTION_PROBLEM"] = 2] = "CONNECTION_PROBLEM";
|
|
28
|
-
/** Substitute value from controller
|
|
28
|
+
/** Substitute value from controller. Do not set this in adapters */
|
|
29
29
|
STATE_QUALITY[STATE_QUALITY["SUBSTITUTE_FROM_CONTROLLER"] = 16] = "SUBSTITUTE_FROM_CONTROLLER";
|
|
30
30
|
/** Quality for default values */
|
|
31
31
|
STATE_QUALITY[STATE_QUALITY["SUBSTITUTE_INITIAL_VALUE"] = 32] = "SUBSTITUTE_INITIAL_VALUE";
|
|
@@ -68,7 +68,7 @@ const SUPPORTED_FEATURES_INTERNAL = [
|
|
|
68
68
|
'CUSTOM_FULL_VIEW',
|
|
69
69
|
'ADAPTER_GET_OBJECTS_BY_ARRAY',
|
|
70
70
|
'CONTROLLER_UI_UPGRADE',
|
|
71
|
-
'ADAPTER_WEBSERVER_UPGRADE' // Controller supports upgrading adapter and
|
|
71
|
+
'ADAPTER_WEBSERVER_UPGRADE' // Controller supports upgrading adapter and provides a webserver (triggered via sendToHost). Since `js-controller` 5.0
|
|
72
72
|
];
|
|
73
73
|
exports.SUPPORTED_FEATURES = [...SUPPORTED_FEATURES_INTERNAL];
|
|
74
74
|
/** Maximum possible value for 32-bit signed integer */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/adapter/constants.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,cAAc,GAAG,iBAAiB,CAAC;AACnC,QAAA,iBAAiB,GAAG,QAAQ,CAAC;AAC7B,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AACxC,QAAA,kBAAkB,GAAG,4BAA4B,CAAC;AAClD,QAAA,gBAAgB,GAAG,iBAAiB,CAAC;AACrC,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACzB,QAAA,kBAAkB,GAAG,IAAI,CAAC;AAC1B,QAAA,kBAAkB,GAAG,GAAG,CAAC;AACzB,QAAA,iBAAiB,GAAG,GAAG,CAAC;AACxB,QAAA,gBAAgB,GAAG,KAAK,CAAC;AACzB,QAAA,iBAAiB,GAAG,KAAK,CAAC;AAC1B,QAAA,mBAAmB,GAAG,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAE1E,mEAAmE;AACnE,IAAY,aA+BX;AA/BD,WAAY,aAAa;IACrB,oCAAoC;IACpC,iDAAW,CAAA;IACX,sBAAsB;IACtB,+CAAU,CAAA;IACV,iDAAiD;IACjD,6EAAyB,CAAA;IACzB,oEAAoE;IACpE,8FAAiC,CAAA;IACjC,iCAAiC;IACjC,0FAA+B,CAAA;IAC/B,+CAA+C;IAC/C,0GAAuC,CAAA;IACvC,qCAAqC;IACrC,yFAA8B,CAAA;IAC9B,kCAAkC;IAClC,0FAA+B,CAAA;IAC/B,gCAAgC;IAChC,sFAA6B,CAAA;IAC7B,gCAAgC;IAChC,uFAA6B,CAAA;IAC7B,oCAAoC;IACpC,sFAA6B,CAAA;IAC7B,kCAAkC;IAClC,kFAA2B,CAAA;IAC3B,kCAAkC;IAClC,mFAA2B,CAAA;IAC3B,uCAAuC;IACvC,gFAA0B,CAAA;IAC1B,uCAAuC;IACvC,iFAA0B,CAAA;AAC9B,CAAC,EA/BW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QA+BxB;AAED,oDAAoD;AACpD,MAAM,2BAA2B,GAAG;IAChC,OAAO;IACP,8BAA8B;IAC9B,sBAAsB;IACtB,8BAA8B;IAC9B,uCAAuC;IACvC,6BAA6B;IAC7B,SAAS;IACT,6BAA6B;IAC7B,oCAAoC;IACpC,uBAAuB;IACvB,4BAA4B;IAC5B,qBAAqB;IACrB,oBAAoB;IACpB,kBAAkB;IAClB,8BAA8B;IAC9B,uBAAuB;IACvB,2BAA2B,CAAC,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/lib/adapter/constants.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,cAAc,GAAG,iBAAiB,CAAC;AACnC,QAAA,iBAAiB,GAAG,QAAQ,CAAC;AAC7B,QAAA,iBAAiB,GAAG,mBAAmB,CAAC;AACxC,QAAA,kBAAkB,GAAG,4BAA4B,CAAC;AAClD,QAAA,gBAAgB,GAAG,iBAAiB,CAAC;AACrC,QAAA,iBAAiB,GAAG,IAAI,CAAC;AACzB,QAAA,kBAAkB,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kBAAkB,GAAG,CAAC,GAAG,2BAA2B,CAAC,CAAC;AAInE,uDAAuD;AAC1C,QAAA,WAAW,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ type Callback = (...args: any[]) => void | Promise<void>;
|
|
|
4
4
|
type OptionalCallback = undefined | Callback;
|
|
5
5
|
type Pattern = string | string[];
|
|
6
6
|
export interface ValidateIdOptions {
|
|
7
|
-
/** in maintenance mode we can access
|
|
7
|
+
/** in maintenance mode, we can access invalid ids to delete them, only works with the admin user */
|
|
8
8
|
maintenance?: boolean;
|
|
9
9
|
user?: string;
|
|
10
10
|
}
|
|
@@ -22,12 +22,12 @@ export declare class Validator {
|
|
|
22
22
|
* @param namespaceLog - Log prefix
|
|
23
23
|
* @param logger - Logger instance
|
|
24
24
|
* @param namespace - the namespace of the adapter
|
|
25
|
-
* @param namespaceRegExp - the namespace RegExp of the adapter adapter.0
|
|
25
|
+
* @param namespaceRegExp - the namespace RegExp of the adapter `adapter.0`
|
|
26
26
|
*/
|
|
27
27
|
constructor(objects: any, states: any, namespaceLog: string, logger: any, namespace: string, namespaceRegExp: RegExp);
|
|
28
28
|
/**
|
|
29
29
|
* Performs the strict object check, which includes checking object existence, read-only logic, type and min/max
|
|
30
|
-
* additionally it rounds state values whose objects have a common.step attribute defined
|
|
30
|
+
* additionally it rounds state values whose objects have a `common.step` attribute defined
|
|
31
31
|
*
|
|
32
32
|
* @param id - id of the state
|
|
33
33
|
* @param state - ioBroker setState object
|
|
@@ -50,55 +50,55 @@ export declare class Validator {
|
|
|
50
50
|
*/
|
|
51
51
|
static getErrorText(code: number): string;
|
|
52
52
|
/**
|
|
53
|
-
* Throws if type is not matching the expected type
|
|
54
|
-
* @param value value to check type of
|
|
53
|
+
* Throws if a type is not matching the expected type
|
|
54
|
+
* @param value value to check a type of
|
|
55
55
|
* @param name name of the parameter for logging
|
|
56
56
|
*/
|
|
57
57
|
static assertString(value: unknown, name: string): asserts value is string;
|
|
58
58
|
/**
|
|
59
|
-
* Throws if type is not a pattern
|
|
60
|
-
* @param value value to check type of
|
|
59
|
+
* Throws if a type is not a pattern
|
|
60
|
+
* @param value value to check a type of
|
|
61
61
|
* @param name name of the parameter for logging
|
|
62
62
|
*/
|
|
63
63
|
static assertPattern(value: unknown, name: string): asserts value is Pattern;
|
|
64
64
|
/**
|
|
65
|
-
* Throws if type is not matching the expected type
|
|
66
|
-
* @param value value to check type of
|
|
65
|
+
* Throws if a type is not matching the expected type
|
|
66
|
+
* @param value value to check a type of
|
|
67
67
|
* @param name name of the parameter for logging
|
|
68
68
|
*/
|
|
69
69
|
static assertBoolean(value: unknown, name: string): asserts value is boolean;
|
|
70
70
|
/**
|
|
71
|
-
* Throws if type is not matching the expected type
|
|
72
|
-
* @param value value to check type of
|
|
71
|
+
* Throws if a type is not matching the expected type
|
|
72
|
+
* @param value value to check a type of
|
|
73
73
|
* @param name name of the parameter for logging
|
|
74
74
|
*/
|
|
75
75
|
static assertNumber(value: unknown, name: string): asserts value is number;
|
|
76
76
|
/**
|
|
77
|
-
* Throws if type is not matching the expected type
|
|
78
|
-
* @param value value to check type of
|
|
77
|
+
* Throws if a type is not matching the expected type
|
|
78
|
+
* @param value value to check a type of
|
|
79
79
|
* @param name name of the parameter for logging
|
|
80
80
|
*/
|
|
81
81
|
static assertObject(value: unknown, name: string): asserts value is Record<string, any>;
|
|
82
82
|
/**
|
|
83
|
-
* Throws if type is not an optional callback
|
|
84
|
-
* @param value value to check type of
|
|
83
|
+
* Throws if a type is not an optional callback
|
|
84
|
+
* @param value value to check a type of
|
|
85
85
|
* @param name name of the parameter for logging
|
|
86
86
|
*/
|
|
87
87
|
static assertBuffer(value: unknown, name: string): asserts value is Buffer;
|
|
88
88
|
/**
|
|
89
|
-
* Throws if type is not an optional callback
|
|
90
|
-
* @param value value to check type of
|
|
89
|
+
* Throws if a type is not an optional callback
|
|
90
|
+
* @param value value to check a type of
|
|
91
91
|
* @param name name of the parameter for logging
|
|
92
92
|
*/
|
|
93
93
|
static assertOptionalCallback(value: unknown, name: string): asserts value is OptionalCallback;
|
|
94
94
|
/**
|
|
95
|
-
* Throws if type is not an optional callback
|
|
96
|
-
* @param value value to check type of
|
|
95
|
+
* Throws if a type is not an optional callback
|
|
96
|
+
* @param value value to check a type of
|
|
97
97
|
* @param name name of the parameter for logging
|
|
98
98
|
*/
|
|
99
99
|
static assertCallback(value: unknown, name: string): asserts value is Callback;
|
|
100
100
|
/**
|
|
101
|
-
* Adds the namespace to the
|
|
101
|
+
* Adds the namespace to the ID if it is missing, if an object is passed it will be converted to an id string
|
|
102
102
|
*
|
|
103
103
|
* @param id id which will be fixed
|
|
104
104
|
* @param isPattern if the id is a pattern
|
|
@@ -110,7 +110,7 @@ export declare class Validator {
|
|
|
110
110
|
*/
|
|
111
111
|
validateSetStateObjectArgument(obj: Record<string, any>): void;
|
|
112
112
|
/**
|
|
113
|
-
* Validates
|
|
113
|
+
* Validates that the timeout is not exceeding a 32-bit signed integer
|
|
114
114
|
*
|
|
115
115
|
* @param ms milliseconds to validate
|
|
116
116
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/lib/adapter/validator.ts"],"names":[],"mappings":";;AAGA,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzD,KAAK,gBAAgB,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC7C,KAAK,OAAO,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC;AAEjC,MAAM,WAAW,iBAAiB;IAC9B,
|
|
1
|
+
{"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../../src/lib/adapter/validator.ts"],"names":[],"mappings":";;AAGA,KAAK,QAAQ,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,GAAG,OAAO,CAAC,IA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
12
|
* @param logger - Logger instance
|
|
13
13
|
* @param namespace - the namespace of the adapter
|
|
14
|
-
* @param namespaceRegExp - the namespace RegExp of the adapter adapter.0
|
|
14
|
+
* @param namespaceRegExp - the namespace RegExp of the adapter `adapter.0`
|
|
15
15
|
*/
|
|
16
16
|
constructor(objects, states, namespaceLog, logger, namespace, namespaceRegExp) {
|
|
17
17
|
this.objects = objects;
|
|
@@ -23,7 +23,7 @@ class Validator {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Performs the strict object check, which includes checking object existence, read-only logic, type and min/max
|
|
26
|
-
* additionally it rounds state values whose objects have a common.step attribute defined
|
|
26
|
+
* additionally it rounds state values whose objects have a `common.step` attribute defined
|
|
27
27
|
*
|
|
28
28
|
* @param id - id of the state
|
|
29
29
|
* @param state - ioBroker setState object
|
|
@@ -43,14 +43,14 @@ class Validator {
|
|
|
43
43
|
this.log.warn(`${this.namespaceLog} State "${id}" has no existing object, this might lead to an error in future versions`);
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
// for a state object we require common.type to exist
|
|
46
|
+
// for a state object, we require common.type to exist
|
|
47
47
|
if (obj.common && obj.common.type) {
|
|
48
48
|
// check if we are allowed to write (read-only can only be written with ack: true)
|
|
49
49
|
if (!state.ack && obj.common.write === false) {
|
|
50
50
|
this.log.warn(`${this.namespaceLog} Read-only state "${id}" has been written without ack-flag with value "${state.val}"`);
|
|
51
51
|
}
|
|
52
52
|
if (state.val !== null) {
|
|
53
|
-
// now check if type is correct, null is always allowed
|
|
53
|
+
// now check if a type is correct, null is always allowed
|
|
54
54
|
if (obj.common.type === 'file') {
|
|
55
55
|
// file has to be set with setBinaryState
|
|
56
56
|
this.log.warn(`${this.namespaceLog} State to set for "${id}" has to be written with setBinaryState/Async, because its object is of type "file"`);
|
|
@@ -61,8 +61,8 @@ class Validator {
|
|
|
61
61
|
(obj.common.type === 'json' && typeof state.val === 'string') ||
|
|
62
62
|
(obj.common.type === 'file' && typeof state.val === 'string') ||
|
|
63
63
|
(obj.common.type === 'object' && typeof state.val === 'string'))) {
|
|
64
|
-
// types can be 'number', 'string', 'boolean', 'array', 'object', 'mixed', 'json'
|
|
65
|
-
// array, object, json need to be string
|
|
64
|
+
// types can be 'number', 'string', 'boolean', 'array', 'object', 'mixed', 'json';
|
|
65
|
+
// 'array', 'object', 'json' need to be string
|
|
66
66
|
if (['object', 'json', 'array'].includes(obj.common.type)) {
|
|
67
67
|
this.log.info(`${this.namespaceLog} State value to set for "${id}" has to be stringified but received type "${typeof state.val}"`);
|
|
68
68
|
}
|
|
@@ -105,7 +105,7 @@ class Validator {
|
|
|
105
105
|
* @throws Error when id is invalid
|
|
106
106
|
*/
|
|
107
107
|
validateId(id, isForeignId, options) {
|
|
108
|
-
// there is special maintenance mode to clear the DB from invalid IDs
|
|
108
|
+
// there is a special maintenance mode to clear the DB from invalid IDs
|
|
109
109
|
if (options && options.maintenance && options.user === constants_1.SYSTEM_ADMIN_USER) {
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
@@ -159,8 +159,8 @@ class Validator {
|
|
|
159
159
|
return (js_controller_common_1.EXIT_CODES[code] || code).toString();
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
|
-
* Throws if type is not matching the expected type
|
|
163
|
-
* @param value value to check type of
|
|
162
|
+
* Throws if a type is not matching the expected type
|
|
163
|
+
* @param value value to check a type of
|
|
164
164
|
* @param name name of the parameter for logging
|
|
165
165
|
*/
|
|
166
166
|
static assertString(value, name) {
|
|
@@ -169,8 +169,8 @@ class Validator {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
|
-
* Throws if type is not a pattern
|
|
173
|
-
* @param value value to check type of
|
|
172
|
+
* Throws if a type is not a pattern
|
|
173
|
+
* @param value value to check a type of
|
|
174
174
|
* @param name name of the parameter for logging
|
|
175
175
|
*/
|
|
176
176
|
static assertPattern(value, name) {
|
|
@@ -186,8 +186,8 @@ class Validator {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
/**
|
|
189
|
-
* Throws if type is not matching the expected type
|
|
190
|
-
* @param value value to check type of
|
|
189
|
+
* Throws if a type is not matching the expected type
|
|
190
|
+
* @param value value to check a type of
|
|
191
191
|
* @param name name of the parameter for logging
|
|
192
192
|
*/
|
|
193
193
|
static assertBoolean(value, name) {
|
|
@@ -196,8 +196,8 @@ class Validator {
|
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
198
|
/**
|
|
199
|
-
* Throws if type is not matching the expected type
|
|
200
|
-
* @param value value to check type of
|
|
199
|
+
* Throws if a type is not matching the expected type
|
|
200
|
+
* @param value value to check a type of
|
|
201
201
|
* @param name name of the parameter for logging
|
|
202
202
|
*/
|
|
203
203
|
static assertNumber(value, name) {
|
|
@@ -206,8 +206,8 @@ class Validator {
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
/**
|
|
209
|
-
* Throws if type is not matching the expected type
|
|
210
|
-
* @param value value to check type of
|
|
209
|
+
* Throws if a type is not matching the expected type
|
|
210
|
+
* @param value value to check a type of
|
|
211
211
|
* @param name name of the parameter for logging
|
|
212
212
|
*/
|
|
213
213
|
static assertObject(value, name) {
|
|
@@ -216,8 +216,8 @@ class Validator {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
|
-
* Throws if type is not an optional callback
|
|
220
|
-
* @param value value to check type of
|
|
219
|
+
* Throws if a type is not an optional callback
|
|
220
|
+
* @param value value to check a type of
|
|
221
221
|
* @param name name of the parameter for logging
|
|
222
222
|
*/
|
|
223
223
|
static assertBuffer(value, name) {
|
|
@@ -226,8 +226,8 @@ class Validator {
|
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
|
-
* Throws if type is not an optional callback
|
|
230
|
-
* @param value value to check type of
|
|
229
|
+
* Throws if a type is not an optional callback
|
|
230
|
+
* @param value value to check a type of
|
|
231
231
|
* @param name name of the parameter for logging
|
|
232
232
|
*/
|
|
233
233
|
static assertOptionalCallback(value, name) {
|
|
@@ -236,8 +236,8 @@ class Validator {
|
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
/**
|
|
239
|
-
* Throws if type is not an optional callback
|
|
240
|
-
* @param value value to check type of
|
|
239
|
+
* Throws if a type is not an optional callback
|
|
240
|
+
* @param value value to check a type of
|
|
241
241
|
* @param name name of the parameter for logging
|
|
242
242
|
*/
|
|
243
243
|
static assertCallback(value, name) {
|
|
@@ -246,7 +246,7 @@ class Validator {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
249
|
-
* Adds the namespace to the
|
|
249
|
+
* Adds the namespace to the ID if it is missing, if an object is passed it will be converted to an id string
|
|
250
250
|
*
|
|
251
251
|
* @param id id which will be fixed
|
|
252
252
|
* @param isPattern if the id is a pattern
|
|
@@ -258,7 +258,7 @@ class Validator {
|
|
|
258
258
|
let result = '';
|
|
259
259
|
if (typeof id === 'string') {
|
|
260
260
|
result = id;
|
|
261
|
-
// if not instance name itself and also not starts with namespace and "."
|
|
261
|
+
// if not the instance name itself and also not starts with namespace and "."
|
|
262
262
|
if (id !== this.namespace && !this.namespaceRegExp.test(id)) {
|
|
263
263
|
if (!isPattern) {
|
|
264
264
|
result = this.namespace + (id ? `.${id}` : '');
|
|
@@ -269,7 +269,7 @@ class Validator {
|
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
else if (js_controller_common_1.tools.isObject(id)) {
|
|
272
|
-
// If
|
|
272
|
+
// If ID is an object
|
|
273
273
|
// Add namespace + device + channel
|
|
274
274
|
result = `${this.namespace}.${id.device ? id.device + '.' : ''}${id.channel ? id.channel + '.' : ''}${id.state ? id.state : ''}`;
|
|
275
275
|
}
|
|
@@ -330,7 +330,7 @@ class Validator {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
/**
|
|
333
|
-
* Validates
|
|
333
|
+
* Validates that the timeout is not exceeding a 32-bit signed integer
|
|
334
334
|
*
|
|
335
335
|
* @param ms milliseconds to validate
|
|
336
336
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../src/lib/adapter/validator.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAC7D,yEAAmE;AAYnE,MAAa,SAAS;IAQlB;;;;;;;;OAQG;IACH,YACI,OAAY,EACZ,MAAW,EACX,YAAoB,EACpB,MAAW,EACX,SAAiB,EACjB,eAAuB;QAEvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;QACvC,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,wBAAwB,CAAC,EAAU,EAAE,KAA6B;QACpE,6FAA6F;QAC7F,0GAA0G;QAC1G,IAAI;YACA,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE;gBACzB,mEAAmE;gBACnE,2DAA2D;gBAC3D,OAAO;aACV;YAED,MAAM,GAAG,GAAQ,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YACvD,kCAAkC;YAClC,IAAI,CAAC,GAAG,EAAE;gBACN,IAAI,CAAC,GAAG,CAAC,IAAI,CACT,GAAG,IAAI,CAAC,YAAY,WAAW,EAAE,0EAA0E,CAC9G,CAAC;gBACF,OAAO;aACV;YAED,
|
|
1
|
+
{"version":3,"file":"validator.js","sourceRoot":"","sources":["../../../src/lib/adapter/validator.ts"],"names":[],"mappings":";;;AAAA,2CAA6D;AAC7D,yEAAmE;AAYnE,MAAa,SAAS;IAQlB;;;;;;;;OAQG;IACH,YACI,OAAY,EACZ,MAAW,EACX,YAAoB,EACpB,MAAW,EACX,SAAiB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,CAAC;SACrG;QACD,2CAA2C;QAC3C,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE;YAC1D,wBAAwB;YACxB,IAAI,IAAI,KAAK,KAAK,EAAE;gBAChB,SAAS;aACZ;YACD,wEAAwE;YACxE,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;gBACzC,SAAS;aACZ;YACD,IAAI,IAAI,KAAK,OAAO,GAAG,CAAC,GAAG,CAAC,EAAE;gBAC1B,MAAM,IAAI,KAAK,CACX,uBAAuB,GAAG,yBAAyB,OAAO,GAAG,CAAC,GAAG,CAAC,iBAAiB,IAAI,KAAK,CAC/F,CAAC;aACL;SACJ;IACL,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,aAAa,CAAC,EAAU;QAC3B,IAAI,EAAE,GAAG,uBAAW,EAAE;YAClB,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,6CAA6C,uBAAW,GAAG,CAAC,CAAC;SAC9F;QAED,IAAI,EAAE,GAAG,CAAC,EAAE;YACR,MAAM,IAAI,KAAK,CAAC,YAAY,EAAE,qBAAqB,CAAC,CAAC;SACxD;IACL,CAAC;CACJ;AAlbD,8BAkbC"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/js-controller-adapter",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=12.0.0"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@alcalzone/pak": "^0.8.1",
|
|
9
|
-
"@iobroker/db-objects-file": "5.0.
|
|
10
|
-
"@iobroker/db-objects-jsonl": "5.0.
|
|
11
|
-
"@iobroker/db-objects-redis": "5.0.
|
|
12
|
-
"@iobroker/db-states-file": "5.0.
|
|
13
|
-
"@iobroker/db-states-jsonl": "5.0.
|
|
14
|
-
"@iobroker/db-states-redis": "5.0.
|
|
15
|
-
"@iobroker/js-controller-common": "5.0.
|
|
16
|
-
"@iobroker/js-controller-common-db": "5.0.
|
|
9
|
+
"@iobroker/db-objects-file": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
10
|
+
"@iobroker/db-objects-jsonl": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
11
|
+
"@iobroker/db-objects-redis": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
12
|
+
"@iobroker/db-states-file": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
13
|
+
"@iobroker/db-states-jsonl": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
14
|
+
"@iobroker/db-states-redis": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
15
|
+
"@iobroker/js-controller-common": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
16
|
+
"@iobroker/js-controller-common-db": "5.0.14-alpha.0-20231017-1cfd77e8",
|
|
17
17
|
"@iobroker/plugin-base": "~1.2.1",
|
|
18
18
|
"@iobroker/plugin-sentry": "~1.2.0",
|
|
19
19
|
"deep-clone": "^3.0.3",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"build/index.js",
|
|
56
56
|
"build/index.d.ts"
|
|
57
57
|
],
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6310c435dc597062a1a146d55a70e960ec111509"
|
|
59
59
|
}
|