@zwave-js/config 14.3.3 → 14.3.4

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 (38) hide show
  1. package/build/cjs/ConfigManager.js +4 -0
  2. package/build/cjs/ConfigManager.js.map +1 -1
  3. package/build/cjs/JsonTemplate.js +9 -0
  4. package/build/cjs/JsonTemplate.js.map +1 -1
  5. package/build/cjs/Logger.js +4 -0
  6. package/build/cjs/Logger.js.map +1 -1
  7. package/build/cjs/Logic.js +4 -0
  8. package/build/cjs/Logic.js.map +1 -1
  9. package/build/cjs/LogicParser.js +80 -36
  10. package/build/cjs/LogicParser.js.map +1 -1
  11. package/build/cjs/Manufacturers.js +3 -0
  12. package/build/cjs/Manufacturers.js.map +1 -1
  13. package/build/cjs/_version.d.ts +1 -1
  14. package/build/cjs/_version.js +1 -1
  15. package/build/cjs/_version.js.map +1 -1
  16. package/build/cjs/devices/AssociationConfig.js +4 -0
  17. package/build/cjs/devices/AssociationConfig.js.map +1 -1
  18. package/build/cjs/devices/CompatConfig.js +19 -4
  19. package/build/cjs/devices/CompatConfig.js.map +1 -1
  20. package/build/cjs/devices/ConditionalItem.js +5 -0
  21. package/build/cjs/devices/ConditionalItem.js.map +1 -1
  22. package/build/cjs/devices/ConditionalPrimitive.js +5 -0
  23. package/build/cjs/devices/ConditionalPrimitive.js.map +1 -1
  24. package/build/cjs/devices/DeviceConfig.js +25 -9
  25. package/build/cjs/devices/DeviceConfig.js.map +1 -1
  26. package/build/cjs/devices/DeviceMetadata.js +8 -1
  27. package/build/cjs/devices/DeviceMetadata.js.map +1 -1
  28. package/build/cjs/devices/EndpointConfig.js +4 -0
  29. package/build/cjs/devices/EndpointConfig.js.map +1 -1
  30. package/build/cjs/devices/ParamInformation.js +8 -0
  31. package/build/cjs/devices/ParamInformation.js.map +1 -1
  32. package/build/cjs/utils.js +5 -0
  33. package/build/cjs/utils.js.map +2 -2
  34. package/build/cjs/utils_safe.js +3 -0
  35. package/build/cjs/utils_safe.js.map +1 -1
  36. package/build/esm/_version.d.ts +1 -1
  37. package/build/esm/_version.js +1 -1
  38. package/package.json +5 -5
@@ -3,6 +3,7 @@ var __defProp = Object.defineProperty;
3
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
5
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
7
  var __export = (target, all) => {
7
8
  for (var name in all)
8
9
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -33,9 +34,11 @@ const peggyParser = (
33
34
  function C() {
34
35
  this.constructor = child;
35
36
  }
37
+ __name(C, "C");
36
38
  C.prototype = parent.prototype;
37
39
  child.prototype = new C();
38
40
  }
41
+ __name(peg$subclass, "peg$subclass");
39
42
  function peg$SyntaxError(message, expected, found, location) {
40
43
  var self = Error.call(this, message);
41
44
  if (Object.setPrototypeOf) {
@@ -47,6 +50,7 @@ const peggyParser = (
47
50
  self.name = "SyntaxError";
48
51
  return self;
49
52
  }
53
+ __name(peg$SyntaxError, "peg$SyntaxError");
50
54
  peg$subclass(peg$SyntaxError, Error);
51
55
  function peg$padEnd(str, targetLength, padString) {
52
56
  padString = padString || " ";
@@ -56,6 +60,7 @@ const peggyParser = (
56
60
  padString += padString.repeat(targetLength);
57
61
  return str + padString.slice(0, targetLength);
58
62
  }
63
+ __name(peg$padEnd, "peg$padEnd");
59
64
  peg$SyntaxError.prototype.format = function(sources) {
60
65
  var str = "Error: " + this.message;
61
66
  if (this.location) {
@@ -86,32 +91,33 @@ const peggyParser = (
86
91
  peg$SyntaxError.buildMessage = function(expected, found) {
87
92
  var DESCRIBE_EXPECTATION_FNS = {
88
93
  // @ts-ignore
89
- literal: function(expectation) {
94
+ literal: /* @__PURE__ */ __name(function(expectation) {
90
95
  return '"' + literalEscape(expectation.text) + '"';
91
- },
96
+ }, "literal"),
92
97
  // @ts-ignore
93
- class: function(expectation) {
98
+ class: /* @__PURE__ */ __name(function(expectation) {
94
99
  var escapedParts = expectation.parts.map(function(part) {
95
100
  return Array.isArray(part) ? classEscape(part[0]) + "-" + classEscape(part[1]) : classEscape(part);
96
101
  });
97
102
  return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";
98
- },
103
+ }, "class"),
99
104
  // @ts-ignore
100
- any: function() {
105
+ any: /* @__PURE__ */ __name(function() {
101
106
  return "any character";
102
- },
107
+ }, "any"),
103
108
  // @ts-ignore
104
- end: function() {
109
+ end: /* @__PURE__ */ __name(function() {
105
110
  return "end of input";
106
- },
111
+ }, "end"),
107
112
  // @ts-ignore
108
- other: function(expectation) {
113
+ other: /* @__PURE__ */ __name(function(expectation) {
109
114
  return expectation.description;
110
- }
115
+ }, "other")
111
116
  };
112
117
  function hex(ch) {
113
118
  return ch.charCodeAt(0).toString(16).toUpperCase();
114
119
  }
120
+ __name(hex, "hex");
115
121
  function literalEscape(s) {
116
122
  return s.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
117
123
  return "\\x0" + hex(ch);
@@ -119,6 +125,7 @@ const peggyParser = (
119
125
  return "\\x" + hex(ch);
120
126
  });
121
127
  }
128
+ __name(literalEscape, "literalEscape");
122
129
  function classEscape(s) {
123
130
  return s.replace(/\\/g, "\\\\").replace(/\]/g, "\\]").replace(/\^/g, "\\^").replace(/-/g, "\\-").replace(/\0/g, "\\0").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/[\x00-\x0F]/g, function(ch) {
124
131
  return "\\x0" + hex(ch);
@@ -126,9 +133,11 @@ const peggyParser = (
126
133
  return "\\x" + hex(ch);
127
134
  });
128
135
  }
136
+ __name(classEscape, "classEscape");
129
137
  function describeExpectation(expectation) {
130
138
  return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);
131
139
  }
140
+ __name(describeExpectation, "describeExpectation");
132
141
  function describeExpected(expected2) {
133
142
  var descriptions = expected2.map(describeExpectation);
134
143
  var i, j;
@@ -154,9 +163,11 @@ const peggyParser = (
154
163
  return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1];
155
164
  }
156
165
  }
166
+ __name(describeExpected, "describeExpected");
157
167
  function describeFound(found2) {
158
168
  return found2 ? '"' + literalEscape(found2) + '"' : "end of input";
159
169
  }
170
+ __name(describeFound, "describeFound");
160
171
  return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
161
172
  };
162
173
  function peg$parse(input, options) {
@@ -218,45 +229,45 @@ const peggyParser = (
218
229
  var peg$e29 = peg$classExpectation(["'"], true, false);
219
230
  var peg$e30 = peg$otherExpectation("whitespace");
220
231
  var peg$e31 = peg$classExpectation([" ", " ", "\n", "\r"], false, false);
221
- var peg$f0 = function(group) {
232
+ var peg$f0 = /* @__PURE__ */ __name(function(group) {
222
233
  return group;
223
- };
224
- var peg$f1 = function(head, tails) {
234
+ }, "peg$f0");
235
+ var peg$f1 = /* @__PURE__ */ __name(function(head, tails) {
225
236
  return { or: [head, ...tails] };
226
- };
227
- var peg$f2 = function(tail) {
237
+ }, "peg$f1");
238
+ var peg$f2 = /* @__PURE__ */ __name(function(tail) {
228
239
  return tail;
229
- };
230
- var peg$f3 = function(head, tails) {
240
+ }, "peg$f2");
241
+ var peg$f3 = /* @__PURE__ */ __name(function(head, tails) {
231
242
  return { and: [head, ...tails] };
232
- };
233
- var peg$f4 = function(tail) {
243
+ }, "peg$f3");
244
+ var peg$f4 = /* @__PURE__ */ __name(function(tail) {
234
245
  return tail;
235
- };
236
- var peg$f5 = function(head, expr, tail) {
246
+ }, "peg$f4");
247
+ var peg$f5 = /* @__PURE__ */ __name(function(head, expr, tail) {
237
248
  return { [expr]: [head, tail] };
238
- };
239
- var peg$f6 = function(head, expr, tail) {
249
+ }, "peg$f5");
250
+ var peg$f6 = /* @__PURE__ */ __name(function(head, expr, tail) {
240
251
  return { ["ver " + expr]: [head, tail] };
241
- };
242
- var peg$f7 = function(variable) {
252
+ }, "peg$f6");
253
+ var peg$f7 = /* @__PURE__ */ __name(function(variable) {
243
254
  return { var: variable[1].join("") };
244
- };
245
- var peg$f8 = function() {
255
+ }, "peg$f7");
256
+ var peg$f8 = /* @__PURE__ */ __name(function() {
246
257
  return parseInt(text(), 10);
247
- };
248
- var peg$f9 = function() {
258
+ }, "peg$f8");
259
+ var peg$f9 = /* @__PURE__ */ __name(function() {
249
260
  return parseInt(text(), 16);
250
- };
251
- var peg$f10 = function(version) {
261
+ }, "peg$f9");
262
+ var peg$f10 = /* @__PURE__ */ __name(function(version) {
252
263
  return text();
253
- };
254
- var peg$f11 = function() {
264
+ }, "peg$f10");
265
+ var peg$f11 = /* @__PURE__ */ __name(function() {
255
266
  return text();
256
- };
257
- var peg$f12 = function() {
267
+ }, "peg$f11");
268
+ var peg$f12 = /* @__PURE__ */ __name(function() {
258
269
  return text();
259
- };
270
+ }, "peg$f12");
260
271
  var peg$currPos = 0;
261
272
  var peg$savedPos = 0;
262
273
  var peg$posDetailsCache = [{ line: 1, column: 1 }];
@@ -273,9 +284,11 @@ const peggyParser = (
273
284
  function text() {
274
285
  return input.substring(peg$savedPos, peg$currPos);
275
286
  }
287
+ __name(text, "text");
276
288
  function offset() {
277
289
  return peg$savedPos;
278
290
  }
291
+ __name(offset, "offset");
279
292
  function range() {
280
293
  return {
281
294
  // @ts-ignore
@@ -286,9 +299,11 @@ const peggyParser = (
286
299
  end: peg$currPos
287
300
  };
288
301
  }
302
+ __name(range, "range");
289
303
  function location() {
290
304
  return peg$computeLocation(peg$savedPos, peg$currPos);
291
305
  }
306
+ __name(location, "location");
292
307
  function expected(description, location2) {
293
308
  location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
294
309
  throw peg$buildStructuredError(
@@ -300,13 +315,16 @@ const peggyParser = (
300
315
  location2
301
316
  );
302
317
  }
318
+ __name(expected, "expected");
303
319
  function error(message, location2) {
304
320
  location2 = location2 !== void 0 ? location2 : peg$computeLocation(peg$savedPos, peg$currPos);
305
321
  throw peg$buildSimpleError(message, location2);
306
322
  }
323
+ __name(error, "error");
307
324
  function peg$literalExpectation(text2, ignoreCase) {
308
325
  return { type: "literal", text: text2, ignoreCase };
309
326
  }
327
+ __name(peg$literalExpectation, "peg$literalExpectation");
310
328
  function peg$classExpectation(parts, inverted, ignoreCase) {
311
329
  return {
312
330
  type: "class",
@@ -315,15 +333,19 @@ const peggyParser = (
315
333
  ignoreCase
316
334
  };
317
335
  }
336
+ __name(peg$classExpectation, "peg$classExpectation");
318
337
  function peg$anyExpectation() {
319
338
  return { type: "any" };
320
339
  }
340
+ __name(peg$anyExpectation, "peg$anyExpectation");
321
341
  function peg$endExpectation() {
322
342
  return { type: "end" };
323
343
  }
344
+ __name(peg$endExpectation, "peg$endExpectation");
324
345
  function peg$otherExpectation(description) {
325
346
  return { type: "other", description };
326
347
  }
348
+ __name(peg$otherExpectation, "peg$otherExpectation");
327
349
  function peg$computePosDetails(pos) {
328
350
  var details = peg$posDetailsCache[pos];
329
351
  var p;
@@ -354,6 +376,7 @@ const peggyParser = (
354
376
  return details;
355
377
  }
356
378
  }
379
+ __name(peg$computePosDetails, "peg$computePosDetails");
357
380
  function peg$computeLocation(startPos, endPos, offset2) {
358
381
  var startPosDetails = peg$computePosDetails(startPos);
359
382
  var endPosDetails = peg$computePosDetails(endPos);
@@ -385,6 +408,7 @@ const peggyParser = (
385
408
  }
386
409
  return res;
387
410
  }
411
+ __name(peg$computeLocation, "peg$computeLocation");
388
412
  function peg$fail(expected2) {
389
413
  if (peg$currPos < peg$maxFailPos)
390
414
  return;
@@ -394,9 +418,11 @@ const peggyParser = (
394
418
  }
395
419
  peg$maxFailExpected.push(expected2);
396
420
  }
421
+ __name(peg$fail, "peg$fail");
397
422
  function peg$buildSimpleError(message, location2) {
398
423
  return new peg$SyntaxError(message, null, null, location2);
399
424
  }
425
+ __name(peg$buildSimpleError, "peg$buildSimpleError");
400
426
  function peg$buildStructuredError(expected2, found, location2) {
401
427
  return new peg$SyntaxError(
402
428
  // @ts-ignore
@@ -409,6 +435,7 @@ const peggyParser = (
409
435
  location2
410
436
  );
411
437
  }
438
+ __name(peg$buildStructuredError, "peg$buildStructuredError");
412
439
  function peg$parsestart() {
413
440
  var s0;
414
441
  s0 = peg$parsegroup();
@@ -423,6 +450,7 @@ const peggyParser = (
423
450
  }
424
451
  return s0;
425
452
  }
453
+ __name(peg$parsestart, "peg$parsestart");
426
454
  function peg$parsegroup() {
427
455
  var s0, s1, s2, s3, s4, s5, s6;
428
456
  peg$silentFails++;
@@ -472,6 +500,7 @@ const peggyParser = (
472
500
  }
473
501
  return s0;
474
502
  }
503
+ __name(peg$parsegroup, "peg$parsegroup");
475
504
  function peg$parseor() {
476
505
  var s0, s1, s2, s3, s4;
477
506
  peg$silentFails++;
@@ -511,6 +540,7 @@ const peggyParser = (
511
540
  }
512
541
  return s0;
513
542
  }
543
+ __name(peg$parseor, "peg$parseor");
514
544
  function peg$parseor_tails() {
515
545
  var s0, s1, s2, s3, s4;
516
546
  s0 = peg$currPos;
@@ -542,6 +572,7 @@ const peggyParser = (
542
572
  }
543
573
  return s0;
544
574
  }
575
+ __name(peg$parseor_tails, "peg$parseor_tails");
545
576
  function peg$parseand() {
546
577
  var s0, s1, s2, s3, s4;
547
578
  peg$silentFails++;
@@ -581,6 +612,7 @@ const peggyParser = (
581
612
  }
582
613
  return s0;
583
614
  }
615
+ __name(peg$parseand, "peg$parseand");
584
616
  function peg$parseand_tails() {
585
617
  var s0, s1, s2, s3, s4;
586
618
  s0 = peg$currPos;
@@ -612,6 +644,7 @@ const peggyParser = (
612
644
  }
613
645
  return s0;
614
646
  }
647
+ __name(peg$parseand_tails, "peg$parseand_tails");
615
648
  function peg$parsecomparison() {
616
649
  var s0;
617
650
  s0 = peg$parsever_comparison();
@@ -620,6 +653,7 @@ const peggyParser = (
620
653
  }
621
654
  return s0;
622
655
  }
656
+ __name(peg$parsecomparison, "peg$parsecomparison");
623
657
  function peg$parseint_comparison() {
624
658
  var s0, s1, s2, s3, s4, s5, s6, s7;
625
659
  peg$silentFails++;
@@ -705,6 +739,7 @@ const peggyParser = (
705
739
  }
706
740
  return s0;
707
741
  }
742
+ __name(peg$parseint_comparison, "peg$parseint_comparison");
708
743
  function peg$parsever_comparison() {
709
744
  var s0, s1, s2, s3, s4, s5, s6, s7;
710
745
  peg$silentFails++;
@@ -790,6 +825,7 @@ const peggyParser = (
790
825
  }
791
826
  return s0;
792
827
  }
828
+ __name(peg$parsever_comparison, "peg$parsever_comparison");
793
829
  function peg$parseterm() {
794
830
  var s0;
795
831
  s0 = peg$parseconst();
@@ -804,6 +840,7 @@ const peggyParser = (
804
840
  }
805
841
  return s0;
806
842
  }
843
+ __name(peg$parseterm, "peg$parseterm");
807
844
  function peg$parseconst() {
808
845
  var s0, s1, s2, s3, s4, s5;
809
846
  peg$silentFails++;
@@ -878,6 +915,7 @@ const peggyParser = (
878
915
  }
879
916
  return s0;
880
917
  }
918
+ __name(peg$parseconst, "peg$parseconst");
881
919
  function peg$parseinteger() {
882
920
  var s0, s1, s2, s3, s4, s5;
883
921
  peg$silentFails++;
@@ -941,6 +979,7 @@ const peggyParser = (
941
979
  }
942
980
  return s0;
943
981
  }
982
+ __name(peg$parseinteger, "peg$parseinteger");
944
983
  function peg$parsehex() {
945
984
  var s0, s1, s2, s3, s4, s5;
946
985
  peg$silentFails++;
@@ -1006,6 +1045,7 @@ const peggyParser = (
1006
1045
  }
1007
1046
  return s0;
1008
1047
  }
1048
+ __name(peg$parsehex, "peg$parsehex");
1009
1049
  function peg$parseversion() {
1010
1050
  var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9;
1011
1051
  peg$silentFails++;
@@ -1151,6 +1191,7 @@ const peggyParser = (
1151
1191
  }
1152
1192
  return s0;
1153
1193
  }
1194
+ __name(peg$parseversion, "peg$parseversion");
1154
1195
  function peg$parsestring() {
1155
1196
  var s0, s1, s2, s3, s4, s5;
1156
1197
  peg$silentFails++;
@@ -1280,6 +1321,7 @@ const peggyParser = (
1280
1321
  }
1281
1322
  return s0;
1282
1323
  }
1324
+ __name(peg$parsestring, "peg$parsestring");
1283
1325
  function peg$parse_() {
1284
1326
  var s0, s1;
1285
1327
  peg$silentFails++;
@@ -1309,6 +1351,7 @@ const peggyParser = (
1309
1351
  peg$fail(peg$e30);
1310
1352
  return s0;
1311
1353
  }
1354
+ __name(peg$parse_, "peg$parse_");
1312
1355
  peg$result = peg$startRuleFunction();
1313
1356
  if (peg$result !== peg$FAILED && peg$currPos === input.length) {
1314
1357
  return peg$result;
@@ -1326,6 +1369,7 @@ const peggyParser = (
1326
1369
  );
1327
1370
  }
1328
1371
  }
1372
+ __name(peg$parse, "peg$parse");
1329
1373
  return {
1330
1374
  SyntaxError: peg$SyntaxError,
1331
1375
  parse: peg$parse