improves block functionality

adds cli compatible prompts/logs
adds logfile function for debug
adds multiselect support
new fieldRename
adds listFieldNames
This commit is contained in:
2025-04-30 01:17:45 -06:00
parent 2634f40f2b
commit 9535222fb7
14 changed files with 623 additions and 70 deletions

21
cli/style.ts Normal file
View File

@@ -0,0 +1,21 @@
const colorMap = {
purple: "\x1b[35m",
porple: "\x1b[38;2;150;0;200m",
red: "\x1b[31m",
green: "\x1b[32m",
yellow: "\x1b[33m",
blue: "\x1b[34m",
cyan: "\x1b[36m",
white: "\x1b[37m",
gray: "\x1b[90m",
get grey() {
return this.gray;
},
};
export function colorize(text: string, color?: keyof typeof colorMap | string) {
if (!color) return text;
const c = colorMap[color as keyof typeof colorMap];
if (!c) return text;
return `${c}${text}\x1b[0m`;
}