@zwave-js/config 15.1.1 → 15.1.2
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/cjs/ConfigManager.d.ts +1 -1
- package/build/cjs/ConfigManager.js.map +1 -1
- package/build/cjs/JsonTemplate.d.ts +1 -1
- package/build/cjs/JsonTemplate.js +12 -13
- package/build/cjs/JsonTemplate.js.map +3 -3
- package/build/cjs/Logger_safe.d.ts +1 -1
- package/build/cjs/Logger_safe.js.map +1 -1
- package/build/cjs/Manufacturers.d.ts +1 -1
- package/build/cjs/Manufacturers.js.map +1 -1
- package/build/cjs/_version.d.ts +1 -1
- package/build/cjs/_version.js +1 -1
- package/build/cjs/_version.js.map +1 -1
- package/build/cjs/devices/AssociationConfig.d.ts +1 -1
- package/build/cjs/devices/AssociationConfig.js +2 -2
- package/build/cjs/devices/AssociationConfig.js.map +2 -2
- package/build/cjs/devices/CompatConfig.d.ts +2 -2
- package/build/cjs/devices/CompatConfig.js +13 -13
- package/build/cjs/devices/CompatConfig.js.map +3 -3
- package/build/cjs/devices/ConditionalItem.d.ts +1 -1
- package/build/cjs/devices/ConditionalItem.js +5 -5
- package/build/cjs/devices/ConditionalItem.js.map +3 -3
- package/build/cjs/devices/DeviceConfig.d.ts +1 -1
- package/build/cjs/devices/DeviceConfig.js +1 -2
- package/build/cjs/devices/DeviceConfig.js.map +3 -3
- package/build/cjs/devices/DeviceMetadata.d.ts +1 -1
- package/build/cjs/devices/DeviceMetadata.js +2 -2
- package/build/cjs/devices/DeviceMetadata.js.map +2 -2
- package/build/cjs/devices/EndpointConfig.d.ts +1 -1
- package/build/cjs/devices/EndpointConfig.js.map +1 -1
- package/build/cjs/devices/ParamInformation.d.ts +1 -1
- package/build/cjs/devices/ParamInformation.js +4 -4
- package/build/cjs/devices/ParamInformation.js.map +2 -2
- package/build/cjs/traits.d.ts +1 -1
- package/build/cjs/utils.d.ts +1 -1
- package/build/cjs/utils.js.map +1 -1
- package/build/cjs/utils_safe.d.ts +1 -1
- package/build/cjs/utils_safe.js +6 -6
- package/build/cjs/utils_safe.js.map +2 -2
- package/build/esm/ConfigManager.d.ts +1 -1
- package/build/esm/ConfigManager.d.ts.map +1 -1
- package/build/esm/JsonTemplate.d.ts +1 -1
- package/build/esm/JsonTemplate.d.ts.map +1 -1
- package/build/esm/JsonTemplate.js +2 -3
- package/build/esm/JsonTemplate.js.map +1 -1
- package/build/esm/Logger_safe.d.ts +1 -1
- package/build/esm/Logger_safe.d.ts.map +1 -1
- package/build/esm/Manufacturers.d.ts +1 -1
- package/build/esm/Manufacturers.d.ts.map +1 -1
- package/build/esm/_version.d.ts +1 -1
- package/build/esm/_version.js +1 -1
- package/build/esm/devices/AssociationConfig.d.ts +1 -1
- package/build/esm/devices/AssociationConfig.d.ts.map +1 -1
- package/build/esm/devices/AssociationConfig.js +1 -1
- package/build/esm/devices/AssociationConfig.js.map +1 -1
- package/build/esm/devices/CompatConfig.d.ts +2 -2
- package/build/esm/devices/CompatConfig.d.ts.map +1 -1
- package/build/esm/devices/CompatConfig.js +2 -2
- package/build/esm/devices/CompatConfig.js.map +1 -1
- package/build/esm/devices/ConditionalItem.d.ts +1 -1
- package/build/esm/devices/ConditionalItem.d.ts.map +1 -1
- package/build/esm/devices/ConditionalItem.js +2 -2
- package/build/esm/devices/ConditionalItem.js.map +1 -1
- package/build/esm/devices/DeviceConfig.d.ts +1 -1
- package/build/esm/devices/DeviceConfig.d.ts.map +1 -1
- package/build/esm/devices/DeviceConfig.js +1 -2
- package/build/esm/devices/DeviceConfig.js.map +1 -1
- package/build/esm/devices/DeviceMetadata.d.ts +1 -1
- package/build/esm/devices/DeviceMetadata.d.ts.map +1 -1
- package/build/esm/devices/DeviceMetadata.js +1 -1
- package/build/esm/devices/DeviceMetadata.js.map +1 -1
- package/build/esm/devices/EndpointConfig.d.ts +1 -1
- package/build/esm/devices/EndpointConfig.d.ts.map +1 -1
- package/build/esm/devices/ParamInformation.d.ts +1 -1
- package/build/esm/devices/ParamInformation.d.ts.map +1 -1
- package/build/esm/devices/ParamInformation.js +1 -1
- package/build/esm/devices/ParamInformation.js.map +1 -1
- package/build/esm/traits.d.ts +1 -1
- package/build/esm/traits.d.ts.map +1 -1
- package/build/esm/utils.d.ts +1 -1
- package/build/esm/utils.d.ts.map +1 -1
- package/build/esm/utils_safe.d.ts +1 -1
- package/build/esm/utils_safe.d.ts.map +1 -1
- package/build/esm/utils_safe.js +1 -1
- package/build/esm/utils_safe.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/devices/DeviceMetadata.ts"],
|
|
4
|
-
"sourcesContent": ["import { type JSONObject, pick } from \"@zwave-js/shared
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAAA,
|
|
4
|
+
"sourcesContent": ["import { type JSONObject, pick } from \"@zwave-js/shared\";\nimport { isArray, isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig } from \"../utils_safe.js\";\nimport {\n\ttype ConditionalItem,\n\tconditionApplies,\n\tevaluateDeep,\n} from \"./ConditionalItem.js\";\nimport {\n\ttype ConditionalPrimitive,\n\tparseConditionalPrimitive,\n} from \"./ConditionalPrimitive.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalDeviceMetadata\n\timplements ConditionalItem<DeviceMetadata>\n{\n\tpublic constructor(filename: string, definition: JSONObject) {\n\t\tfor (\n\t\t\tconst prop of [\n\t\t\t\t\"wakeup\",\n\t\t\t\t\"inclusion\",\n\t\t\t\t\"exclusion\",\n\t\t\t\t\"reset\",\n\t\t\t\t\"manual\",\n\t\t\t] as const\n\t\t) {\n\t\t\tif (prop in definition) {\n\t\t\t\tthis[prop] = parseConditionalPrimitive(\n\t\t\t\t\tfilename,\n\t\t\t\t\t\"string\",\n\t\t\t\t\tprop,\n\t\t\t\t\tdefinition[prop],\n\t\t\t\t\t\"The metadata entry \",\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\tif (\"comments\" in definition) {\n\t\t\tconst value = definition.comments;\n\t\t\tconst isComment = (opt: unknown) =>\n\t\t\t\tisObject(opt)\n\t\t\t\t&& typeof opt.level === \"string\"\n\t\t\t\t&& typeof opt.text === \"string\";\n\n\t\t\tif (isComment(value)) {\n\t\t\t\tthis.comments = new ConditionalDeviceComment(\n\t\t\t\t\tvalue.level,\n\t\t\t\t\tvalue.text,\n\t\t\t\t\tvalue.$if,\n\t\t\t\t);\n\t\t\t} else if (isArray(value) && value.every(isComment)) {\n\t\t\t\tthis.comments = value.map(\n\t\t\t\t\t(c: any) =>\n\t\t\t\t\t\tnew ConditionalDeviceComment(c.level, c.text, c.$if),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${filename}:\nThe metadata entry comments is invalid!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic readonly condition?: string;\n\n\tpublic evaluateCondition(deviceId?: DeviceID): DeviceMetadata | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\t\tconst ret: DeviceMetadata = {};\n\t\tfor (\n\t\t\tconst prop of [\n\t\t\t\t\"wakeup\",\n\t\t\t\t\"inclusion\",\n\t\t\t\t\"exclusion\",\n\t\t\t\t\"reset\",\n\t\t\t\t\"manual\",\n\t\t\t] as const\n\t\t) {\n\t\t\tif (this[prop]) {\n\t\t\t\tconst evaluated = evaluateDeep(this[prop], deviceId);\n\t\t\t\tif (evaluated) ret[prop] = evaluated;\n\t\t\t}\n\t\t}\n\t\tconst comments = evaluateDeep(this.comments, deviceId, true);\n\t\tif (comments) ret.comments = comments;\n\n\t\treturn ret;\n\t}\n\n\t/** How to wake up the device manually */\n\tpublic readonly wakeup?: ConditionalPrimitive<string>;\n\t/** Inclusion instructions */\n\tpublic readonly inclusion?: ConditionalPrimitive<string>;\n\t/** Exclusion instructions */\n\tpublic readonly exclusion?: ConditionalPrimitive<string>;\n\t/** Instructions for resetting the device to factory defaults */\n\tpublic readonly reset?: ConditionalPrimitive<string>;\n\t/** A link to the device manual */\n\tpublic readonly manual?: ConditionalPrimitive<string>;\n\t/** Comments for this device */\n\tpublic readonly comments?:\n\t\t| ConditionalDeviceComment\n\t\t| ConditionalDeviceComment[];\n}\n\nexport interface DeviceMetadata {\n\twakeup?: string;\n\tinclusion?: string;\n\texclusion?: string;\n\treset?: string;\n\tmanual?: string;\n\tcomments?: DeviceComment | DeviceComment[];\n}\n\nexport class ConditionalDeviceComment\n\timplements ConditionalItem<DeviceComment>\n{\n\tpublic constructor(\n\t\tpublic readonly level: DeviceComment[\"level\"],\n\t\tpublic readonly text: string,\n\t\tpublic readonly condition?: string,\n\t) {}\n\n\tpublic evaluateCondition(deviceId?: DeviceID): DeviceComment | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\t\treturn pick(this, [\"level\", \"text\"]);\n\t}\n}\n\nexport interface DeviceComment {\n\tlevel: \"info\" | \"warning\" | \"error\";\n\ttext: string;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;AAAA,oBAAsC;AACtC,wBAAkC;AAClC,wBAAmC;AACnC,6BAIO;AACP,kCAGO;AAGD,MAAO,0BAAyB;EAdtC,OAcsC;;;EAGrC,YAAmB,UAAkB,YAAsB;AAC1D,eACO,QAAQ;MACb;MACA;MACA;MACA;MACA;OAEA;AACD,UAAI,QAAQ,YAAY;AACvB,aAAK,IAAI,QAAI,uDACZ,UACA,UACA,MACA,WAAW,IAAI,GACf,qBAAqB;MAEvB;IACD;AAEA,QAAI,cAAc,YAAY;AAC7B,YAAM,QAAQ,WAAW;AACzB,YAAM,YAAY,wBAAC,YAClB,4BAAS,GAAG,KACT,OAAO,IAAI,UAAU,YACrB,OAAO,IAAI,SAAS,UAHN;AAKlB,UAAI,UAAU,KAAK,GAAG;AACrB,aAAK,WAAW,IAAI,yBACnB,MAAM,OACN,MAAM,MACN,MAAM,GAAG;MAEX,eAAW,2BAAQ,KAAK,KAAK,MAAM,MAAM,SAAS,GAAG;AACpD,aAAK,WAAW,MAAM,IACrB,CAAC,MACA,IAAI,yBAAyB,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC;MAEvD,OAAO;AACN,kDACC,WACA,kCAAkC,QAAQ;wCACP;MAErC;IACD;EACD;EAEgB;EAET,kBAAkB,UAAmB;AAC3C,QAAI,KAAC,yCAAiB,MAAM,QAAQ;AAAG;AACvC,UAAM,MAAsB,CAAA;AAC5B,eACO,QAAQ;MACb;MACA;MACA;MACA;MACA;OAEA;AACD,UAAI,KAAK,IAAI,GAAG;AACf,cAAM,gBAAY,qCAAa,KAAK,IAAI,GAAG,QAAQ;AACnD,YAAI;AAAW,cAAI,IAAI,IAAI;MAC5B;IACD;AACA,UAAM,eAAW,qCAAa,KAAK,UAAU,UAAU,IAAI;AAC3D,QAAI;AAAU,UAAI,WAAW;AAE7B,WAAO;EACR;;EAGgB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;AAcX,MAAO,yBAAwB;EApHrC,OAoHqC;;;EAInB;EACA;EACA;EAHjB,YACiB,OACA,MACA,WAAkB;AAFlB,SAAA,QAAA;AACA,SAAA,OAAA;AACA,SAAA,YAAA;EACd;EAEI,kBAAkB,UAAmB;AAC3C,QAAI,KAAC,yCAAiB,MAAM,QAAQ;AAAG;AACvC,eAAO,oBAAK,MAAM,CAAC,SAAS,MAAM,CAAC;EACpC;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONObject } from "@zwave-js/shared
|
|
1
|
+
import type { JSONObject } from "@zwave-js/shared";
|
|
2
2
|
import { type AssociationConfig, ConditionalAssociationConfig } from "./AssociationConfig.js";
|
|
3
3
|
import { type ConditionalItem } from "./ConditionalItem.js";
|
|
4
4
|
import type { ConditionalDeviceConfig } from "./DeviceConfig.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/devices/EndpointConfig.ts"],
|
|
4
|
-
"sourcesContent": ["import type { JSONObject } from \"@zwave-js/shared
|
|
4
|
+
"sourcesContent": ["import type { JSONObject } from \"@zwave-js/shared\";\nimport { isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig } from \"../utils_safe.js\";\nimport {\n\ttype AssociationConfig,\n\tConditionalAssociationConfig,\n} from \"./AssociationConfig.js\";\nimport {\n\ttype ConditionalItem,\n\tconditionApplies,\n\tevaluateDeep,\n\tvalidateCondition,\n} from \"./ConditionalItem.js\";\nimport type { ConditionalDeviceConfig } from \"./DeviceConfig.js\";\nimport {\n\ttype ConditionalParamInfoMap,\n\ttype ParamInfoMap,\n\tparseConditionalParamInformationMap,\n} from \"./ParamInformation.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalEndpointConfig\n\timplements ConditionalItem<EndpointConfig>\n{\n\tpublic constructor(\n\t\tparent: ConditionalDeviceConfig,\n\t\tindex: number,\n\t\tdefinition: JSONObject,\n\t) {\n\t\tthis.index = index;\n\t\tconst filename = parent.filename;\n\n\t\tvalidateCondition(\n\t\t\tfilename,\n\t\t\tdefinition,\n\t\t\t`Endpoint ${index} contains an`,\n\t\t);\n\t\tthis.condition = definition.$if;\n\n\t\tif (definition.label != undefined) {\n\t\t\tif (typeof definition.label !== \"string\") {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t`device`,\n\t\t\t\t\t`packages/config/config/devices/${filename}:\nEndpoint ${index}: label is not a string`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.label = definition.label;\n\t\t}\n\n\t\tif (definition.associations != undefined) {\n\t\t\tconst associations = new Map<\n\t\t\t\tnumber,\n\t\t\t\tConditionalAssociationConfig\n\t\t\t>();\n\t\t\tif (!isObject(definition.associations)) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t`device`,\n\t\t\t\t\t`packages/config/config/devices/${filename}:\nEndpoint ${index}: associations is not an object`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tfor (\n\t\t\t\tconst [key, assocDefinition] of Object.entries(\n\t\t\t\t\tdefinition.associations,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tif (!/^[1-9][0-9]*$/.test(key)) {\n\t\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\t`device`,\n\t\t\t\t\t\t`packages/config/config/devices/${filename}:\nEndpoint ${index}: found non-numeric group id \"${key}\" in associations`,\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst keyNum = parseInt(key, 10);\n\t\t\t\tassociations.set(\n\t\t\t\t\tkeyNum,\n\t\t\t\t\tnew ConditionalAssociationConfig(\n\t\t\t\t\t\tfilename,\n\t\t\t\t\t\tkeyNum,\n\t\t\t\t\t\tassocDefinition as any,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.associations = associations;\n\t\t}\n\n\t\tif (definition.paramInformation != undefined) {\n\t\t\tthis.paramInformation = parseConditionalParamInformationMap(\n\t\t\t\tdefinition,\n\t\t\t\tparent,\n\t\t\t\t`Endpoint ${index}: `,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic readonly index: number;\n\tpublic readonly associations?: ReadonlyMap<\n\t\tnumber,\n\t\tConditionalAssociationConfig\n\t>;\n\n\tpublic readonly paramInformation?: ConditionalParamInfoMap;\n\n\tpublic readonly condition?: string;\n\tpublic readonly label?: string;\n\n\tpublic evaluateCondition(deviceId?: DeviceID): EndpointConfig | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\t\tconst ret: EndpointConfig = {\n\t\t\tindex: this.index,\n\t\t\tlabel: this.label,\n\t\t};\n\t\tconst associations = evaluateDeep(this.associations, deviceId);\n\t\tif (associations) ret.associations = associations;\n\n\t\tconst paramInformation = evaluateDeep(this.paramInformation, deviceId);\n\t\tif (paramInformation) ret.paramInformation = paramInformation;\n\n\t\treturn ret;\n\t}\n}\n\nexport type EndpointConfig =\n\t& Omit<\n\t\tConditionalEndpointConfig,\n\t\t\"condition\" | \"evaluateCondition\" | \"associations\" | \"paramInformation\"\n\t>\n\t& {\n\t\tassociations?: Map<number, AssociationConfig> | undefined;\n\t\tparamInformation?: ParamInfoMap;\n\t};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;AACA;;;;;AAAA,wBAAyB;AACzB,wBAAmC;AACnC,+BAGO;AACP,6BAKO;AAEP,8BAIO;AAGD,MAAO,0BAAyB;EApBtC,OAoBsC;;;EAGrC,YACC,QACA,OACA,YAAsB;AAEtB,SAAK,QAAQ;AACb,UAAM,WAAW,OAAO;AAExB,kDACC,UACA,YACA,YAAY,KAAK,cAAc;AAEhC,SAAK,YAAY,WAAW;AAE5B,QAAI,WAAW,SAAS,QAAW;AAClC,UAAI,OAAO,WAAW,UAAU,UAAU;AACzC,kDACC,UACA,kCAAkC,QAAQ;WACpC,KAAK,yBAAyB;MAEtC;AACA,WAAK,QAAQ,WAAW;IACzB;AAEA,QAAI,WAAW,gBAAgB,QAAW;AACzC,YAAM,eAAe,oBAAI,IAAG;AAI5B,UAAI,KAAC,4BAAS,WAAW,YAAY,GAAG;AACvC,kDACC,UACA,kCAAkC,QAAQ;WACpC,KAAK,iCAAiC;MAE9C;AACA,iBACO,CAAC,KAAK,eAAe,KAAK,OAAO,QACtC,WAAW,YAAY,GAEvB;AACD,YAAI,CAAC,gBAAgB,KAAK,GAAG,GAAG;AAC/B,oDACC,UACA,kCAAkC,QAAQ;WACrC,KAAK,iCAAiC,GAAG,mBAAmB;QAEnE;AAEA,cAAM,SAAS,SAAS,KAAK,EAAE;AAC/B,qBAAa,IACZ,QACA,IAAI,sDACH,UACA,QACA,eAAsB,CACtB;MAEH;AACA,WAAK,eAAe;IACrB;AAEA,QAAI,WAAW,oBAAoB,QAAW;AAC7C,WAAK,uBAAmB,6DACvB,YACA,QACA,YAAY,KAAK,IAAI;IAEvB;EACD;EAEgB;EACA;EAKA;EAEA;EACA;EAET,kBAAkB,UAAmB;AAC3C,QAAI,KAAC,yCAAiB,MAAM,QAAQ;AAAG;AACvC,UAAM,MAAsB;MAC3B,OAAO,KAAK;MACZ,OAAO,KAAK;;AAEb,UAAM,mBAAe,qCAAa,KAAK,cAAc,QAAQ;AAC7D,QAAI;AAAc,UAAI,eAAe;AAErC,UAAM,uBAAmB,qCAAa,KAAK,kBAAkB,QAAQ;AACrE,QAAI;AAAkB,UAAI,mBAAmB;AAE7C,WAAO;EACR;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JSONObject, type ReadonlyObjectKeyMap } from "@zwave-js/shared
|
|
1
|
+
import { type JSONObject, type ReadonlyObjectKeyMap } from "@zwave-js/shared";
|
|
2
2
|
import { type ConditionalItem } from "./ConditionalItem.js";
|
|
3
3
|
import type { ConditionalDeviceConfig } from "./DeviceConfig.js";
|
|
4
4
|
import type { DeviceID } from "./shared.js";
|
|
@@ -25,7 +25,7 @@ __export(ParamInformation_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(ParamInformation_exports);
|
|
27
27
|
var import_core = require("@zwave-js/core");
|
|
28
|
-
var
|
|
28
|
+
var import_shared = require("@zwave-js/shared");
|
|
29
29
|
var import_typeguards = require("alcalzone-shared/typeguards");
|
|
30
30
|
var import_utils_safe = require("../utils_safe.js");
|
|
31
31
|
var import_ConditionalItem = require("./ConditionalItem.js");
|
|
@@ -124,7 +124,7 @@ Parameter #${parameterNumber}: options is malformed!`);
|
|
|
124
124
|
if (!(0, import_ConditionalItem.conditionApplies)(this, deviceId))
|
|
125
125
|
return;
|
|
126
126
|
const ret = {
|
|
127
|
-
...(0,
|
|
127
|
+
...(0, import_shared.pick)(this, [
|
|
128
128
|
"parameterNumber",
|
|
129
129
|
"valueBitMask",
|
|
130
130
|
"label",
|
|
@@ -175,11 +175,11 @@ class ConditionalConfigOption {
|
|
|
175
175
|
evaluateCondition(deviceId) {
|
|
176
176
|
if (!(0, import_ConditionalItem.conditionApplies)(this, deviceId))
|
|
177
177
|
return;
|
|
178
|
-
return (0,
|
|
178
|
+
return (0, import_shared.pick)(this, ["value", "label"]);
|
|
179
179
|
}
|
|
180
180
|
}
|
|
181
181
|
function parseConditionalParamInformationMap(definition, parent, errorPrefix = "") {
|
|
182
|
-
const paramInformation = new
|
|
182
|
+
const paramInformation = new import_shared.ObjectKeyMap();
|
|
183
183
|
const filename = parent.filename;
|
|
184
184
|
if ((0, import_typeguards.isArray)(definition.paramInformation)) {
|
|
185
185
|
if (!definition.paramInformation.every((entry) => "#" in entry)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/devices/ParamInformation.ts"],
|
|
4
|
-
"sourcesContent": ["import { tryParseParamNumber } from \"@zwave-js/core\";\nimport {\n\ttype JSONObject,\n\tObjectKeyMap,\n\ttype ReadonlyObjectKeyMap,\n\tpick,\n} from \"@zwave-js/shared/safe\";\nimport { isArray, isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig } from \"../utils_safe.js\";\nimport {\n\ttype ConditionalItem,\n\tconditionApplies,\n\tevaluateDeep,\n\tvalidateCondition,\n} from \"./ConditionalItem.js\";\nimport type { ConditionalDeviceConfig } from \"./DeviceConfig.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalParamInformation\n\timplements ConditionalItem<ParamInformation>\n{\n\tpublic constructor(\n\t\tparent: ConditionalDeviceConfig,\n\t\tparameterNumber: number,\n\t\tvalueBitMask: number | undefined,\n\t\tdefinition: JSONObject,\n\t) {\n\t\tthis.parent = parent;\n\t\tthis.parameterNumber = parameterNumber;\n\t\tthis.valueBitMask = valueBitMask;\n\t\t// No need to validate here, this should be done one level higher\n\t\tthis.condition = definition.$if;\n\n\t\tif (typeof definition.label !== \"string\") {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string label`,\n\t\t\t);\n\t\t}\n\t\tthis.label = definition.label;\n\n\t\tif (\n\t\t\tdefinition.description != undefined\n\t\t\t&& typeof definition.description !== \"string\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string description`,\n\t\t\t);\n\t\t}\n\t\tthis.description = definition.description;\n\n\t\tif (\n\t\t\ttypeof definition.valueSize !== \"number\"\n\t\t\t|| definition.valueSize <= 0\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has an invalid value size`,\n\t\t\t);\n\t\t}\n\t\tthis.valueSize = definition.valueSize;\n\n\t\tif (\n\t\t\tdefinition.minValue != undefined\n\t\t\t&& typeof definition.minValue !== \"number\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property minValue`,\n\t\t\t);\n\t\t}\n\t\tthis.minValue = definition.minValue;\n\n\t\tif (\n\t\t\tdefinition.maxValue != undefined\n\t\t\t&& typeof definition.maxValue !== \"number\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property maxValue`,\n\t\t\t);\n\t\t}\n\t\tthis.maxValue = definition.maxValue;\n\n\t\tif (\n\t\t\tdefinition.unsigned != undefined\n\t\t\t&& typeof definition.unsigned !== \"boolean\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-boolean property unsigned`,\n\t\t\t);\n\t\t}\n\t\tthis.unsigned = definition.unsigned === true;\n\n\t\tif (\n\t\t\tdefinition.unit != undefined\n\t\t\t&& typeof definition.unit !== \"string\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string unit`,\n\t\t\t);\n\t\t}\n\t\tthis.unit = definition.unit;\n\n\t\tif (definition.readOnly != undefined && definition.readOnly !== true) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\n\t\tParameter #${parameterNumber}: readOnly must true or omitted!`,\n\t\t\t);\n\t\t}\n\t\tthis.readOnly = definition.readOnly;\n\n\t\tif (\n\t\t\tdefinition.writeOnly != undefined\n\t\t\t&& definition.writeOnly !== true\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\n\t\tParameter #${parameterNumber}: writeOnly must be true or omitted!`,\n\t\t\t);\n\t\t}\n\t\tthis.writeOnly = definition.writeOnly;\n\n\t\tif (definition.defaultValue == undefined) {\n\t\t\tif (!this.readOnly) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} is missing defaultValue, which is required unless the parameter is readOnly`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (typeof definition.defaultValue !== \"number\") {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property defaultValue`,\n\t\t\t);\n\t\t}\n\t\tthis.defaultValue = definition.defaultValue;\n\n\t\tif (\n\t\t\tdefinition.allowManualEntry != undefined\n\t\t\t&& definition.allowManualEntry !== false\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber}: allowManualEntry must be false or omitted!`,\n\t\t\t);\n\t\t}\n\t\t// Default to allowing manual entry, except if the param is readonly\n\t\tthis.allowManualEntry = definition.allowManualEntry\n\t\t\t?? (this.readOnly ? false : true);\n\n\t\tif (\n\t\t\tisArray(definition.options)\n\t\t\t&& !definition.options.every(\n\t\t\t\t(opt: unknown) =>\n\t\t\t\t\tisObject(opt)\n\t\t\t\t\t&& typeof opt.label === \"string\"\n\t\t\t\t\t&& typeof opt.value === \"number\",\n\t\t\t)\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber}: options is malformed!`,\n\t\t\t);\n\t\t}\n\n\t\tthis.options = definition.options?.map(\n\t\t\t(opt: any) =>\n\t\t\t\tnew ConditionalConfigOption(opt.value, opt.label, opt.$if),\n\t\t) ?? [];\n\t}\n\n\tprivate parent: ConditionalDeviceConfig;\n\tpublic readonly parameterNumber: number;\n\tpublic readonly valueBitMask?: number;\n\tpublic readonly label: string;\n\tpublic readonly description?: string;\n\tpublic readonly valueSize: number;\n\tpublic readonly minValue?: number;\n\tpublic readonly maxValue?: number;\n\tpublic readonly unsigned?: boolean;\n\tpublic readonly defaultValue: number;\n\tpublic readonly unit?: string;\n\tpublic readonly readOnly?: true;\n\tpublic readonly writeOnly?: true;\n\tpublic readonly allowManualEntry: boolean;\n\tpublic readonly options: readonly ConditionalConfigOption[];\n\n\tpublic readonly condition?: string;\n\n\tpublic evaluateCondition(\n\t\tdeviceId?: DeviceID,\n\t): ParamInformation | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\n\t\tconst ret = {\n\t\t\t...pick(this, [\n\t\t\t\t\"parameterNumber\",\n\t\t\t\t\"valueBitMask\",\n\t\t\t\t\"label\",\n\t\t\t\t\"description\",\n\t\t\t\t\"valueSize\",\n\t\t\t\t\"minValue\",\n\t\t\t\t\"maxValue\",\n\t\t\t\t\"unsigned\",\n\t\t\t\t\"defaultValue\",\n\t\t\t\t\"unit\",\n\t\t\t\t\"readOnly\",\n\t\t\t\t\"writeOnly\",\n\t\t\t\t\"allowManualEntry\",\n\t\t\t]),\n\t\t\toptions: evaluateDeep(this.options, deviceId, true),\n\t\t};\n\t\t// Infer minValue from options if possible\n\t\tif (ret.minValue == undefined) {\n\t\t\tif (ret.allowManualEntry === false && ret.options.length > 0) {\n\t\t\t\tret.minValue = Math.min(...ret.options.map((o) => o.value));\n\t\t\t} else {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${this.parent.filename}:\nParameter #${this.parameterNumber} is missing required property \"minValue\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (ret.maxValue == undefined) {\n\t\t\tif (ret.allowManualEntry === false && ret.options.length > 0) {\n\t\t\t\tret.maxValue = Math.max(...ret.options.map((o) => o.value));\n\t\t\t} else {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${this.parent.filename}:\nParameter #${this.parameterNumber} is missing required property \"maxValue\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// @ts-expect-error TS doesn't seem to understand that we do set min/maxValue\n\t\treturn ret;\n\t}\n}\n\nexport type ParamInformation =\n\t& Omit<\n\t\tConditionalParamInformation,\n\t\t\"condition\" | \"evaluateCondition\" | \"options\" | \"minValue\" | \"maxValue\"\n\t>\n\t& {\n\t\toptions: readonly ConfigOption[];\n\t\tminValue: NonNullable<ConditionalParamInformation[\"minValue\"]>;\n\t\tmaxValue: NonNullable<ConditionalParamInformation[\"maxValue\"]>;\n\t};\n\nexport class ConditionalConfigOption implements ConditionalItem<ConfigOption> {\n\tpublic constructor(\n\t\tpublic readonly value: number,\n\t\tpublic readonly label: string,\n\t\tpublic readonly condition?: string,\n\t) {}\n\n\tpublic evaluateCondition(deviceId?: DeviceID): ConfigOption | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\n\t\treturn pick(this, [\"value\", \"label\"]);\n\t}\n}\n\nexport interface ConfigOption {\n\tvalue: number;\n\tlabel: string;\n}\n\nexport type ConditionalParamInfoMap = ReadonlyObjectKeyMap<\n\t{ parameter: number; valueBitMask?: number },\n\tConditionalParamInformation[]\n>;\n\nexport type ParamInfoMap = ReadonlyObjectKeyMap<\n\t{ parameter: number; valueBitMask?: number },\n\tParamInformation\n>;\n\nexport function parseConditionalParamInformationMap(\n\tdefinition: JSONObject,\n\tparent: ConditionalDeviceConfig,\n\terrorPrefix: string = \"\",\n): ConditionalParamInfoMap {\n\tconst paramInformation = new ObjectKeyMap<\n\t\t{ parameter: number; valueBitMask?: number },\n\t\tConditionalParamInformation[]\n\t>();\n\n\tconst filename = parent.filename;\n\n\tif (isArray(definition.paramInformation)) {\n\t\t// Check that every param has a param number\n\t\tif (!definition.paramInformation.every((entry: any) => \"#\" in entry)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t`device`,\n\t\t\t\t`packages/config/config/devices/${filename}: \n${errorPrefix}required property \"#\" missing in at least one entry of paramInformation`,\n\t\t\t);\n\t\t}\n\n\t\t// And a valid $if condition\n\t\tfor (const entry of definition.paramInformation) {\n\t\t\tvalidateCondition(\n\t\t\t\tfilename,\n\t\t\t\tentry,\n\t\t\t\t`${errorPrefix}At least one entry of paramInformation contains an`,\n\t\t\t);\n\t\t}\n\n\t\tfor (const paramDefinition of definition.paramInformation) {\n\t\t\tconst { [\"#\"]: paramNo, ...defn } = paramDefinition;\n\t\t\tconst key = tryParseParamNumber(paramNo);\n\t\t\tif (!key) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t`device`,\n\t\t\t\t\t`packages/config/config/devices/${filename}: \n${errorPrefix}found invalid param number \"${paramNo}\" in paramInformation`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!paramInformation.has(key)) paramInformation.set(key, []);\n\t\t\tparamInformation\n\t\t\t\t.get(key)!\n\t\t\t\t.push(\n\t\t\t\t\tnew ConditionalParamInformation(\n\t\t\t\t\t\tparent,\n\t\t\t\t\t\tkey.parameter,\n\t\t\t\t\t\tkey.valueBitMask,\n\t\t\t\t\t\tdefn,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t}\n\t} else if (isObject(definition.paramInformation)) {\n\t\t// Silently ignore this old format\n\t} else {\n\t\tthrowInvalidConfig(\n\t\t\t`device`,\n\t\t\t`packages/config/config/devices/${filename}:\n${errorPrefix}paramInformation must be an array!`,\n\t\t);\n\t}\n\n\treturn paramInformation;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,kBAAoC;AACpC,
|
|
4
|
+
"sourcesContent": ["import { tryParseParamNumber } from \"@zwave-js/core\";\nimport {\n\ttype JSONObject,\n\tObjectKeyMap,\n\ttype ReadonlyObjectKeyMap,\n\tpick,\n} from \"@zwave-js/shared\";\nimport { isArray, isObject } from \"alcalzone-shared/typeguards\";\nimport { throwInvalidConfig } from \"../utils_safe.js\";\nimport {\n\ttype ConditionalItem,\n\tconditionApplies,\n\tevaluateDeep,\n\tvalidateCondition,\n} from \"./ConditionalItem.js\";\nimport type { ConditionalDeviceConfig } from \"./DeviceConfig.js\";\nimport type { DeviceID } from \"./shared.js\";\n\nexport class ConditionalParamInformation\n\timplements ConditionalItem<ParamInformation>\n{\n\tpublic constructor(\n\t\tparent: ConditionalDeviceConfig,\n\t\tparameterNumber: number,\n\t\tvalueBitMask: number | undefined,\n\t\tdefinition: JSONObject,\n\t) {\n\t\tthis.parent = parent;\n\t\tthis.parameterNumber = parameterNumber;\n\t\tthis.valueBitMask = valueBitMask;\n\t\t// No need to validate here, this should be done one level higher\n\t\tthis.condition = definition.$if;\n\n\t\tif (typeof definition.label !== \"string\") {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string label`,\n\t\t\t);\n\t\t}\n\t\tthis.label = definition.label;\n\n\t\tif (\n\t\t\tdefinition.description != undefined\n\t\t\t&& typeof definition.description !== \"string\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string description`,\n\t\t\t);\n\t\t}\n\t\tthis.description = definition.description;\n\n\t\tif (\n\t\t\ttypeof definition.valueSize !== \"number\"\n\t\t\t|| definition.valueSize <= 0\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has an invalid value size`,\n\t\t\t);\n\t\t}\n\t\tthis.valueSize = definition.valueSize;\n\n\t\tif (\n\t\t\tdefinition.minValue != undefined\n\t\t\t&& typeof definition.minValue !== \"number\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property minValue`,\n\t\t\t);\n\t\t}\n\t\tthis.minValue = definition.minValue;\n\n\t\tif (\n\t\t\tdefinition.maxValue != undefined\n\t\t\t&& typeof definition.maxValue !== \"number\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property maxValue`,\n\t\t\t);\n\t\t}\n\t\tthis.maxValue = definition.maxValue;\n\n\t\tif (\n\t\t\tdefinition.unsigned != undefined\n\t\t\t&& typeof definition.unsigned !== \"boolean\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-boolean property unsigned`,\n\t\t\t);\n\t\t}\n\t\tthis.unsigned = definition.unsigned === true;\n\n\t\tif (\n\t\t\tdefinition.unit != undefined\n\t\t\t&& typeof definition.unit !== \"string\"\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-string unit`,\n\t\t\t);\n\t\t}\n\t\tthis.unit = definition.unit;\n\n\t\tif (definition.readOnly != undefined && definition.readOnly !== true) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\n\t\tParameter #${parameterNumber}: readOnly must true or omitted!`,\n\t\t\t);\n\t\t}\n\t\tthis.readOnly = definition.readOnly;\n\n\t\tif (\n\t\t\tdefinition.writeOnly != undefined\n\t\t\t&& definition.writeOnly !== true\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\n\t\tParameter #${parameterNumber}: writeOnly must be true or omitted!`,\n\t\t\t);\n\t\t}\n\t\tthis.writeOnly = definition.writeOnly;\n\n\t\tif (definition.defaultValue == undefined) {\n\t\t\tif (!this.readOnly) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} is missing defaultValue, which is required unless the parameter is readOnly`,\n\t\t\t\t);\n\t\t\t}\n\t\t} else if (typeof definition.defaultValue !== \"number\") {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber} has a non-numeric property defaultValue`,\n\t\t\t);\n\t\t}\n\t\tthis.defaultValue = definition.defaultValue;\n\n\t\tif (\n\t\t\tdefinition.allowManualEntry != undefined\n\t\t\t&& definition.allowManualEntry !== false\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber}: allowManualEntry must be false or omitted!`,\n\t\t\t);\n\t\t}\n\t\t// Default to allowing manual entry, except if the param is readonly\n\t\tthis.allowManualEntry = definition.allowManualEntry\n\t\t\t?? (this.readOnly ? false : true);\n\n\t\tif (\n\t\t\tisArray(definition.options)\n\t\t\t&& !definition.options.every(\n\t\t\t\t(opt: unknown) =>\n\t\t\t\t\tisObject(opt)\n\t\t\t\t\t&& typeof opt.label === \"string\"\n\t\t\t\t\t&& typeof opt.value === \"number\",\n\t\t\t)\n\t\t) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t\"devices\",\n\t\t\t\t`packages/config/config/devices/${parent.filename}:\nParameter #${parameterNumber}: options is malformed!`,\n\t\t\t);\n\t\t}\n\n\t\tthis.options = definition.options?.map(\n\t\t\t(opt: any) =>\n\t\t\t\tnew ConditionalConfigOption(opt.value, opt.label, opt.$if),\n\t\t) ?? [];\n\t}\n\n\tprivate parent: ConditionalDeviceConfig;\n\tpublic readonly parameterNumber: number;\n\tpublic readonly valueBitMask?: number;\n\tpublic readonly label: string;\n\tpublic readonly description?: string;\n\tpublic readonly valueSize: number;\n\tpublic readonly minValue?: number;\n\tpublic readonly maxValue?: number;\n\tpublic readonly unsigned?: boolean;\n\tpublic readonly defaultValue: number;\n\tpublic readonly unit?: string;\n\tpublic readonly readOnly?: true;\n\tpublic readonly writeOnly?: true;\n\tpublic readonly allowManualEntry: boolean;\n\tpublic readonly options: readonly ConditionalConfigOption[];\n\n\tpublic readonly condition?: string;\n\n\tpublic evaluateCondition(\n\t\tdeviceId?: DeviceID,\n\t): ParamInformation | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\n\t\tconst ret = {\n\t\t\t...pick(this, [\n\t\t\t\t\"parameterNumber\",\n\t\t\t\t\"valueBitMask\",\n\t\t\t\t\"label\",\n\t\t\t\t\"description\",\n\t\t\t\t\"valueSize\",\n\t\t\t\t\"minValue\",\n\t\t\t\t\"maxValue\",\n\t\t\t\t\"unsigned\",\n\t\t\t\t\"defaultValue\",\n\t\t\t\t\"unit\",\n\t\t\t\t\"readOnly\",\n\t\t\t\t\"writeOnly\",\n\t\t\t\t\"allowManualEntry\",\n\t\t\t]),\n\t\t\toptions: evaluateDeep(this.options, deviceId, true),\n\t\t};\n\t\t// Infer minValue from options if possible\n\t\tif (ret.minValue == undefined) {\n\t\t\tif (ret.allowManualEntry === false && ret.options.length > 0) {\n\t\t\t\tret.minValue = Math.min(...ret.options.map((o) => o.value));\n\t\t\t} else {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${this.parent.filename}:\nParameter #${this.parameterNumber} is missing required property \"minValue\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif (ret.maxValue == undefined) {\n\t\t\tif (ret.allowManualEntry === false && ret.options.length > 0) {\n\t\t\t\tret.maxValue = Math.max(...ret.options.map((o) => o.value));\n\t\t\t} else {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t\"devices\",\n\t\t\t\t\t`packages/config/config/devices/${this.parent.filename}:\nParameter #${this.parameterNumber} is missing required property \"maxValue\"!`,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t// @ts-expect-error TS doesn't seem to understand that we do set min/maxValue\n\t\treturn ret;\n\t}\n}\n\nexport type ParamInformation =\n\t& Omit<\n\t\tConditionalParamInformation,\n\t\t\"condition\" | \"evaluateCondition\" | \"options\" | \"minValue\" | \"maxValue\"\n\t>\n\t& {\n\t\toptions: readonly ConfigOption[];\n\t\tminValue: NonNullable<ConditionalParamInformation[\"minValue\"]>;\n\t\tmaxValue: NonNullable<ConditionalParamInformation[\"maxValue\"]>;\n\t};\n\nexport class ConditionalConfigOption implements ConditionalItem<ConfigOption> {\n\tpublic constructor(\n\t\tpublic readonly value: number,\n\t\tpublic readonly label: string,\n\t\tpublic readonly condition?: string,\n\t) {}\n\n\tpublic evaluateCondition(deviceId?: DeviceID): ConfigOption | undefined {\n\t\tif (!conditionApplies(this, deviceId)) return;\n\n\t\treturn pick(this, [\"value\", \"label\"]);\n\t}\n}\n\nexport interface ConfigOption {\n\tvalue: number;\n\tlabel: string;\n}\n\nexport type ConditionalParamInfoMap = ReadonlyObjectKeyMap<\n\t{ parameter: number; valueBitMask?: number },\n\tConditionalParamInformation[]\n>;\n\nexport type ParamInfoMap = ReadonlyObjectKeyMap<\n\t{ parameter: number; valueBitMask?: number },\n\tParamInformation\n>;\n\nexport function parseConditionalParamInformationMap(\n\tdefinition: JSONObject,\n\tparent: ConditionalDeviceConfig,\n\terrorPrefix: string = \"\",\n): ConditionalParamInfoMap {\n\tconst paramInformation = new ObjectKeyMap<\n\t\t{ parameter: number; valueBitMask?: number },\n\t\tConditionalParamInformation[]\n\t>();\n\n\tconst filename = parent.filename;\n\n\tif (isArray(definition.paramInformation)) {\n\t\t// Check that every param has a param number\n\t\tif (!definition.paramInformation.every((entry: any) => \"#\" in entry)) {\n\t\t\tthrowInvalidConfig(\n\t\t\t\t`device`,\n\t\t\t\t`packages/config/config/devices/${filename}: \n${errorPrefix}required property \"#\" missing in at least one entry of paramInformation`,\n\t\t\t);\n\t\t}\n\n\t\t// And a valid $if condition\n\t\tfor (const entry of definition.paramInformation) {\n\t\t\tvalidateCondition(\n\t\t\t\tfilename,\n\t\t\t\tentry,\n\t\t\t\t`${errorPrefix}At least one entry of paramInformation contains an`,\n\t\t\t);\n\t\t}\n\n\t\tfor (const paramDefinition of definition.paramInformation) {\n\t\t\tconst { [\"#\"]: paramNo, ...defn } = paramDefinition;\n\t\t\tconst key = tryParseParamNumber(paramNo);\n\t\t\tif (!key) {\n\t\t\t\tthrowInvalidConfig(\n\t\t\t\t\t`device`,\n\t\t\t\t\t`packages/config/config/devices/${filename}: \n${errorPrefix}found invalid param number \"${paramNo}\" in paramInformation`,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (!paramInformation.has(key)) paramInformation.set(key, []);\n\t\t\tparamInformation\n\t\t\t\t.get(key)!\n\t\t\t\t.push(\n\t\t\t\t\tnew ConditionalParamInformation(\n\t\t\t\t\t\tparent,\n\t\t\t\t\t\tkey.parameter,\n\t\t\t\t\t\tkey.valueBitMask,\n\t\t\t\t\t\tdefn,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t}\n\t} else if (isObject(definition.paramInformation)) {\n\t\t// Silently ignore this old format\n\t} else {\n\t\tthrowInvalidConfig(\n\t\t\t`device`,\n\t\t\t`packages/config/config/devices/${filename}:\n${errorPrefix}paramInformation must be an array!`,\n\t\t);\n\t}\n\n\treturn paramInformation;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAAA,kBAAoC;AACpC,oBAKO;AACP,wBAAkC;AAClC,wBAAmC;AACnC,6BAKO;AAID,MAAO,4BAA2B;EAlBxC,OAkBwC;;;EAGvC,YACC,QACA,iBACA,cACA,YAAsB;AAEtB,SAAK,SAAS;AACd,SAAK,kBAAkB;AACvB,SAAK,eAAe;AAEpB,SAAK,YAAY,WAAW;AAE5B,QAAI,OAAO,WAAW,UAAU,UAAU;AACzC,gDACC,WACA,kCAAkC,OAAO,QAAQ;aACxC,eAAe,yBAAyB;IAEnD;AACA,SAAK,QAAQ,WAAW;AAExB,QACC,WAAW,eAAe,UACvB,OAAO,WAAW,gBAAgB,UACpC;AACD,gDACC,WACA,kCAAkC,OAAO,QAAQ;aACxC,eAAe,+BAA+B;IAEzD;AACA,SAAK,cAAc,WAAW;AAE9B,QACC,OAAO,WAAW,cAAc,YAC7B,WAAW,aAAa,GAC1B;AACD,gDACC,WACA,kCAAkC,OAAO,QAAQ;aACxC,eAAe,4BAA4B;IAEtD;AACA,SAAK,YAAY,WAAW;AAE5B,QACC,WAAW,YAAY,UACpB,OAAO,WAAW,aAAa,UACjC;AACD,gDACC,WACA,kCAAkC,OAAO,QAAQ;aACxC,eAAe,sCAAsC;IAEhE;AACA,SAAK,WAAW,WAAW;AAE3B,QACC,WAAW,YAAY,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,UAAmB;AAC3C,QAAI,KAAC,yCAAiB,MAAM,QAAQ;AAAG;AAEvC,eAAO,oBAAK,MAAM,CAAC,SAAS,OAAO,CAAC;EACrC;;AAkBK,SAAU,oCACf,YACA,QACA,cAAsB,IAAE;AAExB,QAAM,mBAAmB,IAAI,2BAAY;AAKzC,QAAM,WAAW,OAAO;AAExB,UAAI,2BAAQ,WAAW,gBAAgB,GAAG;AAEzC,QAAI,CAAC,WAAW,iBAAiB,MAAM,CAAC,UAAe,OAAO,KAAK,GAAG;AACrE,gDACC,UACA,kCAAkC,QAAQ;EAC5C,WAAW,yEAAyE;IAEpF;AAGA,eAAW,SAAS,WAAW,kBAAkB;AAChD,oDACC,UACA,OACA,GAAG,WAAW,oDAAoD;IAEpE;AAEA,eAAW,mBAAmB,WAAW,kBAAkB;AAC1D,YAAM,EAAE,CAAC,GAAG,GAAG,SAAS,GAAG,KAAI,IAAK;AACpC,YAAM,UAAM,iCAAoB,OAAO;AACvC,UAAI,CAAC,KAAK;AACT,kDACC,UACA,kCAAkC,QAAQ;EAC7C,WAAW,+BAA+B,OAAO,uBAAuB;MAEvE;AAEA,UAAI,CAAC,iBAAiB,IAAI,GAAG;AAAG,yBAAiB,IAAI,KAAK,CAAA,CAAE;AAC5D,uBACE,IAAI,GAAG,EACP,KACA,IAAI,4BACH,QACA,IAAI,WACJ,IAAI,cACJ,IAAI,CACJ;IAEJ;EACD,eAAW,4BAAS,WAAW,gBAAgB,GAAG;EAElD,OAAO;AACN,8CACC,UACA,kCAAkC,QAAQ;EAC3C,WAAW,oCAAoC;EAEhD;AAEA,SAAO;AACR;AAjEgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/build/cjs/traits.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { DeviceConfig } from "./devices/DeviceConfig.js";
|
|
2
2
|
/** Allows querying device configuration for a node */
|
|
3
3
|
export interface GetDeviceConfig {
|
|
4
4
|
getDeviceConfig(nodeId: number): DeviceConfig | undefined;
|
package/build/cjs/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CopyFile, ManageDirectory, ReadFile, ReadFileSystemInfo, WriteFile } from "@zwave-js/shared/bindings";
|
|
2
2
|
import type { ConfigLogger } from "./Logger.js";
|
|
3
3
|
import type { DeviceConfigIndexEntry } from "./devices/DeviceConfig.js";
|
|
4
4
|
/** The absolute path of the embedded configuration directory */
|
package/build/cjs/utils.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils.ts", "../../../../node_modules/.store/@alcalzone-esm2cjs-npm-1.4.1-18ec443a54/package/shims/import.meta.url/shim.js"],
|
|
4
|
-
"sourcesContent": ["import {\n\tcopyFilesRecursive,\n\tformatId,\n\tgetenv,\n\tpadVersion,\n\treadTextFile,\n\twriteTextFile,\n} from \"@zwave-js/shared\";\nimport {\n\
|
|
4
|
+
"sourcesContent": ["import {\n\tcopyFilesRecursive,\n\tformatId,\n\tgetenv,\n\tpadVersion,\n\treadTextFile,\n\twriteTextFile,\n} from \"@zwave-js/shared\";\nimport type {\n\tCopyFile,\n\tManageDirectory,\n\tReadFile,\n\tReadFileSystemInfo,\n\tWriteFile,\n} from \"@zwave-js/shared/bindings\";\nimport { fileURLToPath } from \"node:url\";\nimport path from \"pathe\";\nimport semverGte from \"semver/functions/gte.js\";\nimport semverInc from \"semver/functions/inc.js\";\nimport semverLte from \"semver/functions/lte.js\";\nimport semverSatisfies from \"semver/functions/satisfies.js\";\nimport semverValid from \"semver/functions/valid.js\";\nimport type { ConfigLogger } from \"./Logger.js\";\nimport { PACKAGE_VERSION } from \"./_version.js\";\nimport type { DeviceConfigIndexEntry } from \"./devices/DeviceConfig.js\";\n\n/** The absolute path of the embedded configuration directory */\nexport const configDir = import.meta.url.startsWith(\"file:\")\n\t? path.join(\n\t\tpath.dirname(fileURLToPath(import.meta.url)),\n\t\timport.meta.url.endsWith(\"src/utils.ts\")\n\t\t\t? \"..\"\n\t\t\t: \"../..\",\n\t\t\"config\",\n\t)\n\t: import.meta.resolve(\"/config\");\n\n/** The (optional) absolute path of an external configuration directory */\nexport function getExternalConfigDirEnvVariable(): string | undefined {\n\treturn getenv(\"ZWAVEJS_EXTERNAL_CONFIG\");\n}\n\nexport function getDeviceEntryPredicate(\n\tmanufacturerId: number,\n\tproductType: number,\n\tproductId: number,\n\tfirmwareVersion?: string,\n): (entry: DeviceConfigIndexEntry) => boolean {\n\treturn (entry) => {\n\t\tif (entry.manufacturerId !== formatId(manufacturerId)) return false;\n\t\tif (entry.productType !== formatId(productType)) return false;\n\t\tif (entry.productId !== formatId(productId)) return false;\n\t\tif (firmwareVersion != undefined) {\n\t\t\t// A firmware version was given, only look at files with a matching firmware version\n\t\t\treturn (\n\t\t\t\tsemverLte(\n\t\t\t\t\tpadVersion(entry.firmwareVersion.min),\n\t\t\t\t\tpadVersion(firmwareVersion),\n\t\t\t\t)\n\t\t\t\t&& semverGte(\n\t\t\t\t\tpadVersion(entry.firmwareVersion.max),\n\t\t\t\t\tpadVersion(firmwareVersion),\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\treturn true;\n\t};\n}\n\nexport type SyncExternalConfigDirResult =\n\t| {\n\t\tsuccess: false;\n\t}\n\t| {\n\t\tsuccess: true;\n\t\tversion: string;\n\t};\n\n/**\n * Synchronizes or updates the external config directory and returns whether the directory is in a state that can be used\n */\nexport async function syncExternalConfigDir(\n\tfs: ManageDirectory & ReadFileSystemInfo & ReadFile & CopyFile & WriteFile,\n\textConfigDir: string,\n\tlogger: ConfigLogger,\n): Promise<SyncExternalConfigDirResult> {\n\tif (!extConfigDir) return { success: false };\n\n\t// Make sure the config dir exists\n\ttry {\n\t\tawait fs.ensureDir(extConfigDir);\n\t} catch {\n\t\tlogger.print(\n\t\t\t`Synchronizing external config dir failed - directory could not be created`,\n\t\t\t\"error\",\n\t\t);\n\t\treturn { success: false };\n\t}\n\n\tconst externalVersionFilename = path.join(extConfigDir, \"version\");\n\tconst currentVersion = PACKAGE_VERSION;\n\tconst supportedRange = `>=${currentVersion} <${\n\t\tsemverInc(\n\t\t\tcurrentVersion,\n\t\t\t\"patch\",\n\t\t)\n\t}`;\n\n\t// We remember the config version that was copied there in a file called \"version\"\n\t// If that either...\n\t// ...isn't there,\n\t// ...can't be read,\n\t// ...doesn't contain a matching version (>= current && nightly)\n\t// wipe the external config dir and recreate it\n\tlet wipe = false;\n\tlet externalVersion: string | undefined;\n\ttry {\n\t\texternalVersion = await readTextFile(\n\t\t\tfs,\n\t\t\texternalVersionFilename,\n\t\t\t\"utf8\",\n\t\t);\n\t\tif (!semverValid(externalVersion)) {\n\t\t\twipe = true;\n\t\t} else if (\n\t\t\t!semverSatisfies(externalVersion, supportedRange, {\n\t\t\t\tincludePrerelease: true,\n\t\t\t})\n\t\t) {\n\t\t\twipe = true;\n\t\t}\n\t} catch {\n\t\twipe = true;\n\t}\n\n\t// Nothing to wipe, the external dir is good to go\n\tif (!wipe) return { success: true, version: externalVersion! };\n\n\t// Wipe and override the external dir\n\ttry {\n\t\tlogger.print(`Synchronizing external config dir ${extConfigDir}...`);\n\t\tawait fs.deleteDir(extConfigDir);\n\t\tawait fs.ensureDir(extConfigDir);\n\t\tawait copyFilesRecursive(\n\t\t\tfs,\n\t\t\tconfigDir,\n\t\t\textConfigDir,\n\t\t\t(src) => src.endsWith(\".json\"),\n\t\t);\n\t\tawait writeTextFile(\n\t\t\tfs,\n\t\t\texternalVersionFilename,\n\t\t\tcurrentVersion,\n\t\t\t\"utf8\",\n\t\t);\n\t\texternalVersion = currentVersion;\n\t} catch {\n\t\t// Something went wrong\n\t\tlogger.print(\n\t\t\t`Synchronizing external config dir failed - using embedded config`,\n\t\t\t\"error\",\n\t\t);\n\t\treturn { success: false };\n\t}\n\n\treturn { success: true, version: externalVersion };\n}\n\nexport function versionInRange(\n\tversion: string,\n\tmin: string,\n\tmax: string,\n): boolean {\n\treturn (\n\t\tsemverGte(padVersion(version), padVersion(min))\n\t\t&& semverLte(padVersion(version), padVersion(max))\n\t);\n}\n", "export const __import_meta_url =\n typeof document === 'undefined' ? new (require('url'.replace('', '')).URL)('file:' + __filename).href :\n (document.currentScript && document.currentScript.src || new URL('main.js', document.baseURI).href)\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;ACAO,IAAM,oBACX,OAAO,aAAa,cAAc,KAAK,QAAQ,MAAM,QAAQ,IAAI,EAAE,CAAC,GAAE,IAAK,UAAU,UAAU,EAAE,OAC9F,SAAS,iBAAiB,SAAS,cAAc,OAAO,IAAI,IAAI,WAAW,SAAS,OAAO,EAAE;ADFlG;AAAA,oBAOO;AAQP,sBAA8B;AAC9B,mBAAiB;AACjB,iBAAsB;AACtB,iBAAsB;AACtB,iBAAsB;AACtB,uBAA4B;AAC5B,mBAAwB;AAExB,qBAAgC;AAIzB,MAAM,YAAY,kBAAgB,WAAW,OAAO,IACxD,aAAAA,QAAK,KACN,aAAAA,QAAK,YAAQ,+BAAc,iBAAe,CAAC,GAC3C,kBAAgB,SAAS,cAAc,IACpC,OACA,SACH,QAAQ,IAEP,YAAY,QAAQ,SAAS;AAG1B,SAAU,kCAA+B;AAC9C,aAAO,sBAAO,yBAAyB;AACxC;AAFgB;AAIV,SAAU,wBACf,gBACA,aACA,WACA,iBAAwB;AAExB,SAAO,CAAC,UAAS;AAChB,QAAI,MAAM,uBAAmB,wBAAS,cAAc;AAAG,aAAO;AAC9D,QAAI,MAAM,oBAAgB,wBAAS,WAAW;AAAG,aAAO;AACxD,QAAI,MAAM,kBAAc,wBAAS,SAAS;AAAG,aAAO;AACpD,QAAI,mBAAmB,QAAW;AAEjC,iBACC,WAAAC,aACC,0BAAW,MAAM,gBAAgB,GAAG,OACpC,0BAAW,eAAe,CAAC,SAEzB,WAAAC,aACF,0BAAW,MAAM,gBAAgB,GAAG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AAG,0BAAW,GAAG,CAAC;AAEnD;AATgB;",
|
|
6
6
|
"names": ["path", "semverLte", "semverGte", "semverInc", "semverValid", "semverSatisfies"]
|
|
7
7
|
}
|
package/build/cjs/utils_safe.js
CHANGED
|
@@ -26,13 +26,13 @@ __export(utils_safe_exports, {
|
|
|
26
26
|
tryParseCCId: () => tryParseCCId
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(utils_safe_exports);
|
|
29
|
-
var
|
|
29
|
+
var import_core = require("@zwave-js/core");
|
|
30
30
|
const hexKeyRegexNDigits = /^0x[a-f0-9]+$/;
|
|
31
31
|
const hexKeyRegex4Digits = /^0x[a-f0-9]{4}$/;
|
|
32
32
|
const hexKeyRegex2Digits = /^0x[a-f0-9]{2}$/;
|
|
33
33
|
function throwInvalidConfig(which, reason) {
|
|
34
|
-
throw new
|
|
35
|
-
${reason}` : ""),
|
|
34
|
+
throw new import_core.ZWaveError(`The ${which ? which + " " : ""}config file is malformed!` + (reason ? `
|
|
35
|
+
${reason}` : ""), import_core.ZWaveErrorCodes.Config_Invalid);
|
|
36
36
|
}
|
|
37
37
|
__name(throwInvalidConfig, "throwInvalidConfig");
|
|
38
38
|
function tryParseCCId(from) {
|
|
@@ -41,10 +41,10 @@ function tryParseCCId(from) {
|
|
|
41
41
|
ccId = parseInt(from, 10);
|
|
42
42
|
} else if (hexKeyRegexNDigits.test(from)) {
|
|
43
43
|
ccId = parseInt(from.slice(2), 16);
|
|
44
|
-
} else if (from in
|
|
45
|
-
return
|
|
44
|
+
} else if (from in import_core.CommandClasses) {
|
|
45
|
+
return import_core.CommandClasses[from];
|
|
46
46
|
}
|
|
47
|
-
if (ccId != void 0 && ccId in
|
|
47
|
+
if (ccId != void 0 && ccId in import_core.CommandClasses) {
|
|
48
48
|
return ccId;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/utils_safe.ts"],
|
|
4
|
-
"sourcesContent": ["import {
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;AAAA,
|
|
4
|
+
"sourcesContent": ["import { CommandClasses, ZWaveError, ZWaveErrorCodes } from \"@zwave-js/core\";\n\nexport const hexKeyRegexNDigits = /^0x[a-f0-9]+$/;\nexport const hexKeyRegex4Digits = /^0x[a-f0-9]{4}$/;\nexport const hexKeyRegex2Digits = /^0x[a-f0-9]{2}$/;\n\nexport function throwInvalidConfig(which: string, reason?: string): never {\n\tthrow new ZWaveError(\n\t\t`The ${which ? which + \" \" : \"\"}config file is malformed!`\n\t\t\t+ (reason ? `\\n${reason}` : \"\"),\n\t\tZWaveErrorCodes.Config_Invalid,\n\t);\n}\n\nexport function tryParseCCId(from: string): CommandClasses | undefined {\n\tlet ccId: number | undefined;\n\tif (/^\\d+$/.test(from)) {\n\t\t// Decimal CC ID\n\t\tccId = parseInt(from, 10);\n\t} else if (hexKeyRegexNDigits.test(from)) {\n\t\t// Hexadecimal CC ID\n\t\tccId = parseInt(from.slice(2), 16);\n\t} else if (from in CommandClasses) {\n\t\t// CC name\n\t\treturn (CommandClasses as any)[from];\n\t}\n\n\tif (ccId != undefined && ccId in CommandClasses) {\n\t\t// This is a valid CC ID\n\t\treturn ccId;\n\t}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;AAAA,kBAA4D;AAErD,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAC3B,MAAM,qBAAqB;AAE5B,SAAU,mBAAmB,OAAe,QAAe;AAChE,QAAM,IAAI,uBACT,OAAO,QAAQ,QAAQ,MAAM,EAAE,+BAC3B,SAAS;EAAK,MAAM,KAAK,KAC7B,4BAAgB,cAAc;AAEhC;AANgB;AAQV,SAAU,aAAa,MAAY;AACxC,MAAI;AACJ,MAAI,QAAQ,KAAK,IAAI,GAAG;AAEvB,WAAO,SAAS,MAAM,EAAE;EACzB,WAAW,mBAAmB,KAAK,IAAI,GAAG;AAEzC,WAAO,SAAS,KAAK,MAAM,CAAC,GAAG,EAAE;EAClC,WAAW,QAAQ,4BAAgB;AAElC,WAAQ,2BAAuB,IAAI;EACpC;AAEA,MAAI,QAAQ,UAAa,QAAQ,4BAAgB;AAEhD,WAAO;EACR;AACD;AAjBgB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type LogContainer } from "@zwave-js/core";
|
|
2
|
-
import {
|
|
2
|
+
import type { FileSystem } from "@zwave-js/shared/bindings";
|
|
3
3
|
import { type ManufacturersMap } from "./Manufacturers.js";
|
|
4
4
|
import { ConditionalDeviceConfig, type DeviceConfig, type DeviceConfigIndex, type FulltextDeviceConfigIndex } from "./devices/DeviceConfig.js";
|
|
5
5
|
export interface ConfigManagerOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../../src/ConfigManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EAIjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../../src/ConfigManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EAIjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAG5D,OAAO,EACN,KAAK,gBAAgB,EAGrB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACN,uBAAuB,EACvB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAK9B,MAAM,2BAA2B,CAAC;AASnC,MAAM,WAAW,oBAAoB;IACpC,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAC;I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C,uBAAuB,GAAG,SAAS,CAAC;IAgE/C;;;;;;;OAOG;IACU,YAAY,CACxB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,eAAe,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,YAAY,GAAG,SAAS,CAAC;CAcpC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { ReadFile, ReadFileSystemInfo } from "@zwave-js/shared/bindings";
|
|
2
2
|
export declare function clearTemplateCache(): void;
|
|
3
3
|
/** Parses a JSON file with $import keys and replaces them with the selected objects */
|
|
4
4
|
export declare function readJsonWithTemplate(fs: ReadFileSystemInfo & ReadFile, filename: string, rootDirs?: string | string[]): Promise<Record<string, unknown>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonTemplate.d.ts","sourceRoot":"","sources":["../../src/JsonTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"JsonTemplate.d.ts","sourceRoot":"","sources":["../../src/JsonTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAe9E,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED,uFAAuF;AACvF,wBAAsB,oBAAoB,CACzC,EAAE,EAAE,kBAAkB,GAAG,QAAQ,EACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAC1B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CA6BlC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { ZWaveError, ZWaveErrorCodes } from "@zwave-js/core
|
|
2
|
-
import { pathExists, readTextFile } from "@zwave-js/shared";
|
|
3
|
-
import { getErrorMessage } from "@zwave-js/shared/safe";
|
|
1
|
+
import { ZWaveError, ZWaveErrorCodes } from "@zwave-js/core";
|
|
2
|
+
import { getErrorMessage, pathExists, readTextFile } from "@zwave-js/shared";
|
|
4
3
|
import { isArray, isObject } from "alcalzone-shared/typeguards";
|
|
5
4
|
import JSON5 from "json5";
|
|
6
5
|
import path from "pathe";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonTemplate.js","sourceRoot":"","sources":["../../src/JsonTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"JsonTemplate.js","sourceRoot":"","sources":["../../src/JsonTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE7E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,OAAO,CAAC;AAEzB,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,oBAAoB,GACzB,uGAAuG,CAAC;AAIzG,+FAA+F;AAC/F,mGAAmG;AACnG,yCAAyC;AACzC,MAAM,aAAa,GAAc,IAAI,GAAG,EAAE,CAAC;AAC3C,MAAM,UAAU,kBAAkB;IACjC,aAAa,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC;AAED,uFAAuF;AACvF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACzC,EAAiC,EACjC,QAAgB,EAChB,QAA4B;IAE5B,IAAI,CAAC,CAAC,MAAM,UAAU,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,UAAU,CACnB,8BAA8B,QAAQ,cAAc,EACpD,eAAe,CAAC,eAAe,CAC/B,CAAC;IACH,CAAC;IAED,IAAI,OAAO,QAA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G,GAAG,CAAC;QACjB,CAAC;IACF,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logger_safe.d.ts","sourceRoot":"","sources":["../../src/Logger_safe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Logger_safe.d.ts","sourceRoot":"","sources":["../../src/Logger_safe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,eAAO,MAAM,YAAY,WAAW,CAAC;AACrC,eAAO,MAAM,eAAe,UAAU,CAAC;AAEvC,MAAM,MAAM,gBAAgB,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Manufacturers.d.ts","sourceRoot":"","sources":["../../src/Manufacturers.ts"],"names":[],"mappings":"AAQA,OAAO,
|
|
1
|
+
{"version":3,"file":"Manufacturers.d.ts","sourceRoot":"","sources":["../../src/Manufacturers.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAGX,SAAS,EACT,MAAM,2BAA2B,CAAC;AAOnC,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAwDnD;;GAEG;AACH,wBAAsB,yBAAyB,CAC9C,EAAE,EAAE,SAAS,EACb,aAAa,EAAE,gBAAgB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAaf"}
|
package/build/esm/_version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "15.1.
|
|
1
|
+
export declare const PACKAGE_VERSION = "15.1.2";
|
|
2
2
|
//# sourceMappingURL=_version.d.ts.map
|
package/build/esm/_version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type JSONObject } from "@zwave-js/shared
|
|
1
|
+
import { type JSONObject } from "@zwave-js/shared";
|
|
2
2
|
import { type ConditionalItem } from "./ConditionalItem.js";
|
|
3
3
|
import type { DeviceID } from "./shared.js";
|
|
4
4
|
export declare class ConditionalAssociationConfig implements ConditionalItem<AssociationConfig> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssociationConfig.d.ts","sourceRoot":"","sources":["../../../src/devices/AssociationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,
|
|
1
|
+
{"version":3,"file":"AssociationConfig.d.ts","sourceRoot":"","sources":["../../../src/devices/AssociationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EACN,KAAK,eAAe,EAGpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,qBAAa,4BACZ,YAAW,eAAe,CAAC,iBAAiB,CAAC;gBAG5C,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,UAAU;IAmEvB,SAAgB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrC,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC;;;OAGG;IACH,SAAgB,UAAU,EAAE,OAAO,CAAC;IACpC;;;;;;OAMG;IACH,SAAgB,YAAY,EAAE,OAAO,GAAG,MAAM,CAAC;IAExC,iBAAiB,CACvB,QAAQ,CAAC,EAAE,QAAQ,GACjB,iBAAiB,GAAG,SAAS;CAYhC;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CACnC,4BAA4B,EAC5B,WAAW,GAAG,mBAAmB,CACjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssociationConfig.js","sourceRoot":"","sources":["../../../src/devices/AssociationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AssociationConfig.js","sourceRoot":"","sources":["../../../src/devices/AssociationConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAEN,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,OAAO,4BAA4B;IAGxC,YACC,QAAgB,EAChB,OAAe,EACf,UAAsB;QAEtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,iBAAiB,CAChB,QAAQ,EACR,UAAU,EACV,eAAe,OAAO,cAAc,CACpC,CAAC;QACF,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG,CAAC;QAEhC,IAAI,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC1C,kBAAkB,CACjB,SAAS,EACT,kCAAkC,QAAQ;cAChC,OAAO,yBAAyB,CAC1C,CAAC;QACH,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;QAE9B,IACC,UAAU,CAAC,WAAW,IAAI,SAAS;eAChC,OAAO,UAAU,CAAC,WAAW,KAAK,QAAQ,EAC5C,CAAC;YACF,kBAAkB,CACjB,SAAS,EACT,kCAAkC,QAAQ;cAChC,OAAO,+BAA+B,CAChD,CAAC;QACH,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QAE1C,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC7C,kBAAkB,CACjB,SAAS,EACT,kCAAkC,QAAQ;2BACnB,OAAO,kBAAkB,CAChD,CAAC;QACH,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC;QAEpC,IACC,UAAU,CAAC,UAAU,IAAI,SAAS;eAC/B,OAAO,UAAU,CAAC,UAAU,KAAK,SAAS,EAC5C,CAAC;YACF,kBAAkB,CACjB,SAAS,EACT,kCAAkC,QAAQ;4BAClB,OAAO,oBAAoB,CACnD,CAAC;QACH,CAAC;QACD,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC;QAE1C,IACC,UAAU,CAAC,YAAY,IAAI,SAAS;eACjC,OAAO,UAAU,CAAC,YAAY,KAAK,SAAS,EAC9C,CAAC;YACF,kBAAkB,CACjB,SAAS,EACT,kCAAkC,QAAQ;8BAChB,OAAO,oBAAoB,CACrD,CAAC;QACH,CAAC;QACD,iCAAiC;QACjC,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,YAAY,IAAI,MAAM,CAAC;IACvD,CAAC;IAEe,SAAS,CAAU;IAEnB,OAAO,CAAS;IAChB,KAAK,CAAS;IACd,WAAW,CAAU;IACrB,QAAQ,CAAS;IACjC;;;OAGG;IACa,UAAU,CAAU;IACpC;;;;;;OAMG;IACa,YAAY,CAAmB;IAExC,iBAAiB,CACvB,QAAmB;QAEnB,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC;YAAE,OAAO;QAE9C,OAAO,IAAI,CAAC,IAAI,EAAE;YACjB,SAAS;YACT,OAAO;YACP,aAAa;YACb,UAAU;YACV,YAAY;YACZ,cAAc;SACd,CAAC,CAAC;IACJ,CAAC;CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type CommandClassInfo, type CommandClasses, type ValueID } from "@zwave-js/core
|
|
2
|
-
import { type JSONObject } from "@zwave-js/shared
|
|
1
|
+
import { type CommandClassInfo, type CommandClasses, type ValueID } from "@zwave-js/core";
|
|
2
|
+
import { type JSONObject } from "@zwave-js/shared";
|
|
3
3
|
import { type ConditionalItem } from "./ConditionalItem.js";
|
|
4
4
|
import type { DeviceID } from "./shared.js";
|
|
5
5
|
export declare class ConditionalCompatConfig implements ConditionalItem<CompatConfig> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompatConfig.d.ts","sourceRoot":"","sources":["../../../src/devices/CompatConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,OAAO,EAGZ,MAAM,
|
|
1
|
+
{"version":3,"file":"CompatConfig.d.ts","sourceRoot":"","sources":["../../../src/devices/CompatConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,OAAO,EAGZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,KAAK,eAAe,EAAoB,MAAM,sBAAsB,CAAC;AAC9E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,qBAAa,uBAAwB,YAAW,eAAe,CAAC,YAAY,CAAC;IAC5E,OAAO,CAAC,YAAY,CAAuB;gBAExB,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;IA+kB3D,SAAgB,YAAY,CAAC,EAAE,SAAS,cAAc,EAAE,CAAC;IACzD,SAAgB,MAAM,CAAC,EAAE,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;IAClE,SAAgB,SAAS,CAAC,EAAE,WAAW,CACtC,cAAc,EACd,GAAG,GAAG,SAAS,MAAM,EAAE,CACvB,CAAC;IACF,SAAgB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7C,SAAgB,uCAAuC,CAAC,EAAE,OAAO,CAAC;IAClE,SAAgB,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAC7D,SAAgB,gCAAgC,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5D,SAAgB,2BAA2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;IAClB,oDAAoD;IACpD,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC;IAClB,6CAA6C;IAC7C,MAAM,EAAE,GAAG,CAAC;IACZ;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACpC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC;AAED,QAAA,MAAM,mBAAmB,2CAIf,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAMpE,QAAA,MAAM,gBAAgB,uDAKZ,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { getCCName, stripUndefined, } from "@zwave-js/core
|
|
2
|
-
import { pick } from "@zwave-js/shared
|
|
1
|
+
import { getCCName, stripUndefined, } from "@zwave-js/core";
|
|
2
|
+
import { pick } from "@zwave-js/shared";
|
|
3
3
|
import { isArray, isObject } from "alcalzone-shared/typeguards";
|
|
4
4
|
import { throwInvalidConfig, tryParseCCId } from "../utils_safe.js";
|
|
5
5
|
import { conditionApplies } from "./ConditionalItem.js";
|