@oclif/core 2.3.1 → 2.4.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/config/util.d.ts +1 -1
- package/lib/config/util.js +1 -1
- package/lib/errors/handle.d.ts +3 -1
- package/lib/errors/handle.js +1 -1
- package/lib/help/util.js +1 -1
- package/package.json +2 -2
package/lib/config/util.d.ts
CHANGED
|
@@ -33,4 +33,4 @@ export declare function getCommandIdPermutations(commandId: string): string[];
|
|
|
33
33
|
* @param commandIds string[]
|
|
34
34
|
* @returns string[]
|
|
35
35
|
*/
|
|
36
|
-
export declare function collectUsableIds(commandIds: string[]): string
|
|
36
|
+
export declare function collectUsableIds(commandIds: string[]): Set<string>;
|
package/lib/config/util.js
CHANGED
package/lib/errors/handle.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { OclifError, PrettyPrintableError } from '../interfaces';
|
|
2
|
-
export declare const handle: (err: Error & Partial<PrettyPrintableError> & Partial<OclifError>
|
|
2
|
+
export declare const handle: (err: Error & Partial<PrettyPrintableError> & Partial<OclifError> & {
|
|
3
|
+
skipOclifErrorHandling?: boolean;
|
|
4
|
+
}) => void;
|
package/lib/errors/handle.js
CHANGED
|
@@ -14,7 +14,7 @@ const handle = (err) => {
|
|
|
14
14
|
err = new cli_1.CLIError('no error?');
|
|
15
15
|
if (err.message === 'SIGINT')
|
|
16
16
|
process.exit(1);
|
|
17
|
-
const shouldPrint = !(err instanceof _1.ExitError);
|
|
17
|
+
const shouldPrint = !(err instanceof _1.ExitError) && !err.skipOclifErrorHandling;
|
|
18
18
|
const pretty = (0, pretty_print_1.default)(err);
|
|
19
19
|
const stack = clean(err.stack || '', { pretty: true });
|
|
20
20
|
if (shouldPrint) {
|
package/lib/help/util.js
CHANGED
|
@@ -37,7 +37,7 @@ function collateSpacedCmdIDFromArgs(argv, config) {
|
|
|
37
37
|
const findId = (argv) => {
|
|
38
38
|
const ids = (0, util_1.collectUsableIds)(config.commandIDs);
|
|
39
39
|
const final = [];
|
|
40
|
-
const idPresent = (id) => ids.
|
|
40
|
+
const idPresent = (id) => ids.has(id);
|
|
41
41
|
const isFlag = (s) => s.startsWith('-');
|
|
42
42
|
const isArgWithValue = (s) => s.includes('=');
|
|
43
43
|
const finalizeId = (s) => s ? [...final, s].join(':') : final.join(':');
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oclif/core",
|
|
3
3
|
"description": "base library for oclif CLIs",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@commitlint/config-conventional": "^12.1.4",
|
|
39
39
|
"@oclif/plugin-help": "^5.2.5",
|
|
40
40
|
"@oclif/plugin-plugins": "^2.3.2",
|
|
41
|
-
"@oclif/test": "^2.3.
|
|
41
|
+
"@oclif/test": "^2.3.7",
|
|
42
42
|
"@types/ansi-styles": "^3.2.1",
|
|
43
43
|
"@types/chai": "^4.3.4",
|
|
44
44
|
"@types/chai-as-promised": "^7.1.5",
|