@zwave-js/host 14.0.0-beta.1 → 14.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/build/cjs/FileSystem.js +17 -0
  2. package/build/cjs/FileSystem.js.map +7 -0
  3. package/build/{ZWaveHost.d.ts → cjs/ZWaveHost.d.ts} +1 -1
  4. package/build/cjs/ZWaveHost.js +17 -0
  5. package/build/cjs/ZWaveHost.js.map +7 -0
  6. package/build/cjs/ZWaveHostOptions.js +17 -0
  7. package/build/cjs/ZWaveHostOptions.js.map +7 -0
  8. package/build/cjs/index.d.ts +5 -0
  9. package/build/cjs/index.js +29 -0
  10. package/build/cjs/index.js.map +7 -0
  11. package/build/cjs/index_safe.d.ts +4 -0
  12. package/build/cjs/index_safe.js +27 -0
  13. package/build/cjs/index_safe.js.map +7 -0
  14. package/build/{mocks.d.ts → cjs/mocks.d.ts} +1 -1
  15. package/build/cjs/mocks.js +118 -0
  16. package/build/cjs/mocks.js.map +7 -0
  17. package/build/cjs/package.json +3 -0
  18. package/build/esm/FileSystem.d.ts +10 -0
  19. package/build/esm/FileSystem.d.ts.map +1 -0
  20. package/build/esm/FileSystem.js +2 -0
  21. package/build/{FileSystem.js.map → esm/FileSystem.js.map} +1 -1
  22. package/build/esm/ZWaveHost.d.ts +97 -0
  23. package/build/esm/ZWaveHost.d.ts.map +1 -0
  24. package/build/esm/ZWaveHost.js +2 -0
  25. package/build/{ZWaveHost.js.map → esm/ZWaveHost.js.map} +1 -1
  26. package/build/esm/ZWaveHostOptions.d.ts +71 -0
  27. package/build/esm/ZWaveHostOptions.d.ts.map +1 -0
  28. package/build/esm/ZWaveHostOptions.js +2 -0
  29. package/build/{ZWaveHostOptions.js.map → esm/ZWaveHostOptions.js.map} +1 -1
  30. package/build/esm/index.d.ts +5 -0
  31. package/build/esm/index.d.ts.map +1 -0
  32. package/build/esm/index.js +6 -0
  33. package/build/esm/index.js.map +1 -0
  34. package/build/esm/index_safe.d.ts +4 -0
  35. package/build/esm/index_safe.d.ts.map +1 -0
  36. package/build/esm/index_safe.js +6 -0
  37. package/build/esm/index_safe.js.map +1 -0
  38. package/build/esm/mocks.d.ts +12 -0
  39. package/build/esm/mocks.d.ts.map +1 -0
  40. package/build/{mocks.js → esm/mocks.js} +6 -9
  41. package/build/esm/mocks.js.map +1 -0
  42. package/build/esm/package.json +3 -0
  43. package/package.json +15 -12
  44. package/build/FileSystem.d.ts.map +0 -1
  45. package/build/FileSystem.js +0 -3
  46. package/build/ZWaveHost.d.ts.map +0 -1
  47. package/build/ZWaveHost.js +0 -3
  48. package/build/ZWaveHostOptions.d.ts.map +0 -1
  49. package/build/ZWaveHostOptions.js +0 -3
  50. package/build/index.d.ts +0 -5
  51. package/build/index.d.ts.map +0 -1
  52. package/build/index.js +0 -22
  53. package/build/index.js.map +0 -1
  54. package/build/index_safe.d.ts +0 -4
  55. package/build/index_safe.d.ts.map +0 -1
  56. package/build/index_safe.js +0 -22
  57. package/build/index_safe.js.map +0 -1
  58. package/build/mocks.d.ts.map +0 -1
  59. package/build/mocks.js.map +0 -1
  60. /package/build/{FileSystem.d.ts → cjs/FileSystem.d.ts} +0 -0
  61. /package/build/{ZWaveHostOptions.d.ts → cjs/ZWaveHostOptions.d.ts} +0 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var FileSystem_exports = {};
16
+ module.exports = __toCommonJS(FileSystem_exports);
17
+ //# sourceMappingURL=FileSystem.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../esm/FileSystem.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=FileSystem.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -1,6 +1,6 @@
1
1
  import type { DeviceConfig } from "@zwave-js/config";
2
2
  import type { CCId, CommandClasses, ControllerLogger, FrameType, MaybeNotKnown, NodeId, SecurityClass, SecurityManagers, SendCommandOptions, SendCommandReturnType, ValueDB, ValueID } from "@zwave-js/core";
3
- import type { ZWaveHostOptions } from "./ZWaveHostOptions";
3
+ import type { ZWaveHostOptions } from "./ZWaveHostOptions.js";
4
4
  /** Allows querying the home ID and node ID of the host */
5
5
  export interface HostIDs {
6
6
  /** The ID of this node in the current network */
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ZWaveHost_exports = {};
16
+ module.exports = __toCommonJS(ZWaveHost_exports);
17
+ //# sourceMappingURL=ZWaveHost.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../esm/ZWaveHost.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=ZWaveHost.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var ZWaveHostOptions_exports = {};
16
+ module.exports = __toCommonJS(ZWaveHostOptions_exports);
17
+ //# sourceMappingURL=ZWaveHostOptions.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../esm/ZWaveHostOptions.js"],
4
+ "sourcesContent": ["export {};\n//# sourceMappingURL=ZWaveHostOptions.js.map"],
5
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,5 @@
1
+ export * from "./FileSystem.js";
2
+ export * from "./ZWaveHost.js";
3
+ export * from "./ZWaveHostOptions.js";
4
+ export * from "./mocks.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var esm_exports = {};
17
+ module.exports = __toCommonJS(esm_exports);
18
+ __reExport(esm_exports, require("./FileSystem.js"), module.exports);
19
+ __reExport(esm_exports, require("./ZWaveHost.js"), module.exports);
20
+ __reExport(esm_exports, require("./ZWaveHostOptions.js"), module.exports);
21
+ __reExport(esm_exports, require("./mocks.js"), module.exports);
22
+ // Annotate the CommonJS export names for ESM import in node:
23
+ 0 && (module.exports = {
24
+ ...require("./FileSystem.js"),
25
+ ...require("./ZWaveHost.js"),
26
+ ...require("./ZWaveHostOptions.js"),
27
+ ...require("./mocks.js")
28
+ });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/consistent-type-exports */\nexport * from \"./FileSystem.js\";\nexport * from \"./ZWaveHost.js\";\nexport * from \"./ZWaveHostOptions.js\";\nexport * from \"./mocks.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;AACA,wBAAc,4BADd;AAEA,wBAAc,2BAFd;AAGA,wBAAc,kCAHd;AAIA,wBAAc,uBAJd;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ export * from "./FileSystem.js";
2
+ export * from "./ZWaveHost.js";
3
+ export * from "./ZWaveHostOptions.js";
4
+ //# sourceMappingURL=index_safe.d.ts.map
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+ var index_safe_exports = {};
17
+ module.exports = __toCommonJS(index_safe_exports);
18
+ __reExport(index_safe_exports, require("./FileSystem.js"), module.exports);
19
+ __reExport(index_safe_exports, require("./ZWaveHost.js"), module.exports);
20
+ __reExport(index_safe_exports, require("./ZWaveHostOptions.js"), module.exports);
21
+ // Annotate the CommonJS export names for ESM import in node:
22
+ 0 && (module.exports = {
23
+ ...require("./FileSystem.js"),
24
+ ...require("./ZWaveHost.js"),
25
+ ...require("./ZWaveHostOptions.js")
26
+ });
27
+ //# sourceMappingURL=index_safe.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index_safe.ts"],
4
+ "sourcesContent": ["/* eslint-disable @typescript-eslint/consistent-type-exports */\n/* @forbiddenImports external */\n\nexport * from \"./FileSystem.js\";\nexport * from \"./ZWaveHost.js\";\nexport * from \"./ZWaveHostOptions.js\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;;AAGA,+BAAc,4BAHd;AAIA,+BAAc,2BAJd;AAKA,+BAAc,kCALd;",
6
+ "names": []
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { type ControlsCC, type EndpointId, type GetEndpoint, type IsCCSecure, type ListenBehavior, type NodeId, type QuerySecurityClasses, type SetSecurityClass, type SupportsCC } from "@zwave-js/core";
2
- import type { GetAllNodes, GetDeviceConfig, GetNode, GetSupportedCCVersion, GetValueDB, HostIDs, LogNode } from "./ZWaveHost";
2
+ import type { GetAllNodes, GetDeviceConfig, GetNode, GetSupportedCCVersion, GetValueDB, HostIDs, LogNode } from "./ZWaveHost.js";
3
3
  export interface CreateTestingHostOptions extends HostIDs, GetDeviceConfig {
4
4
  }
5
5
  export type BaseTestEndpoint = EndpointId & SupportsCC & ControlsCC & IsCCSecure;
@@ -0,0 +1,118 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var mocks_exports = {};
20
+ __export(mocks_exports, {
21
+ createTestingHost: () => createTestingHost
22
+ });
23
+ module.exports = __toCommonJS(mocks_exports);
24
+ var import_core = require("@zwave-js/core");
25
+ var import_shared = require("@zwave-js/shared");
26
+ function createTestingHost(options = {}) {
27
+ const valuesStorage = /* @__PURE__ */ new Map();
28
+ const metadataStorage = /* @__PURE__ */ new Map();
29
+ const valueDBCache = /* @__PURE__ */ new Map();
30
+ const nodes = (0, import_shared.createThrowingMap)((nodeId) => {
31
+ throw new import_core.ZWaveError(`Node ${nodeId} was not found!`, import_core.ZWaveErrorCodes.Controller_NodeNotFound);
32
+ });
33
+ const ret = {
34
+ homeId: options.homeId ?? 2119630849,
35
+ ownNodeId: options.ownNodeId ?? 1,
36
+ getDeviceConfig: options.getDeviceConfig ?? (() => void 0),
37
+ // securityManager: undefined,
38
+ // securityManager2: undefined,
39
+ // securityManagerLR: undefined,
40
+ // getDeviceConfig: () => undefined,
41
+ // lookupManufacturer: () => undefined,
42
+ logNode: () => {
43
+ },
44
+ // options: {
45
+ // attempts: {
46
+ // nodeInterview: 1,
47
+ // // openSerialPort: 1,
48
+ // sendData: 3,
49
+ // controller: 3,
50
+ // },
51
+ // timeouts: {
52
+ // refreshValue: 5000,
53
+ // refreshValueAfterTransition: 1000,
54
+ // },
55
+ // },
56
+ // getInterviewOptions() {
57
+ // return {};
58
+ // },
59
+ // getUserPreferences() {
60
+ // return undefined;
61
+ // },
62
+ // getCommunicationTimeouts() {
63
+ // return {
64
+ // refreshValue: 5000,
65
+ // refreshValueAfterTransition: 1000,
66
+ // };
67
+ // },
68
+ getNode(nodeId) {
69
+ return nodes.get(nodeId);
70
+ },
71
+ getNodeOrThrow(nodeId) {
72
+ return nodes.getOrThrow(nodeId);
73
+ },
74
+ getAllNodes() {
75
+ return [...nodes.values()];
76
+ },
77
+ setNode(nodeId, node) {
78
+ nodes.set(nodeId, node);
79
+ },
80
+ // getSafeCCVersion: options.getSafeCCVersion ?? (() => 100),
81
+ getSupportedCCVersion: (cc, nodeId, endpoint) => {
82
+ return nodes.get(nodeId)?.getEndpoint(endpoint ?? 0)?.getCCVersion(cc) ?? 0;
83
+ },
84
+ getValueDB: (nodeId) => {
85
+ if (!valueDBCache.has(nodeId)) {
86
+ valueDBCache.set(nodeId, new import_core.ValueDB(nodeId, valuesStorage, metadataStorage));
87
+ }
88
+ return valueDBCache.get(nodeId);
89
+ },
90
+ tryGetValueDB: (nodeId) => {
91
+ return ret.getValueDB(nodeId);
92
+ }
93
+ // getHighestSecurityClass: (nodeId) => {
94
+ // const node = nodes.getOrThrow(nodeId);
95
+ // return node.getHighestSecurityClass();
96
+ // },
97
+ // hasSecurityClass: (nodeId, securityClass) => {
98
+ // const node = nodes.getOrThrow(nodeId);
99
+ // return node.hasSecurityClass(securityClass);
100
+ // },
101
+ // setSecurityClass: (nodeId, securityClass, granted) => {
102
+ // const node = nodes.getOrThrow(nodeId);
103
+ // node.setSecurityClass(securityClass, granted);
104
+ // },
105
+ // sendCommand: async (_command, _options) => {
106
+ // return undefined as any;
107
+ // },
108
+ // schedulePoll: (_nodeId, _valueId, _options) => {
109
+ // return false;
110
+ // },
111
+ };
112
+ return ret;
113
+ }
114
+ // Annotate the CommonJS export names for ESM import in node:
115
+ 0 && (module.exports = {
116
+ createTestingHost
117
+ });
118
+ //# sourceMappingURL=mocks.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/mocks.ts"],
4
+ "sourcesContent": ["import {\n\ttype ControlsCC,\n\ttype EndpointId,\n\ttype GetEndpoint,\n\ttype IsCCSecure,\n\ttype ListenBehavior,\n\ttype NodeId,\n\ttype QuerySecurityClasses,\n\ttype SetSecurityClass,\n\ttype SupportsCC,\n\tValueDB,\n\tZWaveError,\n\tZWaveErrorCodes,\n} from \"@zwave-js/core\";\nimport { createThrowingMap } from \"@zwave-js/shared\";\nimport type {\n\tGetAllNodes,\n\tGetDeviceConfig,\n\tGetNode,\n\tGetSupportedCCVersion,\n\tGetValueDB,\n\tHostIDs,\n\tLogNode,\n} from \"./ZWaveHost.js\";\n\nexport interface CreateTestingHostOptions extends HostIDs, GetDeviceConfig {}\n\nexport type BaseTestEndpoint =\n\t& EndpointId\n\t& SupportsCC\n\t& ControlsCC\n\t& IsCCSecure;\n\nexport type BaseTestNode =\n\t& BaseTestEndpoint\n\t& NodeId\n\t& ListenBehavior\n\t& QuerySecurityClasses\n\t& SetSecurityClass\n\t& SupportsCC\n\t& ControlsCC\n\t& IsCCSecure\n\t& GetEndpoint<BaseTestEndpoint>;\n\nexport interface TestingHost\n\textends\n\t\tHostIDs,\n\t\tGetValueDB,\n\t\tGetSupportedCCVersion,\n\t\tGetAllNodes<BaseTestNode>,\n\t\tGetNode<BaseTestNode>,\n\t\tGetDeviceConfig,\n\t\tLogNode\n{\n\tsetNode(nodeId: number, node: BaseTestNode): void;\n}\n\n/** Creates a {@link TestingHost} that can be used instead of a real driver instance in tests */\nexport function createTestingHost(\n\toptions: Partial<CreateTestingHostOptions> = {},\n): TestingHost {\n\tconst valuesStorage = new Map();\n\tconst metadataStorage = new Map();\n\tconst valueDBCache = new Map<number, ValueDB>();\n\tconst nodes = createThrowingMap<number, BaseTestNode>((nodeId) => {\n\t\tthrow new ZWaveError(\n\t\t\t`Node ${nodeId} was not found!`,\n\t\t\tZWaveErrorCodes.Controller_NodeNotFound,\n\t\t);\n\t});\n\n\tconst ret: TestingHost = {\n\t\thomeId: options.homeId ?? 0x7e570001,\n\t\townNodeId: options.ownNodeId ?? 1,\n\t\tgetDeviceConfig: options.getDeviceConfig ?? (() => undefined),\n\t\t// securityManager: undefined,\n\t\t// securityManager2: undefined,\n\t\t// securityManagerLR: undefined,\n\t\t// getDeviceConfig: () => undefined,\n\t\t// lookupManufacturer: () => undefined,\n\t\tlogNode: () => {},\n\t\t// options: {\n\t\t// \tattempts: {\n\t\t// \t\tnodeInterview: 1,\n\t\t// \t\t// openSerialPort: 1,\n\t\t// \t\tsendData: 3,\n\t\t// \t\tcontroller: 3,\n\t\t// \t},\n\t\t// \ttimeouts: {\n\t\t// \t\trefreshValue: 5000,\n\t\t// \t\trefreshValueAfterTransition: 1000,\n\t\t// \t},\n\t\t// },\n\t\t// getInterviewOptions() {\n\t\t// \treturn {};\n\t\t// },\n\t\t// getUserPreferences() {\n\t\t// \treturn undefined;\n\t\t// },\n\t\t// getCommunicationTimeouts() {\n\t\t// \treturn {\n\t\t// \t\trefreshValue: 5000,\n\t\t// \t\trefreshValueAfterTransition: 1000,\n\t\t// \t};\n\t\t// },\n\t\tgetNode(nodeId) {\n\t\t\treturn nodes.get(nodeId);\n\t\t},\n\t\tgetNodeOrThrow(nodeId) {\n\t\t\treturn nodes.getOrThrow(nodeId);\n\t\t},\n\t\tgetAllNodes() {\n\t\t\treturn [...nodes.values()];\n\t\t},\n\t\tsetNode(nodeId, node) {\n\t\t\tnodes.set(nodeId, node);\n\t\t},\n\t\t// getSafeCCVersion: options.getSafeCCVersion ?? (() => 100),\n\t\tgetSupportedCCVersion: (cc, nodeId, endpoint) => {\n\t\t\treturn nodes.get(nodeId)?.getEndpoint(endpoint ?? 0)?.getCCVersion(\n\t\t\t\tcc,\n\t\t\t) ?? 0;\n\t\t\t// \treturn options.getSupportedCCVersion?.(cc, nodeId, endpoint)\n\t\t\t// \t\t?? options.getSafeCCVersion?.(cc, nodeId, endpoint)\n\t\t\t// \t\t?? 100;\n\t\t},\n\t\tgetValueDB: (nodeId) => {\n\t\t\tif (!valueDBCache.has(nodeId)) {\n\t\t\t\tvalueDBCache.set(\n\t\t\t\t\tnodeId,\n\t\t\t\t\tnew ValueDB(\n\t\t\t\t\t\tnodeId,\n\t\t\t\t\t\tvaluesStorage as any,\n\t\t\t\t\t\tmetadataStorage as any,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn valueDBCache.get(nodeId)!;\n\t\t},\n\t\ttryGetValueDB: (nodeId) => {\n\t\t\treturn ret.getValueDB(nodeId);\n\t\t},\n\t\t// getHighestSecurityClass: (nodeId) => {\n\t\t// \tconst node = nodes.getOrThrow(nodeId);\n\t\t// \treturn node.getHighestSecurityClass();\n\t\t// },\n\t\t// hasSecurityClass: (nodeId, securityClass) => {\n\t\t// \tconst node = nodes.getOrThrow(nodeId);\n\t\t// \treturn node.hasSecurityClass(securityClass);\n\t\t// },\n\t\t// setSecurityClass: (nodeId, securityClass, granted) => {\n\t\t// \tconst node = nodes.getOrThrow(nodeId);\n\t\t// \tnode.setSecurityClass(securityClass, granted);\n\t\t// },\n\t\t// sendCommand: async (_command, _options) => {\n\t\t// \treturn undefined as any;\n\t\t// },\n\t\t// schedulePoll: (_nodeId, _valueId, _options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commonjs"
3
+ }
@@ -0,0 +1,10 @@
1
+ /** Defines which methods must be supported by a replacement filesystem */
2
+ export interface FileSystem {
3
+ ensureDir(path: string): Promise<void>;
4
+ writeFile(file: string, data: string | Uint8Array, options?: {
5
+ encoding: BufferEncoding;
6
+ } | BufferEncoding): Promise<void>;
7
+ readFile(file: string, encoding: BufferEncoding): Promise<string>;
8
+ pathExists(path: string): Promise<boolean>;
9
+ }
10
+ //# sourceMappingURL=FileSystem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../../src/FileSystem.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IAC1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,SAAS,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,EACzB,OAAO,CAAC,EACL;QACD,QAAQ,EAAE,cAAc,CAAC;KACzB,GACC,cAAc,GACf,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=FileSystem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileSystem.js","sourceRoot":"","sources":["../src/FileSystem.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"FileSystem.js","sourceRoot":"","sources":["../../src/FileSystem.ts"],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ import type { DeviceConfig } from "@zwave-js/config";
2
+ import type { CCId, CommandClasses, ControllerLogger, FrameType, MaybeNotKnown, NodeId, SecurityClass, SecurityManagers, SendCommandOptions, SendCommandReturnType, ValueDB, ValueID } from "@zwave-js/core";
3
+ import type { ZWaveHostOptions } from "./ZWaveHostOptions.js";
4
+ /** Allows querying the home ID and node ID of the host */
5
+ export interface HostIDs {
6
+ /** The ID of this node in the current network */
7
+ ownNodeId: number;
8
+ /** The Home ID of the current network */
9
+ homeId: number;
10
+ }
11
+ /** Allows querying device configuration for a node */
12
+ export interface GetDeviceConfig {
13
+ getDeviceConfig(nodeId: number): DeviceConfig | undefined;
14
+ }
15
+ export interface GetSupportedCCVersion {
16
+ /**
17
+ * Retrieves the maximum version of a command class the given node/endpoint has reported support for.
18
+ * Returns 0 when the CC is not supported or that information is not known yet.
19
+ */
20
+ getSupportedCCVersion(cc: CommandClasses, nodeId: number, endpointIndex?: number): number;
21
+ }
22
+ export interface GetSafeCCVersion {
23
+ /**
24
+ * Retrieves the maximum version of a command class that can be used to communicate with a node.
25
+ * Returns 1 if the node claims that it does not support a CC.
26
+ * Returns `undefined` for CCs that are not implemented in this library yet.
27
+ */
28
+ getSafeCCVersion(cc: CommandClasses, nodeId: number, endpointIndex?: number): number | undefined;
29
+ }
30
+ /** Additional context needed for deserializing CCs */
31
+ export interface CCParsingContext extends Readonly<SecurityManagers>, GetDeviceConfig, HostIDs {
32
+ sourceNodeId: number;
33
+ __internalIsMockNode?: boolean;
34
+ /** If known, the frame type of the containing message */
35
+ frameType: FrameType;
36
+ getHighestSecurityClass(nodeId: number): MaybeNotKnown<SecurityClass>;
37
+ hasSecurityClass(nodeId: number, securityClass: SecurityClass): MaybeNotKnown<boolean>;
38
+ setSecurityClass(nodeId: number, securityClass: SecurityClass, granted: boolean): void;
39
+ }
40
+ /** Additional context needed for serializing CCs */
41
+ export interface CCEncodingContext extends Readonly<SecurityManagers>, GetDeviceConfig, HostIDs, GetSupportedCCVersion {
42
+ getHighestSecurityClass(nodeId: number): MaybeNotKnown<SecurityClass>;
43
+ hasSecurityClass(nodeId: number, securityClass: SecurityClass): MaybeNotKnown<boolean>;
44
+ setSecurityClass(nodeId: number, securityClass: SecurityClass, granted: boolean): void;
45
+ }
46
+ /** Host application abstractions that provide support for reading and writing values to a database */
47
+ export interface GetValueDB {
48
+ /** Returns the value DB which belongs to the node with the given ID, or throws if the Value DB cannot be accessed */
49
+ getValueDB(nodeId: number): ValueDB;
50
+ /** Returns the value DB which belongs to the node with the given ID, or `undefined` if the Value DB cannot be accessed */
51
+ tryGetValueDB(nodeId: number): ValueDB | undefined;
52
+ }
53
+ /** Allows accessing a specific node */
54
+ export interface GetNode<T extends NodeId> {
55
+ getNode(nodeId: number): T | undefined;
56
+ getNodeOrThrow(nodeId: number): T;
57
+ }
58
+ /** Allows accessing all nodes */
59
+ export interface GetAllNodes<T extends NodeId> {
60
+ getAllNodes(): T[];
61
+ }
62
+ /** Allows looking up Z-Wave manufacturers by manufacturer ID */
63
+ export interface LookupManufacturer {
64
+ /** Looks up the name of the manufacturer with the given ID in the configuration DB */
65
+ lookupManufacturer(manufacturerId: number): string | undefined;
66
+ }
67
+ /** Allows sending commands to one or more nodes */
68
+ export interface SendCommand {
69
+ sendCommand<TResponse extends CCId | undefined = undefined>(command: CCId, options?: SendCommandOptions): Promise<SendCommandReturnType<TResponse>>;
70
+ }
71
+ /** Allows reading options to use for interviewing devices */
72
+ export interface GetInterviewOptions {
73
+ getInterviewOptions(): ZWaveHostOptions["interview"];
74
+ }
75
+ /** Allows reading user preferences */
76
+ export interface GetUserPreferences {
77
+ getUserPreferences(): ZWaveHostOptions["preferences"];
78
+ }
79
+ /** Allows reading user preferences */
80
+ export interface GetCommunicationTimeouts {
81
+ getCommunicationTimeouts(): ZWaveHostOptions["timeouts"];
82
+ }
83
+ export type LogNode = Pick<ControllerLogger, "logNode">;
84
+ /** Allows scheduling a value refresh (poll) for a later time */
85
+ export interface SchedulePoll {
86
+ schedulePoll(nodeId: number, valueId: ValueID, options: NodeSchedulePollOptions): boolean;
87
+ }
88
+ export interface NodeSchedulePollOptions {
89
+ /** The timeout after which the poll is to be scheduled */
90
+ timeoutMs?: number;
91
+ /**
92
+ * The expected value that's should be verified with this poll.
93
+ * When this value is received in the meantime, the poll will be cancelled.
94
+ */
95
+ expectedValue?: unknown;
96
+ }
97
+ //# sourceMappingURL=ZWaveHost.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZWaveHost.d.ts","sourceRoot":"","sources":["../../src/ZWaveHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACX,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,OAAO,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,0DAA0D;AAC1D,MAAM,WAAW,OAAO;IACvB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC/B,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;CAC1D;AAED,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,qBAAqB,CACpB,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,gBAAgB,CACf,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAAC;CACtB;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAChB,SAAQ,QAAQ,CAAC,gBAAgB,CAAC,EAAE,eAAe,EAAE,OAAO;IAE5D,YAAY,EAAE,MAAM,CAAC;IACrB,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C;CACnB;AAED,gEAAgE;AAChE,MAAM,WAAW,kBAAkB;IAClC,sFAAsF;IACtF,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC/D;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC3B,WAAW,CAAC,SAAS,SAAS,IAAI,GAAG,SAAS,GAAG,SAAS,EACzD,OAAO,EAAE,IAAI,EACb,OAAO,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;CAC7C;AAED,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IACnC,mBAAmB,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACrD;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IAClC,kBAAkB,IAAI,gBAAgB,CAAC,aAAa,CAAC,CAAC;CACtD;AAED,sCAAsC;AACtC,MAAM,WAAW,wBAAwB;IACxC,wBAAwB,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAExD,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,YAAY,CACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC;CACX;AAED,MAAM,WAAW,uBAAuB;IACvC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ZWaveHost.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZWaveHost.js","sourceRoot":"","sources":["../src/ZWaveHost.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ZWaveHost.js","sourceRoot":"","sources":["../../src/ZWaveHost.ts"],"names":[],"mappings":""}
@@ -0,0 +1,71 @@
1
+ export interface ZWaveHostOptions {
2
+ /** Specify timeouts in milliseconds */
3
+ timeouts: {
4
+ /**
5
+ * How long to wait for a poll after setting a value without transition duration
6
+ */
7
+ refreshValue: number;
8
+ /**
9
+ * How long to wait for a poll after setting a value with transition duration. This doubles as the "fast" delay.
10
+ */
11
+ refreshValueAfterTransition: number;
12
+ };
13
+ attempts: {
14
+ /** How often the driver should try communication with the controller before giving up */
15
+ controller: number;
16
+ /** How often the driver should try sending SendData commands before giving up */
17
+ sendData: number;
18
+ /**
19
+ * How many attempts should be made for each node interview before giving up
20
+ */
21
+ nodeInterview: number;
22
+ };
23
+ interview?: {
24
+ /**
25
+ * Whether all user code should be queried during the interview of the UserCode CC.
26
+ * Note that enabling this can cause a lot of traffic during the interview.
27
+ */
28
+ queryAllUserCodes?: boolean;
29
+ };
30
+ /**
31
+ * Some SET-type commands optimistically update the current value to match the target value
32
+ * when the device acknowledges the command.
33
+ *
34
+ * While this generally makes UIs feel more responsive, it is not necessary for devices which report their status
35
+ * on their own and can lead to confusing behavior when dealing with slow devices like blinds.
36
+ *
37
+ * To disable the optimistic update, set this option to `true`.
38
+ * Default: `false`
39
+ */
40
+ disableOptimisticValueUpdate?: boolean;
41
+ preferences?: {
42
+ /**
43
+ * The preferred scales to use when querying sensors. The key is either:
44
+ * - the name of a named scale group, e.g. "temperature", which applies to every sensor type that uses this scale group.
45
+ * - or the numeric sensor type to specify the scale for a single sensor type
46
+ *
47
+ * Single-type preferences have a higher priority than named ones. For example, the following preference
48
+ * ```js
49
+ * {
50
+ * temperature: "°F",
51
+ * 0x01: "°C",
52
+ * }
53
+ * ```
54
+ * will result in using the Fahrenheit scale for all temperature sensors, except the air temperature (0x01).
55
+ *
56
+ * The value must match what is defined in the sensor type config file and contain either:
57
+ * - the label (e.g. "Celsius", "Fahrenheit")
58
+ * - the unit (e.g. "°C", "°F")
59
+ * - or the numeric key of the scale (e.g. 0 or 1).
60
+ *
61
+ * Default:
62
+ * ```js
63
+ * {
64
+ * temperature: "Celsius"
65
+ * }
66
+ * ```
67
+ */
68
+ scales: Partial<Record<string | number, string | number>>;
69
+ };
70
+ }
71
+ //# sourceMappingURL=ZWaveHostOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ZWaveHostOptions.d.ts","sourceRoot":"","sources":["../../src/ZWaveHostOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAChC,uCAAuC;IACvC,QAAQ,EAAE;QACT;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,2BAA2B,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,QAAQ,EAAE;QACT,yFAAyF;QACzF,UAAU,EAAE,MAAM,CAAC;QAEnB,iFAAiF;QACjF,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF,SAAS,CAAC,EAAE;QACX;;;WAGG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IAEF;;;;;;;;;OASG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAEvC,WAAW,CAAC,EAAE;QACb;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;QACH,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;KAC1D,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ZWaveHostOptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ZWaveHostOptions.js","sourceRoot":"","sources":["../src/ZWaveHostOptions.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ZWaveHostOptions.js","sourceRoot":"","sources":["../../src/ZWaveHostOptions.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from "./FileSystem.js";
2
+ export * from "./ZWaveHost.js";
3
+ export * from "./ZWaveHostOptions.js";
4
+ export * from "./mocks.js";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ /* eslint-disable @typescript-eslint/consistent-type-exports */
2
+ export * from "./FileSystem.js";
3
+ export * from "./ZWaveHost.js";
4
+ export * from "./ZWaveHostOptions.js";
5
+ export * from "./mocks.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from "./FileSystem.js";
2
+ export * from "./ZWaveHost.js";
3
+ export * from "./ZWaveHostOptions.js";
4
+ //# sourceMappingURL=index_safe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index_safe.d.ts","sourceRoot":"","sources":["../../src/index_safe.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /* eslint-disable @typescript-eslint/consistent-type-exports */
2
+ /* @forbiddenImports external */
3
+ export * from "./FileSystem.js";
4
+ export * from "./ZWaveHost.js";
5
+ export * from "./ZWaveHostOptions.js";
6
+ //# sourceMappingURL=index_safe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index_safe.js","sourceRoot":"","sources":["../../src/index_safe.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gCAAgC;AAEhC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type ControlsCC, type EndpointId, type GetEndpoint, type IsCCSecure, type ListenBehavior, type NodeId, type QuerySecurityClasses, type SetSecurityClass, type SupportsCC } from "@zwave-js/core";
2
+ import type { GetAllNodes, GetDeviceConfig, GetNode, GetSupportedCCVersion, GetValueDB, HostIDs, LogNode } from "./ZWaveHost.js";
3
+ export interface CreateTestingHostOptions extends HostIDs, GetDeviceConfig {
4
+ }
5
+ export type BaseTestEndpoint = EndpointId & SupportsCC & ControlsCC & IsCCSecure;
6
+ export type BaseTestNode = BaseTestEndpoint & NodeId & ListenBehavior & QuerySecurityClasses & SetSecurityClass & SupportsCC & ControlsCC & IsCCSecure & GetEndpoint<BaseTestEndpoint>;
7
+ export interface TestingHost extends HostIDs, GetValueDB, GetSupportedCCVersion, GetAllNodes<BaseTestNode>, GetNode<BaseTestNode>, GetDeviceConfig, LogNode {
8
+ setNode(nodeId: number, node: BaseTestNode): void;
9
+ }
10
+ /** Creates a {@link TestingHost} that can be used instead of a real driver instance in tests */
11
+ export declare function createTestingHost(options?: Partial<CreateTestingHostOptions>): TestingHost;
12
+ //# sourceMappingURL=mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../src/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAIf,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EACf,OAAO,EACP,qBAAqB,EACrB,UAAU,EACV,OAAO,EACP,OAAO,EACP,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,wBAAyB,SAAQ,OAAO,EAAE,eAAe;CAAG;AAE7E,MAAM,MAAM,gBAAgB,GACzB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEd,MAAM,MAAM,YAAY,GACrB,gBAAgB,GAChB,MAAM,GACN,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAEjC,MAAM,WAAW,WAChB,SACC,OAAO,EACP,UAAU,EACV,qBAAqB,EACrB,WAAW,CAAC,YAAY,CAAC,EACzB,OAAO,CAAC,YAAY,CAAC,EACrB,eAAe,EACf,OAAO;IAER,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAClD;AAED,gGAAgG;AAChG,wBAAgB,iBAAiB,CAChC,OAAO,GAAE,OAAO,CAAC,wBAAwB,CAAM,GAC7C,WAAW,CAsGb"}
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createTestingHost = createTestingHost;
4
- const core_1 = require("@zwave-js/core");
5
- const shared_1 = require("@zwave-js/shared");
1
+ import { ValueDB, ZWaveError, ZWaveErrorCodes, } from "@zwave-js/core";
2
+ import { createThrowingMap } from "@zwave-js/shared";
6
3
  /** Creates a {@link TestingHost} that can be used instead of a real driver instance in tests */
7
- function createTestingHost(options = {}) {
4
+ export function createTestingHost(options = {}) {
8
5
  const valuesStorage = new Map();
9
6
  const metadataStorage = new Map();
10
7
  const valueDBCache = new Map();
11
- const nodes = (0, shared_1.createThrowingMap)((nodeId) => {
12
- throw new core_1.ZWaveError(`Node ${nodeId} was not found!`, core_1.ZWaveErrorCodes.Controller_NodeNotFound);
8
+ const nodes = createThrowingMap((nodeId) => {
9
+ throw new ZWaveError(`Node ${nodeId} was not found!`, ZWaveErrorCodes.Controller_NodeNotFound);
13
10
  });
14
11
  const ret = {
15
12
  homeId: options.homeId ?? 0x7e570001,
@@ -66,7 +63,7 @@ function createTestingHost(options = {}) {
66
63
  },
67
64
  getValueDB: (nodeId) => {
68
65
  if (!valueDBCache.has(nodeId)) {
69
- valueDBCache.set(nodeId, new core_1.ValueDB(nodeId, valuesStorage, metadataStorage));
66
+ valueDBCache.set(nodeId, new ValueDB(nodeId, valuesStorage, metadataStorage));
70
67
  }
71
68
  return valueDBCache.get(nodeId);
72
69
  },
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mocks.js","sourceRoot":"","sources":["../../src/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAUN,OAAO,EACP,UAAU,EACV,eAAe,GACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AA2CrD,gGAAgG;AAChG,MAAM,UAAU,iBAAiB,CAChC,UAA6C,EAAE;IAE/C,MAAM,aAAa,GAAG,IAAI,GAAG,EAAE,CAAC;IAChC,MAAM,eAAe,GAAG,IAAI,GAAG,EAAE,CAAC;IAClC,MAAM,YAAY,GAAG,IAAI,GAAG,EAAmB,CAAC;IAChD,MAAM,KAAK,GAAG,iBAAiB,CAAuB,CAAC,MAAM,EAAE,EAAE;QAChE,MAAM,IAAI,UAAU,CACnB,QAAQ,MAAM,iBAAiB,EAC/B,eAAe,CAAC,uBAAuB,CACvC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAgB;QACxB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU;QACpC,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,CAAC;QACjC,eAAe,EAAE,OAAO,CAAC,eAAe,IAAI,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC;QAC7D,8BAA8B;QAC9B,+BAA+B;QAC/B,gCAAgC;QAChC,oCAAoC;QACpC,uCAAuC;QACvC,OAAO,EAAE,GAAG,EAAE,GAAE,CAAC;QACjB,aAAa;QACb,eAAe;QACf,sBAAsB;QACtB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AE,EAAE;YACzB,OAAO,GAAG,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,CAAC;QACD,yCAAyC;QACzC,0CAA0C;QAC1C,0CAA0C;QAC1C,KAAK;QACL,iDAAiD;QACjD,0CAA0C;QAC1C,gDAAgD;QAChD,KAAK;QACL,0DAA0D;QAC1D,0CAA0C;QAC1C,kDAAkD;QAClD,KAAK;QACL,+CAA+C;QAC/C,4BAA4B;QAC5B,KAAK;QACL,mDAAmD;QACnD,iBAAiB;QACjB,KAAK;KACL,CAAC;IACF,OAAO,GAAG,CAAC;AACZ,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
package/package.json CHANGED
@@ -1,27 +1,28 @@
1
1
  {
2
2
  "name": "@zwave-js/host",
3
- "version": "14.0.0-beta.1",
3
+ "version": "14.0.0-beta.5",
4
4
  "description": "zwave-js: Host abstractions",
5
5
  "keywords": [],
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
- "type": "commonjs",
9
+ "type": "module",
10
10
  "exports": {
11
11
  ".": {
12
12
  "@@dev": "./src/index.ts",
13
- "types": "./build/index.d.ts",
14
- "default": "./build/index.js"
13
+ "import": "./build/esm/index.js",
14
+ "require": "./build/cjs/index.js"
15
15
  },
16
16
  "./safe": {
17
17
  "@@dev": "./src/index_safe.ts",
18
- "types": "./build/index_safe.d.ts",
19
- "default": "./build/index_safe.js"
18
+ "import": "./build/esm/index_safe.js",
19
+ "require": "./build/cjs/index_safe.js"
20
20
  },
21
21
  "./package.json": "./package.json"
22
22
  },
23
23
  "files": [
24
- "build/**/*.{js,d.ts,map}"
24
+ "build/**/*.{js,cjs,mjs,d.ts,d.cts,d.mts,map}",
25
+ "build/**/package.json"
25
26
  ],
26
27
  "author": {
27
28
  "name": "AlCalzone",
@@ -43,21 +44,23 @@
43
44
  "node": ">= 18"
44
45
  },
45
46
  "scripts": {
46
- "build": "tsc -b tsconfig.build.json --pretty",
47
+ "build": "tsc -b tsconfig.build.json --pretty && yarn postbuild",
48
+ "postbuild": "yarn esm2cjs --in build/esm --out build/cjs -l error -t node18",
47
49
  "clean": "del-cli build/ \"*.tsbuildinfo\"",
48
50
  "extract-api": "yarn api-extractor run",
49
51
  "lint:ts": "eslint --cache \"src/**/*.ts\"",
50
52
  "lint:ts:fix": "yarn run lint:ts --fix"
51
53
  },
52
54
  "dependencies": {
53
- "@zwave-js/config": "14.0.0-beta.1",
54
- "@zwave-js/core": "14.0.0-beta.1",
55
- "@zwave-js/shared": "14.0.0-beta.1",
55
+ "@zwave-js/config": "14.0.0-beta.5",
56
+ "@zwave-js/core": "14.0.0-beta.5",
57
+ "@zwave-js/shared": "14.0.0-beta.5",
56
58
  "alcalzone-shared": "^4.0.8"
57
59
  },
58
60
  "devDependencies": {
61
+ "@alcalzone/esm2cjs": "^1.2.3",
59
62
  "@microsoft/api-extractor": "^7.47.9",
60
- "@types/node": "^18.19.55",
63
+ "@types/node": "^18.19.63",
61
64
  "del-cli": "^6.0.0",
62
65
  "typescript": "5.6.2"
63
66
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../src/FileSystem.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IAC1B,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,SAAS,CACR,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GAAG,UAAU,EACzB,OAAO,CAAC,EACL;QACD,QAAQ,EAAE,cAAc,CAAC;KACzB,GACC,cAAc,GACf,OAAO,CAAC,IAAI,CAAC,CAAC;IACjB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAClE,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=FileSystem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZWaveHost.d.ts","sourceRoot":"","sources":["../src/ZWaveHost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EACX,IAAI,EACJ,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,OAAO,EACP,OAAO,EACP,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,0DAA0D;AAC1D,MAAM,WAAW,OAAO;IACvB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,yCAAyC;IACzC,MAAM,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC/B,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAAC;CAC1D;AAED,MAAM,WAAW,qBAAqB;IACrC;;;OAGG;IACH,qBAAqB,CACpB,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC;CACV;AAED,MAAM,WAAW,gBAAgB;IAChC;;;;OAIG;IACH,gBAAgB,CACf,EAAE,EAAE,cAAc,EAClB,MAAM,EAAE,MAAM,EACd,aAAa,CAAC,EAAE,MAAM,GACpB,MAAM,GAAG,SAAS,CAAC;CACtB;AAED,sDAAsD;AACtD,MAAM,WAAW,gBAChB,SAAQ,QAAQ,CAAC,gBAAgB,CAAC,EAAE,eAAe,EAAE,OAAO;IAE5D,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,yDAAyD;IACzD,SAAS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sF;IACtF,kBAAkB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAC/D;AAED,mDAAmD;AACnD,MAAM,WAAW,WAAW;IAC3B,WAAW,CAAC,SAAS,SAAS,IAAI,GAAG,SAAS,GAAG,SAAS,EACzD,OAAO,EAAE,IAAI,EACb,OAAO,CAAC,EAAE,kBAAkB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC;CAC7C;AAED,6DAA6D;AAC7D,MAAM,WAAW,mBAAmB;IACnC,mBAAmB,IAAI,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACrD;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IAClC,kBAAkB,IAAI,gBAAgB,CAAC,aAAa,CAAC,CAAC;CACtD;AAED,sCAAsC;AACtC,MAAM,WAAW,wBAAwB;IACxC,wBAAwB,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAC;CACzD;AAED,MAAM,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,CAAC;AAExD,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,YAAY,CACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC;CACX;AAED,MAAM,WAAW,uBAAuB;IACvC,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ZWaveHost.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ZWaveHostOptions.d.ts","sourceRoot":"","sources":["../src/ZWaveHostOptions.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAChC,uCAAuC;IACvC,QAAQ,EAAE;QACT;;WAEG;QACH,YAAY,EAAE,MAAM,CAAC;QAErB;;WAEG;QACH,2BAA2B,EAAE,MAAM,CAAC;KACpC,CAAC;IAEF,QAAQ,EAAE;QACT,yFAAyF;QACzF,UAAU,EAAE,MAAM,CAAC;QAEnB,iFAAiF;QACjF,QAAQ,EAAE,MAAM,CAAC;QAEjB;;WAEG;QACH,aAAa,EAAE,MAAM,CAAC;KACtB,CAAC;IAEF,SAAS,CAAC,EAAE;QACX;;;WAGG;QACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC5B,CAAC;IAEF;;;;;;;;;OASG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IAEvC,WAAW,CAAC,EAAE;QACb;;;;;;;;;;;;;;;;;;;;;;;;;WAyBG;QACH,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC;KAC1D,CAAC;CACF"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=ZWaveHostOptions.js.map
package/build/index.d.ts DELETED
@@ -1,5 +0,0 @@
1
- export * from "./FileSystem";
2
- export * from "./ZWaveHost";
3
- export * from "./ZWaveHostOptions";
4
- export * from "./mocks";
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
package/build/index.js DELETED
@@ -1,22 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- /* eslint-disable @typescript-eslint/consistent-type-exports */
18
- __exportStar(require("./FileSystem"), exports);
19
- __exportStar(require("./ZWaveHost"), exports);
20
- __exportStar(require("./ZWaveHostOptions"), exports);
21
- __exportStar(require("./mocks"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA+D;AAC/D,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC;AACnC,0CAAwB"}
@@ -1,4 +0,0 @@
1
- export * from "./FileSystem";
2
- export * from "./ZWaveHost";
3
- export * from "./ZWaveHostOptions";
4
- //# sourceMappingURL=index_safe.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index_safe.d.ts","sourceRoot":"","sources":["../src/index_safe.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- /* eslint-disable @typescript-eslint/consistent-type-exports */
3
- /* @forbiddenImports external */
4
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5
- if (k2 === undefined) k2 = k;
6
- var desc = Object.getOwnPropertyDescriptor(m, k);
7
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
8
- desc = { enumerable: true, get: function() { return m[k]; } };
9
- }
10
- Object.defineProperty(o, k2, desc);
11
- }) : (function(o, m, k, k2) {
12
- if (k2 === undefined) k2 = k;
13
- o[k2] = m[k];
14
- }));
15
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- __exportStar(require("./FileSystem"), exports);
20
- __exportStar(require("./ZWaveHost"), exports);
21
- __exportStar(require("./ZWaveHostOptions"), exports);
22
- //# sourceMappingURL=index_safe.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index_safe.js","sourceRoot":"","sources":["../src/index_safe.ts"],"names":[],"mappings":";AAAA,+DAA+D;AAC/D,gCAAgC;;;;;;;;;;;;;;;;AAEhC,+CAA6B;AAC7B,8CAA4B;AAC5B,qDAAmC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../src/mocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,MAAM,EACX,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EAIf,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EACX,WAAW,EACX,eAAe,EACf,OAAO,EACP,qBAAqB,EACrB,UAAU,EACV,OAAO,EACP,OAAO,EACP,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,wBAAyB,SAAQ,OAAO,EAAE,eAAe;CAAG;AAE7E,MAAM,MAAM,gBAAgB,GACzB,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,CAAC;AAEd,MAAM,MAAM,YAAY,GACrB,gBAAgB,GAChB,MAAM,GACN,cAAc,GACd,oBAAoB,GACpB,gBAAgB,GAChB,UAAU,GACV,UAAU,GACV,UAAU,GACV,WAAW,CAAC,gBAAgB,CAAC,CAAC;AAEjC,MAAM,WAAW,WAChB,SACC,OAAO,EACP,UAAU,EACV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