16 lines
416 B
TypeScript
16 lines
416 B
TypeScript
export const defaults = () => {
|
|
const DefaultCommand = 'salamander';
|
|
if (process.argv.length === 2) {
|
|
process.argv.push(DefaultCommand);
|
|
}
|
|
process.on('unhandledRejection', (reason: string) => {
|
|
console.error('Unhandled rejection, reason: ', reason)
|
|
})
|
|
}
|
|
|
|
export const sanitize = (argv: any): any => {
|
|
return {
|
|
...argv,
|
|
logLevel: argv.logLevel || 'info'
|
|
}
|
|
} |