@matter/nodejs-shell 0.17.0-alpha.0-20260507-059f7763b → 0.17.0-alpha.0-20260508-29ff5ae9e
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/package.json +9 -9
- package/src/MatterNode.ts +13 -12
- package/src/shell/cmd_cert.ts +34 -0
- package/src/shell/cmd_commission.ts +24 -1
- package/src/shell/cmd_config.ts +140 -0
- package/src/shell/cmd_nodes.ts +1 -3
- package/dist/esm/MatterNode.js +0 -189
- package/dist/esm/MatterNode.js.map +0 -6
- package/dist/esm/app.js +0 -167
- package/dist/esm/app.js.map +0 -6
- package/dist/esm/package.json +0 -3
- package/dist/esm/shell/Shell.js +0 -201
- package/dist/esm/shell/Shell.js.map +0 -6
- package/dist/esm/shell/cmd_cert.js +0 -134
- package/dist/esm/shell/cmd_cert.js.map +0 -6
- package/dist/esm/shell/cmd_cluster-attributes.js +0 -295
- package/dist/esm/shell/cmd_cluster-attributes.js.map +0 -6
- package/dist/esm/shell/cmd_cluster-commands.js +0 -137
- package/dist/esm/shell/cmd_cluster-commands.js.map +0 -6
- package/dist/esm/shell/cmd_cluster-events.js +0 -77
- package/dist/esm/shell/cmd_cluster-events.js.map +0 -6
- package/dist/esm/shell/cmd_commission.js +0 -269
- package/dist/esm/shell/cmd_commission.js.map +0 -6
- package/dist/esm/shell/cmd_config.js +0 -462
- package/dist/esm/shell/cmd_config.js.map +0 -6
- package/dist/esm/shell/cmd_dcl.js +0 -178
- package/dist/esm/shell/cmd_dcl.js.map +0 -6
- package/dist/esm/shell/cmd_discover.js +0 -115
- package/dist/esm/shell/cmd_discover.js.map +0 -6
- package/dist/esm/shell/cmd_identify.js +0 -46
- package/dist/esm/shell/cmd_identify.js.map +0 -6
- package/dist/esm/shell/cmd_nodes.js +0 -688
- package/dist/esm/shell/cmd_nodes.js.map +0 -6
- package/dist/esm/shell/cmd_ota.js +0 -493
- package/dist/esm/shell/cmd_ota.js.map +0 -6
- package/dist/esm/shell/cmd_session.js +0 -23
- package/dist/esm/shell/cmd_session.js.map +0 -6
- package/dist/esm/shell/cmd_subscribe.js +0 -39
- package/dist/esm/shell/cmd_subscribe.js.map +0 -6
- package/dist/esm/shell/cmd_tlv.js +0 -167
- package/dist/esm/shell/cmd_tlv.js.map +0 -6
- package/dist/esm/shell/cmd_vendor.js +0 -135
- package/dist/esm/shell/cmd_vendor.js.map +0 -6
- package/dist/esm/util/CommandlineParser.js +0 -87
- package/dist/esm/util/CommandlineParser.js.map +0 -6
- package/dist/esm/util/Json.js +0 -45
- package/dist/esm/util/Json.js.map +0 -6
- package/dist/esm/web_plumbing.js +0 -140
- package/dist/esm/web_plumbing.js.map +0 -6
package/dist/esm/app.js
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright 2022-2026 Matter.js Authors
|
|
5
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
-
*/
|
|
7
|
-
import { Environment, LogDestination, LogFormat, Logger, LogLevel } from "@matter/general";
|
|
8
|
-
import { createFileLogger } from "@matter/nodejs";
|
|
9
|
-
import "@matter/nodejs-ble";
|
|
10
|
-
import yargs from "yargs";
|
|
11
|
-
import { hideBin } from "yargs/helpers";
|
|
12
|
-
import { MatterNode } from "./MatterNode.js";
|
|
13
|
-
import { Shell } from "./shell/Shell.js";
|
|
14
|
-
import { initializeWebPlumbing } from "./web_plumbing.js";
|
|
15
|
-
const PROMPT = "matter> ";
|
|
16
|
-
const DEFAULT_WEBSOCKET_PORT = 3e3;
|
|
17
|
-
const logger = Logger.get("Shell");
|
|
18
|
-
let theShell;
|
|
19
|
-
if (process.stdin?.isTTY) Logger.format = LogFormat.ANSI;
|
|
20
|
-
let theNode;
|
|
21
|
-
function setLogLevel(identifier, level) {
|
|
22
|
-
let logLevel = LogLevel.INFO;
|
|
23
|
-
switch (level) {
|
|
24
|
-
case "fatal":
|
|
25
|
-
logLevel = LogLevel.FATAL;
|
|
26
|
-
break;
|
|
27
|
-
case "error":
|
|
28
|
-
logLevel = LogLevel.ERROR;
|
|
29
|
-
break;
|
|
30
|
-
case "warn":
|
|
31
|
-
logLevel = LogLevel.WARN;
|
|
32
|
-
break;
|
|
33
|
-
case "debug":
|
|
34
|
-
logLevel = LogLevel.DEBUG;
|
|
35
|
-
break;
|
|
36
|
-
}
|
|
37
|
-
Logger.setDefaultLoglevelForLogger(identifier, logLevel);
|
|
38
|
-
}
|
|
39
|
-
async function main() {
|
|
40
|
-
const yargsInstance = yargs().command(
|
|
41
|
-
"* [node-num] [node-type]",
|
|
42
|
-
"Matter Node Shell",
|
|
43
|
-
(yargs2) => {
|
|
44
|
-
return yargs2.positional("node-num", {
|
|
45
|
-
describe: "Node number for storage",
|
|
46
|
-
default: 0,
|
|
47
|
-
type: "number"
|
|
48
|
-
}).positional("node-type", {
|
|
49
|
-
describe: "Type of the node",
|
|
50
|
-
choices: ["controller"],
|
|
51
|
-
default: "controller",
|
|
52
|
-
type: "string"
|
|
53
|
-
}).options({
|
|
54
|
-
"ble-enable": {
|
|
55
|
-
description: "Enable BLE support.",
|
|
56
|
-
type: "boolean",
|
|
57
|
-
default: false,
|
|
58
|
-
alias: "b"
|
|
59
|
-
},
|
|
60
|
-
bleHciId: {
|
|
61
|
-
description: "HCI ID of the BLE adapter to use. The provided value will be persisted for future runs.",
|
|
62
|
-
type: "number",
|
|
63
|
-
default: 0
|
|
64
|
-
},
|
|
65
|
-
factoryReset: {
|
|
66
|
-
description: "Factory-Reset storage of this node.",
|
|
67
|
-
default: false,
|
|
68
|
-
type: "boolean"
|
|
69
|
-
},
|
|
70
|
-
netInterface: {
|
|
71
|
-
description: "Network interface to use for MDNS announcements and scanning.",
|
|
72
|
-
type: "string",
|
|
73
|
-
default: void 0
|
|
74
|
-
},
|
|
75
|
-
logfile: {
|
|
76
|
-
description: "Logfile to use to log to. By Default debug loglevel is logged to the file. The provided value will be persisted for future runs.",
|
|
77
|
-
type: "string",
|
|
78
|
-
default: void 0
|
|
79
|
-
},
|
|
80
|
-
webSocketInterface: {
|
|
81
|
-
description: "Enable WebSocket interface",
|
|
82
|
-
type: "boolean",
|
|
83
|
-
default: false
|
|
84
|
-
},
|
|
85
|
-
webSocketPort: {
|
|
86
|
-
description: "WebSocket and HTTP server port",
|
|
87
|
-
type: "number",
|
|
88
|
-
default: DEFAULT_WEBSOCKET_PORT
|
|
89
|
-
},
|
|
90
|
-
webServer: {
|
|
91
|
-
description: "Enable Web server when using WebSocket interface",
|
|
92
|
-
type: "boolean",
|
|
93
|
-
default: false
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
},
|
|
97
|
-
async (argv) => {
|
|
98
|
-
if (argv.help) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const {
|
|
102
|
-
nodeNum,
|
|
103
|
-
bleEnable,
|
|
104
|
-
bleHciId,
|
|
105
|
-
nodeType,
|
|
106
|
-
factoryReset,
|
|
107
|
-
netInterface,
|
|
108
|
-
logfile,
|
|
109
|
-
webSocketInterface,
|
|
110
|
-
webSocketPort,
|
|
111
|
-
webServer
|
|
112
|
-
} = argv;
|
|
113
|
-
theNode = new MatterNode(nodeNum, netInterface);
|
|
114
|
-
await theNode.initialize(factoryReset);
|
|
115
|
-
if (logfile !== void 0) {
|
|
116
|
-
await theNode.Store.set("LogFile", logfile);
|
|
117
|
-
}
|
|
118
|
-
if (await theNode.Store.has("LogFile")) {
|
|
119
|
-
const storedLogFileName = await theNode.Store.get("LogFile");
|
|
120
|
-
if (storedLogFileName !== void 0) {
|
|
121
|
-
Logger.destinations.file = LogDestination({
|
|
122
|
-
write: await createFileLogger(storedLogFileName),
|
|
123
|
-
level: LogLevel(await theNode.Store.get("LoglevelFile", LogLevel.DEBUG)),
|
|
124
|
-
format: LogFormat("plain")
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
setLogLevel("default", await theNode.Store.get("LogLevel", "info"));
|
|
129
|
-
if (webSocketInterface) {
|
|
130
|
-
Logger.format = LogFormat.PLAIN;
|
|
131
|
-
initializeWebPlumbing(theNode, nodeNum, webSocketPort, webServer);
|
|
132
|
-
} else {
|
|
133
|
-
theShell = new Shell(theNode, nodeNum, PROMPT, process.stdin, process.stdout);
|
|
134
|
-
}
|
|
135
|
-
if (bleEnable) {
|
|
136
|
-
Environment.default.vars.set("ble.enable", true);
|
|
137
|
-
}
|
|
138
|
-
if (bleHciId !== void 0) {
|
|
139
|
-
Environment.default.vars.set("ble.hci.id", bleHciId);
|
|
140
|
-
}
|
|
141
|
-
console.log(`Started Node #${nodeNum} (Type: ${nodeType}) ${bleEnable ? "with" : "without"} BLE`);
|
|
142
|
-
if (!webSocketInterface) {
|
|
143
|
-
theShell.start(theNode.storageLocation);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
).version(false).scriptName("shell").strict();
|
|
147
|
-
await yargsInstance.wrap(yargsInstance.terminalWidth()).parse(hideBin(process.argv));
|
|
148
|
-
}
|
|
149
|
-
process.on("message", function(message) {
|
|
150
|
-
console.log(`Message to shell.ts: ${message}`);
|
|
151
|
-
switch (message) {
|
|
152
|
-
case "exit":
|
|
153
|
-
exit().catch((error) => logger.error(error));
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
async function exit(code = 0) {
|
|
157
|
-
process.exitCode = code;
|
|
158
|
-
Environment.default.runtime.cancel();
|
|
159
|
-
}
|
|
160
|
-
const runtime = Environment.default.runtime;
|
|
161
|
-
runtime.add(main());
|
|
162
|
-
void runtime.inactive.then(() => process.exit(process.exitCode ?? 0));
|
|
163
|
-
export {
|
|
164
|
-
exit,
|
|
165
|
-
setLogLevel
|
|
166
|
-
};
|
|
167
|
-
//# sourceMappingURL=app.js.map
|
package/dist/esm/app.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/app.ts"],
|
|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License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Logger, MatterError } from "@matter/general";
|
|
7
|
-
import { createWriteStream, readFileSync } from "node:fs";
|
|
8
|
-
import readline from "node:readline";
|
|
9
|
-
import { inspect } from "node:util";
|
|
10
|
-
import yargs from "yargs/yargs";
|
|
11
|
-
import { exit } from "../app.js";
|
|
12
|
-
import { commandlineParser } from "../util/CommandlineParser.js";
|
|
13
|
-
import cmdCert from "./cmd_cert.js";
|
|
14
|
-
import cmdAttributes from "./cmd_cluster-attributes.js";
|
|
15
|
-
import cmdCommands from "./cmd_cluster-commands.js";
|
|
16
|
-
import cmdEvents from "./cmd_cluster-events.js";
|
|
17
|
-
import cmdCommission from "./cmd_commission.js";
|
|
18
|
-
import cmdConfig from "./cmd_config.js";
|
|
19
|
-
import cmdDcl from "./cmd_dcl.js";
|
|
20
|
-
import cmdDiscover from "./cmd_discover.js";
|
|
21
|
-
import cmdIdentify from "./cmd_identify.js";
|
|
22
|
-
import cmdNodes from "./cmd_nodes.js";
|
|
23
|
-
import cmdOta from "./cmd_ota.js";
|
|
24
|
-
import cmdSession from "./cmd_session.js";
|
|
25
|
-
import cmdSubscribe from "./cmd_subscribe.js";
|
|
26
|
-
import cmdTlv from "./cmd_tlv.js";
|
|
27
|
-
import cmdVendor from "./cmd_vendor.js";
|
|
28
|
-
const logger = Logger.get("Shell");
|
|
29
|
-
const MAX_HISTORY_SIZE = 1e3;
|
|
30
|
-
function exitCommand() {
|
|
31
|
-
return {
|
|
32
|
-
command: "exit",
|
|
33
|
-
describe: "Exit",
|
|
34
|
-
builder: {},
|
|
35
|
-
handler: async () => {
|
|
36
|
-
console.log("Goodbye.");
|
|
37
|
-
await exit();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
class Shell {
|
|
42
|
-
/**
|
|
43
|
-
* Construct a new Shell object.
|
|
44
|
-
*/
|
|
45
|
-
constructor(theNode, nodeNum, prompt, input, output) {
|
|
46
|
-
this.theNode = theNode;
|
|
47
|
-
this.nodeNum = nodeNum;
|
|
48
|
-
this.prompt = prompt;
|
|
49
|
-
this.input = input;
|
|
50
|
-
this.output = output;
|
|
51
|
-
}
|
|
52
|
-
theNode;
|
|
53
|
-
nodeNum;
|
|
54
|
-
prompt;
|
|
55
|
-
input;
|
|
56
|
-
output;
|
|
57
|
-
readline;
|
|
58
|
-
writeStream;
|
|
59
|
-
start(storageBase) {
|
|
60
|
-
const history = new Array();
|
|
61
|
-
if (storageBase !== void 0) {
|
|
62
|
-
const fileName = `${storageBase}.history`;
|
|
63
|
-
try {
|
|
64
|
-
const historyData = readFileSync(fileName, "utf8");
|
|
65
|
-
history.push(
|
|
66
|
-
...historyData.split("\n").map((line) => line.trim()).filter((line) => line.length)
|
|
67
|
-
);
|
|
68
|
-
history.splice(0, -MAX_HISTORY_SIZE);
|
|
69
|
-
console.log(`Loaded ${history.length} history entries from ${fileName}`);
|
|
70
|
-
} catch (e) {
|
|
71
|
-
if (e instanceof Error && "code" in e && e.code !== "ENOENT") {
|
|
72
|
-
process.stderr.write(`Error happened during history file read: ${e}
|
|
73
|
-
`);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
try {
|
|
77
|
-
this.writeStream = createWriteStream(fileName, { flags: "w" });
|
|
78
|
-
this.writeStream.write(`${history.join("\n")}
|
|
79
|
-
`);
|
|
80
|
-
} catch (e) {
|
|
81
|
-
process.stderr.write(`Error happened during history file write: ${e}
|
|
82
|
-
`);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
this.readline = readline.createInterface({
|
|
86
|
-
input: this.input,
|
|
87
|
-
output: this.output,
|
|
88
|
-
terminal: this.input === process.stdin && this.output === process.stdout,
|
|
89
|
-
prompt: this.prompt,
|
|
90
|
-
history: history.reverse(),
|
|
91
|
-
historySize: MAX_HISTORY_SIZE
|
|
92
|
-
});
|
|
93
|
-
this.readline.on("line", (cmd) => {
|
|
94
|
-
cmd = cmd.trim();
|
|
95
|
-
this.onReadLine(cmd).then((result) => result && cmd.length && this.writeStream?.write(`${cmd}
|
|
96
|
-
`)).catch((e) => {
|
|
97
|
-
process.stderr.write(`Read error: ${e}
|
|
98
|
-
`);
|
|
99
|
-
process.exit(1);
|
|
100
|
-
});
|
|
101
|
-
}).on("SIGINT", () => {
|
|
102
|
-
console.log("\nGoodbye.");
|
|
103
|
-
try {
|
|
104
|
-
this.writeStream?.end();
|
|
105
|
-
} catch (e) {
|
|
106
|
-
process.stderr.write(`Error happened during history file write: ${e}
|
|
107
|
-
`);
|
|
108
|
-
}
|
|
109
|
-
exit().catch((e) => {
|
|
110
|
-
process.stderr.write(`Exit error: ${e}
|
|
111
|
-
`);
|
|
112
|
-
process.exit(1);
|
|
113
|
-
});
|
|
114
|
-
}).on("close", () => {
|
|
115
|
-
try {
|
|
116
|
-
this.writeStream?.end();
|
|
117
|
-
} catch (e) {
|
|
118
|
-
process.stderr.write(`Error happened during history file write: ${e}
|
|
119
|
-
`);
|
|
120
|
-
}
|
|
121
|
-
if (this.input === process.stdin && this.output === process.stdout) {
|
|
122
|
-
exit().catch((e) => {
|
|
123
|
-
process.stderr.write(`Close error: ${e}
|
|
124
|
-
`);
|
|
125
|
-
process.exit(1);
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
});
|
|
129
|
-
this.readline.prompt();
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Method to process a line of raw cli text input.
|
|
133
|
-
*
|
|
134
|
-
* @param {string} line
|
|
135
|
-
*/
|
|
136
|
-
async onReadLine(line) {
|
|
137
|
-
let result = true;
|
|
138
|
-
if (line) {
|
|
139
|
-
let args;
|
|
140
|
-
try {
|
|
141
|
-
args = commandlineParser(line);
|
|
142
|
-
} catch (error) {
|
|
143
|
-
process.stderr.write(`Error happened during command parsing: ${error}
|
|
144
|
-
`);
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
const yargsInstance = yargs(args).command([
|
|
148
|
-
cmdCommission(this.theNode),
|
|
149
|
-
cmdConfig(this.theNode),
|
|
150
|
-
cmdSession(this.theNode),
|
|
151
|
-
cmdNodes(this.theNode),
|
|
152
|
-
cmdSubscribe(this.theNode),
|
|
153
|
-
cmdIdentify(this.theNode),
|
|
154
|
-
cmdDiscover(this.theNode),
|
|
155
|
-
cmdAttributes(this.theNode),
|
|
156
|
-
cmdEvents(this.theNode),
|
|
157
|
-
cmdCommands(this.theNode),
|
|
158
|
-
cmdOta(this.theNode),
|
|
159
|
-
cmdCert(this.theNode),
|
|
160
|
-
cmdVendor(this.theNode),
|
|
161
|
-
cmdTlv(),
|
|
162
|
-
cmdDcl(),
|
|
163
|
-
exitCommand()
|
|
164
|
-
]).command({
|
|
165
|
-
command: "*",
|
|
166
|
-
handler: (argv) => {
|
|
167
|
-
argv.unhandled = true;
|
|
168
|
-
}
|
|
169
|
-
}).exitProcess(false).version(false).help("help").scriptName("").strictCommands(false).strictOptions(false).fail(false).strict(false);
|
|
170
|
-
try {
|
|
171
|
-
const argv = await yargsInstance.wrap(yargsInstance.terminalWidth()).parseAsync();
|
|
172
|
-
if (argv.unhandled) {
|
|
173
|
-
process.stderr.write(`Unknown command: ${line}
|
|
174
|
-
`);
|
|
175
|
-
yargsInstance.showHelp();
|
|
176
|
-
} else {
|
|
177
|
-
console.log("Done.");
|
|
178
|
-
}
|
|
179
|
-
} catch (error) {
|
|
180
|
-
logger.error(`Error during command execution:`, error);
|
|
181
|
-
process.stderr.write(`Error happened during command: ${error}
|
|
182
|
-
`);
|
|
183
|
-
if (error instanceof Error && error.stack) {
|
|
184
|
-
const errorText = inspect(error, { depth: 10 });
|
|
185
|
-
process.stderr.write(errorText);
|
|
186
|
-
process.stderr.write("\n");
|
|
187
|
-
}
|
|
188
|
-
if (!(error instanceof MatterError)) {
|
|
189
|
-
yargsInstance.showHelp();
|
|
190
|
-
result = false;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
this.readline?.prompt();
|
|
195
|
-
return result;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
export {
|
|
199
|
-
Shell
|
|
200
|
-
};
|
|
201
|
-
//# sourceMappingURL=Shell.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/shell/Shell.ts"],
|
|
4
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,QAAQ,mBAAmB;AACpC,SAAS,mBAAmB,oBAAoB;AAChD,OAAO,cAAc;AAErB,SAAS,eAAe;AACxB,OAAO,WAAW;AAElB,SAAS,YAAY;AACrB,SAAS,yBAAyB;AAClC,OAAO,aAAa;AACpB,OAAO,mBAAmB;AAC1B,OAAO,iBAAiB;AACxB,OAAO,eAAe;AACtB,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,OAAO,YAAY;AACnB,OAAO,iBAAiB;AACxB,OAAO,iBAAiB;AACxB,OAAO,cAAc;AACrB,OAAO,YAAY;AACnB,OAAO,gBAAgB;AACvB,OAAO,kBAAkB;AACzB,OAAO,YAAY;AACnB,OAAO,eAAe;AAEtB,MAAM,SAAS,OAAO,IAAI,OAAO;AAEjC,MAAM,mBAAmB;AAEzB,SAAS,cAAc;AACnB,SAAO;AAAA,IACH,SAAS;AAAA,IACT,UAAU;AAAA,IACV,SAAS,CAAC;AAAA,IACV,SAAS,YAAY;AACjB,cAAQ,IAAI,UAAU;AACtB,YAAM,KAAK;AAAA,IACf;AAAA,EACJ;AACJ;AAKO,MAAM,MAAM;AAAA;AAAA;AAAA;AAAA,EAOf,YACW,SACA,SACA,QACA,OACA,QACT;AALS;AACA;AACA;AACA;AACA;AAAA,EACR;AAAA,EALQ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAXX;AAAA,EACA;AAAA,EAaA,MAAM,aAAsB;AACxB,UAAM,UAAU,IAAI,MAAc;AAClC,QAAI,gBAAgB,QAAW;AAC3B,YAAM,WAAW,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copyright 2022-2026 Matter.js Authors
|
|
4
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
-
*/
|
|
6
|
-
import { Diagnostic } from "@matter/general";
|
|
7
|
-
function commands(theNode) {
|
|
8
|
-
return {
|
|
9
|
-
command: "cert",
|
|
10
|
-
describe: "Certificate management operations",
|
|
11
|
-
builder: (yargs) => yargs.command(
|
|
12
|
-
["*", "list [vendor-id]"],
|
|
13
|
-
"List all stored certificates",
|
|
14
|
-
(yargs2) => {
|
|
15
|
-
return yargs2.positional("vendor-id", {
|
|
16
|
-
describe: "Filter by vendor ID (hex format like 0xFFF1 or decimal)",
|
|
17
|
-
type: "string"
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
async (argv) => {
|
|
21
|
-
const { vendorId: vendorIdStr } = argv;
|
|
22
|
-
await theNode.start();
|
|
23
|
-
let certificates = (await theNode.certificateService()).certificates;
|
|
24
|
-
if (vendorIdStr) {
|
|
25
|
-
let vendorId;
|
|
26
|
-
if (vendorIdStr.startsWith("0x")) {
|
|
27
|
-
const hexStr = vendorIdStr.replace(/^0x/i, "");
|
|
28
|
-
vendorId = parseInt(hexStr, 16);
|
|
29
|
-
} else {
|
|
30
|
-
vendorId = parseInt(vendorIdStr, 10);
|
|
31
|
-
}
|
|
32
|
-
if (!isFinite(vendorId)) {
|
|
33
|
-
console.error(`Error: Invalid vendor ID "${vendorIdStr}"`);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
certificates = certificates.filter((cert) => cert.vid === vendorId);
|
|
37
|
-
}
|
|
38
|
-
if (certificates.length === 0) {
|
|
39
|
-
console.log(
|
|
40
|
-
vendorIdStr ? `No certificates found for vendor ID ${vendorIdStr}.` : "No certificates found in storage."
|
|
41
|
-
);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
console.log(`
|
|
45
|
-
Found ${certificates.length} certificate(s):
|
|
46
|
-
`);
|
|
47
|
-
certificates.forEach((cert) => {
|
|
48
|
-
console.log(`Subject Key ID: ${cert.subjectKeyId}`);
|
|
49
|
-
console.log(` Subject: ${cert.subjectAsText || cert.subject || "N/A"}`);
|
|
50
|
-
console.log("");
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
).command(
|
|
54
|
-
"details <subject-key-id>",
|
|
55
|
-
"Display detailed information about a certificate",
|
|
56
|
-
(yargs2) => {
|
|
57
|
-
return yargs2.positional("subject-key-id", {
|
|
58
|
-
describe: "Subject Key ID of the certificate",
|
|
59
|
-
type: "string",
|
|
60
|
-
demandOption: true
|
|
61
|
-
});
|
|
62
|
-
},
|
|
63
|
-
async (argv) => {
|
|
64
|
-
const { subjectKeyId } = argv;
|
|
65
|
-
await theNode.start();
|
|
66
|
-
const cert = (await theNode.certificateService()).getCertificate(subjectKeyId);
|
|
67
|
-
if (!cert) {
|
|
68
|
-
console.error(`Certificate with subject key ID ${subjectKeyId} not found`);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
console.log("\nCertificate Details:");
|
|
72
|
-
console.log(Diagnostic.json(cert));
|
|
73
|
-
}
|
|
74
|
-
).command(
|
|
75
|
-
"as-pem <subject-key-id>",
|
|
76
|
-
"Get certificate in PEM format",
|
|
77
|
-
(yargs2) => {
|
|
78
|
-
return yargs2.positional("subject-key-id", {
|
|
79
|
-
describe: "Subject Key ID of the certificate",
|
|
80
|
-
type: "string",
|
|
81
|
-
demandOption: true
|
|
82
|
-
});
|
|
83
|
-
},
|
|
84
|
-
async (argv) => {
|
|
85
|
-
const { subjectKeyId } = argv;
|
|
86
|
-
const normalizedId = subjectKeyId.replace(/:/g, "").toUpperCase();
|
|
87
|
-
await theNode.start();
|
|
88
|
-
const pemCert = await (await theNode.certificateService()).getCertificateAsPem(normalizedId);
|
|
89
|
-
console.log(pemCert);
|
|
90
|
-
}
|
|
91
|
-
).command(
|
|
92
|
-
"delete <subject-key-id>",
|
|
93
|
-
"Deletes a certificate from the storage",
|
|
94
|
-
(yargs2) => {
|
|
95
|
-
return yargs2.positional("subject-key-id", {
|
|
96
|
-
describe: "Subject Key ID of the certificate to delete",
|
|
97
|
-
type: "string",
|
|
98
|
-
demandOption: true
|
|
99
|
-
});
|
|
100
|
-
},
|
|
101
|
-
async (argv) => {
|
|
102
|
-
const { subjectKeyId } = argv;
|
|
103
|
-
const normalizedId = subjectKeyId.replace(/:/g, "").toUpperCase();
|
|
104
|
-
await theNode.start();
|
|
105
|
-
await (await theNode.certificateService()).deleteCertificate(normalizedId);
|
|
106
|
-
console.log(`Certificate ${subjectKeyId} deleted successfully`);
|
|
107
|
-
}
|
|
108
|
-
).command(
|
|
109
|
-
"update",
|
|
110
|
-
"Update certificates from DCL",
|
|
111
|
-
(yargs2) => yargs2.option("force", {
|
|
112
|
-
describe: "Force re-download and overwrite existing certificates",
|
|
113
|
-
type: "boolean",
|
|
114
|
-
default: false
|
|
115
|
-
}),
|
|
116
|
-
async (argv) => {
|
|
117
|
-
const { force } = argv;
|
|
118
|
-
await theNode.start();
|
|
119
|
-
console.log(`Updating certificates from DCL${force ? " (force mode)" : ""}...`);
|
|
120
|
-
await (await theNode.certificateService()).update(force);
|
|
121
|
-
console.log("Certificate update completed successfully");
|
|
122
|
-
const count = (await theNode.certificateService()).certificates.length;
|
|
123
|
-
console.log(`Total certificates in storage: ${count}`);
|
|
124
|
-
}
|
|
125
|
-
),
|
|
126
|
-
handler: async (argv) => {
|
|
127
|
-
argv.unhandled = true;
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export {
|
|
132
|
-
commands as default
|
|
133
|
-
};
|
|
134
|
-
//# sourceMappingURL=cmd_cert.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/shell/cmd_cert.ts"],
|
|
4
|
-
"mappings": "AAAA;AAAA;AAAA;AAAA;AAAA;AAMA,SAAS,kBAAkB;AAIZ,SAAR,SAA0B,SAAqB;AAClD,SAAO;AAAA,IACH,SAA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