UNPKG

@omni-door/cli

Version:

A tool set for set up the standard JS project

22 lines (21 loc) 751 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var utils_1 = require("@omni-door/utils"); function default_1() { ['SIGINT', 'SIGQUIT', 'SIGTERM'].forEach(function (sig) { process.on(sig, function () { utils_1.logInfo("process exit by " + sig); process.exit(0); }); }); process.on('uncaughtException', function (e) { utils_1.logErr("uncaughtException - " + e.name + ":" + e.message); }); process.on('unhandledRejection', function (reason) { utils_1.logErr("unhandledRejection - " + JSON.stringify(reason)); }); process.on('exit', function (code) { utils_1.logInfo("exit with code " + code); }); } exports.default = default_1;