poyka
Version:
A framework for interactively creating, extending and maintaining web application as never easier before while doing it in elegant design patterns.
35 lines • 1.97 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());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TerminalAgent = void 0;
const decova_terminal_1 = require("decova-terminal");
const CurrentTerminal_1 = require("decova-terminal/dist/src/CurrentTerminal");
class TerminalAgent {
static Instruct(text) {
decova_terminal_1.CurrentTerminal.Echo(`₪ ${text}`, CurrentTerminal_1.Foreground.cyanBright, CurrentTerminal_1.Background.bgBlackBright, 2, true, true, false, true);
}
static Exec(cmdText) {
decova_terminal_1.CurrentTerminal.Exec(cmdText);
}
static Hint(hint) {
decova_terminal_1.CurrentTerminal.Echo(`HINT: ${hint}`, CurrentTerminal_1.Foreground.yellow, CurrentTerminal_1.Background.bgBlack, 1, true, false, false, true);
}
static ShowError(error) {
decova_terminal_1.CurrentTerminal.Echo(`! ${error}`, CurrentTerminal_1.Foreground.red, CurrentTerminal_1.Background.bgBlackBright, 1, true, true, false, true);
}
static AskForTextAsync(promptHint) {
return __awaiter(this, void 0, void 0, function* () {
return yield decova_terminal_1.CurrentTerminal.AskForTextAsync(promptHint);
});
}
}
exports.TerminalAgent = TerminalAgent;
//# sourceMappingURL=TerminalAgent.js.map