updates checkCode to new framework

This commit is contained in:
2025-05-02 01:11:15 -06:00
parent 26b7089cc2
commit 03a1e3ed21
6 changed files with 128 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
// deno-lint-disable-must-await-calls
import { Cursor } from "./cursor.ts";
import { ScrollManager } from "./scrollManager.ts";
import { colorize } from "./style.ts";
import { TerminalBlock, TerminalLayout } from "./TerminalLayout.ts";
@@ -75,10 +75,14 @@ export function cliAlert(message: string, block?: TerminalBlock) {
});
}
export function cliLog(message: string, block?: TerminalBlock) {
export function cliLog(
message: string | object | Array<unknown>,
block?: TerminalBlock,
) {
if (!block) {
console.log(message);
} else {
if (typeof message === "object") message = Deno.inspect(message);
block.setLines(message.split("\n"));
}
}