UNPKG

tokyo-3

Version:

Worlds Best Pomodoro. 3rd Impact Imminent. Switching to Auxillary Power.

62 lines (61 loc) 2.99 kB
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.shinji = void 0; const colorette_1 = require("colorette"); const terminal_kit_1 = __importDefault(require("terminal-kit")); const node_notifier_1 = require("node-notifier"); const _1 = require("."); const path_1 = __importDefault(require("path")); const shinji = () => { const { terminal } = terminal_kit_1.default; let swap = 1; const run1 = () => __awaiter(void 0, void 0, void 0, function* () { return yield terminal.drawImage(path_1.default.join(__dirname, `../images/unit-1-run/r${swap}.jpg`), { shrink: { width: 80, height: 80 }, }); }); const atField = [ "A.T. FIELD ▁ A.T. FIELD ▁ A.T. FIELD ▁ ", "A.T. FIELD ▁ ▂ A.T. FIELD ▁ ▂ A.T. FIELD ▁ ▂ ", "A.T. FIELD ▁ ▂ ▄ A.T. FIELD ▁ ▂ ▄ A.T. FIELD ▁ ▂ ▄ ", "A.T. FIELD ▁ ▂ ▄ ▅ A.T. FIELD ▁ ▂ ▄ ▅ A.T. FIELD ▁ ▂ ▄ ▅ ", "A.T. FIELD ▁ ▂ ▄ ▅ ▆ A.T. FIELD ▁ ▂ ▄ ▅ ▆ A.T. FIELD ▁ ▂ ▄ ▅ ▆ ", "A.T. FIELD ▁ ▂ ▄ ▅ ▆ ▇ █ █ █ A.T. FIELD ▁ ▂ ▄ ▅ ▆ ▇ █ █ █ A.T. FIELD ▁ ▂ ▄ ▅ ▆ ▇ ", ]; const bakaRun = setInterval(() => __awaiter(void 0, void 0, void 0, function* () { terminal.clear(); if (swap !== 6) { yield run1(); swap = swap + 1; } else { yield run1(); swap = 1; } console.log((0, colorette_1.bold)((0, colorette_1.red)(atField[swap - 1]))); }), 200); const clearBaka = setTimeout(() => { clearInterval(bakaRun); clearTimeout(clearBaka); _1.rl.write("\u001B[?25h"); console.clear(); console.log((0, colorette_1.yellow)(_1.example)); process.exit(); }, 10000); bakaRun; (0, node_notifier_1.notify)("🚨TIME🚨"); clearBaka; }; exports.shinji = shinji;