balena-cli 23.1.2-build-remove-help-patch-149117ec0c36346e2eadac5823d0cacbb5a40349-1 → 23.1.2-build-remove-help-patch-4a0d00ce703dfb8c6251d5748ae24dc5aa75df3f-1
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 +1 -0
- package/build/app.js +16 -0
- package/build/app.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +322 -322
- package/package.json +2 -2
- package/src/app.ts +29 -1
- package/patches/all/@oclif+core+4.5.6.patch +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
## 23.1.2 - 2025-11-18
|
|
8
8
|
|
|
9
|
+
* Remove the oclif/core patch in favor of augmenting the RequiredArgsError messages [Thodoris Greasidis]
|
|
9
10
|
* help: Replace the oclif patch for hiding subtopics with overrides in the BalenaHelp class [Thodoris Greasidis]
|
|
10
11
|
|
|
11
12
|
## 23.1.1 - 2025-11-18
|
package/build/app.js
CHANGED
|
@@ -77,6 +77,22 @@ async function oclifRun(command, options) {
|
|
|
77
77
|
isEEXIT = true;
|
|
78
78
|
}
|
|
79
79
|
else {
|
|
80
|
+
if (error instanceof core_1.Errors.CLIError) {
|
|
81
|
+
const RequiredArgsErrorRegex = /^Missing (\d+) required arg(s?\b)/;
|
|
82
|
+
if (RequiredArgsErrorRegex.exec(error.message) != null) {
|
|
83
|
+
error.message = error.message
|
|
84
|
+
.split('\n')
|
|
85
|
+
.map((line, i) => {
|
|
86
|
+
if (i === 0) {
|
|
87
|
+
return line.replace(RequiredArgsErrorRegex, 'Missing $1 required argument$2');
|
|
88
|
+
}
|
|
89
|
+
return line.replace(/^(?<argName>[\w-]+)(?<paddingSpaces>[ ]+)[ ](?<description>\w)/, '$<argName>$<paddingSpaces>: $<description>');
|
|
90
|
+
})
|
|
91
|
+
.join('\n');
|
|
92
|
+
const helpCommand = `balena ${command.map((c, i) => (i === 0 ? c.replace(/:/g, ' ') : c)).join(' ')} --help`;
|
|
93
|
+
error.message = error.message.replace('\nSee more help with --help', `\nSee more help with \`${helpCommand}\``);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
80
96
|
throw error;
|
|
81
97
|
}
|
|
82
98
|
}
|
package/build/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":";;;AAoEA,0CAEC;
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":";;;AAoEA,0CAEC;AAgHD,kBA4BC;AAjMD,+CAA+C;AAE/C,2CAIqB;AACrB,iDAAgD;AAChD,uCAAyC;AACzC,sCAA+D;AAMlD,QAAA,WAAW,GAAG,IAAA,gBAAS,EAAC,KAAK,IAAI,EAAE;IAC/C,MAAM,MAAM,GAAG,2CAAa,UAAU,EAAC,CAAC;IACxC,MAAM,MAAM,GAAG,2CAAa,cAAc,EAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,CAAC;QACX,GAAG,EAAE,MAAM,CAAC,SAAS;QACrB,OAAO,EAAE,WAAW,CAAC,OAAO;KAC5B,CAAC,CAAC;IACH,MAAM,CAAC,eAAe,EAAE,CAAC,SAAS,CAAC;QAClC,YAAY,EAAE,OAAO,CAAC,OAAO;QAC7B,QAAQ,EAAE,OAAO,CAAC,QAAQ;KAC1B,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,gBAAgB;IAC9B,MAAM,iBAAiB,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC;IACnD,IAAI,CAAC,CAAC,2CAAa,QAAQ,EAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC,EAAE,CAAC;QAC7E,MAAM,EAAE,wBAAwB,EAAE,GAAG,2CAAa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AI,CAAC;QACJ,MAAM,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,GAAG,2CACnD,mBAAmB,EACnB,CAAC;QACF,qBAAqB,EAAE,CAAC;QACxB,gBAAgB,EAAE,CAAC;QAEnB,MAAM,IAAI,EAAE,CAAC;QAGb,IAAA,+BAAmB,EAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAEtC,MAAM,IAAI,GAAG,MAAM,IAAA,wBAAY,EAAC,OAAO,CAAC,CAAC;QACzC,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC/B,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,MAAM,CAAC,2CAAa,UAAU,EAAC,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IACnD,CAAC;YAAS,CAAC;QACV,IAAI,CAAC;YACJ,CAAC,2CAAa,aAAa,EAAC,CAAC,CAAC,IAAI,EAAE,CAAC;QACtC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACZ,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;gBACvB,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,EAAE,CAAC,CAAC;YACnD,CAAC;QACF,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;AACF,CAAC"}
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balena-cli",
|
|
3
|
-
"version": "23.1.2-build-remove-help-patch-
|
|
3
|
+
"version": "23.1.2-build-remove-help-patch-4a0d00ce703dfb8c6251d5748ae24dc5aa75df3f-1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "balena-cli",
|
|
9
|
-
"version": "23.1.2-build-remove-help-patch-
|
|
9
|
+
"version": "23.1.2-build-remove-help-patch-4a0d00ce703dfb8c6251d5748ae24dc5aa75df3f-1",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"dependencies": {
|
package/oclif.manifest.json
CHANGED
|
@@ -160,56 +160,6 @@
|
|
|
160
160
|
"create.js"
|
|
161
161
|
]
|
|
162
162
|
},
|
|
163
|
-
"block:create": {
|
|
164
|
-
"aliases": [],
|
|
165
|
-
"args": {
|
|
166
|
-
"name": {
|
|
167
|
-
"description": "block name",
|
|
168
|
-
"name": "name",
|
|
169
|
-
"required": true
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
"description": "Create an block.\n\nCreate a new balena block.\n\nYou can specify the organization the block should belong to using\nthe `--organization` option. The organization's handle, not its name,\nshould be provided. Organization handles can be listed with the\n`balena organization list` command.\n\nThe block's default device type is specified with the `--type` option.\nThe `balena device-type list` command can be used to list the available\ndevice types.\n\nInteractive dropdowns will be shown for selection if no device type or\norganization is specified and there are multiple options to choose from.\nIf there is a single option to choose from, it will be chosen automatically.\nThis interactive behavior can be disabled by explicitly specifying a device\ntype and organization.",
|
|
173
|
-
"examples": [
|
|
174
|
-
"$ balena block create MyBlock",
|
|
175
|
-
"$ balena block create MyBlock --organization mmyorg",
|
|
176
|
-
"$ balena block create MyBlock -o myorg --type raspberry-pi"
|
|
177
|
-
],
|
|
178
|
-
"flags": {
|
|
179
|
-
"organization": {
|
|
180
|
-
"char": "o",
|
|
181
|
-
"description": "handle of the organization the block should belong to",
|
|
182
|
-
"name": "organization",
|
|
183
|
-
"hasDynamicHelp": false,
|
|
184
|
-
"multiple": false,
|
|
185
|
-
"type": "option"
|
|
186
|
-
},
|
|
187
|
-
"type": {
|
|
188
|
-
"char": "t",
|
|
189
|
-
"description": "block device type (Check available types with `balena device-type list`)",
|
|
190
|
-
"name": "type",
|
|
191
|
-
"hasDynamicHelp": false,
|
|
192
|
-
"multiple": false,
|
|
193
|
-
"type": "option"
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"hasDynamicHelp": false,
|
|
197
|
-
"hiddenAliases": [],
|
|
198
|
-
"id": "block:create",
|
|
199
|
-
"pluginAlias": "balena-cli",
|
|
200
|
-
"pluginName": "balena-cli",
|
|
201
|
-
"pluginType": "core",
|
|
202
|
-
"strict": true,
|
|
203
|
-
"enableJsonFlag": false,
|
|
204
|
-
"authenticated": true,
|
|
205
|
-
"isESM": false,
|
|
206
|
-
"relativePath": [
|
|
207
|
-
"build",
|
|
208
|
-
"commands",
|
|
209
|
-
"block",
|
|
210
|
-
"create.js"
|
|
211
|
-
]
|
|
212
|
-
},
|
|
213
163
|
"build": {
|
|
214
164
|
"aliases": [],
|
|
215
165
|
"args": {
|
|
@@ -412,6 +362,56 @@
|
|
|
412
362
|
"index.js"
|
|
413
363
|
]
|
|
414
364
|
},
|
|
365
|
+
"block:create": {
|
|
366
|
+
"aliases": [],
|
|
367
|
+
"args": {
|
|
368
|
+
"name": {
|
|
369
|
+
"description": "block name",
|
|
370
|
+
"name": "name",
|
|
371
|
+
"required": true
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
"description": "Create an block.\n\nCreate a new balena block.\n\nYou can specify the organization the block should belong to using\nthe `--organization` option. The organization's handle, not its name,\nshould be provided. Organization handles can be listed with the\n`balena organization list` command.\n\nThe block's default device type is specified with the `--type` option.\nThe `balena device-type list` command can be used to list the available\ndevice types.\n\nInteractive dropdowns will be shown for selection if no device type or\norganization is specified and there are multiple options to choose from.\nIf there is a single option to choose from, it will be chosen automatically.\nThis interactive behavior can be disabled by explicitly specifying a device\ntype and organization.",
|
|
375
|
+
"examples": [
|
|
376
|
+
"$ balena block create MyBlock",
|
|
377
|
+
"$ balena block create MyBlock --organization mmyorg",
|
|
378
|
+
"$ balena block create MyBlock -o myorg --type raspberry-pi"
|
|
379
|
+
],
|
|
380
|
+
"flags": {
|
|
381
|
+
"organization": {
|
|
382
|
+
"char": "o",
|
|
383
|
+
"description": "handle of the organization the block should belong to",
|
|
384
|
+
"name": "organization",
|
|
385
|
+
"hasDynamicHelp": false,
|
|
386
|
+
"multiple": false,
|
|
387
|
+
"type": "option"
|
|
388
|
+
},
|
|
389
|
+
"type": {
|
|
390
|
+
"char": "t",
|
|
391
|
+
"description": "block device type (Check available types with `balena device-type list`)",
|
|
392
|
+
"name": "type",
|
|
393
|
+
"hasDynamicHelp": false,
|
|
394
|
+
"multiple": false,
|
|
395
|
+
"type": "option"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
"hasDynamicHelp": false,
|
|
399
|
+
"hiddenAliases": [],
|
|
400
|
+
"id": "block:create",
|
|
401
|
+
"pluginAlias": "balena-cli",
|
|
402
|
+
"pluginName": "balena-cli",
|
|
403
|
+
"pluginType": "core",
|
|
404
|
+
"strict": true,
|
|
405
|
+
"enableJsonFlag": false,
|
|
406
|
+
"authenticated": true,
|
|
407
|
+
"isESM": false,
|
|
408
|
+
"relativePath": [
|
|
409
|
+
"build",
|
|
410
|
+
"commands",
|
|
411
|
+
"block",
|
|
412
|
+
"create.js"
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
415
|
"config:generate": {
|
|
416
416
|
"aliases": [],
|
|
417
417
|
"args": {},
|
|
@@ -979,45 +979,6 @@
|
|
|
979
979
|
"index.js"
|
|
980
980
|
]
|
|
981
981
|
},
|
|
982
|
-
"device-type:list": {
|
|
983
|
-
"aliases": [],
|
|
984
|
-
"args": {},
|
|
985
|
-
"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.",
|
|
986
|
-
"examples": [
|
|
987
|
-
"$ balena device-type list",
|
|
988
|
-
"$ balena device-type list --all"
|
|
989
|
-
],
|
|
990
|
-
"flags": {
|
|
991
|
-
"json": {
|
|
992
|
-
"description": "Format output as json.",
|
|
993
|
-
"helpGroup": "GLOBAL",
|
|
994
|
-
"name": "json",
|
|
995
|
-
"allowNo": false,
|
|
996
|
-
"type": "boolean"
|
|
997
|
-
},
|
|
998
|
-
"all": {
|
|
999
|
-
"description": "include device types no longer supported by balena",
|
|
1000
|
-
"name": "all",
|
|
1001
|
-
"allowNo": false,
|
|
1002
|
-
"type": "boolean"
|
|
1003
|
-
}
|
|
1004
|
-
},
|
|
1005
|
-
"hasDynamicHelp": false,
|
|
1006
|
-
"hiddenAliases": [],
|
|
1007
|
-
"id": "device-type:list",
|
|
1008
|
-
"pluginAlias": "balena-cli",
|
|
1009
|
-
"pluginName": "balena-cli",
|
|
1010
|
-
"pluginType": "core",
|
|
1011
|
-
"strict": true,
|
|
1012
|
-
"enableJsonFlag": true,
|
|
1013
|
-
"isESM": false,
|
|
1014
|
-
"relativePath": [
|
|
1015
|
-
"build",
|
|
1016
|
-
"commands",
|
|
1017
|
-
"device-type",
|
|
1018
|
-
"list.js"
|
|
1019
|
-
]
|
|
1020
|
-
},
|
|
1021
982
|
"device:deactivate": {
|
|
1022
983
|
"aliases": [],
|
|
1023
984
|
"args": {
|
|
@@ -2238,6 +2199,45 @@
|
|
|
2238
2199
|
"tunnel.js"
|
|
2239
2200
|
]
|
|
2240
2201
|
},
|
|
2202
|
+
"device-type:list": {
|
|
2203
|
+
"aliases": [],
|
|
2204
|
+
"args": {},
|
|
2205
|
+
"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.",
|
|
2206
|
+
"examples": [
|
|
2207
|
+
"$ balena device-type list",
|
|
2208
|
+
"$ balena device-type list --all"
|
|
2209
|
+
],
|
|
2210
|
+
"flags": {
|
|
2211
|
+
"json": {
|
|
2212
|
+
"description": "Format output as json.",
|
|
2213
|
+
"helpGroup": "GLOBAL",
|
|
2214
|
+
"name": "json",
|
|
2215
|
+
"allowNo": false,
|
|
2216
|
+
"type": "boolean"
|
|
2217
|
+
},
|
|
2218
|
+
"all": {
|
|
2219
|
+
"description": "include device types no longer supported by balena",
|
|
2220
|
+
"name": "all",
|
|
2221
|
+
"allowNo": false,
|
|
2222
|
+
"type": "boolean"
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
"hasDynamicHelp": false,
|
|
2226
|
+
"hiddenAliases": [],
|
|
2227
|
+
"id": "device-type:list",
|
|
2228
|
+
"pluginAlias": "balena-cli",
|
|
2229
|
+
"pluginName": "balena-cli",
|
|
2230
|
+
"pluginType": "core",
|
|
2231
|
+
"strict": true,
|
|
2232
|
+
"enableJsonFlag": true,
|
|
2233
|
+
"isESM": false,
|
|
2234
|
+
"relativePath": [
|
|
2235
|
+
"build",
|
|
2236
|
+
"commands",
|
|
2237
|
+
"device-type",
|
|
2238
|
+
"list.js"
|
|
2239
|
+
]
|
|
2240
|
+
},
|
|
2241
2241
|
"env:list": {
|
|
2242
2242
|
"aliases": [],
|
|
2243
2243
|
"args": {},
|
|
@@ -2916,6 +2916,59 @@
|
|
|
2916
2916
|
"osinit.js"
|
|
2917
2917
|
]
|
|
2918
2918
|
},
|
|
2919
|
+
"join": {
|
|
2920
|
+
"aliases": [],
|
|
2921
|
+
"args": {
|
|
2922
|
+
"deviceIpOrHostname": {
|
|
2923
|
+
"description": "the IP or hostname of device",
|
|
2924
|
+
"name": "deviceIpOrHostname"
|
|
2925
|
+
}
|
|
2926
|
+
},
|
|
2927
|
+
"description": "Move a local device to a fleet on another balena server.\n\nMove a local device to a fleet on another balena server, causing\nthe device to \"join\" the new server. The device must be running balenaOS.\n\nFor example, you could provision a device against an openBalena installation\nwhere you perform end-to-end tests and then move it to balenaCloud when it's\nready for production.\n\nTo move a device between fleets on the same server, use the\n`balena device move` command instead of `balena join`.\n\nIf you don't specify a device hostname or IP, this command will automatically\nscan the local network for balenaOS devices and prompt you to select one\nfrom an interactive picker. This may require administrator/root privileges.\nLikewise, if the fleet option is not provided then a picker will be shown.\n\nFleets may be specified by fleet name or slug. Fleet slugs are\nthe recommended option, as they are unique and unambiguous. Slugs can be\nlisted with the `balena fleet list` command. Note that slugs may change if the\nfleet is renamed. Fleet names are not unique and may result in \"Fleet is\nambiguous\" errors at any time (even if it \"used to work in the past\"), for\nexample if the name clashes with a newly created public fleet, or with fleets\nfrom other balena accounts that you may be invited to join under any role.\nFor this reason, fleet names are especially discouraged in scripts (e.g. CI\nenvironments).",
|
|
2928
|
+
"examples": [
|
|
2929
|
+
"$ balena join",
|
|
2930
|
+
"$ balena join balena.local",
|
|
2931
|
+
"$ balena join balena.local --fleet MyFleet",
|
|
2932
|
+
"$ balena join balena.local -f myorg/myfleet",
|
|
2933
|
+
"$ balena join 192.168.1.25",
|
|
2934
|
+
"$ balena join 192.168.1.25 --fleet MyFleet"
|
|
2935
|
+
],
|
|
2936
|
+
"flags": {
|
|
2937
|
+
"fleet": {
|
|
2938
|
+
"char": "f",
|
|
2939
|
+
"description": "fleet name or slug (preferred)",
|
|
2940
|
+
"name": "fleet",
|
|
2941
|
+
"hasDynamicHelp": false,
|
|
2942
|
+
"multiple": false,
|
|
2943
|
+
"type": "option"
|
|
2944
|
+
},
|
|
2945
|
+
"pollInterval": {
|
|
2946
|
+
"char": "i",
|
|
2947
|
+
"description": "the interval in minutes to check for updates",
|
|
2948
|
+
"name": "pollInterval",
|
|
2949
|
+
"hasDynamicHelp": false,
|
|
2950
|
+
"multiple": false,
|
|
2951
|
+
"type": "option"
|
|
2952
|
+
}
|
|
2953
|
+
},
|
|
2954
|
+
"hasDynamicHelp": false,
|
|
2955
|
+
"hiddenAliases": [],
|
|
2956
|
+
"id": "join",
|
|
2957
|
+
"pluginAlias": "balena-cli",
|
|
2958
|
+
"pluginName": "balena-cli",
|
|
2959
|
+
"pluginType": "core",
|
|
2960
|
+
"strict": true,
|
|
2961
|
+
"enableJsonFlag": false,
|
|
2962
|
+
"authenticated": true,
|
|
2963
|
+
"primary": true,
|
|
2964
|
+
"isESM": false,
|
|
2965
|
+
"relativePath": [
|
|
2966
|
+
"build",
|
|
2967
|
+
"commands",
|
|
2968
|
+
"join",
|
|
2969
|
+
"index.js"
|
|
2970
|
+
]
|
|
2971
|
+
},
|
|
2919
2972
|
"leave": {
|
|
2920
2973
|
"aliases": [],
|
|
2921
2974
|
"args": {
|
|
@@ -3156,65 +3209,12 @@
|
|
|
3156
3209
|
"index.js"
|
|
3157
3210
|
]
|
|
3158
3211
|
},
|
|
3159
|
-
"
|
|
3212
|
+
"logout": {
|
|
3160
3213
|
"aliases": [],
|
|
3161
|
-
"args": {
|
|
3162
|
-
|
|
3163
|
-
"description": "the IP or hostname of device",
|
|
3164
|
-
"name": "deviceIpOrHostname"
|
|
3165
|
-
}
|
|
3166
|
-
},
|
|
3167
|
-
"description": "Move a local device to a fleet on another balena server.\n\nMove a local device to a fleet on another balena server, causing\nthe device to \"join\" the new server. The device must be running balenaOS.\n\nFor example, you could provision a device against an openBalena installation\nwhere you perform end-to-end tests and then move it to balenaCloud when it's\nready for production.\n\nTo move a device between fleets on the same server, use the\n`balena device move` command instead of `balena join`.\n\nIf you don't specify a device hostname or IP, this command will automatically\nscan the local network for balenaOS devices and prompt you to select one\nfrom an interactive picker. This may require administrator/root privileges.\nLikewise, if the fleet option is not provided then a picker will be shown.\n\nFleets may be specified by fleet name or slug. Fleet slugs are\nthe recommended option, as they are unique and unambiguous. Slugs can be\nlisted with the `balena fleet list` command. Note that slugs may change if the\nfleet is renamed. Fleet names are not unique and may result in \"Fleet is\nambiguous\" errors at any time (even if it \"used to work in the past\"), for\nexample if the name clashes with a newly created public fleet, or with fleets\nfrom other balena accounts that you may be invited to join under any role.\nFor this reason, fleet names are especially discouraged in scripts (e.g. CI\nenvironments).",
|
|
3214
|
+
"args": {},
|
|
3215
|
+
"description": "Logout from balena.\n\nLogout from your balena account.",
|
|
3168
3216
|
"examples": [
|
|
3169
|
-
"$ balena
|
|
3170
|
-
"$ balena join balena.local",
|
|
3171
|
-
"$ balena join balena.local --fleet MyFleet",
|
|
3172
|
-
"$ balena join balena.local -f myorg/myfleet",
|
|
3173
|
-
"$ balena join 192.168.1.25",
|
|
3174
|
-
"$ balena join 192.168.1.25 --fleet MyFleet"
|
|
3175
|
-
],
|
|
3176
|
-
"flags": {
|
|
3177
|
-
"fleet": {
|
|
3178
|
-
"char": "f",
|
|
3179
|
-
"description": "fleet name or slug (preferred)",
|
|
3180
|
-
"name": "fleet",
|
|
3181
|
-
"hasDynamicHelp": false,
|
|
3182
|
-
"multiple": false,
|
|
3183
|
-
"type": "option"
|
|
3184
|
-
},
|
|
3185
|
-
"pollInterval": {
|
|
3186
|
-
"char": "i",
|
|
3187
|
-
"description": "the interval in minutes to check for updates",
|
|
3188
|
-
"name": "pollInterval",
|
|
3189
|
-
"hasDynamicHelp": false,
|
|
3190
|
-
"multiple": false,
|
|
3191
|
-
"type": "option"
|
|
3192
|
-
}
|
|
3193
|
-
},
|
|
3194
|
-
"hasDynamicHelp": false,
|
|
3195
|
-
"hiddenAliases": [],
|
|
3196
|
-
"id": "join",
|
|
3197
|
-
"pluginAlias": "balena-cli",
|
|
3198
|
-
"pluginName": "balena-cli",
|
|
3199
|
-
"pluginType": "core",
|
|
3200
|
-
"strict": true,
|
|
3201
|
-
"enableJsonFlag": false,
|
|
3202
|
-
"authenticated": true,
|
|
3203
|
-
"primary": true,
|
|
3204
|
-
"isESM": false,
|
|
3205
|
-
"relativePath": [
|
|
3206
|
-
"build",
|
|
3207
|
-
"commands",
|
|
3208
|
-
"join",
|
|
3209
|
-
"index.js"
|
|
3210
|
-
]
|
|
3211
|
-
},
|
|
3212
|
-
"logout": {
|
|
3213
|
-
"aliases": [],
|
|
3214
|
-
"args": {},
|
|
3215
|
-
"description": "Logout from balena.\n\nLogout from your balena account.",
|
|
3216
|
-
"examples": [
|
|
3217
|
-
"$ balena logout"
|
|
3217
|
+
"$ balena logout"
|
|
3218
3218
|
],
|
|
3219
3219
|
"flags": {},
|
|
3220
3220
|
"hasDynamicHelp": false,
|
|
@@ -3258,136 +3258,6 @@
|
|
|
3258
3258
|
"list.js"
|
|
3259
3259
|
]
|
|
3260
3260
|
},
|
|
3261
|
-
"preload": {
|
|
3262
|
-
"aliases": [],
|
|
3263
|
-
"args": {
|
|
3264
|
-
"image": {
|
|
3265
|
-
"description": "the image file path",
|
|
3266
|
-
"name": "image",
|
|
3267
|
-
"required": true
|
|
3268
|
-
}
|
|
3269
|
-
},
|
|
3270
|
-
"description": "Preload a release on a disk image (or Edison zip archive).\n\nPreload a release (service images/containers) from a balena fleet, and optionally\na balenaOS splash screen, in a previously downloaded '.img' balenaOS image file\nin the local disk (a zip file is only accepted for the Intel Edison device type).\nAfter preloading, the balenaOS image file can be flashed to a device's SD card.\nWhen the device boots, it will not need to download the release, as it was\npreloaded. This is usually combined with release pinning\n(https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/)\nto avoid the device downloading a newer release straight away, if available.\nCheck also the Preloading and Preregistering section of the balena CLI's advanced\nmasterclass document:\nhttps://www.balena.io/docs/learn/more/masterclasses/advanced-cli/#5-preloading-and-preregistering\n\nFleets may be specified by fleet name or slug. Fleet slugs are\nthe recommended option, as they are unique and unambiguous. Slugs can be\nlisted with the `balena fleet list` command. Note that slugs may change if the\nfleet is renamed. Fleet names are not unique and may result in \"Fleet is\nambiguous\" errors at any time (even if it \"used to work in the past\"), for\nexample if the name clashes with a newly created public fleet, or with fleets\nfrom other balena accounts that you may be invited to join under any role.\nFor this reason, fleet names are especially discouraged in scripts (e.g. CI\nenvironments).\n\nNote that the this command requires Docker to be installed, as further detailed\nin the balena CLI's installation instructions:\nhttps://github.com/balena-io/balena-cli/blob/master/INSTALL.md\nThe `--dockerHost` and `--dockerPort` flags allow a remote Docker engine to\nbe used, however the image file must be accessible to the remote Docker engine\non the same path given on the command line. This is because Docker's bind mount\nfeature is used to \"share\" the image with a container that performs the preload.",
|
|
3271
|
-
"examples": [
|
|
3272
|
-
"$ balena preload balena.img --fleet MyFleet --commit e1f2592fc6ee949e68756d4f4a48e49bff8d72a0",
|
|
3273
|
-
"$ balena preload balena.img --fleet myorg/myfleet --splash-image image.png",
|
|
3274
|
-
"$ balena preload balena.img"
|
|
3275
|
-
],
|
|
3276
|
-
"flags": {
|
|
3277
|
-
"fleet": {
|
|
3278
|
-
"char": "f",
|
|
3279
|
-
"description": "fleet name or slug (preferred)",
|
|
3280
|
-
"name": "fleet",
|
|
3281
|
-
"hasDynamicHelp": false,
|
|
3282
|
-
"multiple": false,
|
|
3283
|
-
"type": "option"
|
|
3284
|
-
},
|
|
3285
|
-
"commit": {
|
|
3286
|
-
"char": "c",
|
|
3287
|
-
"description": "The commit hash of the release to preload. Use \"current\" to specify the current\nrelease (ignored if no appId is given). The current release is usually also the\nlatest, but can be pinned to a specific release. See:\nhttps://www.balena.io/docs/learn/deploy/release-strategy/release-policy/\nhttps://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api\nhttps://github.com/balena-io-examples/staged-releases",
|
|
3288
|
-
"name": "commit",
|
|
3289
|
-
"hasDynamicHelp": false,
|
|
3290
|
-
"multiple": false,
|
|
3291
|
-
"type": "option"
|
|
3292
|
-
},
|
|
3293
|
-
"splash-image": {
|
|
3294
|
-
"char": "s",
|
|
3295
|
-
"description": "path to a png image to replace the splash screen",
|
|
3296
|
-
"name": "splash-image",
|
|
3297
|
-
"hasDynamicHelp": false,
|
|
3298
|
-
"multiple": false,
|
|
3299
|
-
"type": "option"
|
|
3300
|
-
},
|
|
3301
|
-
"dont-check-arch": {
|
|
3302
|
-
"description": "disable architecture compatibility check between image and fleet",
|
|
3303
|
-
"name": "dont-check-arch",
|
|
3304
|
-
"allowNo": false,
|
|
3305
|
-
"type": "boolean"
|
|
3306
|
-
},
|
|
3307
|
-
"pin-device-to-release": {
|
|
3308
|
-
"char": "p",
|
|
3309
|
-
"description": "pin the preloaded device to the preloaded release on provision",
|
|
3310
|
-
"name": "pin-device-to-release",
|
|
3311
|
-
"allowNo": true,
|
|
3312
|
-
"type": "boolean"
|
|
3313
|
-
},
|
|
3314
|
-
"additional-space": {
|
|
3315
|
-
"description": "expand the image by this amount of bytes instead of automatically estimating the required amount",
|
|
3316
|
-
"name": "additional-space",
|
|
3317
|
-
"hasDynamicHelp": false,
|
|
3318
|
-
"multiple": false,
|
|
3319
|
-
"type": "option"
|
|
3320
|
-
},
|
|
3321
|
-
"add-certificate": {
|
|
3322
|
-
"description": "Add the given certificate (in PEM format) to /etc/ssl/certs in the preloading container.\nThe file name must end with '.crt' and must not be already contained in the preloader's\n/etc/ssl/certs folder.\nCan be repeated to add multiple certificates.",
|
|
3323
|
-
"name": "add-certificate",
|
|
3324
|
-
"hasDynamicHelp": false,
|
|
3325
|
-
"multiple": true,
|
|
3326
|
-
"type": "option"
|
|
3327
|
-
},
|
|
3328
|
-
"docker": {
|
|
3329
|
-
"char": "P",
|
|
3330
|
-
"description": "Path to a local docker socket (e.g. /var/run/docker.sock)",
|
|
3331
|
-
"name": "docker",
|
|
3332
|
-
"hasDynamicHelp": false,
|
|
3333
|
-
"multiple": false,
|
|
3334
|
-
"type": "option"
|
|
3335
|
-
},
|
|
3336
|
-
"dockerHost": {
|
|
3337
|
-
"char": "h",
|
|
3338
|
-
"description": "Docker daemon hostname or IP address (dev machine or balena device) ",
|
|
3339
|
-
"name": "dockerHost",
|
|
3340
|
-
"hasDynamicHelp": false,
|
|
3341
|
-
"multiple": false,
|
|
3342
|
-
"type": "option"
|
|
3343
|
-
},
|
|
3344
|
-
"dockerPort": {
|
|
3345
|
-
"description": "Docker daemon TCP port number (hint: 2375 for balena devices)",
|
|
3346
|
-
"name": "dockerPort",
|
|
3347
|
-
"hasDynamicHelp": false,
|
|
3348
|
-
"multiple": false,
|
|
3349
|
-
"type": "option"
|
|
3350
|
-
},
|
|
3351
|
-
"ca": {
|
|
3352
|
-
"description": "Docker host TLS certificate authority file",
|
|
3353
|
-
"name": "ca",
|
|
3354
|
-
"hasDynamicHelp": false,
|
|
3355
|
-
"multiple": false,
|
|
3356
|
-
"type": "option"
|
|
3357
|
-
},
|
|
3358
|
-
"cert": {
|
|
3359
|
-
"description": "Docker host TLS certificate file",
|
|
3360
|
-
"name": "cert",
|
|
3361
|
-
"hasDynamicHelp": false,
|
|
3362
|
-
"multiple": false,
|
|
3363
|
-
"type": "option"
|
|
3364
|
-
},
|
|
3365
|
-
"key": {
|
|
3366
|
-
"description": "Docker host TLS key file",
|
|
3367
|
-
"name": "key",
|
|
3368
|
-
"hasDynamicHelp": false,
|
|
3369
|
-
"multiple": false,
|
|
3370
|
-
"type": "option"
|
|
3371
|
-
}
|
|
3372
|
-
},
|
|
3373
|
-
"hasDynamicHelp": false,
|
|
3374
|
-
"hiddenAliases": [],
|
|
3375
|
-
"id": "preload",
|
|
3376
|
-
"pluginAlias": "balena-cli",
|
|
3377
|
-
"pluginName": "balena-cli",
|
|
3378
|
-
"pluginType": "core",
|
|
3379
|
-
"strict": true,
|
|
3380
|
-
"enableJsonFlag": false,
|
|
3381
|
-
"authenticated": true,
|
|
3382
|
-
"primary": true,
|
|
3383
|
-
"isESM": false,
|
|
3384
|
-
"relativePath": [
|
|
3385
|
-
"build",
|
|
3386
|
-
"commands",
|
|
3387
|
-
"preload",
|
|
3388
|
-
"index.js"
|
|
3389
|
-
]
|
|
3390
|
-
},
|
|
3391
3261
|
"os:configure": {
|
|
3392
3262
|
"aliases": [],
|
|
3393
3263
|
"args": {
|
|
@@ -3727,6 +3597,136 @@
|
|
|
3727
3597
|
"versions.js"
|
|
3728
3598
|
]
|
|
3729
3599
|
},
|
|
3600
|
+
"preload": {
|
|
3601
|
+
"aliases": [],
|
|
3602
|
+
"args": {
|
|
3603
|
+
"image": {
|
|
3604
|
+
"description": "the image file path",
|
|
3605
|
+
"name": "image",
|
|
3606
|
+
"required": true
|
|
3607
|
+
}
|
|
3608
|
+
},
|
|
3609
|
+
"description": "Preload a release on a disk image (or Edison zip archive).\n\nPreload a release (service images/containers) from a balena fleet, and optionally\na balenaOS splash screen, in a previously downloaded '.img' balenaOS image file\nin the local disk (a zip file is only accepted for the Intel Edison device type).\nAfter preloading, the balenaOS image file can be flashed to a device's SD card.\nWhen the device boots, it will not need to download the release, as it was\npreloaded. This is usually combined with release pinning\n(https://www.balena.io/docs/learn/deploy/release-strategy/release-policy/)\nto avoid the device downloading a newer release straight away, if available.\nCheck also the Preloading and Preregistering section of the balena CLI's advanced\nmasterclass document:\nhttps://www.balena.io/docs/learn/more/masterclasses/advanced-cli/#5-preloading-and-preregistering\n\nFleets may be specified by fleet name or slug. Fleet slugs are\nthe recommended option, as they are unique and unambiguous. Slugs can be\nlisted with the `balena fleet list` command. Note that slugs may change if the\nfleet is renamed. Fleet names are not unique and may result in \"Fleet is\nambiguous\" errors at any time (even if it \"used to work in the past\"), for\nexample if the name clashes with a newly created public fleet, or with fleets\nfrom other balena accounts that you may be invited to join under any role.\nFor this reason, fleet names are especially discouraged in scripts (e.g. CI\nenvironments).\n\nNote that the this command requires Docker to be installed, as further detailed\nin the balena CLI's installation instructions:\nhttps://github.com/balena-io/balena-cli/blob/master/INSTALL.md\nThe `--dockerHost` and `--dockerPort` flags allow a remote Docker engine to\nbe used, however the image file must be accessible to the remote Docker engine\non the same path given on the command line. This is because Docker's bind mount\nfeature is used to \"share\" the image with a container that performs the preload.",
|
|
3610
|
+
"examples": [
|
|
3611
|
+
"$ balena preload balena.img --fleet MyFleet --commit e1f2592fc6ee949e68756d4f4a48e49bff8d72a0",
|
|
3612
|
+
"$ balena preload balena.img --fleet myorg/myfleet --splash-image image.png",
|
|
3613
|
+
"$ balena preload balena.img"
|
|
3614
|
+
],
|
|
3615
|
+
"flags": {
|
|
3616
|
+
"fleet": {
|
|
3617
|
+
"char": "f",
|
|
3618
|
+
"description": "fleet name or slug (preferred)",
|
|
3619
|
+
"name": "fleet",
|
|
3620
|
+
"hasDynamicHelp": false,
|
|
3621
|
+
"multiple": false,
|
|
3622
|
+
"type": "option"
|
|
3623
|
+
},
|
|
3624
|
+
"commit": {
|
|
3625
|
+
"char": "c",
|
|
3626
|
+
"description": "The commit hash of the release to preload. Use \"current\" to specify the current\nrelease (ignored if no appId is given). The current release is usually also the\nlatest, but can be pinned to a specific release. See:\nhttps://www.balena.io/docs/learn/deploy/release-strategy/release-policy/\nhttps://www.balena.io/docs/learn/more/masterclasses/fleet-management/#63-pin-using-the-api\nhttps://github.com/balena-io-examples/staged-releases",
|
|
3627
|
+
"name": "commit",
|
|
3628
|
+
"hasDynamicHelp": false,
|
|
3629
|
+
"multiple": false,
|
|
3630
|
+
"type": "option"
|
|
3631
|
+
},
|
|
3632
|
+
"splash-image": {
|
|
3633
|
+
"char": "s",
|
|
3634
|
+
"description": "path to a png image to replace the splash screen",
|
|
3635
|
+
"name": "splash-image",
|
|
3636
|
+
"hasDynamicHelp": false,
|
|
3637
|
+
"multiple": false,
|
|
3638
|
+
"type": "option"
|
|
3639
|
+
},
|
|
3640
|
+
"dont-check-arch": {
|
|
3641
|
+
"description": "disable architecture compatibility check between image and fleet",
|
|
3642
|
+
"name": "dont-check-arch",
|
|
3643
|
+
"allowNo": false,
|
|
3644
|
+
"type": "boolean"
|
|
3645
|
+
},
|
|
3646
|
+
"pin-device-to-release": {
|
|
3647
|
+
"char": "p",
|
|
3648
|
+
"description": "pin the preloaded device to the preloaded release on provision",
|
|
3649
|
+
"name": "pin-device-to-release",
|
|
3650
|
+
"allowNo": true,
|
|
3651
|
+
"type": "boolean"
|
|
3652
|
+
},
|
|
3653
|
+
"additional-space": {
|
|
3654
|
+
"description": "expand the image by this amount of bytes instead of automatically estimating the required amount",
|
|
3655
|
+
"name": "additional-space",
|
|
3656
|
+
"hasDynamicHelp": false,
|
|
3657
|
+
"multiple": false,
|
|
3658
|
+
"type": "option"
|
|
3659
|
+
},
|
|
3660
|
+
"add-certificate": {
|
|
3661
|
+
"description": "Add the given certificate (in PEM format) to /etc/ssl/certs in the preloading container.\nThe file name must end with '.crt' and must not be already contained in the preloader's\n/etc/ssl/certs folder.\nCan be repeated to add multiple certificates.",
|
|
3662
|
+
"name": "add-certificate",
|
|
3663
|
+
"hasDynamicHelp": false,
|
|
3664
|
+
"multiple": true,
|
|
3665
|
+
"type": "option"
|
|
3666
|
+
},
|
|
3667
|
+
"docker": {
|
|
3668
|
+
"char": "P",
|
|
3669
|
+
"description": "Path to a local docker socket (e.g. /var/run/docker.sock)",
|
|
3670
|
+
"name": "docker",
|
|
3671
|
+
"hasDynamicHelp": false,
|
|
3672
|
+
"multiple": false,
|
|
3673
|
+
"type": "option"
|
|
3674
|
+
},
|
|
3675
|
+
"dockerHost": {
|
|
3676
|
+
"char": "h",
|
|
3677
|
+
"description": "Docker daemon hostname or IP address (dev machine or balena device) ",
|
|
3678
|
+
"name": "dockerHost",
|
|
3679
|
+
"hasDynamicHelp": false,
|
|
3680
|
+
"multiple": false,
|
|
3681
|
+
"type": "option"
|
|
3682
|
+
},
|
|
3683
|
+
"dockerPort": {
|
|
3684
|
+
"description": "Docker daemon TCP port number (hint: 2375 for balena devices)",
|
|
3685
|
+
"name": "dockerPort",
|
|
3686
|
+
"hasDynamicHelp": false,
|
|
3687
|
+
"multiple": false,
|
|
3688
|
+
"type": "option"
|
|
3689
|
+
},
|
|
3690
|
+
"ca": {
|
|
3691
|
+
"description": "Docker host TLS certificate authority file",
|
|
3692
|
+
"name": "ca",
|
|
3693
|
+
"hasDynamicHelp": false,
|
|
3694
|
+
"multiple": false,
|
|
3695
|
+
"type": "option"
|
|
3696
|
+
},
|
|
3697
|
+
"cert": {
|
|
3698
|
+
"description": "Docker host TLS certificate file",
|
|
3699
|
+
"name": "cert",
|
|
3700
|
+
"hasDynamicHelp": false,
|
|
3701
|
+
"multiple": false,
|
|
3702
|
+
"type": "option"
|
|
3703
|
+
},
|
|
3704
|
+
"key": {
|
|
3705
|
+
"description": "Docker host TLS key file",
|
|
3706
|
+
"name": "key",
|
|
3707
|
+
"hasDynamicHelp": false,
|
|
3708
|
+
"multiple": false,
|
|
3709
|
+
"type": "option"
|
|
3710
|
+
}
|
|
3711
|
+
},
|
|
3712
|
+
"hasDynamicHelp": false,
|
|
3713
|
+
"hiddenAliases": [],
|
|
3714
|
+
"id": "preload",
|
|
3715
|
+
"pluginAlias": "balena-cli",
|
|
3716
|
+
"pluginName": "balena-cli",
|
|
3717
|
+
"pluginType": "core",
|
|
3718
|
+
"strict": true,
|
|
3719
|
+
"enableJsonFlag": false,
|
|
3720
|
+
"authenticated": true,
|
|
3721
|
+
"primary": true,
|
|
3722
|
+
"isESM": false,
|
|
3723
|
+
"relativePath": [
|
|
3724
|
+
"build",
|
|
3725
|
+
"commands",
|
|
3726
|
+
"preload",
|
|
3727
|
+
"index.js"
|
|
3728
|
+
]
|
|
3729
|
+
},
|
|
3730
3730
|
"push": {
|
|
3731
3731
|
"aliases": [],
|
|
3732
3732
|
"args": {
|
|
@@ -4074,6 +4074,30 @@
|
|
|
4074
4074
|
"validate.js"
|
|
4075
4075
|
]
|
|
4076
4076
|
},
|
|
4077
|
+
"settings": {
|
|
4078
|
+
"aliases": [],
|
|
4079
|
+
"args": {},
|
|
4080
|
+
"description": "Print current settings.\n\nUse this command to display the current balena CLI settings.",
|
|
4081
|
+
"examples": [
|
|
4082
|
+
"$ balena settings"
|
|
4083
|
+
],
|
|
4084
|
+
"flags": {},
|
|
4085
|
+
"hasDynamicHelp": false,
|
|
4086
|
+
"hiddenAliases": [],
|
|
4087
|
+
"id": "settings",
|
|
4088
|
+
"pluginAlias": "balena-cli",
|
|
4089
|
+
"pluginName": "balena-cli",
|
|
4090
|
+
"pluginType": "core",
|
|
4091
|
+
"strict": true,
|
|
4092
|
+
"enableJsonFlag": false,
|
|
4093
|
+
"isESM": false,
|
|
4094
|
+
"relativePath": [
|
|
4095
|
+
"build",
|
|
4096
|
+
"commands",
|
|
4097
|
+
"settings",
|
|
4098
|
+
"index.js"
|
|
4099
|
+
]
|
|
4100
|
+
},
|
|
4077
4101
|
"release-asset:delete": {
|
|
4078
4102
|
"aliases": [],
|
|
4079
4103
|
"args": {
|
|
@@ -4289,30 +4313,6 @@
|
|
|
4289
4313
|
"upload.js"
|
|
4290
4314
|
]
|
|
4291
4315
|
},
|
|
4292
|
-
"settings": {
|
|
4293
|
-
"aliases": [],
|
|
4294
|
-
"args": {},
|
|
4295
|
-
"description": "Print current settings.\n\nUse this command to display the current balena CLI settings.",
|
|
4296
|
-
"examples": [
|
|
4297
|
-
"$ balena settings"
|
|
4298
|
-
],
|
|
4299
|
-
"flags": {},
|
|
4300
|
-
"hasDynamicHelp": false,
|
|
4301
|
-
"hiddenAliases": [],
|
|
4302
|
-
"id": "settings",
|
|
4303
|
-
"pluginAlias": "balena-cli",
|
|
4304
|
-
"pluginName": "balena-cli",
|
|
4305
|
-
"pluginType": "core",
|
|
4306
|
-
"strict": true,
|
|
4307
|
-
"enableJsonFlag": false,
|
|
4308
|
-
"isESM": false,
|
|
4309
|
-
"relativePath": [
|
|
4310
|
-
"build",
|
|
4311
|
-
"commands",
|
|
4312
|
-
"settings",
|
|
4313
|
-
"index.js"
|
|
4314
|
-
]
|
|
4315
|
-
},
|
|
4316
4316
|
"support": {
|
|
4317
4317
|
"aliases": [],
|
|
4318
4318
|
"args": {
|
|
@@ -4509,6 +4509,28 @@
|
|
|
4509
4509
|
"rm.js"
|
|
4510
4510
|
]
|
|
4511
4511
|
},
|
|
4512
|
+
"util:available-drives": {
|
|
4513
|
+
"aliases": [],
|
|
4514
|
+
"args": {},
|
|
4515
|
+
"description": "List available drives.\n\nList available drives which are usable for writing an OS image to.\nDoes not list system drives.",
|
|
4516
|
+
"flags": {},
|
|
4517
|
+
"hasDynamicHelp": false,
|
|
4518
|
+
"hiddenAliases": [],
|
|
4519
|
+
"id": "util:available-drives",
|
|
4520
|
+
"pluginAlias": "balena-cli",
|
|
4521
|
+
"pluginName": "balena-cli",
|
|
4522
|
+
"pluginType": "core",
|
|
4523
|
+
"strict": true,
|
|
4524
|
+
"enableJsonFlag": false,
|
|
4525
|
+
"offlineCompatible": true,
|
|
4526
|
+
"isESM": false,
|
|
4527
|
+
"relativePath": [
|
|
4528
|
+
"build",
|
|
4529
|
+
"commands",
|
|
4530
|
+
"util",
|
|
4531
|
+
"available-drives.js"
|
|
4532
|
+
]
|
|
4533
|
+
},
|
|
4512
4534
|
"tag:list": {
|
|
4513
4535
|
"aliases": [],
|
|
4514
4536
|
"args": {},
|
|
@@ -4729,28 +4751,6 @@
|
|
|
4729
4751
|
"set.js"
|
|
4730
4752
|
]
|
|
4731
4753
|
},
|
|
4732
|
-
"util:available-drives": {
|
|
4733
|
-
"aliases": [],
|
|
4734
|
-
"args": {},
|
|
4735
|
-
"description": "List available drives.\n\nList available drives which are usable for writing an OS image to.\nDoes not list system drives.",
|
|
4736
|
-
"flags": {},
|
|
4737
|
-
"hasDynamicHelp": false,
|
|
4738
|
-
"hiddenAliases": [],
|
|
4739
|
-
"id": "util:available-drives",
|
|
4740
|
-
"pluginAlias": "balena-cli",
|
|
4741
|
-
"pluginName": "balena-cli",
|
|
4742
|
-
"pluginType": "core",
|
|
4743
|
-
"strict": true,
|
|
4744
|
-
"enableJsonFlag": false,
|
|
4745
|
-
"offlineCompatible": true,
|
|
4746
|
-
"isESM": false,
|
|
4747
|
-
"relativePath": [
|
|
4748
|
-
"build",
|
|
4749
|
-
"commands",
|
|
4750
|
-
"util",
|
|
4751
|
-
"available-drives.js"
|
|
4752
|
-
]
|
|
4753
|
-
},
|
|
4754
4754
|
"whoami": {
|
|
4755
4755
|
"aliases": [],
|
|
4756
4756
|
"args": {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "balena-cli",
|
|
3
|
-
"version": "23.1.2-build-remove-help-patch-
|
|
3
|
+
"version": "23.1.2-build-remove-help-patch-4a0d00ce703dfb8c6251d5748ae24dc5aa75df3f-1",
|
|
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",
|
|
@@ -262,6 +262,6 @@
|
|
|
262
262
|
"balena-request": "14.0.6"
|
|
263
263
|
},
|
|
264
264
|
"versionist": {
|
|
265
|
-
"publishedAt": "2025-11-
|
|
265
|
+
"publishedAt": "2025-11-18T17:28:04.439Z"
|
|
266
266
|
}
|
|
267
267
|
}
|
package/src/app.ts
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from './preparser';
|
|
25
25
|
import { CliSettings } from './utils/bootstrap';
|
|
26
26
|
import { onceAsync } from './utils/lazy';
|
|
27
|
-
import { run as mainRun, settings } from '@oclif/core';
|
|
27
|
+
import { run as mainRun, settings, Errors } from '@oclif/core';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Sentry.io setup
|
|
@@ -126,6 +126,34 @@ async function oclifRun(command: string[], options: AppOptions) {
|
|
|
126
126
|
if (error.oclif?.exit === 0) {
|
|
127
127
|
isEEXIT = true;
|
|
128
128
|
} else {
|
|
129
|
+
if (error instanceof Errors.CLIError) {
|
|
130
|
+
const RequiredArgsErrorRegex = /^Missing (\d+) required arg(s?\b)/;
|
|
131
|
+
if (RequiredArgsErrorRegex.exec(error.message) != null) {
|
|
132
|
+
error.message = error.message
|
|
133
|
+
.split('\n')
|
|
134
|
+
.map((line, i) => {
|
|
135
|
+
if (i === 0) {
|
|
136
|
+
// Replace 'arg(s)' with 'argument(s)'
|
|
137
|
+
return line.replace(
|
|
138
|
+
RequiredArgsErrorRegex,
|
|
139
|
+
'Missing $1 required argument$2',
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
// Add a ':' between the missing argument name and its description
|
|
143
|
+
return line.replace(
|
|
144
|
+
/^(?<argName>[\w-]+)(?<paddingSpaces>[ ]+)[ ](?<description>\w)/,
|
|
145
|
+
'$<argName>$<paddingSpaces>: $<description>',
|
|
146
|
+
);
|
|
147
|
+
})
|
|
148
|
+
.join('\n');
|
|
149
|
+
// Print the whole command used along with '--help'
|
|
150
|
+
const helpCommand = `balena ${command.map((c, i) => (i === 0 ? c.replace(/:/g, ' ') : c)).join(' ')} --help`;
|
|
151
|
+
error.message = error.message.replace(
|
|
152
|
+
'\nSee more help with --help',
|
|
153
|
+
`\nSee more help with \`${helpCommand}\``,
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
129
157
|
throw error;
|
|
130
158
|
}
|
|
131
159
|
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
diff --git a/node_modules/@oclif/core/lib/parser/errors.js b/node_modules/@oclif/core/lib/parser/errors.js
|
|
2
|
-
index 168da99..538a880 100644
|
|
3
|
-
--- a/node_modules/@oclif/core/lib/parser/errors.js
|
|
4
|
-
+++ b/node_modules/@oclif/core/lib/parser/errors.js
|
|
5
|
-
@@ -15,7 +15,8 @@ class CLIParseError extends errors_1.CLIError {
|
|
6
|
-
parse;
|
|
7
|
-
showHelp = false;
|
|
8
|
-
constructor(options) {
|
|
9
|
-
- options.message += '\nSee more help with --help';
|
|
10
|
-
+ const help = options.command ? `\`${options.command} --help\`` : '--help';
|
|
11
|
-
+ options.message += `\nSee more help with ${help}`;
|
|
12
|
-
super(options.message, { exit: options.exit });
|
|
13
|
-
this.parse = options.parse;
|
|
14
|
-
}
|
|
15
|
-
@@ -38,7 +39,8 @@ exports.InvalidArgsSpecError = InvalidArgsSpecError;
|
|
16
|
-
class RequiredArgsError extends CLIParseError {
|
|
17
|
-
args;
|
|
18
|
-
constructor({ args, exit, flagsWithMultiple, parse, }) {
|
|
19
|
-
- let message = `Missing ${args.length} required arg${args.length === 1 ? '' : 's'}`;
|
|
20
|
-
+ const command = 'balena ' + parse.input.context.id.replace(/:/g, ' ');
|
|
21
|
-
+ let message = `Missing ${args.length} required argument${args.length === 1 ? '' : 's'}`;
|
|
22
|
-
const namedArgs = args.filter((a) => a.name);
|
|
23
|
-
if (namedArgs.length > 0) {
|
|
24
|
-
const list = (0, list_1.default)(namedArgs.map((a) => {
|
|
25
|
-
@@ -52,7 +54,7 @@ class RequiredArgsError extends CLIParseError {
|
|
26
|
-
message += `\n\nNote: ${flags} allow${flagsWithMultiple.length === 1 ? 's' : ''} multiple values. Because of this you need to provide all arguments before providing ${flagsWithMultiple.length === 1 ? 'that flag' : 'those flags'}.`;
|
|
27
|
-
message += '\nAlternatively, you can use "--" to signify the end of the flags and the beginning of arguments.';
|
|
28
|
-
}
|
|
29
|
-
- super({ exit: cache_1.default.getInstance().get('exitCodes')?.requiredArgs ?? exit, message, parse });
|
|
30
|
-
+ super({ exit: cache_1.default.getInstance().get('exitCodes')?.requiredArgs ?? exit, message, parse, command });
|
|
31
|
-
this.args = args;
|
|
32
|
-
this.showHelp = true;
|
|
33
|
-
}
|
|
34
|
-
diff --git a/node_modules/@oclif/core/lib/ux/list.js b/node_modules/@oclif/core/lib/ux/list.js
|
|
35
|
-
index ebafa29..55c88e5 100644
|
|
36
|
-
--- a/node_modules/@oclif/core/lib/ux/list.js
|
|
37
|
-
+++ b/node_modules/@oclif/core/lib/ux/list.js
|
|
38
|
-
@@ -22,7 +22,7 @@ function renderList(items) {
|
|
39
|
-
}
|
|
40
|
-
left = left.padEnd(maxLength);
|
|
41
|
-
right = linewrap(maxLength + 2, right);
|
|
42
|
-
- return `${left} ${right}`;
|
|
43
|
-
+ return `${left} : ${right}`;
|
|
44
|
-
});
|
|
45
|
-
return lines.join('\n');
|
|
46
|
-
}
|