diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 50f1d646e837..96ed037cfd16 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -48,7 +48,7 @@ jobs: - name: Compile TypeScript code run: | - yarn clean $TURBO_FLAGS + # yarn clean $TURBO_FLAGS yarn build $TURBO_FLAGS - name: Save Turbo Cache between jobs diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000000..5f325da0b079 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,8 @@ +#!/bin/sh +. "$(dirname -- "$0")/_/husky.sh" + +# Make sure tsconfig references are up to date +if ! yarn run check-references >/dev/null 2>&1 ; then + echo "TSConfig references are out of date. Execute \033[0;34myarn run sync-references\033[0m to fix and try again" >&2 + exit 1 +fi diff --git a/.yarn/plugins/@yarnpkg/plugin-publishconfig.cjs b/.yarn/plugins/@yarnpkg/plugin-publishconfig.cjs deleted file mode 100644 index 269c422bebba..000000000000 --- a/.yarn/plugins/@yarnpkg/plugin-publishconfig.cjs +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable */ -//prettier-ignore -module.exports = { -name: "@yarnpkg/plugin-publishconfig", -factory: function (require) { -var plugin=(()=>{var l=Object.defineProperty;var s=(p,o)=>{for(var r in o)l(p,r,{get:o[r],enumerable:!0})};var d={};s(d,{beforeWorkspacePacking:()=>a,default:()=>g});function f(p,o,r){o.split&&(o=o.split("."));for(var e=0,t=o.length,i=p,c,n;et.startsWith("$")).map(([t,i])=>[t.replace(/^\$/,""),i]);for(let[t,i]of e)f(o,t,i)}}var u={hooks:{beforeWorkspacePacking:a}},g=u;return d;})(); -return plugin; -} -}; diff --git a/.yarnrc.yml b/.yarnrc.yml index 53f00c83e57a..e161a634f6d6 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -13,8 +13,6 @@ plugins: spec: "https://github.com/Dcard/yarn-plugins/releases/download/v0.7.2/plugin-changed.js" - path: .yarn/plugins/@yarnpkg/plugin-version.cjs spec: "@yarnpkg/plugin-version" - - path: .yarn/plugins/@yarnpkg/plugin-publishconfig.cjs - spec: "https://raw.githubusercontent.com/alizeait/yarn-plugin-publishconfig/v1.0/bundles/@yarnpkg/plugin-publishconfig.js" preferInteractive: true diff --git a/package.json b/package.json index bed63eed839e..fe3caad52578 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "@commitlint/config-conventional": "^17.4.4", "@esm2cjs/p-queue": "^7.3.0", "@microsoft/api-extractor": "^7.33.7", + "@monorepo-utils/workspaces-to-typescript-project-references": "^2.9.0", "@tsconfig/node14": "^1.0.3", "@types/fs-extra": "^9.0.13", "@types/node": "^14.18.36", @@ -129,8 +130,10 @@ "for-changed": "yarn changed foreach --exclude \"@zwave-js/repo\" --git-range=$(git describe --abbrev=0)", "codefind": "yarn ts packages/maintenance/src/codefind.ts", "extract-api": "FORCE_COLOR=1 yarn turbo run extract-api", - "accept-api": "yarn extract-api --force -- --local", - "monopack": "yarn exec monopack" + "accept-api": "yarn extract-api -- --local", + "monopack": "yarn exec monopack", + "check-references": "workspaces-to-typescript-project-references --check && workspaces-to-typescript-project-references --check --tsconfigPath tsconfig.build.json", + "sync-references": "workspaces-to-typescript-project-references && workspaces-to-typescript-project-references --tsconfigPath tsconfig.build.json && prettier -c '{,packages/*/}{tsconfig,tsconfig.*}.json' -w --loglevel silent" }, "readme": "README.md", "config": { diff --git a/packages/cc/api.md b/packages/cc/api.md index ea09dc7dff8a..7f70f3c21fe3 100644 --- a/packages/cc/api.md +++ b/packages/cc/api.md @@ -184,17 +184,6 @@ export const AlarmSensorCCValues: Readonly<{ }; }; duration: ((sensorType: AlarmSensorType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; - readonly endpoint: number; - readonly property: "duration"; - readonly propertyKey: AlarmSensorType; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Alarm Sensor"]; - property: "duration"; - propertyKey: AlarmSensorType; - }; readonly meta: { readonly unit: "s"; readonly label: `${string} duration`; @@ -206,6 +195,17 @@ export const AlarmSensorCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Alarm Sensor"]; + property: "duration"; + propertyKey: AlarmSensorType; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; + readonly endpoint: number; + readonly property: "duration"; + readonly propertyKey: AlarmSensorType; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -218,17 +218,6 @@ export const AlarmSensorCCValues: Readonly<{ }; }; severity: ((sensorType: AlarmSensorType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; - readonly endpoint: number; - readonly property: "severity"; - readonly propertyKey: AlarmSensorType; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Alarm Sensor"]; - property: "severity"; - propertyKey: AlarmSensorType; - }; readonly meta: { readonly min: 1; readonly max: 100; @@ -241,6 +230,17 @@ export const AlarmSensorCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Alarm Sensor"]; + property: "severity"; + propertyKey: AlarmSensorType; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; + readonly endpoint: number; + readonly property: "severity"; + readonly propertyKey: AlarmSensorType; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -253,17 +253,6 @@ export const AlarmSensorCCValues: Readonly<{ }; }; state: ((sensorType: AlarmSensorType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; - readonly endpoint: number; - readonly property: "state"; - readonly propertyKey: AlarmSensorType; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Alarm Sensor"]; - property: "state"; - propertyKey: AlarmSensorType; - }; readonly meta: { readonly label: `${string} state`; readonly description: "Whether the alarm is active"; @@ -274,6 +263,17 @@ export const AlarmSensorCCValues: Readonly<{ readonly type: "boolean"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Alarm Sensor"]; + property: "state"; + propertyKey: AlarmSensorType; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Alarm Sensor"]; + readonly endpoint: number; + readonly property: "state"; + readonly propertyKey: AlarmSensorType; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -470,21 +470,21 @@ export class AssociationCCSupportedGroupingsReport extends AssociationCC { // @public (undocumented) export const AssociationCCValues: Readonly<{ nodeIds: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Association; - readonly endpoint: number; - readonly property: "nodeIds"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Association; property: "nodeIds"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Association; + readonly endpoint: number; + readonly property: "nodeIds"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -498,21 +498,21 @@ export const AssociationCCValues: Readonly<{ }; }; maxNodes: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Association; - readonly endpoint: number; - readonly property: "maxNodes"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Association; property: "maxNodes"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Association; + readonly endpoint: number; + readonly property: "maxNodes"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -726,21 +726,21 @@ export class AssociationGroupInfoCCNameReport extends AssociationGroupInfoCC { // @public (undocumented) export const AssociationGroupInfoCCValues: Readonly<{ commands: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Association Group Information"]; - readonly endpoint: number; - readonly property: "issuedCommands"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Association Group Information"]; property: "issuedCommands"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Association Group Information"]; + readonly endpoint: number; + readonly property: "issuedCommands"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -754,21 +754,21 @@ export const AssociationGroupInfoCCValues: Readonly<{ }; }; groupInfo: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Association Group Information"]; - readonly endpoint: number; - readonly property: "info"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Association Group Information"]; property: "info"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Association Group Information"]; + readonly endpoint: number; + readonly property: "info"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -782,21 +782,21 @@ export const AssociationGroupInfoCCValues: Readonly<{ }; }; groupName: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Association Group Information"]; - readonly endpoint: number; - readonly property: "name"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Association Group Information"]; property: "name"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Association Group Information"]; + readonly endpoint: number; + readonly property: "name"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -1318,17 +1318,6 @@ export class BarrierOperatorCCSignalingCapabilitiesReport extends BarrierOperato // @public (undocumented) export const BarrierOperatorCCValues: Readonly<{ signalingState: ((subsystemType: SubsystemType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Barrier Operator"]; - readonly endpoint: number; - readonly property: "signalingState"; - readonly propertyKey: SubsystemType; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Barrier Operator"]; - property: "signalingState"; - propertyKey: SubsystemType; - }; readonly meta: { readonly label: `Signaling State (${string})`; readonly states: { @@ -1340,6 +1329,17 @@ export const BarrierOperatorCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Barrier Operator"]; + property: "signalingState"; + propertyKey: SubsystemType; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Barrier Operator"]; + readonly endpoint: number; + readonly property: "signalingState"; + readonly propertyKey: SubsystemType; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -1583,8 +1583,8 @@ export const BasicCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly stateful: false; @@ -1812,9 +1812,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 3; @@ -1838,9 +1838,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -1869,9 +1869,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -1895,9 +1895,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -1921,9 +1921,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -1947,9 +1947,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -1973,9 +1973,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -2004,9 +2004,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -2032,9 +2032,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -2061,9 +2061,9 @@ export const BatteryCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -2229,15 +2229,6 @@ export class BinarySensorCCSupportedReport extends BinarySensorCC { // @public (undocumented) export const BinarySensorCCValues: Readonly<{ state: ((sensorType: BinarySensorType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Binary Sensor"]; - readonly endpoint: number; - readonly property: string; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Binary Sensor"]; - property: string; - }; readonly meta: { readonly label: `Sensor state (${string})`; readonly ccSpecific: { @@ -2247,6 +2238,15 @@ export const BinarySensorCCValues: Readonly<{ readonly type: "boolean"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Binary Sensor"]; + property: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Binary Sensor"]; + readonly endpoint: number; + readonly property: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -2418,9 +2418,9 @@ export const BinarySwitchCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -2973,17 +2973,6 @@ export class CentralSceneCCSupportedReport extends CentralSceneCC { // @public (undocumented) export const CentralSceneCCValues: Readonly<{ scene: ((sceneNumber: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Central Scene"]; - readonly endpoint: number; - readonly property: "scene"; - readonly propertyKey: string; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Central Scene"]; - property: "scene"; - propertyKey: string; - }; readonly meta: { readonly label: `Scene ${string}`; readonly writeable: false; @@ -2992,6 +2981,17 @@ export const CentralSceneCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Central Scene"]; + property: "scene"; + propertyKey: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Central Scene"]; + readonly endpoint: number; + readonly property: "scene"; + readonly propertyKey: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -3253,26 +3253,26 @@ export class ClimateControlScheduleCCSet extends ClimateControlScheduleCC { // @public (undocumented) export const ClimateControlScheduleCCValues: Readonly<{ schedule: ((weekday: Weekday) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"]; - readonly endpoint: number; - readonly property: "schedule"; - readonly propertyKey: Weekday; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Climate Control Schedule"]; - property: "schedule"; - propertyKey: Weekday; - }; readonly meta: { readonly label: `Schedule (${string})`; readonly type: "any"; readonly readable: true; readonly writeable: true; }; - }) & { - is: (valueId: ValueID_2) => boolean; - readonly options: { + readonly id: { + commandClass: (typeof CommandClasses)["Climate Control Schedule"]; + property: "schedule"; + propertyKey: Weekday; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Climate Control Schedule"]; + readonly endpoint: number; + readonly property: "schedule"; + readonly propertyKey: Weekday; + }; + }) & { + is: (valueId: ValueID_2) => boolean; + readonly options: { readonly internal: false; readonly minVersion: 1; readonly secret: false; @@ -3590,17 +3590,6 @@ export class ColorSwitchCCSupportedReport extends ColorSwitchCC { // @public (undocumented) export const ColorSwitchCCValues: Readonly<{ targetColorChannel: ((component: ColorComponent) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Color Switch"]; - readonly endpoint: number; - readonly property: "targetColor"; - readonly propertyKey: ColorComponent; - }; - readonly id: { - commandClass: (typeof CommandClasses_2)["Color Switch"]; - property: "targetColor"; - propertyKey: ColorComponent; - }; readonly meta: { readonly label: `Target value (${string})`; readonly description: `The target value of the ${string} channel.`; @@ -3611,6 +3600,17 @@ export const ColorSwitchCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses_2)["Color Switch"]; + property: "targetColor"; + propertyKey: ColorComponent; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Color Switch"]; + readonly endpoint: number; + readonly property: "targetColor"; + readonly propertyKey: ColorComponent; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -3623,17 +3623,6 @@ export const ColorSwitchCCValues: Readonly<{ }; }; currentColorChannel: ((component: ColorComponent) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Color Switch"]; - readonly endpoint: number; - readonly property: "currentColor"; - readonly propertyKey: ColorComponent; - }; - readonly id: { - commandClass: (typeof CommandClasses_2)["Color Switch"]; - property: "currentColor"; - propertyKey: ColorComponent; - }; readonly meta: { readonly label: `Current value (${string})`; readonly description: `The current value of the ${string} channel.`; @@ -3643,6 +3632,17 @@ export const ColorSwitchCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses_2)["Color Switch"]; + property: "currentColor"; + propertyKey: ColorComponent; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Color Switch"]; + readonly endpoint: number; + readonly property: "currentColor"; + readonly propertyKey: ColorComponent; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -4242,28 +4242,28 @@ export class ConfigurationCCSet extends ConfigurationCC { // @public (undocumented) export const ConfigurationCCValues: Readonly<{ paramInformation: ((parameter: number, bitMask?: number | undefined) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Configuration; - readonly endpoint: number; - readonly property: number; - readonly propertyKey: number | undefined; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Configuration; property: number; propertyKey: number | undefined; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Configuration; + readonly endpoint: number; + readonly property: number; + readonly propertyKey: number | undefined; }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -4607,9 +4607,9 @@ export const DoorLockCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: (applHost: ZWaveApplicationHost_2, endpoint: IZWaveEndpoint_2) => boolean; @@ -4658,9 +4658,9 @@ export const DoorLockCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: (applHost: ZWaveApplicationHost_2, endpoint: IZWaveEndpoint_2) => boolean; @@ -4709,9 +4709,9 @@ export const DoorLockCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: (applHost: ZWaveApplicationHost_2, endpoint: IZWaveEndpoint_2) => boolean; @@ -4760,9 +4760,9 @@ export const DoorLockCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 4; @@ -4811,9 +4811,9 @@ export const DoorLockCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 4; @@ -4864,9 +4864,9 @@ export const DoorLockCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 4; @@ -4917,9 +4917,9 @@ export const DoorLockCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 4; @@ -5209,9 +5209,9 @@ export const DoorLockCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 3; @@ -5626,22 +5626,22 @@ export class EnergyProductionCCReport extends EnergyProductionCC { // @public (undocumented) export const EnergyProductionCCValues: Readonly<{ value: ((parameter: EnergyProductionParameter) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Energy Production"]; - readonly endpoint: number; - readonly property: "value"; - readonly propertyKey: EnergyProductionParameter; + readonly meta: { + readonly label: string; + readonly writeable: false; + readonly type: "number"; + readonly readable: true; }; readonly id: { commandClass: (typeof CommandClasses_2)["Energy Production"]; property: "value"; propertyKey: EnergyProductionParameter; }; - readonly meta: { - readonly label: string; - readonly writeable: false; - readonly type: "number"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Energy Production"]; + readonly endpoint: number; + readonly property: "value"; + readonly propertyKey: EnergyProductionParameter; }; }) & { is: (valueId: ValueID) => boolean; @@ -7227,17 +7227,6 @@ export class HumidityControlSetpointCCSupportedReport extends HumidityControlSet // @public (undocumented) export const HumidityControlSetpointCCValues: Readonly<{ setpointScale: ((setpointType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; - readonly endpoint: number; - readonly property: "setpointScale"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; - property: "setpointScale"; - propertyKey: number; - }; readonly meta: { readonly label: `Setpoint scale (${string})`; readonly writeable: false; @@ -7246,6 +7235,17 @@ export const HumidityControlSetpointCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; + property: "setpointScale"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; + readonly endpoint: number; + readonly property: "setpointScale"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -7258,17 +7258,6 @@ export const HumidityControlSetpointCCValues: Readonly<{ }; }; setpoint: ((setpointType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; - readonly endpoint: number; - readonly property: "setpoint"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; - property: "setpoint"; - propertyKey: number; - }; readonly meta: { readonly label: `Setpoint (${string})`; readonly ccSpecific: { @@ -7278,6 +7267,17 @@ export const HumidityControlSetpointCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; + property: "setpoint"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Humidity Control Setpoint"]; + readonly endpoint: number; + readonly property: "setpoint"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -7607,19 +7607,19 @@ export class IndicatorCCSupportedReport extends IndicatorCC { // @public (undocumented) export const IndicatorCCValues: Readonly<{ indicatorDescription: ((indicatorId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Indicator; - readonly endpoint: number; - readonly property: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Indicator; property: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Indicator; + readonly endpoint: number; + readonly property: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -7633,17 +7633,6 @@ export const IndicatorCCValues: Readonly<{ }; }; valueV2: ((indicatorId: number, propertyId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Indicator; - readonly endpoint: number; - readonly property: number; - readonly propertyKey: number; - }; - readonly id: { - commandClass: CommandClasses.Indicator; - property: number; - propertyKey: number; - }; readonly meta: { readonly ccSpecific: { indicatorId: number; @@ -7653,33 +7642,44 @@ export const IndicatorCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Indicator; + property: number; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Indicator; + readonly endpoint: number; + readonly property: number; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; }; }; supportedPropertyIDs: ((indicatorId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Indicator; - readonly endpoint: number; - readonly property: "supportedPropertyIDs"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Indicator; property: "supportedPropertyIDs"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Indicator; + readonly endpoint: number; + readonly property: "supportedPropertyIDs"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -7710,9 +7710,9 @@ export const IndicatorCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 3; @@ -7990,22 +7990,22 @@ export class IrrigationCCSystemStatusReport extends IrrigationCC { // @public (undocumented) export const IrrigationCCValues: Readonly<{ valveRunStartStop: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "startStop"; + readonly meta: { + readonly label: `${string}: Start/Stop`; + readonly type: "boolean"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "startStop"; }; - readonly meta: { - readonly label: `${string}: Start/Stop`; - readonly type: "boolean"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "startStop"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8019,17 +8019,6 @@ export const IrrigationCCValues: Readonly<{ }; }; valveRunDuration: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "duration"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "duration"; - }; readonly meta: { readonly label: `${string}: Run duration`; readonly min: 1; @@ -8039,35 +8028,46 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; - }) & { - is: (valueId: ValueID_2) => boolean; - readonly options: { - readonly internal: false; - readonly minVersion: 1; - readonly secret: false; - readonly stateful: true; - readonly supportsEndpoints: true; - readonly autoCreate: true; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "duration"; }; - }; - useMoistureSensor: ((valveId: ValveId) => { readonly endpoint: (endpoint?: number | undefined) => { readonly commandClass: CommandClasses.Irrigation; readonly endpoint: number; readonly property: ValveId; - readonly propertyKey: "useMoistureSensor"; + readonly propertyKey: "duration"; }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "useMoistureSensor"; + }) & { + is: (valueId: ValueID_2) => boolean; + readonly options: { + readonly internal: false; + readonly minVersion: 1; + readonly secret: false; + readonly stateful: true; + readonly supportsEndpoints: true; + readonly autoCreate: true; }; + }; + useMoistureSensor: ((valveId: ValveId) => { readonly meta: { readonly label: `${string}: Use moisture sensor`; readonly type: "boolean"; readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "useMoistureSensor"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "useMoistureSensor"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8080,22 +8080,22 @@ export const IrrigationCCValues: Readonly<{ }; }; useRainSensor: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "useRainSensor"; + readonly meta: { + readonly label: `${string}: Use rain sensor`; + readonly type: "boolean"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "useRainSensor"; }; - readonly meta: { - readonly label: `${string}: Use rain sensor`; - readonly type: "boolean"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "useRainSensor"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8109,22 +8109,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorLowFlow: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorLowFlow"; + readonly meta: { + readonly label: `${string}: Error - Flow below high threshold`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorLowFlow"; }; - readonly meta: { - readonly label: `${string}: Error - Flow below high threshold`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorLowFlow"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8138,17 +8138,6 @@ export const IrrigationCCValues: Readonly<{ }; }; lowFlowThreshold: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "lowFlowThreshold"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "lowFlowThreshold"; - }; readonly meta: { readonly label: `${string}: Low flow threshold`; readonly min: 0; @@ -8157,6 +8146,17 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "lowFlowThreshold"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "lowFlowThreshold"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8169,22 +8169,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorHighFlow: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorHighFlow"; + readonly meta: { + readonly label: `${string}: Error - Flow above high threshold`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorHighFlow"; }; - readonly meta: { - readonly label: `${string}: Error - Flow above high threshold`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorHighFlow"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8198,17 +8198,6 @@ export const IrrigationCCValues: Readonly<{ }; }; highFlowThreshold: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "highFlowThreshold"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "highFlowThreshold"; - }; readonly meta: { readonly label: `${string}: High flow threshold`; readonly min: 0; @@ -8217,6 +8206,17 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "highFlowThreshold"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "highFlowThreshold"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8229,22 +8229,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorMaximumFlow: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorMaximumFlow"; + readonly meta: { + readonly label: `${string}: Error - Maximum flow detected`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorMaximumFlow"; }; - readonly meta: { - readonly label: `${string}: Error - Maximum flow detected`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorMaximumFlow"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8258,17 +8258,6 @@ export const IrrigationCCValues: Readonly<{ }; }; maximumFlow: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "maximumFlow"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "maximumFlow"; - }; readonly meta: { readonly label: `${string}: Maximum flow`; readonly min: 0; @@ -8277,6 +8266,17 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "maximumFlow"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "maximumFlow"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8289,22 +8289,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorLowCurrent: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorLowCurrent"; + readonly meta: { + readonly label: `${string}: Error - Current below low threshold`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorLowCurrent"; }; - readonly meta: { - readonly label: `${string}: Error - Current below low threshold`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorLowCurrent"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8318,22 +8318,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorHighCurrent: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorHighCurrent"; + readonly meta: { + readonly label: `${string}: Error - Current above high threshold`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorHighCurrent"; }; - readonly meta: { - readonly label: `${string}: Error - Current above high threshold`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorHighCurrent"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8347,22 +8347,22 @@ export const IrrigationCCValues: Readonly<{ }; }; errorShortCircuit: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "errorShortCircuit"; + readonly meta: { + readonly label: `${string}: Error - Short circuit detected`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "errorShortCircuit"; }; - readonly meta: { - readonly label: `${string}: Error - Short circuit detected`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "errorShortCircuit"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -8376,17 +8376,6 @@ export const IrrigationCCValues: Readonly<{ }; }; nominalCurrentLowThreshold: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "nominalCurrentLowThreshold"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "nominalCurrentLowThreshold"; - }; readonly meta: { readonly label: `${string}: Nominal current - low threshold`; readonly min: 0; @@ -8396,6 +8385,17 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "nominalCurrentLowThreshold"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "nominalCurrentLowThreshold"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8408,17 +8408,6 @@ export const IrrigationCCValues: Readonly<{ }; }; nominalCurrentHighThreshold: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "nominalCurrentHighThreshold"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "nominalCurrentHighThreshold"; - }; readonly meta: { readonly label: `${string}: Nominal current - high threshold`; readonly min: 0; @@ -8428,6 +8417,17 @@ export const IrrigationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "nominalCurrentHighThreshold"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "nominalCurrentHighThreshold"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8440,17 +8440,6 @@ export const IrrigationCCValues: Readonly<{ }; }; nominalCurrent: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "nominalCurrent"; - }; - readonly id: { - commandClass: CommandClasses.Irrigation; - property: ValveId; - propertyKey: "nominalCurrent"; - }; readonly meta: { readonly label: `${string}: Nominal current`; readonly unit: "mA"; @@ -8458,6 +8447,17 @@ export const IrrigationCCValues: Readonly<{ readonly type: "boolean"; readonly readable: true; }; + readonly id: { + commandClass: CommandClasses.Irrigation; + property: ValveId; + propertyKey: "nominalCurrent"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "nominalCurrent"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -8470,22 +8470,22 @@ export const IrrigationCCValues: Readonly<{ }; }; valveConnected: ((valveId: ValveId) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Irrigation; - readonly endpoint: number; - readonly property: ValveId; - readonly propertyKey: "valveConnected"; + readonly meta: { + readonly label: `${string}: Connected`; + readonly writeable: false; + readonly type: "boolean"; + readonly readable: true; }; readonly id: { commandClass: CommandClasses.Irrigation; property: ValveId; propertyKey: "valveConnected"; }; - readonly meta: { - readonly label: `${string}: Connected`; - readonly writeable: false; - readonly type: "boolean"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Irrigation; + readonly endpoint: number; + readonly property: ValveId; + readonly propertyKey: "valveConnected"; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -9822,29 +9822,29 @@ export class ManufacturerSpecificCCReport extends ManufacturerSpecificCC { // @public (undocumented) export const ManufacturerSpecificCCValues: Readonly<{ deviceId: ((type: DeviceIdType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Manufacturer Specific"]; - readonly endpoint: number; - readonly property: "deviceId"; - readonly propertyKey: string; + readonly meta: { + readonly label: string; + readonly writeable: false; + readonly type: "string"; + readonly readable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Manufacturer Specific"]; property: "deviceId"; propertyKey: string; }; - readonly meta: { - readonly label: string; - readonly writeable: false; - readonly type: "string"; - readonly readable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Manufacturer Specific"]; + readonly endpoint: number; + readonly property: "deviceId"; + readonly propertyKey: string; }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -9870,9 +9870,9 @@ export const ManufacturerSpecificCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -9898,9 +9898,9 @@ export const ManufacturerSpecificCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -9926,9 +9926,9 @@ export const ManufacturerSpecificCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -10059,17 +10059,6 @@ export class MeterCCSupportedReport extends MeterCC { // @public (undocumented) export const MeterCCValues: Readonly<{ value: ((meterType: number, rateType: RateType, scale: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Meter; - readonly endpoint: number; - readonly property: "value"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: CommandClasses.Meter; - property: "value"; - propertyKey: number; - }; readonly meta: { readonly ccSpecific: { readonly meterType: number; @@ -10080,6 +10069,17 @@ export const MeterCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: CommandClasses.Meter; + property: "value"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Meter; + readonly endpoint: number; + readonly property: "value"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -10092,17 +10092,6 @@ export const MeterCCValues: Readonly<{ }; }; resetSingle: ((meterType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Meter; - readonly endpoint: number; - readonly property: "reset"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: CommandClasses.Meter; - property: "reset"; - propertyKey: number; - }; readonly meta: { readonly label: `Reset (${string})`; readonly ccSpecific: { @@ -10112,6 +10101,17 @@ export const MeterCCValues: Readonly<{ readonly type: "boolean"; readonly writeable: true; }; + readonly id: { + commandClass: CommandClasses.Meter; + property: "reset"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Meter; + readonly endpoint: number; + readonly property: "reset"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -10432,21 +10432,21 @@ export class MultiChannelAssociationCCSupportedGroupingsReport extends MultiChan // @public (undocumented) export const MultiChannelAssociationCCValues: Readonly<{ endpoints: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; - readonly endpoint: number; - readonly property: "endpoints"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Multi Channel Association"]; property: "endpoints"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; + readonly endpoint: number; + readonly property: "endpoints"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -10460,21 +10460,21 @@ export const MultiChannelAssociationCCValues: Readonly<{ }; }; nodeIds: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; - readonly endpoint: number; - readonly property: "nodeIds"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Multi Channel Association"]; property: "nodeIds"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; + readonly endpoint: number; + readonly property: "nodeIds"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -10488,21 +10488,21 @@ export const MultiChannelAssociationCCValues: Readonly<{ }; }; maxNodes: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; - readonly endpoint: number; - readonly property: "maxNodes"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Multi Channel Association"]; property: "maxNodes"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multi Channel Association"]; + readonly endpoint: number; + readonly property: "maxNodes"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -10775,21 +10775,21 @@ export class MultiChannelCCV1Report extends MultiChannelCC { // @public (undocumented) export const MultiChannelCCValues: Readonly<{ aggregatedEndpointMembers: ((endpointIndex: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multi Channel"]; - readonly endpoint: number; - readonly property: "members"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Multi Channel"]; property: "members"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multi Channel"]; + readonly endpoint: number; + readonly property: "members"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -11176,21 +11176,21 @@ export class MultilevelSensorCCSupportedSensorReport extends MultilevelSensorCC // @public (undocumented) export const MultilevelSensorCCValues: Readonly<{ value: ((sensorTypeName: string) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"]; - readonly endpoint: number; - readonly property: string; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Multilevel Sensor"]; - property: string; - }; readonly meta: { readonly label: string; readonly writeable: false; readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Multilevel Sensor"]; + property: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"]; + readonly endpoint: number; + readonly property: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -11203,21 +11203,21 @@ export const MultilevelSensorCCValues: Readonly<{ }; }; supportedScales: ((sensorType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"]; - readonly endpoint: number; - readonly property: "supportedScales"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Multilevel Sensor"]; property: "supportedScales"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multilevel Sensor"]; + readonly endpoint: number; + readonly property: "supportedScales"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -11400,15 +11400,6 @@ export class MultilevelSwitchCCSupportedReport extends MultilevelSwitchCC { // @public (undocumented) export const MultilevelSwitchCCValues: Readonly<{ levelChangeDown: ((switchType: SwitchType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multilevel Switch"]; - readonly endpoint: number; - readonly property: string; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Multilevel Switch"]; - property: string; - }; readonly meta: { readonly label: `Perform a level change (${string})`; readonly valueChangeOptions: readonly ["transitionDuration"]; @@ -11419,6 +11410,15 @@ export const MultilevelSwitchCCValues: Readonly<{ readonly type: "boolean"; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Multilevel Switch"]; + property: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multilevel Switch"]; + readonly endpoint: number; + readonly property: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -11431,15 +11431,6 @@ export const MultilevelSwitchCCValues: Readonly<{ }; }; levelChangeUp: ((switchType: SwitchType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Multilevel Switch"]; - readonly endpoint: number; - readonly property: string; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Multilevel Switch"]; - property: string; - }; readonly meta: { readonly label: `Perform a level change (${string})`; readonly valueChangeOptions: readonly ["transitionDuration"]; @@ -11450,6 +11441,15 @@ export const MultilevelSwitchCCValues: Readonly<{ readonly type: "boolean"; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Multilevel Switch"]; + property: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Multilevel Switch"]; + readonly endpoint: number; + readonly property: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -11531,8 +11531,8 @@ export const MultilevelSwitchCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly stateful: false; @@ -11797,9 +11797,9 @@ export const NodeNamingAndLocationCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -11823,9 +11823,9 @@ export const NodeNamingAndLocationCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -12002,21 +12002,21 @@ export class NotificationCCSupportedReport extends NotificationCC { // @public (undocumented) export const NotificationCCValues: Readonly<{ notificationVariable: ((notificationName: string, variableName: string) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Notification; - readonly endpoint: number; - readonly property: string; - readonly propertyKey: string; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Notification; property: string; propertyKey: string; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Notification; + readonly endpoint: number; + readonly property: string; + readonly propertyKey: string; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -12030,17 +12030,6 @@ export const NotificationCCValues: Readonly<{ }; }; unknownNotificationVariable: ((notificationType: number, notificationName: string) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Notification; - readonly endpoint: number; - readonly property: string; - readonly propertyKey: "unknown"; - }; - readonly id: { - commandClass: CommandClasses.Notification; - property: string; - propertyKey: "unknown"; - }; readonly meta: { readonly label: `${string}: Unknown value`; readonly ccSpecific: { @@ -12052,6 +12041,17 @@ export const NotificationCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: CommandClasses.Notification; + property: string; + propertyKey: "unknown"; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Notification; + readonly endpoint: number; + readonly property: string; + readonly propertyKey: "unknown"; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -12064,15 +12064,6 @@ export const NotificationCCValues: Readonly<{ }; }; unknownNotificationType: ((notificationType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Notification; - readonly endpoint: number; - readonly property: string; - }; - readonly id: { - commandClass: CommandClasses.Notification; - property: string; - }; readonly meta: { readonly label: `Unknown notification (${string})`; readonly ccSpecific: { @@ -12084,6 +12075,15 @@ export const NotificationCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: CommandClasses.Notification; + property: string; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Notification; + readonly endpoint: number; + readonly property: string; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -12096,21 +12096,21 @@ export const NotificationCCValues: Readonly<{ }; }; supportedNotificationEvents: ((notificationType: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Notification; - readonly endpoint: number; - readonly property: "supportedNotificationEvents"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Notification; property: "supportedNotificationEvents"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Notification; + readonly endpoint: number; + readonly property: "supportedNotificationEvents"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -12152,9 +12152,9 @@ export const NotificationCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: (applHost: ZWaveApplicationHost_2, endpoint: IZWaveEndpoint_2) => boolean; @@ -12772,9 +12772,9 @@ export const ProtectionCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -12801,9 +12801,9 @@ export const ProtectionCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -12858,9 +12858,9 @@ export const ProtectionCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -13000,8 +13000,8 @@ export const SceneActivationCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: true; @@ -13082,22 +13082,22 @@ export class SceneActuatorConfigurationCCSet extends SceneActuatorConfigurationC // @public (undocumented) export const SceneActuatorConfigurationCCValues: Readonly<{ dimmingDuration: ((sceneId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; - readonly endpoint: number; - readonly property: "dimmingDuration"; - readonly propertyKey: number; + readonly meta: { + readonly label: `Dimming duration (${number})`; + readonly type: "duration"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; property: "dimmingDuration"; propertyKey: number; }; - readonly meta: { - readonly label: `Dimming duration (${number})`; - readonly type: "duration"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; + readonly endpoint: number; + readonly property: "dimmingDuration"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -13107,21 +13107,10 @@ export const SceneActuatorConfigurationCCValues: Readonly<{ readonly secret: false; readonly stateful: true; readonly supportsEndpoints: true; - readonly autoCreate: true; - }; - }; - level: ((sceneId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; - readonly endpoint: number; - readonly property: "level"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; - property: "level"; - propertyKey: number; + readonly autoCreate: true; }; + }; + level: ((sceneId: number) => { readonly meta: { readonly label: `Level (${number})`; readonly valueChangeOptions: readonly ["transitionDuration"]; @@ -13131,6 +13120,17 @@ export const SceneActuatorConfigurationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; + property: "level"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Scene Actuator Configuration"]; + readonly endpoint: number; + readonly property: "level"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -13225,22 +13225,22 @@ export class SceneControllerConfigurationCCSet extends SceneControllerConfigurat // @public (undocumented) export const SceneControllerConfigurationCCValues: Readonly<{ dimmingDuration: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; - readonly endpoint: number; - readonly property: "dimmingDuration"; - readonly propertyKey: number; + readonly meta: { + readonly label: `Dimming duration (${number})`; + readonly type: "duration"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; property: "dimmingDuration"; propertyKey: number; }; - readonly meta: { - readonly label: `Dimming duration (${number})`; - readonly type: "duration"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; + readonly endpoint: number; + readonly property: "dimmingDuration"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -13254,17 +13254,6 @@ export const SceneControllerConfigurationCCValues: Readonly<{ }; }; sceneId: ((groupId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; - readonly endpoint: number; - readonly property: "sceneId"; - readonly propertyKey: number; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; - property: "sceneId"; - propertyKey: number; - }; readonly meta: { readonly label: `Associated Scene ID (${number})`; readonly valueChangeOptions: readonly ["transitionDuration"]; @@ -13274,6 +13263,17 @@ export const SceneControllerConfigurationCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; + property: "sceneId"; + propertyKey: number; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Scene Controller Configuration"]; + readonly endpoint: number; + readonly property: "sceneId"; + readonly propertyKey: number; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -14799,21 +14799,21 @@ export class SupervisionCCReport extends SupervisionCC { // @public (undocumented) export const SupervisionCCValues: Readonly<{ ccSupported: ((ccId: CommandClasses) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: CommandClasses.Supervision; - readonly endpoint: number; - readonly property: "ccSupported"; - readonly propertyKey: CommandClasses; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: CommandClasses.Supervision; property: "ccSupported"; propertyKey: CommandClasses; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: CommandClasses.Supervision; + readonly endpoint: number; + readonly property: "ccSupported"; + readonly propertyKey: CommandClasses; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -15046,9 +15046,9 @@ export const ThermostatFanModeCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 3; @@ -15740,21 +15740,21 @@ export class ThermostatSetpointCCSupportedReport extends ThermostatSetpointCC { // @public (undocumented) export const ThermostatSetpointCCValues: Readonly<{ setpointScale: ((setpointType: ThermostatSetpointType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; - readonly endpoint: number; - readonly property: "setpointScale"; - readonly propertyKey: ThermostatSetpointType; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; property: "setpointScale"; propertyKey: ThermostatSetpointType; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; + readonly endpoint: number; + readonly property: "setpointScale"; + readonly propertyKey: ThermostatSetpointType; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -15768,17 +15768,6 @@ export const ThermostatSetpointCCValues: Readonly<{ }; }; setpoint: ((setpointType: ThermostatSetpointType) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; - readonly endpoint: number; - readonly property: "setpoint"; - readonly propertyKey: ThermostatSetpointType; - }; - readonly id: { - commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; - property: "setpoint"; - propertyKey: ThermostatSetpointType; - }; readonly meta: { readonly label: `Setpoint (${string})`; readonly ccSpecific: { @@ -15788,6 +15777,17 @@ export const ThermostatSetpointCCValues: Readonly<{ readonly readable: true; readonly writeable: true; }; + readonly id: { + commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; + property: "setpoint"; + propertyKey: ThermostatSetpointType; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["Thermostat Setpoint"]; + readonly endpoint: number; + readonly property: "setpoint"; + readonly propertyKey: ThermostatSetpointType; + }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { @@ -16585,27 +16585,27 @@ export class UserCodeCCUsersNumberReport extends UserCodeCC { // @public (undocumented) export const UserCodeCCValues: Readonly<{ userCode: ((userId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["User Code"]; - readonly endpoint: number; - readonly property: "userCode"; - readonly propertyKey: number; + readonly meta: { + readonly type: "any"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["User Code"]; property: "userCode"; propertyKey: number; }; - readonly meta: { - readonly type: "any"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["User Code"]; + readonly endpoint: number; + readonly property: "userCode"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; readonly options: { - readonly internal: false; readonly stateful: true; + readonly internal: false; readonly minVersion: 1; readonly supportsEndpoints: true; readonly autoCreate: true; @@ -16613,22 +16613,22 @@ export const UserCodeCCValues: Readonly<{ }; }; userIdStatus: ((userId: number) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses)["User Code"]; - readonly endpoint: number; - readonly property: "userIdStatus"; - readonly propertyKey: number; + readonly meta: { + readonly label: `User ID status (${number})`; + readonly type: "number"; + readonly readable: true; + readonly writeable: true; }; readonly id: { commandClass: (typeof CommandClasses)["User Code"]; property: "userIdStatus"; propertyKey: number; }; - readonly meta: { - readonly label: `User ID status (${number})`; - readonly type: "number"; - readonly readable: true; - readonly writeable: true; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses)["User Code"]; + readonly endpoint: number; + readonly property: "userIdStatus"; + readonly propertyKey: number; }; }) & { is: (valueId: ValueID_2) => boolean; @@ -16661,8 +16661,8 @@ export const UserCodeCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -16687,9 +16687,9 @@ export const UserCodeCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly supportsEndpoints: true; readonly autoCreate: true; readonly minVersion: 2; @@ -17161,9 +17161,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17187,9 +17187,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17213,9 +17213,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17239,9 +17239,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17265,9 +17265,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17291,9 +17291,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17317,9 +17317,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17343,9 +17343,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17369,9 +17369,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 3; readonly supportsEndpoints: false; @@ -17420,9 +17420,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly autoCreate: true; readonly minVersion: 2; readonly supportsEndpoints: false; @@ -17446,9 +17446,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -17475,9 +17475,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -17501,9 +17501,9 @@ export const VersionCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -17693,9 +17693,9 @@ export const WakeUpCCValues: Readonly<{ readonly writeable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -17719,9 +17719,9 @@ export const WakeUpCCValues: Readonly<{ readonly readable: true; }; readonly options: { - readonly internal: false; readonly stateful: true; readonly secret: false; + readonly internal: false; readonly minVersion: 1; readonly autoCreate: true; readonly supportsEndpoints: false; @@ -17896,17 +17896,6 @@ export class WindowCoveringCCSupportedReport extends WindowCoveringCC { // @public (undocumented) export const WindowCoveringCCValues: Readonly<{ duration: ((parameter: WindowCoveringParameter) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; - readonly endpoint: number; - readonly property: "duration"; - readonly propertyKey: WindowCoveringParameter; - }; - readonly id: { - commandClass: (typeof CommandClasses_2)["Window Covering"]; - property: "duration"; - propertyKey: WindowCoveringParameter; - }; readonly meta: { readonly label: `Remaining duration - ${string}`; readonly ccSpecific: { @@ -17916,6 +17905,17 @@ export const WindowCoveringCCValues: Readonly<{ readonly type: "duration"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses_2)["Window Covering"]; + property: "duration"; + propertyKey: WindowCoveringParameter; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; + readonly endpoint: number; + readonly property: "duration"; + readonly propertyKey: WindowCoveringParameter; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -17928,17 +17928,6 @@ export const WindowCoveringCCValues: Readonly<{ }; }; targetValue: ((parameter: WindowCoveringParameter) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; - readonly endpoint: number; - readonly property: "targetValue"; - readonly propertyKey: WindowCoveringParameter; - }; - readonly id: { - commandClass: (typeof CommandClasses_2)["Window Covering"]; - property: "targetValue"; - propertyKey: WindowCoveringParameter; - }; readonly meta: { readonly label: `Target value - ${string}`; readonly writeable: boolean; @@ -17951,6 +17940,17 @@ export const WindowCoveringCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses_2)["Window Covering"]; + property: "targetValue"; + propertyKey: WindowCoveringParameter; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; + readonly endpoint: number; + readonly property: "targetValue"; + readonly propertyKey: WindowCoveringParameter; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { @@ -17963,17 +17963,6 @@ export const WindowCoveringCCValues: Readonly<{ }; }; currentValue: ((parameter: WindowCoveringParameter) => { - readonly endpoint: (endpoint?: number | undefined) => { - readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; - readonly endpoint: number; - readonly property: "currentValue"; - readonly propertyKey: WindowCoveringParameter; - }; - readonly id: { - commandClass: (typeof CommandClasses_2)["Window Covering"]; - property: "currentValue"; - propertyKey: WindowCoveringParameter; - }; readonly meta: { readonly label: string; readonly ccSpecific: { @@ -17985,6 +17974,17 @@ export const WindowCoveringCCValues: Readonly<{ readonly type: "number"; readonly readable: true; }; + readonly id: { + commandClass: (typeof CommandClasses_2)["Window Covering"]; + property: "currentValue"; + propertyKey: WindowCoveringParameter; + }; + readonly endpoint: (endpoint?: number | undefined) => { + readonly commandClass: (typeof CommandClasses_2)["Window Covering"]; + readonly endpoint: number; + readonly property: "currentValue"; + readonly propertyKey: WindowCoveringParameter; + }; }) & { is: (valueId: ValueID) => boolean; readonly options: { diff --git a/packages/cc/package.json b/packages/cc/package.json index d17a07e4a51e..98cf460e0462 100644 --- a/packages/cc/package.json +++ b/packages/cc/package.json @@ -4,19 +4,7 @@ "description": "zwave-js: Command Classes", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ], - "*": [ - "build/cc/*.d.ts", - "build/index.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -25,15 +13,15 @@ "./safe": "./build/index_safe.js", "./*": "./build/cc/*.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ], "*": [ - "src/cc/*.ts", - "src/index.ts" + "build/cc/*.d.ts", + "build/index.d.ts" ] } }, @@ -62,7 +50,7 @@ "scripts": { "task": "yarn ts maintenance/_tasks.ts", "codegen": "yarn task codegen", - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:zwave": "yarn task lint", diff --git a/packages/cc/tsconfig.build.json b/packages/cc/tsconfig.build.json index 9e091026d8ef..4d698f2f82c8 100644 --- a/packages/cc/tsconfig.build.json +++ b/packages/cc/tsconfig.build.json @@ -5,6 +5,29 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../host/tsconfig.build.json" + }, + { + "path": "../serial/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + }, + { + "path": "../maintenance/tsconfig.build.json" + }, + { + "path": "../testing/tsconfig.build.json" + }, + { + "path": "../transformers/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/cc/tsconfig.json b/packages/cc/tsconfig.json index 4a0886aa69be..030dc152105c 100644 --- a/packages/cc/tsconfig.json +++ b/packages/cc/tsconfig.json @@ -3,10 +3,38 @@ "extends": "../../tsconfig.json", "compilerOptions": { "plugins": [ - { "transform": "@zwave-js/transformers" }, - { "transform": "ts-nameof", "type": "raw" } + { + "transform": "@zwave-js/transformers" + }, + { + "transform": "ts-nameof", + "type": "raw" + } ] }, + "references": [ + { + "path": "../core" + }, + { + "path": "../host" + }, + { + "path": "../serial" + }, + { + "path": "../shared" + }, + { + "path": "../maintenance" + }, + { + "path": "../testing" + }, + { + "path": "../transformers" + } + ], "include": ["maintenance/**/*.ts", "src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/config/package.json b/packages/config/package.json index e510edfb97b6..6bbf6d87459c 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -3,15 +3,7 @@ "version": "10.15.0", "description": "zwave-js: configuration files", "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -19,11 +11,11 @@ "./package.json": "./package.json", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ] } }, @@ -53,7 +45,7 @@ }, "scripts": { "codegen": "yarn ts maintenance/codegen.ts", - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:zwave": "yarn ts maintenance/lintConfigFiles.ts", diff --git a/packages/config/tsconfig.build.json b/packages/config/tsconfig.build.json index 9e091026d8ef..90eff4956d8e 100644 --- a/packages/config/tsconfig.build.json +++ b/packages/config/tsconfig.build.json @@ -5,6 +5,17 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + }, + { + "path": "../maintenance/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/config/tsconfig.json b/packages/config/tsconfig.json index c4ffc58a685a..8ae8d366ce1b 100644 --- a/packages/config/tsconfig.json +++ b/packages/config/tsconfig.json @@ -2,6 +2,17 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../core" + }, + { + "path": "../shared" + }, + { + "path": "../maintenance" + } + ], "include": ["maintenance/**/*.ts", "src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/core/package.json b/packages/core/package.json index b7f1c948e292..76e876335c22 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -4,41 +4,23 @@ "description": "zwave-js: core components", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ], - "test": [ - "build/index_test.d.ts" - ], - "ava": [ - "build/index_ava.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { ".": "./build/index.js", "./package.json": "./package.json", "./safe": "./build/index_safe.js", - "./test": "./build/index_test.js", - "./ava": "./build/index_ava.js" + "./test": "./build/index_test.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ], "test": [ - "src/index_test.ts" - ], - "ava": [ - "src/index_ava.ts" + "build/index_test.d.ts" ] } }, @@ -65,7 +47,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/core/src/index_ava.ts b/packages/core/src/index_ava.ts deleted file mode 100644 index d0fac8d6c564..000000000000 --- a/packages/core/src/index_ava.ts +++ /dev/null @@ -1 +0,0 @@ -export * from "./test/SpyTransportAva"; diff --git a/packages/core/src/log/Controller.test.ts b/packages/core/src/log/Controller.test.ts index 922c89398724..043047d7ce5a 100644 --- a/packages/core/src/log/Controller.test.ts +++ b/packages/core/src/log/Controller.test.ts @@ -5,7 +5,7 @@ import { assertLogInfo, assertMessage, SpyTransport, -} from "../test/SpyTransportAva"; +} from "../test/SpyTransport"; import { ControllerLogger } from "./Controller"; import { createDefaultTransportFormat, ZWaveLogContainer } from "./shared"; diff --git a/packages/core/src/test/SpyTransport.ts b/packages/core/src/test/SpyTransport.ts index 5a20891c1366..0ffedcf4e900 100644 --- a/packages/core/src/test/SpyTransport.ts +++ b/packages/core/src/test/SpyTransport.ts @@ -1,9 +1,9 @@ -import type { ZWaveLogInfo } from "@zwave-js/core"; import { ansiRegex, stripColor } from "ansi-colors"; -import type { ExecutionContext } from "ava"; +import type { Assertions } from "ava"; import sinon from "sinon"; import { MESSAGE } from "triple-beam"; import Transport from "winston-transport"; +import type { ZWaveLogInfo } from "../log/shared_safe"; const timestampRegex = /\d{2}\:\d{2}\:\d{2}\.\d{3}/g; const timestampPrefixRegex = new RegExp( @@ -16,7 +16,7 @@ const channelPrefixRegex = new RegExp( "gm", ); -/** Log to a Sinon spy in order to perform assertions during unit tests */ +/** Log to a sinon.spy() in order to perform assertions during unit tests */ export class SpyTransport extends Transport { public constructor() { super({ @@ -36,7 +36,7 @@ export class SpyTransport extends Transport { /** Tests a printed log message */ export function assertMessage( - t: ExecutionContext, + t: Assertions, transport: SpyTransport, options: Partial<{ message: string; @@ -83,7 +83,7 @@ export function assertMessage( } export function assertLogInfo( - t: ExecutionContext, + t: Assertions, transport: SpyTransport, options: Partial<{ level: string; diff --git a/packages/core/src/test/SpyTransportAva.ts b/packages/core/src/test/SpyTransportAva.ts deleted file mode 100644 index 4cad48e1bedc..000000000000 --- a/packages/core/src/test/SpyTransportAva.ts +++ /dev/null @@ -1,104 +0,0 @@ -import type { ZWaveLogInfo } from "@zwave-js/core"; -import { ansiRegex, stripColor } from "ansi-colors"; -import type { Assertions } from "ava"; -import sinon from "sinon"; -import { MESSAGE } from "triple-beam"; -import Transport from "winston-transport"; - -const timestampRegex = /\d{2}\:\d{2}\:\d{2}\.\d{3}/g; -const timestampPrefixRegex = new RegExp( - `^(${ansiRegex.source})?${timestampRegex.source}(${ansiRegex.source})? `, - "gm", -); -const channelRegex = /(SERIAL|CNTRLR|DRIVER|RFLCTN)/g; -const channelPrefixRegex = new RegExp( - `(${ansiRegex.source})?${channelRegex.source}(${ansiRegex.source})? `, - "gm", -); - -/** Log to a sinon.spy() in order to perform assertions during unit tests */ -export class SpyTransport extends Transport { - public constructor() { - super({ - level: "silly", - }); - this._spy = sinon.spy(); - } - private _spy: sinon.SinonSpy; - public get spy(): sinon.SinonSpy { - return this._spy; - } - public log(info: any, next: () => void): any { - this._spy(info); - next(); - } -} - -/** Tests a printed log message */ -export function assertMessage( - t: Assertions, - transport: SpyTransport, - options: Partial<{ - message: string; - predicate: (msg: string) => boolean; - /** Default: true */ - ignoreColor: boolean; - /** Default: true */ - ignoreTimestamp: boolean; - /** Default: true */ - ignoreChannel: boolean; - callNumber: number; - }>, -): void { - const callNumber = options.callNumber || 0; - t.true(transport.spy.callCount > callNumber); - const callArg = transport.spy.getCall(callNumber).args[0]; - let actualMessage: string = callArg[MESSAGE]; - // By default ignore the color codes - const ignoreColor = options.ignoreColor !== false; - if (ignoreColor) { - actualMessage = stripColor(actualMessage); - } - // By default, strip away the timestamp and placeholder - if (options.ignoreTimestamp !== false) { - actualMessage = actualMessage - .replace(timestampPrefixRegex, "") - .replace(/^ {13}/gm, ""); - } - // by default, strip away the channel label and placeholder - if (options.ignoreChannel !== false) { - actualMessage = actualMessage - .replace(channelPrefixRegex, "") - .replace(/^ {7}/gm, ""); - } - if (typeof options.message === "string") { - if (ignoreColor) { - options.message = stripColor(options.message); - } - t.is(actualMessage, options.message); - } - if (typeof options.predicate === "function") { - t.true(options.predicate(actualMessage)); - } -} - -export function assertLogInfo( - t: Assertions, - transport: SpyTransport, - options: Partial<{ - level: string; - predicate: (info: ZWaveLogInfo) => boolean; - callNumber: number; - }>, -): void { - const callNumber = options.callNumber || 0; - t.true(transport.spy.callCount > callNumber); - const callArg = transport.spy.getCall(callNumber).args[0]; - - if (typeof options.level === "string") { - t.is(callArg.level, options.level); - } - if (typeof options.predicate === "function") { - t.true(options.predicate(callArg)); - } -} diff --git a/packages/core/tsconfig.build.json b/packages/core/tsconfig.build.json index a8c88735b4e3..a5b5b690ddee 100644 --- a/packages/core/tsconfig.build.json +++ b/packages/core/tsconfig.build.json @@ -7,6 +7,11 @@ // Some @internal members need to be accessed from other modules in this monorepo "stripInternal": false }, + "references": [ + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index afb910bfc4ba..87a067b0d8fd 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -2,6 +2,11 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../shared" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/flash/package.json b/packages/flash/package.json index 93aa3fe1a136..d62fbb9f7976 100644 --- a/packages/flash/package.json +++ b/packages/flash/package.json @@ -38,7 +38,7 @@ "zwave-js": "workspace:*" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", "lint:ts:fix": "yarn run lint:ts --fix", diff --git a/packages/flash/tsconfig.build.json b/packages/flash/tsconfig.build.json index 9e091026d8ef..488e4f43b9db 100644 --- a/packages/flash/tsconfig.build.json +++ b/packages/flash/tsconfig.build.json @@ -5,6 +5,14 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../zwave-js/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/flash/tsconfig.json b/packages/flash/tsconfig.json index afb910bfc4ba..faa154a196e1 100644 --- a/packages/flash/tsconfig.json +++ b/packages/flash/tsconfig.json @@ -2,6 +2,14 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../core" + }, + { + "path": "../zwave-js" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/host/package.json b/packages/host/package.json index c04a3f4d514e..fb3981e2ccdc 100644 --- a/packages/host/package.json +++ b/packages/host/package.json @@ -4,15 +4,7 @@ "description": "zwave-js: Host abstractions", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -20,11 +12,11 @@ "./package.json": "./package.json", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ] } }, @@ -51,7 +43,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/host/tsconfig.build.json b/packages/host/tsconfig.build.json index 9e091026d8ef..df946e2f694e 100644 --- a/packages/host/tsconfig.build.json +++ b/packages/host/tsconfig.build.json @@ -5,6 +5,17 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../config/tsconfig.build.json" + }, + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/host/tsconfig.json b/packages/host/tsconfig.json index afb910bfc4ba..cac086a9dfce 100644 --- a/packages/host/tsconfig.json +++ b/packages/host/tsconfig.json @@ -2,6 +2,17 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../config" + }, + { + "path": "../core" + }, + { + "path": "../shared" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/maintenance/package.json b/packages/maintenance/package.json index 5e0f58a24fdd..6861065be457 100644 --- a/packages/maintenance/package.json +++ b/packages/maintenance/package.json @@ -31,7 +31,7 @@ "scripts": { "ts": "node -r esbuild-register", "prebuild": "yarn ts src/lintForbiddenImports.ts", - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", "lint:ts:fix": "yarn run lint:ts --fix", diff --git a/packages/maintenance/tsconfig.build.json b/packages/maintenance/tsconfig.build.json index 9e091026d8ef..a909f28631df 100644 --- a/packages/maintenance/tsconfig.build.json +++ b/packages/maintenance/tsconfig.build.json @@ -5,6 +5,14 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/maintenance/tsconfig.json b/packages/maintenance/tsconfig.json index 0c808125c3c8..ebaa73ce596a 100644 --- a/packages/maintenance/tsconfig.json +++ b/packages/maintenance/tsconfig.json @@ -6,6 +6,14 @@ "newLine": "lf", "resolveJsonModule": true }, + "references": [ + { + "path": "../core" + }, + { + "path": "../shared" + } + ], "include": ["src/**/*.ts", "src/**/*.json"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/nvmedit/package.json b/packages/nvmedit/package.json index 1863e0c4f148..3a7dc42bcf46 100644 --- a/packages/nvmedit/package.json +++ b/packages/nvmedit/package.json @@ -4,15 +4,7 @@ "description": "zwave-js: library to edit NVM backups", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -20,11 +12,11 @@ "./package.json": "./package.json", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ] } }, @@ -62,7 +54,7 @@ "yargs": "^17.5.1" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/nvmedit/tsconfig.build.json b/packages/nvmedit/tsconfig.build.json index 9e091026d8ef..a909f28631df 100644 --- a/packages/nvmedit/tsconfig.build.json +++ b/packages/nvmedit/tsconfig.build.json @@ -5,6 +5,14 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/nvmedit/tsconfig.json b/packages/nvmedit/tsconfig.json index afb910bfc4ba..0dedb919abdb 100644 --- a/packages/nvmedit/tsconfig.json +++ b/packages/nvmedit/tsconfig.json @@ -2,6 +2,14 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../core" + }, + { + "path": "../shared" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/serial/package.json b/packages/serial/package.json index 7752fdd23b9c..b38db4fe9d48 100644 --- a/packages/serial/package.json +++ b/packages/serial/package.json @@ -3,18 +3,7 @@ "version": "10.15.0", "description": "zwave-js: Serialport driver", "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "mock": [ - "build/index_mock.d.ts" - ], - "safe": [ - "build/index_safe.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -23,14 +12,14 @@ "./mock": "./build/index_mock.js", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "mock": [ - "src/index_mock.ts" + "build/index_mock.d.ts" ], "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ] } }, @@ -58,7 +47,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/serial/tsconfig.build.json b/packages/serial/tsconfig.build.json index 9e091026d8ef..c4884656c2c8 100644 --- a/packages/serial/tsconfig.build.json +++ b/packages/serial/tsconfig.build.json @@ -5,6 +5,17 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../host/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/serial/tsconfig.json b/packages/serial/tsconfig.json index afb910bfc4ba..8eea8d2f0953 100644 --- a/packages/serial/tsconfig.json +++ b/packages/serial/tsconfig.json @@ -2,6 +2,17 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../core" + }, + { + "path": "../host" + }, + { + "path": "../shared" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/shared/package.json b/packages/shared/package.json index 584f47db1ed6..2e2b23b8f400 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -4,15 +4,7 @@ "description": "zwave-js: shared utilities", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "safe": [ - "build/index_safe.d.ts" - ] - } - } + "access": "public" }, "main": "build/index.js", "exports": { @@ -20,11 +12,11 @@ "./package.json": "./package.json", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "safe": [ - "src/index_safe.ts" + "build/index_safe.d.ts" ] } }, @@ -55,7 +47,7 @@ "fs-extra": "^10.1.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/shared/tsconfig.build.json b/packages/shared/tsconfig.build.json index 9e091026d8ef..8549f5112315 100644 --- a/packages/shared/tsconfig.build.json +++ b/packages/shared/tsconfig.build.json @@ -5,6 +5,7 @@ "rootDir": "src", "outDir": "build" }, + "references": [], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/shared/tsconfig.json b/packages/shared/tsconfig.json index 76757227cf49..e769ef20ecc0 100644 --- a/packages/shared/tsconfig.json +++ b/packages/shared/tsconfig.json @@ -2,11 +2,7 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "build/**", - "node_modules/**" - ] + "references": [], + "include": ["src/**/*.ts"], + "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/testing/package.json b/packages/testing/package.json index a554df7d02fb..2b42672903da 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -4,11 +4,10 @@ "description": "zwave-js: testing utilities", "keywords": [], "publishConfig": { - "access": "public", - "$types": "build/index.d.ts" + "access": "public" }, "main": "build/index.js", - "types": "src/index.ts", + "types": "build/index.d.ts", "files": [ "build/**/*.{js,d.ts,map}" ], @@ -32,7 +31,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/testing/tsconfig.build.json b/packages/testing/tsconfig.build.json index 9e091026d8ef..41713a5fcc14 100644 --- a/packages/testing/tsconfig.build.json +++ b/packages/testing/tsconfig.build.json @@ -5,6 +5,20 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../host/tsconfig.build.json" + }, + { + "path": "../serial/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/testing/tsconfig.json b/packages/testing/tsconfig.json index afb910bfc4ba..85436b49c432 100644 --- a/packages/testing/tsconfig.json +++ b/packages/testing/tsconfig.json @@ -2,6 +2,20 @@ { "extends": "../../tsconfig.json", "compilerOptions": {}, + "references": [ + { + "path": "../core" + }, + { + "path": "../host" + }, + { + "path": "../serial" + }, + { + "path": "../shared" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/transformers/package.json b/packages/transformers/package.json index a8fc0c33c815..3d48d78fccc2 100644 --- a/packages/transformers/package.json +++ b/packages/transformers/package.json @@ -29,7 +29,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "pretest": "del-cli \"test/fixtures/*.js\" && tsc -p tsconfig.test.json && cpy \"test/build/test/fixtures/*.js\" test/fixtures && del-cli test/build", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/transformers/tsconfig.build.json b/packages/transformers/tsconfig.build.json index 9e091026d8ef..8549f5112315 100644 --- a/packages/transformers/tsconfig.build.json +++ b/packages/transformers/tsconfig.build.json @@ -5,6 +5,7 @@ "rootDir": "src", "outDir": "build" }, + "references": [], "include": ["src/**/*.ts"], "exclude": ["src/**/*.test.ts"] } diff --git a/packages/transformers/tsconfig.json b/packages/transformers/tsconfig.json index 3c3543e18048..dc6695f1c319 100644 --- a/packages/transformers/tsconfig.json +++ b/packages/transformers/tsconfig.json @@ -9,6 +9,7 @@ "@zwave-js/transformers": ["./src"] } }, + "references": [], "include": ["src/**/*.ts", "test/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packages/zwave-js/api.md b/packages/zwave-js/api.md index 95f04c188cc4..766ddaf7e1aa 100644 --- a/packages/zwave-js/api.md +++ b/packages/zwave-js/api.md @@ -119,6 +119,7 @@ import { SendCommandOptions } from '@zwave-js/core'; import { SendCommandReturnType } from '@zwave-js/core'; import { SendMessageOptions } from '@zwave-js/core'; import { SensorType } from '@zwave-js/config'; +import type { SerialPort } from 'serialport'; import { SetbackState } from '@zwave-js/cc'; import { SetValueAPIOptions } from '@zwave-js/cc'; import { SinglecastCC } from '@zwave-js/core'; @@ -154,6 +155,7 @@ import type { ZWaveHostOptions } from '@zwave-js/host'; import { ZWaveLibraryTypes } from '@zwave-js/core/safe'; import { ZWavePlusNodeType } from '@zwave-js/cc'; import { ZWavePlusRoleType } from '@zwave-js/cc'; +import type { ZWaveSerialPortBase } from '@zwave-js/serial'; import { ZWaveSerialPortImplementation } from '@zwave-js/serial'; export { buffer2hex } @@ -1589,6 +1591,14 @@ export interface ZWaveOptions extends ZWaveHostOptions { deviceConfigPriorityDir?: string; throttle: "fast" | "normal" | "slow"; }; + testingHooks?: { + serialPortBinding?: typeof SerialPort; + onSerialPortOpen?: (port: ZWaveSerialPortBase) => Promise; + skipControllerIdentification?: boolean; + skipNodeInterview?: boolean; + skipBootloaderCheck?: boolean; + loadConfiguration?: boolean; + }; timeouts: { ack: number; byte: number; diff --git a/packages/zwave-js/package.json b/packages/zwave-js/package.json index fa2e77c15c59..68b754c0d32b 100644 --- a/packages/zwave-js/package.json +++ b/packages/zwave-js/package.json @@ -3,37 +3,6 @@ "version": "10.15.0", "description": "Z-Wave driver written entirely in JavaScript/TypeScript", "keywords": [], - "publishConfig": { - "$types": "build/index.d.ts", - "$typesVersions": { - "*": { - "Controller": [ - "./build/Controller.d.ts" - ], - "Driver": [ - "./build/Driver.d.ts" - ], - "Error": [ - "./build/Error.d.ts" - ], - "Node": [ - "./build/Node.d.ts" - ], - "Testing": [ - "./build/Testing.d.ts" - ], - "Utils": [ - "./build/Utils.d.ts" - ], - "Values": [ - "./build/Values.d.ts" - ], - "safe": [ - "./build/index_safe.d.ts" - ] - } - } - }, "main": "build/index.js", "exports": { ".": "./build/index.js", @@ -47,32 +16,32 @@ "./Values": "./build/Values.js", "./safe": "./build/index_safe.js" }, - "types": "src/index.ts", + "types": "build/index.d.ts", "typesVersions": { "*": { "Controller": [ - "./src/Controller.ts" + "./build/Controller.d.ts" ], "Driver": [ - "./src/Driver.ts" + "./build/Driver.d.ts" ], "Error": [ - "./src/Error.ts" + "./build/Error.d.ts" ], "Node": [ - "./src/Node.ts" + "./build/Node.d.ts" ], "Testing": [ - "./src/Testing.ts" + "./build/Testing.d.ts" ], "Utils": [ - "./src/Utils.ts" + "./build/Utils.d.ts" ], "Values": [ - "./src/Values.ts" + "./build/Values.d.ts" ], "safe": [ - "./src/index_safe.ts" + "./build/index_safe.d.ts" ] } }, @@ -99,7 +68,7 @@ "node": ">=14.13.0 <15 || >= 16 <16.9.0 || >16.9.0" }, "scripts": { - "build": "tsc -b tsconfig.build.json", + "build": "tsc -b tsconfig.build.json --pretty", "clean": "del-cli build/ \"*.tsbuildinfo\"", "extract-api": "yarn api-extractor run", "lint:ts": "eslint --ext .ts --rule \"prettier/prettier: off\" \"src/**/*.ts\"", diff --git a/packages/zwave-js/src/lib/driver/ZWaveOptions.ts b/packages/zwave-js/src/lib/driver/ZWaveOptions.ts index f3523eed4330..f1a5f95098bf 100644 --- a/packages/zwave-js/src/lib/driver/ZWaveOptions.ts +++ b/packages/zwave-js/src/lib/driver/ZWaveOptions.ts @@ -224,7 +224,7 @@ export interface ZWaveOptions extends ZWaveHostOptions { */ userAgent?: Record; - /** @internal Used for testing internally */ + /** DO NOT USE! Used for testing internally */ testingHooks?: { serialPortBinding?: typeof SerialPort; /** diff --git a/packages/zwave-js/tsconfig.build.json b/packages/zwave-js/tsconfig.build.json index 804f68daacd9..1fc423d13ef0 100644 --- a/packages/zwave-js/tsconfig.build.json +++ b/packages/zwave-js/tsconfig.build.json @@ -5,6 +5,38 @@ "rootDir": "src", "outDir": "build" }, + "references": [ + { + "path": "../cc/tsconfig.build.json" + }, + { + "path": "../config/tsconfig.build.json" + }, + { + "path": "../core/tsconfig.build.json" + }, + { + "path": "../host/tsconfig.build.json" + }, + { + "path": "../nvmedit/tsconfig.build.json" + }, + { + "path": "../serial/tsconfig.build.json" + }, + { + "path": "../shared/tsconfig.build.json" + }, + { + "path": "../testing/tsconfig.build.json" + }, + { + "path": "../maintenance/tsconfig.build.json" + }, + { + "path": "../transformers/tsconfig.build.json" + } + ], "include": ["src/**/*.ts"], "exclude": ["src/lib/test", "src/**/*.test.ts", "src/**/*.test.ava.ts"] } diff --git a/packages/zwave-js/tsconfig.json b/packages/zwave-js/tsconfig.json index 01e3a8cbe133..143698368dad 100644 --- a/packages/zwave-js/tsconfig.json +++ b/packages/zwave-js/tsconfig.json @@ -3,10 +3,47 @@ "extends": "../../tsconfig.json", "compilerOptions": { "plugins": [ - { "transform": "@zwave-js/transformers" }, - { "transform": "ts-nameof", "type": "raw" } + { + "transform": "@zwave-js/transformers" + }, + { + "transform": "ts-nameof", + "type": "raw" + } ] }, + "references": [ + { + "path": "../cc" + }, + { + "path": "../config" + }, + { + "path": "../core" + }, + { + "path": "../host" + }, + { + "path": "../nvmedit" + }, + { + "path": "../serial" + }, + { + "path": "../shared" + }, + { + "path": "../testing" + }, + { + "path": "../maintenance" + }, + { + "path": "../transformers" + } + ], "include": ["src/**/*.ts"], "exclude": ["build/**", "node_modules/**"] } diff --git a/packmod.sh b/packmod.sh index 3262554299c1..98f60470fa98 100755 --- a/packmod.sh +++ b/packmod.sh @@ -1,10 +1,10 @@ for file in packages/*/package.json ; do jq ' - if (.publishConfig.types != null) then ( - .publishConfig["$types"] = .publishConfig.types | del(.publishConfig.types) + if (.publishConfig["$types"] != null) then ( + .types = .publishConfig["$types"] | del(.publishConfig["$types"]) ) else . end - | if (.publishConfig.typesVersions != null) then ( - .publishConfig["$typesVersions"] = .publishConfig.typesVersions | del(.publishConfig.typesVersions) + | if (.publishConfig["$typesVersions"] != null) then ( + .typesVersions = .publishConfig["$typesVersions"] | del(.publishConfig["$typesVersions"]) ) else . end ' $file | sponge $file done diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index ea12a2ed854b..343ab38b178b 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -1,10 +1,5 @@ { "extends": "./tsconfig.json", - "include": [ - "**/*.ts" - ], - "exclude": [ - "**/build/**", - "**/node_modules/**" - ] + "include": ["**/*.ts"], + "exclude": ["**/build/**", "**/node_modules/**"] } diff --git a/tsconfig.json b/tsconfig.json index 500de27e2457..d616f15c7654 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,7 @@ { "extends": "@tsconfig/node14/tsconfig.json", "compilerOptions": { + "composite": true, "incremental": true, "declaration": true, "declarationMap": true, diff --git a/turbo.json b/turbo.json index 9e020f56f6c4..c9ff689b208c 100644 --- a/turbo.json +++ b/turbo.json @@ -40,7 +40,7 @@ // Specific linting tasks: ESLint "lint:ts": { - // "dependsOn": ["^build"], + "dependsOn": ["build"], "inputs": [ // https://github.com/vercel/turborepo/issues/1407 ":!:build/", @@ -54,7 +54,7 @@ ] }, "lint:ts:fix": { - "dependsOn": ["^build"], + "dependsOn": ["build"], "inputs": [ // https://github.com/vercel/turborepo/issues/1407 ":!:build/", @@ -114,7 +114,8 @@ "extract-api": { "dependsOn": ["build"], "inputs": ["src/**/*.ts", "build/**"], - "outputs": [".tmp/api.md", "api.md"] + "cache": false + // "outputs": [".tmp/api.md", "api.md"] }, "test:ts": { diff --git a/yarn.lock b/yarn.lock index ece928f99279..0186ffbe8779 100644 --- a/yarn.lock +++ b/yarn.lock @@ -786,6 +786,33 @@ __metadata: languageName: node linkType: hard +"@monorepo-utils/package-utils@npm:^2.9.0": + version: 2.9.0 + resolution: "@monorepo-utils/package-utils@npm:2.9.0" + dependencies: + globby: ^11.0.1 + load-json-file: ^6.2.0 + upath: ^2.0.1 + yaml: ^2.1.3 + checksum: 6d167ad9f402bab8c4bfa11b1a6bdd741e1d9d4745ced6b58eae34a6d4f74fd033578f42657ff72aedac442499ac5890e15c0cb94820d3b9873361778925728e + languageName: node + linkType: hard + +"@monorepo-utils/workspaces-to-typescript-project-references@npm:^2.9.0": + version: 2.9.0 + resolution: "@monorepo-utils/workspaces-to-typescript-project-references@npm:2.9.0" + dependencies: + "@monorepo-utils/package-utils": ^2.9.0 + comment-json: ^3.0.3 + meow: ^7.1.1 + semver-match: 0.1.1 + upath: ^2.0.1 + bin: + workspaces-to-typescript-project-references: bin/cmd.js + checksum: 0cd4ceaaddaa5fe0398578c164cf718056a8158f5576538f8b57606cb6919cdf50f165ba7091c88ce4dc21336572dba8cfddba3b9392183d2e7d3dda6c19230b + languageName: node + linkType: hard + "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -1914,6 +1941,7 @@ __metadata: "@commitlint/config-conventional": ^17.4.4 "@esm2cjs/p-queue": ^7.3.0 "@microsoft/api-extractor": ^7.33.7 + "@monorepo-utils/workspaces-to-typescript-project-references": ^2.9.0 "@tsconfig/node14": ^1.0.3 "@types/fs-extra": ^9.0.13 "@types/node": ^14.18.36 @@ -2658,7 +2686,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^5.3.1": +"camelcase@npm:^5.0.0, camelcase@npm:^5.3.1": version: 5.3.1 resolution: "camelcase@npm:5.3.1" checksum: e6effce26b9404e3c0f301498184f243811c30dfe6d0b9051863bd8e4034d09c8c2923794f280d6827e5aa055f6c434115ff97864a16a963366fb35fd673024b @@ -2998,6 +3026,18 @@ __metadata: languageName: node linkType: hard +"comment-json@npm:^3.0.3": + version: 3.0.3 + resolution: "comment-json@npm:3.0.3" + dependencies: + core-util-is: ^1.0.2 + esprima: ^4.0.1 + has-own-prop: ^2.0.0 + repeat-string: ^1.6.1 + checksum: c8e92e820b73e7bd83890e38680617b21028eca9a7e83a2af72750eae8c7e2570dd40e5848148b1e1d34d58ce62a0cb4e2b5836df0f8daa1d6bceca8666936cd + languageName: node + linkType: hard + "comment-json@npm:^4.2.3": version: 4.2.3 resolution: "comment-json@npm:4.2.3" @@ -3168,7 +3208,7 @@ __metadata: languageName: node linkType: hard -"core-util-is@npm:^1.0.3": +"core-util-is@npm:^1.0.2, core-util-is@npm:^1.0.3": version: 1.0.3 resolution: "core-util-is@npm:1.0.3" checksum: 9de8597363a8e9b9952491ebe18167e3b36e7707569eed0ebf14f8bba773611376466ae34575bca8cfe3c767890c859c74056084738f09d4e4a6f902b2ad7d99 @@ -3392,7 +3432,7 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:^1.1.0": +"decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" checksum: ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa @@ -4779,6 +4819,13 @@ __metadata: languageName: node linkType: hard +"graceful-fs@npm:^4.1.15": + version: 4.2.11 + resolution: "graceful-fs@npm:4.2.11" + checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 + languageName: node + linkType: hard + "graceful-fs@npm:^4.1.2, graceful-fs@npm:^4.2.10": version: 4.2.10 resolution: "graceful-fs@npm:4.2.10" @@ -5636,6 +5683,18 @@ __metadata: languageName: node linkType: hard +"load-json-file@npm:^6.2.0": + version: 6.2.0 + resolution: "load-json-file@npm:6.2.0" + dependencies: + graceful-fs: ^4.1.15 + parse-json: ^5.0.0 + strip-bom: ^4.0.0 + type-fest: ^0.6.0 + checksum: 4429e430ebb99375fc7cd936348e4f7ba729486080ced4272091c1e386a7f5f738ea3337d8ffd4b01c2f5bc3ddde92f2c780045b66838fe98bdb79f901884643 + languageName: node + linkType: hard + "load-json-file@npm:^7.0.0": version: 7.0.1 resolution: "load-json-file@npm:7.0.1" @@ -5910,6 +5969,25 @@ __metadata: languageName: node linkType: hard +"meow@npm:^7.1.1": + version: 7.1.1 + resolution: "meow@npm:7.1.1" + dependencies: + "@types/minimist": ^1.2.0 + camelcase-keys: ^6.2.2 + decamelize-keys: ^1.1.0 + hard-rejection: ^2.1.0 + minimist-options: 4.1.0 + normalize-package-data: ^2.5.0 + read-pkg-up: ^7.0.1 + redent: ^3.0.0 + trim-newlines: ^3.0.0 + type-fest: ^0.13.1 + yargs-parser: ^18.1.3 + checksum: 87bba177ab858a9b606ee52220e6bf395277beebafefe8ab5dbdf178f5825274a24ca16dca7e0ddd41e5ac3533164ee52e3d0eec87b66d78aae796d24a817842 + languageName: node + linkType: hard + "meow@npm:^8.0.0": version: 8.1.2 resolution: "meow@npm:8.1.2" @@ -7418,7 +7496,16 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.5.0": +"semver-match@npm:0.1.1": + version: 0.1.1 + resolution: "semver-match@npm:0.1.1" + dependencies: + semver: ^5.1.0 + checksum: 624968a1d0b665fb08d3e7a4d28b62332ae1695c19f4b7f7cddb34c07bf8e5b6f19d393249bb1b96b09746651bd20d754fc2d64318fd7f959f6bec6abfa883dd + languageName: node + linkType: hard + +"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.1.0, semver@npm:^5.5.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -7855,7 +7942,7 @@ __metadata: languageName: node linkType: hard -"strip-bom@npm:4.0.0": +"strip-bom@npm:4.0.0, strip-bom@npm:^4.0.0": version: 4.0.0 resolution: "strip-bom@npm:4.0.0" checksum: 9dbcfbaf503c57c06af15fe2c8176fb1bf3af5ff65003851a102749f875a6dbe0ab3b30115eccf6e805e9d756830d3e40ec508b62b3f1ddf3761a20ebe29d3f3 @@ -8484,6 +8571,13 @@ __metadata: languageName: node linkType: hard +"upath@npm:^2.0.1": + version: 2.0.1 + resolution: "upath@npm:2.0.1" + checksum: 2db04f24a03ef72204c7b969d6991abec9e2cb06fb4c13a1fd1c59bc33b46526b16c3325e55930a11ff86a77a8cbbcda8f6399bf914087028c5beae21ecdb33c + languageName: node + linkType: hard + "uri-js@npm:^4.2.2": version: 4.4.1 resolution: "uri-js@npm:4.4.1" @@ -8721,6 +8815,23 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.1.3": + version: 2.2.1 + resolution: "yaml@npm:2.2.1" + checksum: 84f68cbe462d5da4e7ded4a8bded949ffa912bc264472e5a684c3d45b22d8f73a3019963a32164023bdf3d83cfb6f5b58ff7b2b10ef5b717c630f40bd6369a23 + languageName: node + linkType: hard + +"yargs-parser@npm:^18.1.3": + version: 18.1.3 + resolution: "yargs-parser@npm:18.1.3" + dependencies: + camelcase: ^5.0.0 + decamelize: ^1.2.0 + checksum: 60e8c7d1b85814594d3719300ecad4e6ae3796748b0926137bfec1f3042581b8646d67e83c6fc80a692ef08b8390f21ddcacb9464476c39bbdf52e34961dd4d9 + languageName: node + linkType: hard + "yargs-parser@npm:^20.2.2, yargs-parser@npm:^20.2.3, yargs-parser@npm:^20.2.9": version: 20.2.9 resolution: "yargs-parser@npm:20.2.9"