bob-core 0.3.0 → 0.3.2
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/CommandHelper.js
CHANGED
|
@@ -35,15 +35,14 @@ class CommandHelper {
|
|
|
35
35
|
const maxArgumentLength = (0, lodash_1.max)(availableArguments.map((arg) => arg.name.length)) ?? 0;
|
|
36
36
|
const maxLength = maxArgumentLength > maxOptionLength ? maxArgumentLength : maxOptionLength;
|
|
37
37
|
if (availableArguments.length > 0) {
|
|
38
|
-
log((0, chalk_1.default)
|
|
38
|
+
log((0, chalk_1.default) `\n{yellow Arguments}:`);
|
|
39
39
|
for (const signature of availableArguments) {
|
|
40
40
|
const spaces = (0, string_1.generateSpace)(maxLength - signature.name.length);
|
|
41
41
|
log((0, chalk_1.default) ` {green ${signature.name}} ${spaces} ${signature.help ?? '\b'} ${signature.optional ? (0, chalk_1.default) `{gray (optional)}` : ''}`);
|
|
42
42
|
}
|
|
43
|
-
log((0, chalk_1.default) ``);
|
|
44
43
|
}
|
|
45
44
|
if (availableOptions.length > 0) {
|
|
46
|
-
log((0, chalk_1.default)
|
|
45
|
+
log((0, chalk_1.default) `\n{yellow Options}:`);
|
|
47
46
|
for (const signature of availableOptions) {
|
|
48
47
|
const spaces = (0, string_1.generateSpace)(maxLength - signature.optionWithAlias.length);
|
|
49
48
|
log((0, chalk_1.default) ` {green ${signature.optionWithAlias}} ${spaces} ${signature.help ?? '\b'} `);
|
|
@@ -46,7 +46,7 @@ class CommandNotFoundError extends BobError_1.BobError {
|
|
|
46
46
|
if (similarCommands.length) {
|
|
47
47
|
log((0, chalk_1.default) ` {white.bgRed ERROR } Command "${this.command}" is not defined, Did you mean one of these?`);
|
|
48
48
|
for (const cmd of similarCommands) {
|
|
49
|
-
log((0, chalk_1.default) ` {gray ⇂ ${
|
|
49
|
+
log((0, chalk_1.default) ` {gray ⇂ ${cmd}}`);
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
else {
|