mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
build: update dependencies
This commit is contained in:
12
src/cli.ts
12
src/cli.ts
@@ -13,7 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import * as commander from 'commander';
|
||||
import {Command} from 'commander';
|
||||
import {existsSync, readFileSync, writeFileSync} from 'fs';
|
||||
import * as got from 'got';
|
||||
import {join, resolve} from 'path';
|
||||
@@ -38,12 +38,16 @@ import {UMLConfig} from './uml/uml-config';
|
||||
import {validateFiles, writeReport} from './validate';
|
||||
|
||||
// handle unhandled promise rejections
|
||||
process.on('unhandledRejection', async (error: Error) => {
|
||||
await Logger.error(error.message);
|
||||
Logger.info(error.stack);
|
||||
process.on('unhandledRejection', async (reason: unknown) => {
|
||||
if (reason instanceof Error) {
|
||||
await Logger.error(reason.message);
|
||||
Logger.info(reason.stack);
|
||||
}
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
const commander = new Command('openstapps-core-tools');
|
||||
|
||||
commander
|
||||
.version(JSON.parse(
|
||||
readFileSync(resolve(__dirname, '..', 'package.json'))
|
||||
|
||||
Reference in New Issue
Block a user