1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.displayManualRestartTip = exports.listenForManualRestart = void 0;
|
4 | const chalk = require("chalk");
|
5 | function listenForManualRestart(callback) {
|
6 | const stdinListener = (data) => {
|
7 | if (data.toString().trim() === 'rs') {
|
8 | process.stdin.removeListener('data', stdinListener);
|
9 | callback();
|
10 | }
|
11 | };
|
12 | process.stdin.on('data', stdinListener);
|
13 | }
|
14 | exports.listenForManualRestart = listenForManualRestart;
|
15 | function displayManualRestartTip() {
|
16 | console.log(`To restart at any time, enter ${chalk.gray('rs')}.\n`);
|
17 | }
|
18 | exports.displayManualRestartTip = displayManualRestartTip;
|