@oclif/core 2.0.11 → 2.1.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/config.d.ts +1 -1
- package/lib/config/config.js +3 -1
- package/package.json +2 -2
package/lib/config/config.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export declare class Config implements IConfig {
|
|
|
44
44
|
loadCorePlugins(): Promise<void>;
|
|
45
45
|
loadDevPlugins(): Promise<void>;
|
|
46
46
|
loadUserPlugins(): Promise<void>;
|
|
47
|
-
runHook<T extends keyof Hooks>(event: T, opts: Hooks[T]['options'], timeout?: number): Promise<Hook.Result<Hooks[T]['return']>>;
|
|
47
|
+
runHook<T extends keyof Hooks>(event: T, opts: Hooks[T]['options'], timeout?: number, captureErrors?: boolean): Promise<Hook.Result<Hooks[T]['return']>>;
|
|
48
48
|
runCommand<T = unknown>(id: string, argv?: string[], cachedCommand?: Command.Loadable | null): Promise<T>;
|
|
49
49
|
scopedEnvVar(k: string): string | undefined;
|
|
50
50
|
scopedEnvVarTrue(k: string): boolean;
|
package/lib/config/config.js
CHANGED
|
@@ -186,7 +186,7 @@ class Config {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
async runHook(event, opts, timeout) {
|
|
189
|
+
async runHook(event, opts, timeout, captureErrors) {
|
|
190
190
|
debug('start %s hook', event);
|
|
191
191
|
const search = (m) => {
|
|
192
192
|
if (typeof m === 'function')
|
|
@@ -244,6 +244,8 @@ class Config {
|
|
|
244
244
|
catch (error) {
|
|
245
245
|
final.failures.push({ plugin: p, error: error });
|
|
246
246
|
debug(error);
|
|
247
|
+
if (!captureErrors && error.oclif?.exit !== undefined)
|
|
248
|
+
throw error;
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
251
|
});
|
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.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/oclif/core/issues",
|
|
7
7
|
"dependencies": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"commitlint": "^12.1.4",
|
|
64
64
|
"eslint": "^7.32.0",
|
|
65
65
|
"eslint-config-oclif": "^4.0.0",
|
|
66
|
-
"eslint-config-oclif-typescript": "^1.0.
|
|
66
|
+
"eslint-config-oclif-typescript": "^1.0.3",
|
|
67
67
|
"fancy-test": "^2.0.12",
|
|
68
68
|
"globby": "^11.1.0",
|
|
69
69
|
"husky": "6",
|