@oclif/core 3.4.0 → 3.5.0
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/lib/command.d.ts +2 -1
- package/lib/errors/index.d.ts +1 -1
- package/lib/errors/index.js +3 -1
- package/package.json +1 -1
package/lib/command.d.ts
CHANGED
|
@@ -97,7 +97,8 @@ export declare abstract class Command {
|
|
|
97
97
|
code?: string;
|
|
98
98
|
exit?: number;
|
|
99
99
|
} & PrettyPrintableError): never;
|
|
100
|
-
exit(code
|
|
100
|
+
exit(code: number): never;
|
|
101
|
+
exit(code: 0): void;
|
|
101
102
|
protected finally(_: Error | undefined): Promise<any>;
|
|
102
103
|
protected init(): Promise<any>;
|
|
103
104
|
/**
|
package/lib/errors/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { CLIError } from './errors/cli';
|
|
|
5
5
|
export { ExitError } from './errors/exit';
|
|
6
6
|
export { ModuleLoadError } from './errors/module-load';
|
|
7
7
|
export { handle } from './handle';
|
|
8
|
-
export declare function exit(code?: number):
|
|
8
|
+
export declare function exit(code?: number): void;
|
|
9
9
|
export declare function error(input: Error | string, options: {
|
|
10
10
|
exit: false;
|
|
11
11
|
} & PrettyPrintableError): void;
|
package/lib/errors/index.js
CHANGED
|
@@ -39,7 +39,9 @@ Object.defineProperty(exports, "ModuleLoadError", { enumerable: true, get: funct
|
|
|
39
39
|
var handle_1 = require("./handle");
|
|
40
40
|
Object.defineProperty(exports, "handle", { enumerable: true, get: function () { return handle_1.handle; } });
|
|
41
41
|
function exit(code = 0) {
|
|
42
|
-
|
|
42
|
+
if (code !== 0) {
|
|
43
|
+
throw new exit_1.ExitError(code);
|
|
44
|
+
}
|
|
43
45
|
}
|
|
44
46
|
exports.exit = exit;
|
|
45
47
|
function error(input, options = {}) {
|