bob-core 0.9.1 → 0.9.4
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/Command.d.ts +1 -1
- package/dist/errors/BadParameter.js +1 -1
- package/dist/errors/InvalidOption.js +1 -1
- package/dist/errors/MissingRequiredArgumentValue.js +2 -2
- package/dist/errors/MissingSignatureArgument.js +1 -1
- package/dist/errors/MissingSignatureOption.js +1 -1
- package/package.json +1 -1
package/dist/Command.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type CommandExample = {
|
|
|
4
4
|
description: string;
|
|
5
5
|
command: string;
|
|
6
6
|
};
|
|
7
|
-
export declare abstract class Command<C =
|
|
7
|
+
export declare abstract class Command<C = any> extends CommandHelper {
|
|
8
8
|
abstract signature: string;
|
|
9
9
|
abstract description: string;
|
|
10
10
|
protected ctx: C;
|
|
@@ -21,7 +21,7 @@ class BadParameter extends BobError_1.BobError {
|
|
|
21
21
|
}
|
|
22
22
|
pretty() {
|
|
23
23
|
const log = console.log;
|
|
24
|
-
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument
|
|
24
|
+
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument {bold.yellow ${this.param.param}} value is invalid. `);
|
|
25
25
|
if (this.param.value || this.param.reason) {
|
|
26
26
|
log('');
|
|
27
27
|
}
|
|
@@ -26,7 +26,7 @@ class InvalidOption extends BobError_1.BobError {
|
|
|
26
26
|
}
|
|
27
27
|
log('');
|
|
28
28
|
}
|
|
29
|
-
log((0, chalk_1.default) ` {white.bgRed ERROR } Option
|
|
29
|
+
log((0, chalk_1.default) ` {white.bgRed ERROR } Option {bold.yellow ${this.option}} is not recognized.`);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.InvalidOption = InvalidOption;
|
|
@@ -14,10 +14,10 @@ class MissingRequiredArgumentValue extends BobError_1.BobError {
|
|
|
14
14
|
}
|
|
15
15
|
pretty() {
|
|
16
16
|
const log = console.log;
|
|
17
|
-
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument "${this.paramSignature.name}" is required.`);
|
|
18
17
|
if (this.paramSignature.help) {
|
|
19
|
-
log((0, chalk_1.default)
|
|
18
|
+
log((0, chalk_1.default) `{yellow Help}: ${this.paramSignature.help}\n`);
|
|
20
19
|
}
|
|
20
|
+
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument {bold.yellow ${this.paramSignature.name}} is required.`);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
exports.MissingRequiredArgumentValue = MissingRequiredArgumentValue;
|
|
@@ -25,7 +25,7 @@ class MissingSignatureArgument extends BobError_1.BobError {
|
|
|
25
25
|
}
|
|
26
26
|
log('');
|
|
27
27
|
}
|
|
28
|
-
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument
|
|
28
|
+
log((0, chalk_1.default) ` {white.bgRed ERROR } Argument {bold.yellow ${this.argument}} is missing in the signature.`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.MissingSignatureArgument = MissingSignatureArgument;
|
|
@@ -25,7 +25,7 @@ class MissingSignatureOption extends BobError_1.BobError {
|
|
|
25
25
|
}
|
|
26
26
|
log('');
|
|
27
27
|
}
|
|
28
|
-
log((0, chalk_1.default) ` {white.bgRed ERROR } Option
|
|
28
|
+
log((0, chalk_1.default) ` {white.bgRed ERROR } Option {bold.yellow ${this.option}} is missing in the signature.`);
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.MissingSignatureOption = MissingSignatureOption;
|