tokyo-3
Version:
Worlds Best Pomodoro. 3rd Impact Imminent. Switching to Auxillary Power.
59 lines (58 loc) • 2.65 kB
JavaScript
;
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.dss = 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 dss = () => {
const { terminal } = terminal_kit_1.default;
let swap = true;
const dss1 = () => __awaiter(void 0, void 0, void 0, function* () {
return yield terminal.drawImage(path_1.default.join(__dirname, "../images/dss/dss-1.jpg"), {
shrink: { width: 80, height: 80 },
});
});
const dss2 = () => __awaiter(void 0, void 0, void 0, function* () {
return yield terminal.drawImage(path_1.default.join(__dirname, "../images/dss/dss-2.jpg"), {
shrink: { width: 80, height: 80 },
});
});
const theChoker = setInterval(() => __awaiter(void 0, void 0, void 0, function* () {
terminal.clear();
if (swap) {
yield dss1();
console.log((0, colorette_1.bgBlack)((0, colorette_1.bold)((0, colorette_1.yellow)("WILLE: Deification Shutdown System Choker | WILLE: DSS"))));
}
else {
yield dss2();
console.log((0, colorette_1.bgBlack)((0, colorette_1.bold)((0, colorette_1.red)("WILLE: DSS | WILLE: Deification Shutdown System Choker"))));
}
swap = !swap;
}), 800);
const clearAll = setTimeout(() => {
clearInterval(theChoker);
clearTimeout(clearAll);
_1.rl.write("\u001B[?25h");
terminal.clear();
console.log((0, colorette_1.yellow)(_1.example));
process.exit();
}, 10000);
theChoker;
(0, node_notifier_1.notify)("🚨TIME🚨");
clearAll;
};
exports.dss = dss;