UNPKG

vrem

Version:

An open-source automatic time-tracker

23 lines (22 loc) 1.22 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const colors_1 = __importDefault(require("../colors")); const constants_1 = __importDefault(require("../constants")); const db_1 = __importDefault(require("../db")); const migration0_1 = __importDefault(require("../migrations/migration0")); const process_1 = require("../process"); (0, migration0_1.default)(db_1.default); // it should be done in the db file, but if db is already created for some reason, we have to do it here async function check() { if (!(await (0, process_1.isProcessAlive)(constants_1.default.autoTrackerSocketPath))) { console.warn(colors_1.default.yellow("The auto-tracking process is stopped.\n" + `Run "${colors_1.default.green('vrem on')}" to start it.`)); } if (!(await (0, process_1.isProcessAlive)(constants_1.default.serverSocketPath))) { console.warn(colors_1.default.yellow("The server process is stopped.\n" + `Run "${colors_1.default.green('vrem server on')}" to start it.`)); } } void check();