balena-cli 21.1.2 → 21.1.3
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/CHANGELOG.md +4 -0
- package/build/commands/device/index.js +26 -66
- package/build/commands/device/index.js.map +1 -1
- package/npm-shrinkwrap.json +8 -8
- package/oclif.manifest.json +44 -44
- package/package.json +2 -2
- package/src/commands/device/index.ts +51 -95
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
|
|
4
4
|
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
|
5
5
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
|
6
6
|
|
|
7
|
+
## 21.1.3 - 2025-03-28
|
|
8
|
+
|
|
9
|
+
* Fix device detail for open balena [Otavio Jacobi]
|
|
10
|
+
|
|
7
11
|
## 21.1.2 - 2025-03-27
|
|
8
12
|
|
|
9
13
|
* Deny preload for an image with secure boot enabled [Ken Bannister]
|
|
@@ -10,73 +10,32 @@ class DeviceCmd extends core_1.Command {
|
|
|
10
10
|
var _a;
|
|
11
11
|
const { args: params, flags: options } = await this.parse(DeviceCmd);
|
|
12
12
|
const balena = (0, lazy_1.getBalenaSdk)();
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
'is_of__device_type',
|
|
23
|
-
'uuid',
|
|
24
|
-
'is_running__release',
|
|
25
|
-
'note',
|
|
26
|
-
'local_id',
|
|
27
|
-
'status',
|
|
28
|
-
'update_status',
|
|
29
|
-
'last_update_status_event',
|
|
30
|
-
'is_online',
|
|
31
|
-
'last_connectivity_event',
|
|
32
|
-
'is_connected_to_vpn',
|
|
33
|
-
'last_vpn_event',
|
|
34
|
-
'ip_address',
|
|
35
|
-
'mac_address',
|
|
36
|
-
'public_address',
|
|
37
|
-
'os_version',
|
|
38
|
-
'os_variant',
|
|
39
|
-
'supervisor_version',
|
|
40
|
-
'should_be_managed_by__release',
|
|
41
|
-
'should_be_operated_by__release',
|
|
42
|
-
'is_managed_by__service_instance',
|
|
43
|
-
'provisioning_progress',
|
|
44
|
-
'provisioning_state',
|
|
45
|
-
'download_progress',
|
|
46
|
-
'is_web_accessible',
|
|
47
|
-
'longitude',
|
|
48
|
-
'latitude',
|
|
49
|
-
'location',
|
|
50
|
-
'custom_longitude',
|
|
51
|
-
'custom_latitude',
|
|
52
|
-
'is_locked_until__date',
|
|
53
|
-
'is_accessible_by_support_until__date',
|
|
54
|
-
'created_at',
|
|
55
|
-
'modified_at',
|
|
56
|
-
'is_active',
|
|
57
|
-
'api_heartbeat_state',
|
|
58
|
-
'changed_api_heartbeat_state_on__date',
|
|
59
|
-
'memory_usage',
|
|
60
|
-
'memory_total',
|
|
61
|
-
'storage_block_device',
|
|
62
|
-
'storage_usage',
|
|
63
|
-
'storage_total',
|
|
64
|
-
'cpu_temp',
|
|
65
|
-
'cpu_usage',
|
|
66
|
-
'cpu_id',
|
|
67
|
-
'is_undervolted',
|
|
68
|
-
'overall_status',
|
|
69
|
-
'overall_progress',
|
|
70
|
-
'should_be_running__release',
|
|
71
|
-
],
|
|
72
|
-
$expand: {
|
|
73
|
-
device_tag: {
|
|
74
|
-
$select: ['tag_key', 'value'],
|
|
13
|
+
let device;
|
|
14
|
+
if (options.json) {
|
|
15
|
+
const [deviceBase, deviceComputed] = await Promise.all([
|
|
16
|
+
balena.models.device.get(params.uuid, {
|
|
17
|
+
$expand: {
|
|
18
|
+
device_tag: {
|
|
19
|
+
$select: ['tag_key', 'value'],
|
|
20
|
+
},
|
|
21
|
+
...helpers_1.expandForAppName.$expand,
|
|
75
22
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
23
|
+
}),
|
|
24
|
+
balena.models.device.get(params.uuid, {
|
|
25
|
+
$select: [
|
|
26
|
+
'overall_status',
|
|
27
|
+
'overall_progress',
|
|
28
|
+
'should_be_running__release',
|
|
29
|
+
],
|
|
30
|
+
}),
|
|
31
|
+
]);
|
|
32
|
+
device = {
|
|
33
|
+
...deviceBase,
|
|
34
|
+
...deviceComputed,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
device = (await balena.models.device.get(params.uuid, {
|
|
80
39
|
$select: [
|
|
81
40
|
'device_name',
|
|
82
41
|
'id',
|
|
@@ -103,6 +62,7 @@ class DeviceCmd extends core_1.Command {
|
|
|
103
62
|
],
|
|
104
63
|
...helpers_1.expandForAppName,
|
|
105
64
|
}));
|
|
65
|
+
}
|
|
106
66
|
if (options.view) {
|
|
107
67
|
const open = await Promise.resolve().then(() => require('open'));
|
|
108
68
|
const dashboardUrl = balena.models.device.getDashboardUrl(device.uuid);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/device/index.ts"],"names":[],"mappings":";;AAiBA,sCAAmD;AACnD,+CAA+C;AAC/C,iDAAuD;AACvD,2CAAyE;AACzE,mDAAgD;AAqBhD,MAAqB,SAAU,SAAQ,cAAO;IAgCtC,KAAK,CAAC,GAAG;;QACf,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAErE,MAAM,MAAM,GAAG,IAAA,mBAAY,GAAE,CAAC;QAE9B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/device/index.ts"],"names":[],"mappings":";;AAiBA,sCAAmD;AACnD,+CAA+C;AAC/C,iDAAuD;AACvD,2CAAyE;AACzE,mDAAgD;AAqBhD,MAAqB,SAAU,SAAQ,cAAO;IAgCtC,KAAK,CAAC,GAAG;;QACf,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,SA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R,oBAAoB;YACpB,mBAAmB;YACnB,MAAM;YACN,YAAY;YACZ,eAAe;YACf,mBAAmB;YACnB,YAAY;YACZ,QAAQ;YACR,iBAAiB;YACjB,iBAAiB;YACjB,sBAAsB;YACtB,sBAAsB;YACtB,kBAAkB;YAClB,kBAAkB;YAClB,uBAAuB;YACvB,uBAAuB;SACvB,CAAC,CACF,CAAC;IACH,CAAC;;AA7La,qBAAW,GAAG,IAAA,kBAAW,EAAA;;;;;IAKpC,mBAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC;GACpC,CAAC;AACW,kBAAQ,GAAG;IACxB,yBAAyB;IACzB,gCAAgC;IAChC,gCAAgC;CAChC,CAAC;AAEY,cAAI,GAAG;IACpB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC;QACjB,WAAW,EAAE,iBAAiB;QAC9B,QAAQ,EAAE,IAAI;KACd,CAAC;CACF,CAAC;AAEY,eAAK,GAAG;IACrB,IAAI,EAAE,EAAE,CAAC,IAAI;IACb,IAAI,EAAE,YAAK,CAAC,OAAO,CAAC;QACnB,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,4BAA4B;KACzC,CAAC;CACF,CAAC;AAEY,uBAAa,GAAG,IAAI,CAAC;AACrB,iBAAO,GAAG,IAAI,CAAC;kBA9BT,SAAS"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balena-cli",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "balena-cli",
|
|
9
|
-
"version": "21.1.
|
|
9
|
+
"version": "21.1.3",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"dependencies": {
|
|
@@ -2682,9 +2682,9 @@
|
|
|
2682
2682
|
}
|
|
2683
2683
|
},
|
|
2684
2684
|
"node_modules/@inquirer/core/node_modules/@types/node": {
|
|
2685
|
-
"version": "22.13.
|
|
2686
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.
|
|
2687
|
-
"integrity": "sha512-
|
|
2685
|
+
"version": "22.13.14",
|
|
2686
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.14.tgz",
|
|
2687
|
+
"integrity": "sha512-Zs/Ollc1SJ8nKUAgc7ivOEdIBM8JAKgrqqUYi2J997JuKO7/tpQC+WCetQ1sypiKCQWHdvdg9wBNpUPEWZae7w==",
|
|
2688
2688
|
"dev": true,
|
|
2689
2689
|
"license": "MIT",
|
|
2690
2690
|
"dependencies": {
|
|
@@ -5829,9 +5829,9 @@
|
|
|
5829
5829
|
}
|
|
5830
5830
|
},
|
|
5831
5831
|
"node_modules/@types/node": {
|
|
5832
|
-
"version": "20.17.
|
|
5833
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.
|
|
5834
|
-
"integrity": "sha512-
|
|
5832
|
+
"version": "20.17.28",
|
|
5833
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.28.tgz",
|
|
5834
|
+
"integrity": "sha512-DHlH/fNL6Mho38jTy7/JT7sn2wnXI+wULR6PV4gy4VHLVvnrV/d3pHAMQHhc4gjdLmK2ZiPoMxzp6B3yRajLSQ==",
|
|
5835
5835
|
"license": "MIT",
|
|
5836
5836
|
"dependencies": {
|
|
5837
5837
|
"undici-types": "~6.19.2"
|
package/oclif.manifest.json
CHANGED
|
@@ -982,49 +982,6 @@
|
|
|
982
982
|
"index.js"
|
|
983
983
|
]
|
|
984
984
|
},
|
|
985
|
-
"device-type:list": {
|
|
986
|
-
"aliases": [
|
|
987
|
-
"devices supported"
|
|
988
|
-
],
|
|
989
|
-
"args": {},
|
|
990
|
-
"deprecateAliases": true,
|
|
991
|
-
"description": "List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').\n\nList the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').\n\nBy default, only actively supported device types are listed.\nThe --all option can be used to list all device types, including those that are\nno longer supported by balena.\n\nThe --json option is recommended when scripting the output of this command,\nbecause the JSON format is less likely to change and it better represents data\ntypes like lists and empty strings (for example, the ALIASES column contains a\nlist of zero or more values). The 'jq' utility may be helpful in shell scripts\n(https://stedolan.github.io/jq/manual/).",
|
|
992
|
-
"examples": [
|
|
993
|
-
"$ balena device-type list",
|
|
994
|
-
"$ balena device-type list --all",
|
|
995
|
-
"$ balena device-type list --json"
|
|
996
|
-
],
|
|
997
|
-
"flags": {
|
|
998
|
-
"json": {
|
|
999
|
-
"char": "j",
|
|
1000
|
-
"description": "produce JSON output instead of tabular output",
|
|
1001
|
-
"name": "json",
|
|
1002
|
-
"allowNo": false,
|
|
1003
|
-
"type": "boolean"
|
|
1004
|
-
},
|
|
1005
|
-
"all": {
|
|
1006
|
-
"description": "include device types no longer supported by balena",
|
|
1007
|
-
"name": "all",
|
|
1008
|
-
"allowNo": false,
|
|
1009
|
-
"type": "boolean"
|
|
1010
|
-
}
|
|
1011
|
-
},
|
|
1012
|
-
"hasDynamicHelp": false,
|
|
1013
|
-
"hiddenAliases": [],
|
|
1014
|
-
"id": "device-type:list",
|
|
1015
|
-
"pluginAlias": "balena-cli",
|
|
1016
|
-
"pluginName": "balena-cli",
|
|
1017
|
-
"pluginType": "core",
|
|
1018
|
-
"strict": true,
|
|
1019
|
-
"enableJsonFlag": false,
|
|
1020
|
-
"isESM": false,
|
|
1021
|
-
"relativePath": [
|
|
1022
|
-
"build",
|
|
1023
|
-
"commands",
|
|
1024
|
-
"device-type",
|
|
1025
|
-
"list.js"
|
|
1026
|
-
]
|
|
1027
|
-
},
|
|
1028
985
|
"device:deactivate": {
|
|
1029
986
|
"aliases": [],
|
|
1030
987
|
"args": {
|
|
@@ -2267,6 +2224,49 @@
|
|
|
2267
2224
|
"tunnel.js"
|
|
2268
2225
|
]
|
|
2269
2226
|
},
|
|
2227
|
+
"device-type:list": {
|
|
2228
|
+
"aliases": [
|
|
2229
|
+
"devices supported"
|
|
2230
|
+
],
|
|
2231
|
+
"args": {},
|
|
2232
|
+
"deprecateAliases": true,
|
|
2233
|
+
"description": "List the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').\n\nList the device types supported by balena (like 'raspberrypi3' or 'intel-nuc').\n\nBy default, only actively supported device types are listed.\nThe --all option can be used to list all device types, including those that are\nno longer supported by balena.\n\nThe --json option is recommended when scripting the output of this command,\nbecause the JSON format is less likely to change and it better represents data\ntypes like lists and empty strings (for example, the ALIASES column contains a\nlist of zero or more values). The 'jq' utility may be helpful in shell scripts\n(https://stedolan.github.io/jq/manual/).",
|
|
2234
|
+
"examples": [
|
|
2235
|
+
"$ balena device-type list",
|
|
2236
|
+
"$ balena device-type list --all",
|
|
2237
|
+
"$ balena device-type list --json"
|
|
2238
|
+
],
|
|
2239
|
+
"flags": {
|
|
2240
|
+
"json": {
|
|
2241
|
+
"char": "j",
|
|
2242
|
+
"description": "produce JSON output instead of tabular output",
|
|
2243
|
+
"name": "json",
|
|
2244
|
+
"allowNo": false,
|
|
2245
|
+
"type": "boolean"
|
|
2246
|
+
},
|
|
2247
|
+
"all": {
|
|
2248
|
+
"description": "include device types no longer supported by balena",
|
|
2249
|
+
"name": "all",
|
|
2250
|
+
"allowNo": false,
|
|
2251
|
+
"type": "boolean"
|
|
2252
|
+
}
|
|
2253
|
+
},
|
|
2254
|
+
"hasDynamicHelp": false,
|
|
2255
|
+
"hiddenAliases": [],
|
|
2256
|
+
"id": "device-type:list",
|
|
2257
|
+
"pluginAlias": "balena-cli",
|
|
2258
|
+
"pluginName": "balena-cli",
|
|
2259
|
+
"pluginType": "core",
|
|
2260
|
+
"strict": true,
|
|
2261
|
+
"enableJsonFlag": false,
|
|
2262
|
+
"isESM": false,
|
|
2263
|
+
"relativePath": [
|
|
2264
|
+
"build",
|
|
2265
|
+
"commands",
|
|
2266
|
+
"device-type",
|
|
2267
|
+
"list.js"
|
|
2268
|
+
]
|
|
2269
|
+
},
|
|
2270
2270
|
"env:list": {
|
|
2271
2271
|
"aliases": [
|
|
2272
2272
|
"envs"
|
|
@@ -4716,5 +4716,5 @@
|
|
|
4716
4716
|
]
|
|
4717
4717
|
}
|
|
4718
4718
|
},
|
|
4719
|
-
"version": "21.1.
|
|
4719
|
+
"version": "21.1.3"
|
|
4720
4720
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balena-cli",
|
|
3
|
-
"version": "21.1.
|
|
3
|
+
"version": "21.1.3",
|
|
4
4
|
"description": "The official balena Command Line Interface",
|
|
5
5
|
"main": "./build/app.js",
|
|
6
6
|
"homepage": "https://github.com/balena-io/balena-cli",
|
|
@@ -276,6 +276,6 @@
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
"versionist": {
|
|
279
|
-
"publishedAt": "2025-03-
|
|
279
|
+
"publishedAt": "2025-03-28T16:31:01.880Z"
|
|
280
280
|
}
|
|
281
281
|
}
|
|
@@ -77,103 +77,59 @@ export default class DeviceCmd extends Command {
|
|
|
77
77
|
|
|
78
78
|
const balena = getBalenaSdk();
|
|
79
79
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'
|
|
87
|
-
'belongs_to__user',
|
|
88
|
-
'actor',
|
|
89
|
-
'is_pinned_on__release',
|
|
90
|
-
'device_name',
|
|
91
|
-
'is_of__device_type',
|
|
92
|
-
'uuid',
|
|
93
|
-
'is_running__release',
|
|
94
|
-
'note',
|
|
95
|
-
'local_id',
|
|
96
|
-
'status',
|
|
97
|
-
'update_status',
|
|
98
|
-
'last_update_status_event',
|
|
99
|
-
'is_online',
|
|
100
|
-
'last_connectivity_event',
|
|
101
|
-
'is_connected_to_vpn',
|
|
102
|
-
'last_vpn_event',
|
|
103
|
-
'ip_address',
|
|
104
|
-
'mac_address',
|
|
105
|
-
'public_address',
|
|
106
|
-
'os_version',
|
|
107
|
-
'os_variant',
|
|
108
|
-
'supervisor_version',
|
|
109
|
-
'should_be_managed_by__release',
|
|
110
|
-
'should_be_operated_by__release',
|
|
111
|
-
'is_managed_by__service_instance',
|
|
112
|
-
'provisioning_progress',
|
|
113
|
-
'provisioning_state',
|
|
114
|
-
'download_progress',
|
|
115
|
-
'is_web_accessible',
|
|
116
|
-
'longitude',
|
|
117
|
-
'latitude',
|
|
118
|
-
'location',
|
|
119
|
-
'custom_longitude',
|
|
120
|
-
'custom_latitude',
|
|
121
|
-
'is_locked_until__date',
|
|
122
|
-
'is_accessible_by_support_until__date',
|
|
123
|
-
'created_at',
|
|
124
|
-
'modified_at',
|
|
125
|
-
'is_active',
|
|
126
|
-
'api_heartbeat_state',
|
|
127
|
-
'changed_api_heartbeat_state_on__date',
|
|
128
|
-
'memory_usage',
|
|
129
|
-
'memory_total',
|
|
130
|
-
'storage_block_device',
|
|
131
|
-
'storage_usage',
|
|
132
|
-
'storage_total',
|
|
133
|
-
'cpu_temp',
|
|
134
|
-
'cpu_usage',
|
|
135
|
-
'cpu_id',
|
|
136
|
-
'is_undervolted',
|
|
137
|
-
// explicit read
|
|
138
|
-
'overall_status',
|
|
139
|
-
'overall_progress',
|
|
140
|
-
'should_be_running__release',
|
|
141
|
-
],
|
|
142
|
-
$expand: {
|
|
143
|
-
device_tag: {
|
|
144
|
-
$select: ['tag_key', 'value'],
|
|
145
|
-
},
|
|
146
|
-
...expandForAppName.$expand,
|
|
80
|
+
let device: ExtendedDevice;
|
|
81
|
+
if (options.json) {
|
|
82
|
+
const [deviceBase, deviceComputed] = await Promise.all([
|
|
83
|
+
balena.models.device.get(params.uuid, {
|
|
84
|
+
$expand: {
|
|
85
|
+
device_tag: {
|
|
86
|
+
$select: ['tag_key', 'value'],
|
|
147
87
|
},
|
|
148
|
-
|
|
149
|
-
: {
|
|
150
|
-
$select: [
|
|
151
|
-
'device_name',
|
|
152
|
-
'id',
|
|
153
|
-
'overall_status',
|
|
154
|
-
'is_online',
|
|
155
|
-
'ip_address',
|
|
156
|
-
'mac_address',
|
|
157
|
-
'last_connectivity_event',
|
|
158
|
-
'uuid',
|
|
159
|
-
'supervisor_version',
|
|
160
|
-
'is_web_accessible',
|
|
161
|
-
'note',
|
|
162
|
-
'os_version',
|
|
163
|
-
'memory_usage',
|
|
164
|
-
'memory_total',
|
|
165
|
-
'public_address',
|
|
166
|
-
'storage_block_device',
|
|
167
|
-
'storage_usage',
|
|
168
|
-
'storage_total',
|
|
169
|
-
'cpu_usage',
|
|
170
|
-
'cpu_temp',
|
|
171
|
-
'cpu_id',
|
|
172
|
-
'is_undervolted',
|
|
173
|
-
],
|
|
174
|
-
...expandForAppName,
|
|
88
|
+
...expandForAppName.$expand,
|
|
175
89
|
},
|
|
176
|
-
|
|
90
|
+
}),
|
|
91
|
+
balena.models.device.get(params.uuid, {
|
|
92
|
+
$select: [
|
|
93
|
+
'overall_status',
|
|
94
|
+
'overall_progress',
|
|
95
|
+
'should_be_running__release',
|
|
96
|
+
],
|
|
97
|
+
}),
|
|
98
|
+
]);
|
|
99
|
+
|
|
100
|
+
device = {
|
|
101
|
+
...deviceBase,
|
|
102
|
+
...deviceComputed,
|
|
103
|
+
} as ExtendedDevice;
|
|
104
|
+
} else {
|
|
105
|
+
device = (await balena.models.device.get(params.uuid, {
|
|
106
|
+
$select: [
|
|
107
|
+
'device_name',
|
|
108
|
+
'id',
|
|
109
|
+
'overall_status',
|
|
110
|
+
'is_online',
|
|
111
|
+
'ip_address',
|
|
112
|
+
'mac_address',
|
|
113
|
+
'last_connectivity_event',
|
|
114
|
+
'uuid',
|
|
115
|
+
'supervisor_version',
|
|
116
|
+
'is_web_accessible',
|
|
117
|
+
'note',
|
|
118
|
+
'os_version',
|
|
119
|
+
'memory_usage',
|
|
120
|
+
'memory_total',
|
|
121
|
+
'public_address',
|
|
122
|
+
'storage_block_device',
|
|
123
|
+
'storage_usage',
|
|
124
|
+
'storage_total',
|
|
125
|
+
'cpu_usage',
|
|
126
|
+
'cpu_temp',
|
|
127
|
+
'cpu_id',
|
|
128
|
+
'is_undervolted',
|
|
129
|
+
],
|
|
130
|
+
...expandForAppName,
|
|
131
|
+
})) as ExtendedDevice;
|
|
132
|
+
}
|
|
177
133
|
|
|
178
134
|
if (options.view) {
|
|
179
135
|
const open = await import('open');
|