@zwave-js/config 9.0.4 → 9.0.5

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.
Files changed (61) hide show
  1. package/build/ConfigManager.d.ts +1 -1
  2. package/build/ConfigManager.d.ts.map +1 -1
  3. package/build/ConfigManager.js +6 -6
  4. package/build/ConfigManager.js.map +1 -1
  5. package/build/devices/AssociationConfig.d.ts +27 -0
  6. package/build/devices/AssociationConfig.d.ts.map +1 -0
  7. package/build/devices/AssociationConfig.js +57 -0
  8. package/build/devices/AssociationConfig.js.map +1 -0
  9. package/build/{CompatConfig.d.ts → devices/CompatConfig.d.ts} +6 -1
  10. package/build/devices/CompatConfig.d.ts.map +1 -0
  11. package/build/{CompatConfig.js → devices/CompatConfig.js} +30 -4
  12. package/build/devices/CompatConfig.js.map +1 -0
  13. package/build/devices/ConditionalItem.d.ts +14 -0
  14. package/build/devices/ConditionalItem.d.ts.map +1 -0
  15. package/build/devices/ConditionalItem.js +106 -0
  16. package/build/devices/ConditionalItem.js.map +1 -0
  17. package/build/devices/ConditionalPrimitive.d.ts +13 -0
  18. package/build/devices/ConditionalPrimitive.d.ts.map +1 -0
  19. package/build/devices/ConditionalPrimitive.js +38 -0
  20. package/build/devices/ConditionalPrimitive.js.map +1 -0
  21. package/build/{Devices.d.ts → devices/DeviceConfig.d.ts} +14 -106
  22. package/build/devices/DeviceConfig.d.ts.map +1 -0
  23. package/build/{Devices.js → devices/DeviceConfig.js} +35 -348
  24. package/build/devices/DeviceConfig.js.map +1 -0
  25. package/build/devices/DeviceConfig.unit._test.d.ts +1 -0
  26. package/build/devices/DeviceConfig.unit._test.d.ts.map +1 -0
  27. package/build/{Devices.unit._test.js → devices/DeviceConfig.unit._test.js} +1 -1
  28. package/build/devices/DeviceConfig.unit._test.js.map +1 -0
  29. package/build/devices/DeviceMetadata.d.ts +41 -0
  30. package/build/devices/DeviceMetadata.d.ts.map +1 -0
  31. package/build/devices/DeviceMetadata.js +76 -0
  32. package/build/devices/DeviceMetadata.js.map +1 -0
  33. package/build/devices/EndpointConfig.d.ts +15 -0
  34. package/build/devices/EndpointConfig.d.ts.map +1 -0
  35. package/build/devices/EndpointConfig.js +44 -0
  36. package/build/devices/EndpointConfig.js.map +1 -0
  37. package/build/devices/ParamInformation.d.ts +41 -0
  38. package/build/devices/ParamInformation.d.ts.map +1 -0
  39. package/build/devices/ParamInformation.js +155 -0
  40. package/build/devices/ParamInformation.js.map +1 -0
  41. package/build/devices/shared.d.ts +11 -0
  42. package/build/devices/shared.d.ts.map +1 -0
  43. package/build/devices/shared.js +3 -0
  44. package/build/devices/shared.js.map +1 -0
  45. package/build/index.d.ts +6 -1
  46. package/build/index.d.ts.map +1 -1
  47. package/build/index.js +6 -1
  48. package/build/index.js.map +1 -1
  49. package/build/utils.d.ts +1 -1
  50. package/build/utils.d.ts.map +1 -1
  51. package/config/devices/0x001a/rf9542.json +4 -1
  52. package/config/devices/0x001d/vrcs2.json +4 -0
  53. package/config/devices/0x0403/shlm10000.json +16 -0
  54. package/package.json +2 -2
  55. package/build/CompatConfig.d.ts.map +0 -1
  56. package/build/CompatConfig.js.map +0 -1
  57. package/build/Devices.d.ts.map +0 -1
  58. package/build/Devices.js.map +0 -1
  59. package/build/Devices.unit._test.d.ts +0 -1
  60. package/build/Devices.unit._test.d.ts.map +0 -1
  61. package/build/Devices.unit._test.js.map +0 -1
@@ -1,15 +1,11 @@
1
1
  import { JSONObject, ReadonlyObjectKeyMap } from "@zwave-js/shared";
2
- import { CompatConfig } from "./CompatConfig";
3
- export interface FirmwareVersionRange {
4
- min: string;
5
- max: string;
6
- }
7
- export interface DeviceID {
8
- manufacturerId: number;
9
- productType: number;
10
- productId: number;
11
- firmwareVersion?: string;
12
- }
2
+ import { ConditionalAssociationConfig, type AssociationConfig } from "./AssociationConfig";
3
+ import { CompatConfig, ConditionalCompatConfig } from "./CompatConfig";
4
+ import { ConditionalPrimitive } from "./ConditionalPrimitive";
5
+ import { ConditionalDeviceMetadata, type DeviceMetadata } from "./DeviceMetadata";
6
+ import { ConditionalEndpointConfig, EndpointConfig } from "./EndpointConfig";
7
+ import { ConditionalParamInformation, ParamInformation } from "./ParamInformation";
8
+ import type { DeviceID, FirmwareVersionRange } from "./shared";
13
9
  export interface DeviceConfigIndexEntry {
14
10
  manufacturerId: string;
15
11
  productType: string;
@@ -50,12 +46,12 @@ export declare class ConditionalDeviceConfig {
50
46
  rootDir: string;
51
47
  relative?: boolean;
52
48
  }): Promise<ConditionalDeviceConfig>;
53
- constructor(filename: string, isEmbedded: boolean, definition: any);
49
+ constructor(filename: string, isEmbedded: boolean, definition: JSONObject);
54
50
  readonly filename: string;
55
- readonly manufacturer: string;
51
+ readonly manufacturer: ConditionalPrimitive<string>;
56
52
  readonly manufacturerId: number;
57
- readonly label: string;
58
- readonly description: string;
53
+ readonly label: ConditionalPrimitive<string>;
54
+ readonly description: ConditionalPrimitive<string>;
59
55
  readonly devices: readonly {
60
56
  productType: number;
61
57
  productId: number;
@@ -70,9 +66,9 @@ export declare class ConditionalDeviceConfig {
70
66
  */
71
67
  readonly proprietary?: Record<string, unknown>;
72
68
  /** Contains compatibility options */
73
- readonly compat?: CompatConfig;
69
+ readonly compat?: ConditionalCompatConfig | ConditionalCompatConfig[];
74
70
  /** Contains instructions and other metadata for the device */
75
- readonly metadata?: DeviceMetadata;
71
+ readonly metadata?: ConditionalDeviceMetadata;
76
72
  /** Whether this is an embedded configuration or not */
77
73
  readonly isEmbedded: boolean;
78
74
  evaluate(deviceId?: DeviceID): DeviceConfig;
@@ -125,92 +121,4 @@ export declare class DeviceConfig {
125
121
  /** Returns the association config for a given endpoint */
126
122
  getAssociationConfigForEndpoint(endpointIndex: number, group: number): AssociationConfig | undefined;
127
123
  }
128
- export declare class ConditionalEndpointConfig {
129
- constructor(filename: string, index: number, definition: JSONObject);
130
- readonly index: number;
131
- readonly condition?: string;
132
- readonly associations?: ReadonlyMap<number, ConditionalAssociationConfig>;
133
- evaluateCondition(deviceId?: DeviceID): EndpointConfig | undefined;
134
- }
135
- export declare type EndpointConfig = Omit<ConditionalEndpointConfig, "condition" | "evaluateCondition" | "associations"> & {
136
- associations: Map<number, AssociationConfig> | undefined;
137
- };
138
- export declare class ConditionalAssociationConfig {
139
- constructor(filename: string, groupId: number, definition: JSONObject);
140
- readonly condition?: string;
141
- readonly groupId: number;
142
- readonly label: string;
143
- readonly description?: string;
144
- readonly maxNodes: number;
145
- /**
146
- * Whether this association group is used to report updates to the controller.
147
- * While Z-Wave+ defines a single lifeline, older devices may have multiple lifeline associations.
148
- */
149
- readonly isLifeline: boolean;
150
- /**
151
- * Controls the strategy of setting up lifeline associations:
152
- *
153
- * * `true` - Use a multi channel association (if possible)
154
- * * `false` - Use a node association (if possible)
155
- * * `"auto"` - Prefer node associations, fall back to multi channel associations
156
- */
157
- readonly multiChannel: boolean | "auto";
158
- evaluateCondition(deviceId?: DeviceID): AssociationConfig | undefined;
159
- }
160
- export declare type AssociationConfig = Omit<ConditionalAssociationConfig, "condition" | "evaluateCondition">;
161
- export declare class ConditionalParamInformation {
162
- constructor(parent: ConditionalDeviceConfig, parameterNumber: number, valueBitMask: number | undefined, definition: JSONObject);
163
- private parent;
164
- readonly parameterNumber: number;
165
- readonly valueBitMask?: number;
166
- readonly label: string;
167
- readonly description?: string;
168
- readonly valueSize: number;
169
- readonly minValue?: number;
170
- readonly maxValue?: number;
171
- readonly unsigned?: boolean;
172
- readonly defaultValue: number;
173
- readonly unit?: string;
174
- readonly readOnly?: true;
175
- readonly writeOnly?: true;
176
- readonly allowManualEntry: boolean;
177
- readonly options: readonly ConditionalConfigOption[];
178
- readonly condition?: string;
179
- evaluateCondition(deviceId?: DeviceID): ParamInformation | undefined;
180
- }
181
- export declare type ParamInformation = Omit<ConditionalParamInformation, "condition" | "evaluateCondition" | "options" | "minValue" | "maxValue"> & {
182
- options: readonly ConfigOption[];
183
- minValue: NonNullable<ConditionalParamInformation["minValue"]>;
184
- maxValue: NonNullable<ConditionalParamInformation["maxValue"]>;
185
- };
186
- export declare class ConditionalConfigOption {
187
- readonly value: number;
188
- readonly label: string;
189
- readonly condition?: string | undefined;
190
- constructor(value: number, label: string, condition?: string | undefined);
191
- evaluateCondition(deviceId?: DeviceID): ConfigOption | undefined;
192
- }
193
- export interface ConfigOption {
194
- value: number;
195
- label: string;
196
- }
197
- export declare class DeviceMetadata {
198
- constructor(filename: string, definition: JSONObject);
199
- /** How to wake up the device manually */
200
- readonly wakeup?: string;
201
- /** Inclusion instructions */
202
- readonly inclusion?: string;
203
- /** Exclusion instructions */
204
- readonly exclusion?: string;
205
- /** Instructions for resetting the device to factory defaults */
206
- readonly reset?: string;
207
- /** A link to the device manual */
208
- readonly manual?: string;
209
- /** Comments for this device */
210
- readonly comments?: DeviceComment | DeviceComment[];
211
- }
212
- export interface DeviceComment {
213
- level: "info" | "warning" | "error";
214
- text: string;
215
- }
216
- //# sourceMappingURL=Devices.d.ts.map
124
+ //# sourceMappingURL=DeviceConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceConfig.d.ts","sourceRoot":"","sources":["../../src/devices/DeviceConfig.ts"],"names":[],"mappings":"AACA,OAAO,EAGN,UAAU,EAEV,oBAAoB,EAEpB,MAAM,kBAAkB,CAAC;AAW1B,OAAO,EACN,4BAA4B,EAC5B,KAAK,iBAAiB,EACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEvE,OAAO,EACN,oBAAoB,EAEpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,yBAAyB,EACzB,KAAK,cAAc,EACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EACN,2BAA2B,EAC3B,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,oBAAoB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od && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.DeviceMetadata = exports.ConditionalConfigOption = exports.ConditionalParamInformation = exports.ConditionalAssociationConfig = exports.ConditionalEndpointConfig = exports.DeviceConfig = exports.ConditionalDeviceConfig = exports.loadFulltextDeviceIndexInternal = exports.loadDeviceIndexInternal = exports.generatePriorityDeviceIndex = exports.getDevicesPaths = exports.embeddedDevicesDir = void 0;
29
+ exports.DeviceConfig = exports.ConditionalDeviceConfig = exports.loadFulltextDeviceIndexInternal = exports.loadDeviceIndexInternal = exports.generatePriorityDeviceIndex = exports.getDevicesPaths = exports.embeddedDevicesDir = void 0;
30
30
  const core_1 = require("@zwave-js/core");
31
31
  const shared_1 = require("@zwave-js/shared");
32
32
  const objects_1 = require("alcalzone-shared/objects");
@@ -35,11 +35,16 @@ const fs = __importStar(require("fs-extra"));
35
35
  const fs_extra_1 = require("fs-extra");
36
36
  const json5_1 = __importDefault(require("json5"));
37
37
  const path_1 = __importDefault(require("path"));
38
+ const JsonTemplate_1 = require("../JsonTemplate");
39
+ const utils_1 = require("../utils");
40
+ const utils_safe_1 = require("../utils_safe");
41
+ const AssociationConfig_1 = require("./AssociationConfig");
38
42
  const CompatConfig_1 = require("./CompatConfig");
39
- const JsonTemplate_1 = require("./JsonTemplate");
40
- const Logic_1 = require("./Logic");
41
- const utils_1 = require("./utils");
42
- const utils_safe_1 = require("./utils_safe");
43
+ const ConditionalItem_1 = require("./ConditionalItem");
44
+ const ConditionalPrimitive_1 = require("./ConditionalPrimitive");
45
+ const DeviceMetadata_1 = require("./DeviceMetadata");
46
+ const EndpointConfig_1 = require("./EndpointConfig");
47
+ const ParamInformation_1 = require("./ParamInformation");
43
48
  exports.embeddedDevicesDir = path_1.default.join(utils_1.configDir, "devices");
44
49
  const fulltextIndexPath = path_1.default.join(exports.embeddedDevicesDir, "fulltext_index.json");
45
50
  function getDevicesPaths(configDir) {
@@ -232,14 +237,6 @@ function isFirmwareVersion(val) {
232
237
  .map((str) => parseInt(str, 10))
233
238
  .every((num) => num >= 0 && num <= 255));
234
239
  }
235
- function conditionApplies(condition, context) {
236
- try {
237
- return !!(0, Logic_1.evaluate)(condition, context);
238
- }
239
- catch (e) {
240
- throw new core_1.ZWaveError(`Invalid condition "${condition}"!`, core_1.ZWaveErrorCodes.Config_Invalid);
241
- }
242
- }
243
240
  /** This class represents a device config entry whose conditional settings have not been evaluated yet */
244
241
  class ConditionalDeviceConfig {
245
242
  constructor(filename, isEmbedded, definition) {
@@ -251,11 +248,7 @@ manufacturer id must be a lowercase hexadecimal number with 4 digits`);
251
248
  }
252
249
  this.manufacturerId = parseInt(definition.manufacturerId, 16);
253
250
  for (const prop of ["manufacturer", "label", "description"]) {
254
- if (typeof definition[prop] !== "string") {
255
- (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
256
- ${prop} is not a string`);
257
- }
258
- this[prop] = definition[prop];
251
+ this[prop] = (0, ConditionalPrimitive_1.parseConditionalPrimitive)(filename, "string", prop, definition[prop]);
259
252
  }
260
253
  if (!(0, typeguards_1.isArray)(definition.devices) ||
261
254
  !definition.devices.every((dev) => (0, typeguards_1.isObject)(dev) &&
@@ -290,7 +283,7 @@ endpoints is not an object`);
290
283
  found non-numeric endpoint index "${key}" in endpoints`);
291
284
  }
292
285
  const epIndex = parseInt(key, 10);
293
- endpoints.set(epIndex, new ConditionalEndpointConfig(filename, epIndex, ep));
286
+ endpoints.set(epIndex, new EndpointConfig_1.ConditionalEndpointConfig(filename, epIndex, ep));
294
287
  }
295
288
  this.endpoints = endpoints;
296
289
  }
@@ -306,7 +299,7 @@ associations is not an object`);
306
299
  found non-numeric group id "${key}" in associations`);
307
300
  }
308
301
  const keyNum = parseInt(key, 10);
309
- associations.set(keyNum, new ConditionalAssociationConfig(filename, keyNum, assocDefinition));
302
+ associations.set(keyNum, new AssociationConfig_1.ConditionalAssociationConfig(filename, keyNum, assocDefinition));
310
303
  }
311
304
  this.associations = associations;
312
305
  }
@@ -319,6 +312,10 @@ found non-numeric group id "${key}" in associations`);
319
312
  (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
320
313
  required property "#" missing in at least one entry of paramInformation`);
321
314
  }
315
+ // And a valid $if condition
316
+ for (const entry of definition.paramInformation) {
317
+ (0, ConditionalItem_1.validateCondition)(filename, entry, `At least one entry of paramInformation contains an`);
318
+ }
322
319
  for (const paramDefinition of definition.paramInformation) {
323
320
  const { ["#"]: paramNo, ...defn } = paramDefinition;
324
321
  const match = /^(\d+)(?:\[0x([0-9a-fA-F]+)\])?$/.exec(paramNo);
@@ -335,7 +332,7 @@ found invalid param number "${paramNo}" in paramInformation`);
335
332
  paramInformation.set(key, []);
336
333
  paramInformation
337
334
  .get(key)
338
- .push(new ConditionalParamInformation(this, keyNum, bitMask, defn));
335
+ .push(new ParamInformation_1.ConditionalParamInformation(this, keyNum, bitMask, defn));
339
336
  }
340
337
  }
341
338
  else if ((process.env.NODE_ENV !== "test" || !!process.env.CI) &&
@@ -363,7 +360,7 @@ paramInformation "${key}" is invalid: Every entry must either be an object or an
363
360
  const bitMask = match[2] != undefined
364
361
  ? parseInt(match[2], 16)
365
362
  : undefined;
366
- paramInformation.set({ parameter: keyNum, valueBitMask: bitMask }, defns.map((def) => new ConditionalParamInformation(this, keyNum, bitMask, def)));
363
+ paramInformation.set({ parameter: keyNum, valueBitMask: bitMask }, defns.map((def) => new ParamInformation_1.ConditionalParamInformation(this, keyNum, bitMask, def)));
367
364
  }
368
365
  }
369
366
  else {
@@ -380,18 +377,28 @@ proprietary is not an object`);
380
377
  this.proprietary = definition.proprietary;
381
378
  }
382
379
  if (definition.compat != undefined) {
383
- if (!(0, typeguards_1.isObject)(definition.compat)) {
380
+ if ((0, typeguards_1.isArray)(definition.compat) &&
381
+ definition.compat.every((item) => (0, typeguards_1.isObject)(item))) {
382
+ // Make sure all conditions are valid
383
+ for (const entry of definition.compat) {
384
+ (0, ConditionalItem_1.validateCondition)(filename, entry, `At least one entry of compat contains an`);
385
+ }
386
+ this.compat = definition.compat.map((item) => new CompatConfig_1.ConditionalCompatConfig(filename, item));
387
+ }
388
+ else if ((0, typeguards_1.isObject)(definition.compat)) {
389
+ this.compat = new CompatConfig_1.ConditionalCompatConfig(filename, definition.compat);
390
+ }
391
+ else {
384
392
  (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
385
- compat is not an object`);
393
+ compat must be an object or any array of conditional objects`);
386
394
  }
387
- this.compat = new CompatConfig_1.CompatConfig(filename, definition.compat);
388
395
  }
389
396
  if (definition.metadata != undefined) {
390
397
  if (!(0, typeguards_1.isObject)(definition.metadata)) {
391
398
  (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
392
399
  metadata is not an object`);
393
400
  }
394
- this.metadata = new DeviceMetadata(filename, definition.metadata);
401
+ this.metadata = new DeviceMetadata_1.ConditionalDeviceMetadata(filename, definition.metadata);
395
402
  }
396
403
  }
397
404
  static async from(filename, isEmbedded, options) {
@@ -403,37 +410,7 @@ metadata is not an object`);
403
410
  return new ConditionalDeviceConfig(relativePath, isEmbedded, json);
404
411
  }
405
412
  evaluate(deviceId) {
406
- let associations;
407
- if (this.associations) {
408
- associations = new Map();
409
- for (const [group, assoc] of this.associations) {
410
- const evaluated = assoc.evaluateCondition(deviceId);
411
- if (evaluated)
412
- associations.set(group, evaluated);
413
- }
414
- }
415
- let endpoints;
416
- if (this.endpoints) {
417
- endpoints = new Map();
418
- for (const [group, assoc] of this.endpoints) {
419
- const evaluated = assoc.evaluateCondition(deviceId);
420
- if (evaluated)
421
- endpoints.set(group, evaluated);
422
- }
423
- }
424
- let paramInformation;
425
- if (this.paramInformation) {
426
- paramInformation = new shared_1.ObjectKeyMap();
427
- for (const [key, params] of this.paramInformation.entries()) {
428
- // Only take the first matching parameter
429
- for (const param of params) {
430
- const evaluated = param.evaluateCondition(deviceId);
431
- if (evaluated)
432
- paramInformation.set(key, evaluated);
433
- }
434
- }
435
- }
436
- return new DeviceConfig(this.filename, this.isEmbedded, this.manufacturer, this.manufacturerId, this.label, this.description, this.devices, this.firmwareVersion, endpoints, associations, paramInformation, this.proprietary, this.compat, this.metadata);
413
+ return new DeviceConfig(this.filename, this.isEmbedded, (0, ConditionalItem_1.evaluateDeep)(this.manufacturer, deviceId), this.manufacturerId, (0, ConditionalItem_1.evaluateDeep)(this.label, deviceId), (0, ConditionalItem_1.evaluateDeep)(this.description, deviceId), this.devices, this.firmwareVersion, (0, ConditionalItem_1.evaluateDeep)(this.endpoints, deviceId), (0, ConditionalItem_1.evaluateDeep)(this.associations, deviceId), (0, ConditionalItem_1.evaluateDeep)(this.paramInformation, deviceId), this.proprietary, (0, ConditionalItem_1.evaluateDeep)(this.compat, deviceId), (0, ConditionalItem_1.evaluateDeep)(this.metadata, deviceId));
437
414
  }
438
415
  }
439
416
  exports.ConditionalDeviceConfig = ConditionalDeviceConfig;
@@ -483,294 +460,4 @@ class DeviceConfig {
483
460
  }
484
461
  }
485
462
  exports.DeviceConfig = DeviceConfig;
486
- class ConditionalEndpointConfig {
487
- constructor(filename, index, definition) {
488
- this.index = index;
489
- if (definition.$if != undefined && typeof definition.$if !== "string") {
490
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
491
- Endpoint ${index} has a non-string $if condition`);
492
- }
493
- this.condition = definition.$if;
494
- if (definition.associations != undefined) {
495
- const associations = new Map();
496
- if (!(0, typeguards_1.isObject)(definition.associations)) {
497
- (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
498
- Endpoint ${index}: associations is not an object`);
499
- }
500
- for (const [key, assocDefinition] of (0, objects_1.entries)(definition.associations)) {
501
- if (!/^[1-9][0-9]*$/.test(key)) {
502
- (0, utils_safe_1.throwInvalidConfig)(`device`, `packages/config/config/devices/${filename}:
503
- Endpoint ${index}: found non-numeric group id "${key}" in associations`);
504
- }
505
- const keyNum = parseInt(key, 10);
506
- associations.set(keyNum, new ConditionalAssociationConfig(filename, keyNum, assocDefinition));
507
- }
508
- this.associations = associations;
509
- }
510
- }
511
- evaluateCondition(deviceId) {
512
- if (deviceId &&
513
- this.condition &&
514
- !conditionApplies(this.condition, deviceId)) {
515
- return;
516
- }
517
- let associations;
518
- if (this.associations) {
519
- associations = new Map();
520
- for (const [group, assoc] of this.associations) {
521
- const evaluated = assoc.evaluateCondition(deviceId);
522
- if (evaluated)
523
- associations.set(group, evaluated);
524
- }
525
- }
526
- return {
527
- ...(0, shared_1.pick)(this, ["index"]),
528
- associations,
529
- };
530
- }
531
- }
532
- exports.ConditionalEndpointConfig = ConditionalEndpointConfig;
533
- class ConditionalAssociationConfig {
534
- constructor(filename, groupId, definition) {
535
- var _a;
536
- this.groupId = groupId;
537
- if (definition.$if != undefined && typeof definition.$if !== "string") {
538
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
539
- Association ${groupId} has a non-string $if condition`);
540
- }
541
- this.condition = definition.$if;
542
- if (typeof definition.label !== "string") {
543
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
544
- Association ${groupId} has a non-string label`);
545
- }
546
- this.label = definition.label;
547
- if (definition.description != undefined &&
548
- typeof definition.description !== "string") {
549
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
550
- Association ${groupId} has a non-string description`);
551
- }
552
- this.description = definition.description;
553
- if (typeof definition.maxNodes !== "number") {
554
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
555
- maxNodes for association ${groupId} is not a number`);
556
- }
557
- this.maxNodes = definition.maxNodes;
558
- if (definition.isLifeline != undefined &&
559
- typeof definition.isLifeline !== "boolean") {
560
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
561
- isLifeline in association ${groupId} must be a boolean`);
562
- }
563
- this.isLifeline = !!definition.isLifeline;
564
- if (definition.multiChannel != undefined &&
565
- typeof definition.multiChannel !== "boolean") {
566
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
567
- multiChannel in association ${groupId} must be a boolean`);
568
- }
569
- // Default to the "auto" strategy
570
- this.multiChannel = (_a = definition.multiChannel) !== null && _a !== void 0 ? _a : "auto";
571
- }
572
- evaluateCondition(deviceId) {
573
- if (deviceId &&
574
- this.condition &&
575
- !conditionApplies(this.condition, deviceId)) {
576
- return;
577
- }
578
- return (0, shared_1.pick)(this, [
579
- "groupId",
580
- "label",
581
- "description",
582
- "maxNodes",
583
- "isLifeline",
584
- "multiChannel",
585
- ]);
586
- }
587
- }
588
- exports.ConditionalAssociationConfig = ConditionalAssociationConfig;
589
- class ConditionalParamInformation {
590
- constructor(parent, parameterNumber, valueBitMask, definition) {
591
- var _a, _b, _c;
592
- this.parent = parent;
593
- this.parameterNumber = parameterNumber;
594
- this.valueBitMask = valueBitMask;
595
- // No need to validate here, this should be done one level higher
596
- this.condition = definition.$if;
597
- if (typeof definition.label !== "string") {
598
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
599
- Parameter #${parameterNumber} has a non-string label`);
600
- }
601
- this.label = definition.label;
602
- if (definition.description != undefined &&
603
- typeof definition.description !== "string") {
604
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
605
- Parameter #${parameterNumber} has a non-string description`);
606
- }
607
- this.description = definition.description;
608
- if (typeof definition.valueSize !== "number" ||
609
- definition.valueSize <= 0) {
610
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
611
- Parameter #${parameterNumber} has an invalid value size`);
612
- }
613
- this.valueSize = definition.valueSize;
614
- if (definition.minValue != undefined &&
615
- typeof definition.minValue !== "number") {
616
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
617
- Parameter #${parameterNumber} has a non-numeric property minValue`);
618
- }
619
- this.minValue = definition.minValue;
620
- if (definition.maxValue != undefined &&
621
- typeof definition.maxValue !== "number") {
622
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
623
- Parameter #${parameterNumber} has a non-numeric property maxValue`);
624
- }
625
- this.maxValue = definition.maxValue;
626
- if (definition.unsigned != undefined &&
627
- typeof definition.unsigned !== "boolean") {
628
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
629
- Parameter #${parameterNumber} has a non-boolean property unsigned`);
630
- }
631
- this.unsigned = definition.unsigned === true;
632
- if (definition.unit != undefined &&
633
- typeof definition.unit !== "string") {
634
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
635
- Parameter #${parameterNumber} has a non-string unit`);
636
- }
637
- this.unit = definition.unit;
638
- if (definition.readOnly != undefined && definition.readOnly !== true) {
639
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
640
- Parameter #${parameterNumber}: readOnly must true or omitted!`);
641
- }
642
- this.readOnly = definition.readOnly;
643
- if (definition.writeOnly != undefined &&
644
- definition.writeOnly !== true) {
645
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
646
- Parameter #${parameterNumber}: writeOnly must be true or omitted!`);
647
- }
648
- this.writeOnly = definition.writeOnly;
649
- if (definition.defaultValue == undefined) {
650
- if (!this.readOnly) {
651
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
652
- Parameter #${parameterNumber} is missing defaultValue, which is required unless the parameter is readOnly`);
653
- }
654
- }
655
- else if (typeof definition.defaultValue !== "number") {
656
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
657
- Parameter #${parameterNumber} has a non-numeric property defaultValue`);
658
- }
659
- this.defaultValue = definition.defaultValue;
660
- if (definition.allowManualEntry != undefined &&
661
- definition.allowManualEntry !== false) {
662
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
663
- Parameter #${parameterNumber}: allowManualEntry must be false or omitted!`);
664
- }
665
- // Default to allowing manual entry, except if the param is readonly
666
- this.allowManualEntry =
667
- (_a = definition.allowManualEntry) !== null && _a !== void 0 ? _a : (this.readOnly ? false : true);
668
- if ((0, typeguards_1.isArray)(definition.options) &&
669
- !definition.options.every((opt) => (0, typeguards_1.isObject)(opt) &&
670
- typeof opt.label === "string" &&
671
- typeof opt.value === "number")) {
672
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${parent.filename}:
673
- Parameter #${parameterNumber}: options is malformed!`);
674
- }
675
- this.options =
676
- (_c = (_b = definition.options) === null || _b === void 0 ? void 0 : _b.map((opt) => new ConditionalConfigOption(opt.value, opt.label, opt.$if))) !== null && _c !== void 0 ? _c : [];
677
- }
678
- evaluateCondition(deviceId) {
679
- if (deviceId &&
680
- this.condition &&
681
- !conditionApplies(this.condition, deviceId)) {
682
- return;
683
- }
684
- const ret = {
685
- ...(0, shared_1.pick)(this, [
686
- "parameterNumber",
687
- "valueBitMask",
688
- "label",
689
- "description",
690
- "valueSize",
691
- "minValue",
692
- "maxValue",
693
- "unsigned",
694
- "defaultValue",
695
- "unit",
696
- "readOnly",
697
- "writeOnly",
698
- "allowManualEntry",
699
- ]),
700
- options: this.options
701
- .map((o) => o.evaluateCondition(deviceId))
702
- .filter((o) => !!o),
703
- };
704
- // Infer minValue from options if possible
705
- if (ret.minValue == undefined) {
706
- if (ret.allowManualEntry === false && ret.options.length > 0) {
707
- ret.minValue = Math.min(...ret.options.map((o) => o.value));
708
- }
709
- else {
710
- throw (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${this.parent.filename}:
711
- Parameter #${this.parameterNumber} is missing required property "minValue"!`);
712
- }
713
- }
714
- if (ret.maxValue == undefined) {
715
- if (ret.allowManualEntry === false && ret.options.length > 0) {
716
- ret.maxValue = Math.max(...ret.options.map((o) => o.value));
717
- }
718
- else {
719
- throw (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${this.parent.filename}:
720
- Parameter #${this.parameterNumber} is missing required property "maxValue"!`);
721
- }
722
- }
723
- // @ts-expect-error TS doesn't seem to understand that we do set min/maxValue
724
- return ret;
725
- }
726
- }
727
- exports.ConditionalParamInformation = ConditionalParamInformation;
728
- class ConditionalConfigOption {
729
- constructor(value, label, condition) {
730
- this.value = value;
731
- this.label = label;
732
- this.condition = condition;
733
- }
734
- evaluateCondition(deviceId) {
735
- if (deviceId &&
736
- this.condition &&
737
- !conditionApplies(this.condition, deviceId)) {
738
- return;
739
- }
740
- return (0, shared_1.pick)(this, ["value", "label"]);
741
- }
742
- }
743
- exports.ConditionalConfigOption = ConditionalConfigOption;
744
- class DeviceMetadata {
745
- constructor(filename, definition) {
746
- for (const prop of [
747
- "wakeup",
748
- "inclusion",
749
- "exclusion",
750
- "reset",
751
- "manual",
752
- "comments",
753
- ]) {
754
- if (prop in definition) {
755
- const value = definition[prop];
756
- if (prop === "comments") {
757
- const isComment = (opt) => (0, typeguards_1.isObject)(opt) &&
758
- typeof opt.level === "string" &&
759
- typeof opt.text === "string";
760
- const isValid = ((0, typeguards_1.isArray)(value) && value.every(isComment)) ||
761
- isComment(value);
762
- if (!isValid)
763
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
764
- The metadata entry comments is invalid!`);
765
- }
766
- else if (typeof value !== "string") {
767
- (0, utils_safe_1.throwInvalidConfig)("devices", `packages/config/config/devices/${filename}:
768
- The metadata entry ${prop} must be a string!`);
769
- }
770
- this[prop] = value;
771
- }
772
- }
773
- }
774
- }
775
- exports.DeviceMetadata = DeviceMetadata;
776
- //# sourceMappingURL=Devices.js.map
463
+ //# sourceMappingURL=DeviceConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeviceConfig.js","sourceRoot":"","sources":["../../src/devices/DeviceConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;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