@cenk1cenk2/oclif-common 6.2.5 → 6.2.6
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/index.d.ts +1 -1
- package/dist/index.js +8 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -388,7 +388,7 @@ declare abstract class Command<T extends typeof Command$1 = typeof Command$1, Ct
|
|
|
388
388
|
ctx: C;
|
|
389
389
|
}>;
|
|
390
390
|
/** Catch any error occurred during command. */
|
|
391
|
-
protected catch(
|
|
391
|
+
protected catch(err: Error): Promise<never>;
|
|
392
392
|
abstract run(): Promise<any>;
|
|
393
393
|
}
|
|
394
394
|
|
package/dist/index.js
CHANGED
|
@@ -1560,6 +1560,9 @@ var ValidatorService = (_a17 = class {
|
|
|
1560
1560
|
}
|
|
1561
1561
|
logValidationError(err) {
|
|
1562
1562
|
this.logger.error('Field "%s" failed validation with value "%s": %o', err.property, err.value, err.constraints);
|
|
1563
|
+
if (err.children) {
|
|
1564
|
+
err.children.forEach((children) => this.logValidationError(children));
|
|
1565
|
+
}
|
|
1563
1566
|
}
|
|
1564
1567
|
}, __name(_a17, "ValidatorService"), _a17);
|
|
1565
1568
|
ValidatorService = _ts_decorate17([
|
|
@@ -1795,16 +1798,17 @@ var _Command = class _Command extends BaseCommand {
|
|
|
1795
1798
|
}
|
|
1796
1799
|
/** Catch any error occurred during command. */
|
|
1797
1800
|
// catch all those errors, not verbose
|
|
1798
|
-
async catch(
|
|
1801
|
+
async catch(err) {
|
|
1802
|
+
process.exitCode = process.exitCode ?? err.exitCode ?? 1;
|
|
1799
1803
|
if (!this.logger) {
|
|
1800
1804
|
this.app = await CliModule.create(CliModule.forMinimum());
|
|
1801
1805
|
this.logger = await this.app.resolve(LoggerService);
|
|
1802
1806
|
}
|
|
1803
|
-
this.logger.fatal(
|
|
1804
|
-
this.logger.debug(
|
|
1807
|
+
this.logger.fatal(err.message);
|
|
1808
|
+
this.logger.debug(err.stack, {
|
|
1805
1809
|
context: "crash"
|
|
1806
1810
|
});
|
|
1807
|
-
|
|
1811
|
+
throw err;
|
|
1808
1812
|
}
|
|
1809
1813
|
};
|
|
1810
1814
|
__name(_Command, "Command");
|