@matter/nodejs-shell 0.13.1-alpha.0-20250517-99a1e848a → 0.13.1-alpha.0-20250520-d699cd56d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/MatterNode.js +3 -3
- package/dist/cjs/app.js +18 -18
- package/dist/cjs/app.js.map +1 -1
- package/dist/cjs/package.json +5 -0
- package/dist/cjs/shell/Shell.js +1 -1
- package/dist/cjs/shell/cmd_cluster-attributes.js +4 -4
- package/dist/cjs/shell/cmd_cluster-commands.js +3 -3
- package/dist/cjs/shell/cmd_cluster-events.js +3 -3
- package/dist/cjs/shell/cmd_commission.js +2 -2
- package/dist/cjs/shell/cmd_config.js +1 -1
- package/dist/cjs/shell/cmd_discover.js +2 -2
- package/dist/cjs/shell/cmd_nodes.js +2 -2
- package/dist/cjs/shell/cmd_subscribe.js +1 -1
- package/dist/cjs/util/Json.js +2 -2
- package/package.json +15 -6
- package/src/MatterNode.ts +4 -4
- package/src/app.ts +4 -4
- package/src/shell/Shell.ts +1 -1
- package/src/shell/cmd_cluster-attributes.ts +4 -4
- package/src/shell/cmd_cluster-commands.ts +3 -3
- package/src/shell/cmd_cluster-events.ts +3 -3
- package/src/shell/cmd_commission.ts +2 -2
- package/src/shell/cmd_config.ts +1 -1
- package/src/shell/cmd_discover.ts +3 -3
- package/src/shell/cmd_nodes.ts +2 -2
- package/src/shell/cmd_subscribe.ts +1 -1
- package/src/tsconfig.json +13 -1
- package/src/util/Json.ts +3 -3
package/dist/cjs/MatterNode.js
CHANGED
|
@@ -21,9 +21,9 @@ __export(MatterNode_exports, {
|
|
|
21
21
|
MatterNode: () => MatterNode
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(MatterNode_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_node = require("
|
|
26
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_node = require("#node");
|
|
26
|
+
var import_types = require("#types");
|
|
27
27
|
var import_matter = require("@project-chip/matter.js");
|
|
28
28
|
var import_node_path = require("node:path");
|
|
29
29
|
/**
|
package/dist/cjs/app.js
CHANGED
|
@@ -33,10 +33,10 @@ __export(app_exports, {
|
|
|
33
33
|
setLogLevel: () => setLogLevel
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(app_exports);
|
|
36
|
-
var
|
|
37
|
-
var import_nodejs = require("
|
|
38
|
-
var import_nodejs_ble = require("
|
|
39
|
-
var import_protocol = require("
|
|
36
|
+
var import_general = require("#general");
|
|
37
|
+
var import_nodejs = require("#nodejs");
|
|
38
|
+
var import_nodejs_ble = require("#nodejs-ble");
|
|
39
|
+
var import_protocol = require("#protocol");
|
|
40
40
|
var import_yargs = __toESM(require("yargs/yargs"));
|
|
41
41
|
var import_MatterNode = require("./MatterNode.js");
|
|
42
42
|
var import_Shell = require("./shell/Shell");
|
|
@@ -46,26 +46,26 @@ var import_Shell = require("./shell/Shell");
|
|
|
46
46
|
* SPDX-License-Identifier: Apache-2.0
|
|
47
47
|
*/
|
|
48
48
|
const PROMPT = "matter> ";
|
|
49
|
-
const logger =
|
|
50
|
-
if (process.stdin?.isTTY)
|
|
49
|
+
const logger = import_general.Logger.get("Shell");
|
|
50
|
+
if (process.stdin?.isTTY) import_general.Logger.format = import_general.LogFormat.ANSI;
|
|
51
51
|
let theNode;
|
|
52
52
|
function setLogLevel(identifier, level) {
|
|
53
|
-
let logLevel =
|
|
53
|
+
let logLevel = import_general.LogLevel.INFO;
|
|
54
54
|
switch (level) {
|
|
55
55
|
case "fatal":
|
|
56
|
-
logLevel =
|
|
56
|
+
logLevel = import_general.LogLevel.FATAL;
|
|
57
57
|
break;
|
|
58
58
|
case "error":
|
|
59
|
-
logLevel =
|
|
59
|
+
logLevel = import_general.LogLevel.ERROR;
|
|
60
60
|
break;
|
|
61
61
|
case "warn":
|
|
62
|
-
logLevel =
|
|
62
|
+
logLevel = import_general.LogLevel.WARN;
|
|
63
63
|
break;
|
|
64
64
|
case "debug":
|
|
65
|
-
logLevel =
|
|
65
|
+
logLevel = import_general.LogLevel.DEBUG;
|
|
66
66
|
break;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
import_general.Logger.setDefaultLoglevelForLogger(identifier, logLevel);
|
|
69
69
|
}
|
|
70
70
|
async function main() {
|
|
71
71
|
const yargsInstance = (0, import_yargs.default)(process.argv.slice(2)).command(
|
|
@@ -119,10 +119,10 @@ async function main() {
|
|
|
119
119
|
if (await theNode.Store.has("LogFile")) {
|
|
120
120
|
const storedLogFileName = await theNode.Store.get("LogFile");
|
|
121
121
|
if (storedLogFileName !== void 0) {
|
|
122
|
-
|
|
122
|
+
import_general.Logger.destinations.file = (0, import_general.LogDestination)({
|
|
123
123
|
write: await (0, import_nodejs.createFileLogger)(storedLogFileName),
|
|
124
|
-
level: (0,
|
|
125
|
-
format: (0,
|
|
124
|
+
level: (0, import_general.LogLevel)(await theNode.Store.get("LoglevelFile", import_general.LogLevel.DEBUG)),
|
|
125
|
+
format: (0, import_general.LogFormat)("plain")
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
}
|
|
@@ -133,9 +133,9 @@ async function main() {
|
|
|
133
133
|
}
|
|
134
134
|
if (ble) {
|
|
135
135
|
const hciId = await theNode.Store.get("BleHciId", 0);
|
|
136
|
-
import_protocol.Ble.get = (0,
|
|
136
|
+
import_protocol.Ble.get = (0, import_general.singleton)(
|
|
137
137
|
() => new import_nodejs_ble.NodeJsBle({
|
|
138
|
-
environment:
|
|
138
|
+
environment: import_general.Environment.default,
|
|
139
139
|
hciId
|
|
140
140
|
})
|
|
141
141
|
);
|
|
@@ -162,5 +162,5 @@ const sigIntHandler = () => {
|
|
|
162
162
|
exit().catch((error) => logger.error(error));
|
|
163
163
|
};
|
|
164
164
|
process.on("SIGINT", sigIntHandler);
|
|
165
|
-
|
|
165
|
+
import_general.Environment.default.runtime.add(main());
|
|
166
166
|
//# sourceMappingURL=app.js.map
|
package/dist/c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,MAAM,QAAQ,MAAM,IAAY,YAAY,CAAC;AAE3D,4BAAI,UAAM;AAAA,UACN,MACI,IAAI,4BAAU;AAAA,YACV,aAAa,2BAAY;AAAA,YACzB;AAAA,UACJ,CAAC;AAAA,QACT;AAAA,MACJ;AAEA,cAAQ,IAAI,iBAAiB,OAAO,WAAW,QAAQ,KAAK,MAAM,SAAS,SAAS,MAAM;AAC1F,eAAS,MAAM,QAAQ,eAAe;AAAA,IAC1C;AAAA,EACJ,EACC,QAAQ,KAAK,EACb,WAAW,OAAO;AACvB,QAAM,cAAc,KAAK,cAAc,cAAc,CAAC,EAAE,WAAW;AACvE;AAEA,QAAQ,GAAG,WAAW,SAAU,SAAS;AACrC,UAAQ,IAAI,wBAAwB,OAAO,EAAE;AAE7C,UAAQ,SAAS;AAAA,IACb,KAAK;AACD,WAAK,EAAE,MAAM,WAAS,OAAO,MAAM,KAAK,CAAC;AAAA,EACjD;AACJ,CAAC;AAED,eAAsB,KAAK,OAAO,GAAG;AACjC,UAAQ,IAAI,UAAU,aAAa;AACnC,UAAQ,KAAK,QAAQ;AACrB,UAAQ,KAAK,IAAI;AACrB;AAEA,MAAM,gBAAgB,MAAM;AAExB,OAAK,EAAE,MAAM,WAAS,OAAO,MAAM,KAAK,CAAC;AAC7C;AAEA,QAAQ,GAAG,UAAU,aAAa;AAElC,2BAAY,QAAQ,QAAQ,IAAI,KAAK,CAAC;",
|
|
5
5
|
"names": ["yargs"]
|
|
6
6
|
}
|
package/dist/cjs/package.json
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
"type": "commonjs",
|
|
3
3
|
"imports": {
|
|
4
4
|
"#general": "@matter/general",
|
|
5
|
+
"#model": "@matter/model",
|
|
6
|
+
"#node": "@matter/node",
|
|
7
|
+
"#nodejs": "@matter/nodejs",
|
|
8
|
+
"#nodejs-ble": "@matter/nodejs-ble",
|
|
9
|
+
"#protocol": "@matter/protocol",
|
|
5
10
|
"#types": "@matter/types"
|
|
6
11
|
}
|
|
7
12
|
}
|
package/dist/cjs/shell/Shell.js
CHANGED
|
@@ -31,7 +31,7 @@ __export(Shell_exports, {
|
|
|
31
31
|
Shell: () => Shell
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(Shell_exports);
|
|
34
|
-
var import_general = require("
|
|
34
|
+
var import_general = require("#general");
|
|
35
35
|
var import_node_fs = require("node:fs");
|
|
36
36
|
var import_node_readline = __toESM(require("node:readline"));
|
|
37
37
|
var import_yargs = __toESM(require("yargs/yargs"));
|
|
@@ -21,10 +21,10 @@ __export(cmd_cluster_attributes_exports, {
|
|
|
21
21
|
default: () => cmdAttributes
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_cluster_attributes_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_model = require("
|
|
26
|
-
var import_protocol = require("
|
|
27
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_model = require("#model");
|
|
26
|
+
var import_protocol = require("#protocol");
|
|
27
|
+
var import_types = require("#types");
|
|
28
28
|
var import_Json = require("../util/Json");
|
|
29
29
|
var import_String = require("../util/String");
|
|
30
30
|
/**
|
|
@@ -21,9 +21,9 @@ __export(cmd_cluster_commands_exports, {
|
|
|
21
21
|
default: () => cmdCommands
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_cluster_commands_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_model = require("
|
|
26
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_model = require("#model");
|
|
26
|
+
var import_types = require("#types");
|
|
27
27
|
var import_Json = require("../util/Json");
|
|
28
28
|
var import_String = require("../util/String");
|
|
29
29
|
/**
|
|
@@ -21,9 +21,9 @@ __export(cmd_cluster_events_exports, {
|
|
|
21
21
|
default: () => cmdEvents
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_cluster_events_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_model = require("
|
|
26
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_model = require("#model");
|
|
26
|
+
var import_types = require("#types");
|
|
27
27
|
var import_String = require("../util/String");
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
@@ -21,8 +21,8 @@ __export(cmd_commission_exports, {
|
|
|
21
21
|
default: () => commands
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_commission_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_types = require("#types");
|
|
26
26
|
var import_clusters = require("@matter/types/clusters");
|
|
27
27
|
var import_cmd_nodes = require("./cmd_nodes");
|
|
28
28
|
/**
|
|
@@ -21,7 +21,7 @@ __export(cmd_config_exports, {
|
|
|
21
21
|
default: () => commands
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_config_exports);
|
|
24
|
-
var import_general = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
25
|
var import_app = require("../app");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
@@ -21,8 +21,8 @@ __export(cmd_discover_exports, {
|
|
|
21
21
|
default: () => commands
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_discover_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_types = require("#types");
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2022-2025 Matter.js Authors
|
|
@@ -22,8 +22,8 @@ __export(cmd_nodes_exports, {
|
|
|
22
22
|
default: () => commands
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(cmd_nodes_exports);
|
|
25
|
-
var import_general = require("
|
|
26
|
-
var import_types = require("
|
|
25
|
+
var import_general = require("#general");
|
|
26
|
+
var import_types = require("#types");
|
|
27
27
|
var import_device = require("@project-chip/matter.js/device");
|
|
28
28
|
/**
|
|
29
29
|
* @license
|
|
@@ -21,7 +21,7 @@ __export(cmd_subscribe_exports, {
|
|
|
21
21
|
default: () => commands
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(cmd_subscribe_exports);
|
|
24
|
-
var import_general = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
25
|
/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2022-2025 Matter.js Authors
|
package/dist/cjs/util/Json.js
CHANGED
|
@@ -21,8 +21,8 @@ __export(Json_exports, {
|
|
|
21
21
|
convertJsonDataWithModel: () => convertJsonDataWithModel
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(Json_exports);
|
|
24
|
-
var import_general = require("
|
|
25
|
-
var import_types = require("
|
|
24
|
+
var import_general = require("#general");
|
|
25
|
+
var import_types = require("#types");
|
|
26
26
|
var import_String = require("./String");
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matter/nodejs-shell",
|
|
3
|
-
"version": "0.13.1-alpha.0-
|
|
3
|
+
"version": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
4
4
|
"description": "Shell app for Matter controller",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iot",
|
|
@@ -33,14 +33,23 @@
|
|
|
33
33
|
},
|
|
34
34
|
"imports": {
|
|
35
35
|
"#general": "@matter/general",
|
|
36
|
+
"#model": "@matter/model",
|
|
37
|
+
"#node": "@matter/node",
|
|
38
|
+
"#nodejs": "@matter/nodejs",
|
|
39
|
+
"#nodejs-ble": "@matter/nodejs-ble",
|
|
40
|
+
"#protocol": "@matter/protocol",
|
|
36
41
|
"#types": "@matter/types"
|
|
37
42
|
},
|
|
38
43
|
"dependencies": {
|
|
39
|
-
"@matter/general": "0.13.1-alpha.0-
|
|
40
|
-
"@matter/
|
|
41
|
-
"@matter/
|
|
42
|
-
"@matter/
|
|
43
|
-
"@
|
|
44
|
+
"@matter/general": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
45
|
+
"@matter/model": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
46
|
+
"@matter/node": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
47
|
+
"@matter/nodejs": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
48
|
+
"@matter/nodejs-ble": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
49
|
+
"@matter/protocol": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
50
|
+
"@matter/tools": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
51
|
+
"@matter/types": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
52
|
+
"@project-chip/matter.js": "0.13.1-alpha.0-20250520-d699cd56d",
|
|
44
53
|
"yargs": "^17.7.2"
|
|
45
54
|
},
|
|
46
55
|
"engines": {
|
package/src/MatterNode.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
// Include this first to auto-register Crypto, Network and Time Node.js implementations
|
|
8
|
-
import { Environment, Logger, StorageContext, StorageService } from "
|
|
9
|
-
import { ControllerStore } from "
|
|
10
|
-
import { EndpointInterface } from "
|
|
11
|
-
import { NodeId } from "
|
|
8
|
+
import { Environment, Logger, StorageContext, StorageService } from "#general";
|
|
9
|
+
import { ControllerStore } from "#node";
|
|
10
|
+
import { EndpointInterface } from "#protocol";
|
|
11
|
+
import { NodeId } from "#types";
|
|
12
12
|
import { CommissioningController } from "@project-chip/matter.js";
|
|
13
13
|
import { CommissioningControllerNodeOptions, PairedNode } from "@project-chip/matter.js/device";
|
|
14
14
|
import { join } from "node:path";
|
package/src/app.ts
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* SPDX-License-Identifier: Apache-2.0
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Environment, LogDestination, LogFormat, Logger, LogLevel, singleton } from "
|
|
9
|
-
import { createFileLogger } from "
|
|
10
|
-
import { NodeJsBle } from "
|
|
11
|
-
import { Ble } from "
|
|
8
|
+
import { Environment, LogDestination, LogFormat, Logger, LogLevel, singleton } from "#general";
|
|
9
|
+
import { createFileLogger } from "#nodejs";
|
|
10
|
+
import { NodeJsBle } from "#nodejs-ble";
|
|
11
|
+
import { Ble } from "#protocol";
|
|
12
12
|
import yargs from "yargs/yargs";
|
|
13
13
|
import { MatterNode } from "./MatterNode.js";
|
|
14
14
|
import { Shell } from "./shell/Shell";
|
package/src/shell/Shell.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { MatterError } from "
|
|
7
|
+
import { MatterError } from "#general";
|
|
8
8
|
import { createWriteStream, readFileSync } from "node:fs";
|
|
9
9
|
import readline from "node:readline";
|
|
10
10
|
import yargs from "yargs/yargs";
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Diagnostic } from "
|
|
8
|
-
import { AttributeModel, ClusterModel, MatterModel } from "
|
|
9
|
-
import { SupportedAttributeClient } from "
|
|
10
|
-
import { AttributeId, ClusterId, EndpointNumber, ValidationError } from "
|
|
7
|
+
import { Diagnostic } from "#general";
|
|
8
|
+
import { AttributeModel, ClusterModel, MatterModel } from "#model";
|
|
9
|
+
import { SupportedAttributeClient } from "#protocol";
|
|
10
|
+
import { AttributeId, ClusterId, EndpointNumber, ValidationError } from "#types";
|
|
11
11
|
import type { Argv } from "yargs";
|
|
12
12
|
import { MatterNode } from "../MatterNode";
|
|
13
13
|
import { convertJsonDataWithModel } from "../util/Json";
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Diagnostic } from "
|
|
8
|
-
import { ClusterModel, CommandModel, MatterModel } from "
|
|
9
|
-
import { ClusterId, ValidationError } from "
|
|
7
|
+
import { Diagnostic } from "#general";
|
|
8
|
+
import { ClusterModel, CommandModel, MatterModel } from "#model";
|
|
9
|
+
import { ClusterId, ValidationError } from "#types";
|
|
10
10
|
import type { Argv } from "yargs";
|
|
11
11
|
import { MatterNode } from "../MatterNode";
|
|
12
12
|
import { convertJsonDataWithModel } from "../util/Json";
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Diagnostic } from "
|
|
8
|
-
import { ClusterModel, EventModel, MatterModel } from "
|
|
9
|
-
import { ClusterId } from "
|
|
7
|
+
import { Diagnostic } from "#general";
|
|
8
|
+
import { ClusterModel, EventModel, MatterModel } from "#model";
|
|
9
|
+
import { ClusterId } from "#types";
|
|
10
10
|
import type { Argv } from "yargs";
|
|
11
11
|
import { MatterNode } from "../MatterNode";
|
|
12
12
|
import { camelize } from "../util/String";
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Diagnostic, MatterError } from "
|
|
8
|
-
import { DiscoveryCapabilitiesSchema, ManualPairingCodeCodec, NodeId, QrCode, QrPairingCodeCodec } from "
|
|
7
|
+
import { Diagnostic, MatterError } from "#general";
|
|
8
|
+
import { DiscoveryCapabilitiesSchema, ManualPairingCodeCodec, NodeId, QrCode, QrPairingCodeCodec } from "#types";
|
|
9
9
|
import { BasicInformationCluster, DescriptorCluster, GeneralCommissioning } from "@matter/types/clusters";
|
|
10
10
|
import { NodeCommissioningOptions } from "@project-chip/matter.js";
|
|
11
11
|
import type { Argv } from "yargs";
|
package/src/shell/cmd_config.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Diagnostic } from "
|
|
8
|
-
import { CommissionableDeviceIdentifiers } from "
|
|
9
|
-
import { ManualPairingCodeCodec, VendorId } from "
|
|
7
|
+
import { Diagnostic } from "#general";
|
|
8
|
+
import { CommissionableDeviceIdentifiers } from "#protocol";
|
|
9
|
+
import { ManualPairingCodeCodec, VendorId } from "#types";
|
|
10
10
|
import type { Argv } from "yargs";
|
|
11
11
|
import { MatterNode } from "../MatterNode";
|
|
12
12
|
|
package/src/shell/cmd_nodes.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { capitalize, decamelize, Diagnostic } from "
|
|
8
|
-
import { NodeId } from "
|
|
7
|
+
import { capitalize, decamelize, Diagnostic } from "#general";
|
|
8
|
+
import { NodeId } from "#types";
|
|
9
9
|
import { CommissioningControllerNodeOptions, NodeStateInformation } from "@project-chip/matter.js/device";
|
|
10
10
|
import type { Argv } from "yargs";
|
|
11
11
|
import { MatterNode } from "../MatterNode";
|
package/src/tsconfig.json
CHANGED
|
@@ -12,14 +12,26 @@
|
|
|
12
12
|
{
|
|
13
13
|
"path": "../../matter.js/src"
|
|
14
14
|
},
|
|
15
|
+
{
|
|
16
|
+
"path": "../../model/src"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"path": "../../node/src"
|
|
20
|
+
},
|
|
15
21
|
{
|
|
16
22
|
"path": "../../nodejs-ble/src"
|
|
17
23
|
},
|
|
18
24
|
{
|
|
19
25
|
"path": "../../nodejs/src"
|
|
20
26
|
},
|
|
27
|
+
{
|
|
28
|
+
"path": "../../protocol/src"
|
|
29
|
+
},
|
|
21
30
|
{
|
|
22
31
|
"path": "../../tools/src"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "../../types/src"
|
|
23
35
|
}
|
|
24
36
|
]
|
|
25
|
-
}
|
|
37
|
+
}
|
package/src/util/Json.ts
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { Bytes } from "
|
|
8
|
-
import { ValueModel } from "
|
|
9
|
-
import { ValidationDatatypeMismatchError } from "
|
|
7
|
+
import { Bytes } from "#general";
|
|
8
|
+
import { ValueModel } from "#model";
|
|
9
|
+
import { ValidationDatatypeMismatchError } from "#types";
|
|
10
10
|
import { camelize } from "./String";
|
|
11
11
|
|
|
12
12
|
export function convertJsonDataWithModel(model: ValueModel, data: any): any {
|