indusagi-coding-agent 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +101 -0
- package/README.md +2 -0
- package/dist/cli/args.d.ts +117 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +221 -52
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts +58 -2
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +130 -12
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/file-processor.d.ts +70 -2
- package/dist/cli/file-processor.d.ts.map +1 -1
- package/dist/cli/file-processor.js +240 -15
- package/dist/cli/file-processor.js.map +1 -1
- package/dist/cli/list-models.d.ts +63 -3
- package/dist/cli/list-models.d.ts.map +1 -1
- package/dist/cli/list-models.js +202 -27
- package/dist/cli/list-models.js.map +1 -1
- package/dist/cli/login-handler.d.ts +82 -8
- package/dist/cli/login-handler.d.ts.map +1 -1
- package/dist/cli/login-handler.js +410 -77
- package/dist/cli/login-handler.js.map +1 -1
- package/dist/cli/session-picker.d.ts +74 -2
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +236 -12
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/core/agent-session.d.ts +214 -9
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +214 -9
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts +302 -12
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +302 -12
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/diagnostics.d.ts +191 -0
- package/dist/core/diagnostics.d.ts.map +1 -1
- package/dist/core/diagnostics.js +142 -0
- package/dist/core/diagnostics.js.map +1 -1
- package/dist/core/discover-packages.d.ts +6 -0
- package/dist/core/discover-packages.d.ts.map +1 -0
- package/dist/core/discover-packages.js +62 -0
- package/dist/core/discover-packages.js.map +1 -0
- package/dist/core/event-bus.d.ts +146 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js +93 -0
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts +4 -0
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +4 -0
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/index.d.ts +128 -0
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +128 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts +4 -0
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +4 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/keybindings.d.ts +142 -0
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +142 -0
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-registry.d.ts +98 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +98 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +99 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +99 -1
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/prompt-templates.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +2 -0
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +127 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +125 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/skills.js.map +1 -1
- package/dist/core/subagents.js.map +1 -1
- package/dist/core/tools/bash.d.ts +391 -11
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +269 -2
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/bg-process.d.ts +49 -0
- package/dist/core/tools/bg-process.d.ts.map +1 -0
- package/dist/core/tools/bg-process.js +69 -0
- package/dist/core/tools/bg-process.js.map +1 -0
- package/dist/core/tools/edit.d.ts +284 -6
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +238 -0
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +169 -5
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +136 -0
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +285 -5
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +247 -0
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/index.d.ts +45 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +15 -0
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/ls.d.ts +6 -0
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +6 -0
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +308 -7
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +231 -0
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/registry.d.ts +17 -0
- package/dist/core/tools/registry.d.ts.map +1 -0
- package/dist/core/tools/registry.js +108 -0
- package/dist/core/tools/registry.js.map +1 -0
- package/dist/core/tools/webfetch.d.ts +118 -3
- package/dist/core/tools/webfetch.d.ts.map +1 -1
- package/dist/core/tools/webfetch.js +118 -3
- package/dist/core/tools/webfetch.js.map +1 -1
- package/dist/core/tools/websearch.d.ts +130 -3
- package/dist/core/tools/websearch.d.ts.map +1 -1
- package/dist/core/tools/websearch.js +130 -3
- package/dist/core/tools/websearch.js.map +1 -1
- package/dist/core/tools/write.d.ts +251 -5
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js +210 -0
- package/dist/core/tools/write.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +12 -1
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +164 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +164 -1
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +297 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +297 -1
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +251 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +186 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +186 -1
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1567 -13
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1567 -13
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +422 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +422 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts +538 -5
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +538 -5
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +921 -8
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +921 -8
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts +802 -9
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +802 -9
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +356 -3
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js +356 -3
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/dist/modes/shared.d.ts +386 -0
- package/dist/modes/shared.d.ts.map +1 -0
- package/dist/modes/shared.js +543 -0
- package/dist/modes/shared.js.map +1 -0
- package/dist/utils/array.d.ts +389 -0
- package/dist/utils/array.d.ts.map +1 -0
- package/dist/utils/array.js +585 -0
- package/dist/utils/array.js.map +1 -0
- package/dist/utils/color-formatter.d.ts +318 -0
- package/dist/utils/color-formatter.d.ts.map +1 -0
- package/dist/utils/color-formatter.js +442 -0
- package/dist/utils/color-formatter.js.map +1 -0
- package/dist/utils/data-transformer.d.ts +326 -0
- package/dist/utils/data-transformer.d.ts.map +1 -0
- package/dist/utils/data-transformer.js +512 -0
- package/dist/utils/data-transformer.js.map +1 -0
- package/dist/utils/date-formatter.d.ts +281 -0
- package/dist/utils/date-formatter.d.ts.map +1 -0
- package/dist/utils/date-formatter.js +503 -0
- package/dist/utils/date-formatter.js.map +1 -0
- package/dist/utils/error-handler.d.ts +541 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +726 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/file-operations.d.ts +297 -0
- package/dist/utils/file-operations.d.ts.map +1 -0
- package/dist/utils/file-operations.js +505 -0
- package/dist/utils/file-operations.js.map +1 -0
- package/dist/utils/frontmatter.d.ts +268 -6
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +500 -21
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/json-formatter.d.ts +259 -0
- package/dist/utils/json-formatter.d.ts.map +1 -0
- package/dist/utils/json-formatter.js +517 -0
- package/dist/utils/json-formatter.js.map +1 -0
- package/dist/utils/logger.d.ts +176 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +346 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/markdown-formatter.d.ts +211 -0
- package/dist/utils/markdown-formatter.d.ts.map +1 -0
- package/dist/utils/markdown-formatter.js +482 -0
- package/dist/utils/markdown-formatter.js.map +1 -0
- package/dist/utils/path-validator.d.ts +603 -0
- package/dist/utils/path-validator.d.ts.map +1 -0
- package/dist/utils/path-validator.js +870 -0
- package/dist/utils/path-validator.js.map +1 -0
- package/dist/utils/string-formatter.d.ts +609 -0
- package/dist/utils/string-formatter.d.ts.map +1 -0
- package/dist/utils/string-formatter.js +806 -0
- package/dist/utils/string-formatter.js.map +1 -0
- package/dist/utils/type-guards.d.ts +629 -0
- package/dist/utils/type-guards.d.ts.map +1 -0
- package/dist/utils/type-guards.js +662 -0
- package/dist/utils/type-guards.js.map +1 -0
- package/docs/COMPLETE-GUIDE.md +300 -0
- package/docs/COMPREHENSIVE-CLI-SUMMARY.md +900 -0
- package/docs/MODES-ARCHITECTURE.md +565 -0
- package/docs/PRINT-MODE-GUIDE.md +456 -0
- package/docs/RPC-GUIDE.md +705 -0
- package/docs/UTILS-IMPLEMENTATION-SUMMARY.md +647 -0
- package/docs/UTILS-MODULE-OVERVIEW.md +1480 -0
- package/docs/UTILS-QA-CHECKLIST.md +1061 -0
- package/docs/UTILS-USAGE-GUIDE.md +1419 -0
- package/package.json +7 -3
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ANSI color and text styling utilities for terminal output
|
|
3
|
+
*
|
|
4
|
+
* This module provides:
|
|
5
|
+
* - 8 basic ANSI colors + bright variants
|
|
6
|
+
* - Text styling (bold, dim, italic, underline)
|
|
7
|
+
* - Color palettes and combinations
|
|
8
|
+
* - Safe color stripping for logs
|
|
9
|
+
* - Nested color support
|
|
10
|
+
* - Web-safe color conversion
|
|
11
|
+
*
|
|
12
|
+
* Supported colors: black, red, green, yellow, blue, magenta, cyan, white
|
|
13
|
+
* Plus bright variants: brightRed, brightGreen, etc.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { colorize, stripColors, bg, bold } from './color-formatter';
|
|
17
|
+
*
|
|
18
|
+
* console.log(colorize('Hello World', 'red'));
|
|
19
|
+
* console.log(bold(colorize('Important', 'blue')));
|
|
20
|
+
*
|
|
21
|
+
* @author indusagi
|
|
22
|
+
* @version 1.0.0
|
|
23
|
+
*/
|
|
24
|
+
/** ANSI color codes */
|
|
25
|
+
const COLORS = {
|
|
26
|
+
reset: '\x1b[0m',
|
|
27
|
+
// Basic colors
|
|
28
|
+
black: '\x1b[30m',
|
|
29
|
+
red: '\x1b[31m',
|
|
30
|
+
green: '\x1b[32m',
|
|
31
|
+
yellow: '\x1b[33m',
|
|
32
|
+
blue: '\x1b[34m',
|
|
33
|
+
magenta: '\x1b[35m',
|
|
34
|
+
cyan: '\x1b[36m',
|
|
35
|
+
white: '\x1b[37m',
|
|
36
|
+
// Bright colors
|
|
37
|
+
brightBlack: '\x1b[90m',
|
|
38
|
+
brightRed: '\x1b[91m',
|
|
39
|
+
brightGreen: '\x1b[92m',
|
|
40
|
+
brightYellow: '\x1b[93m',
|
|
41
|
+
brightBlue: '\x1b[94m',
|
|
42
|
+
brightMagenta: '\x1b[95m',
|
|
43
|
+
brightCyan: '\x1b[96m',
|
|
44
|
+
brightWhite: '\x1b[97m',
|
|
45
|
+
};
|
|
46
|
+
/** ANSI background color codes */
|
|
47
|
+
const BG_COLORS = {
|
|
48
|
+
bgBlack: '\x1b[40m',
|
|
49
|
+
bgRed: '\x1b[41m',
|
|
50
|
+
bgGreen: '\x1b[42m',
|
|
51
|
+
bgYellow: '\x1b[43m',
|
|
52
|
+
bgBlue: '\x1b[44m',
|
|
53
|
+
bgMagenta: '\x1b[45m',
|
|
54
|
+
bgCyan: '\x1b[46m',
|
|
55
|
+
bgWhite: '\x1b[47m',
|
|
56
|
+
// Bright backgrounds
|
|
57
|
+
bgBrightBlack: '\x1b[100m',
|
|
58
|
+
bgBrightRed: '\x1b[101m',
|
|
59
|
+
bgBrightGreen: '\x1b[102m',
|
|
60
|
+
bgBrightYellow: '\x1b[103m',
|
|
61
|
+
bgBrightBlue: '\x1b[104m',
|
|
62
|
+
bgBrightMagenta: '\x1b[105m',
|
|
63
|
+
bgBrightCyan: '\x1b[106m',
|
|
64
|
+
bgBrightWhite: '\x1b[107m',
|
|
65
|
+
};
|
|
66
|
+
/** ANSI text styles */
|
|
67
|
+
const STYLES = {
|
|
68
|
+
bold: '\x1b[1m',
|
|
69
|
+
dim: '\x1b[2m',
|
|
70
|
+
italic: '\x1b[3m',
|
|
71
|
+
underline: '\x1b[4m',
|
|
72
|
+
blink: '\x1b[5m',
|
|
73
|
+
reverse: '\x1b[7m',
|
|
74
|
+
hidden: '\x1b[8m',
|
|
75
|
+
strikethrough: '\x1b[9m',
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Colorize text with ANSI color
|
|
79
|
+
* @param text - Text to colorize
|
|
80
|
+
* @param color - Color name
|
|
81
|
+
* @returns Colorized text
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* colorize('Error', 'red'); // '\x1b[31mError\x1b[0m'
|
|
85
|
+
* console.log(colorize('Hello', 'green')); // Displays in green
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* colorize('Info', 'brightBlue');
|
|
89
|
+
* colorize('Success', 'brightGreen');
|
|
90
|
+
*/
|
|
91
|
+
export function colorize(text, color) {
|
|
92
|
+
const colorCode = COLORS[color];
|
|
93
|
+
if (!colorCode) {
|
|
94
|
+
return text;
|
|
95
|
+
}
|
|
96
|
+
return `${colorCode}${text}${COLORS.reset}`;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Apply background color to text
|
|
100
|
+
* @param text - Text to colorize
|
|
101
|
+
* @param bgColor - Background color name
|
|
102
|
+
* @returns Text with background color
|
|
103
|
+
*
|
|
104
|
+
* @example
|
|
105
|
+
* bg('Alert', 'bgRed'); // Red background
|
|
106
|
+
* console.log(bg('Important', 'bgYellow')); // Yellow background text
|
|
107
|
+
*/
|
|
108
|
+
export function bg(text, bgColor) {
|
|
109
|
+
const bgCode = BG_COLORS[bgColor];
|
|
110
|
+
if (!bgCode) {
|
|
111
|
+
return text;
|
|
112
|
+
}
|
|
113
|
+
return `${bgCode}${text}${COLORS.reset}`;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Apply multiple colors and styles
|
|
117
|
+
* @param text - Text to format
|
|
118
|
+
* @param color - Text color
|
|
119
|
+
* @param bgColor - Background color
|
|
120
|
+
* @param styles - Text styles
|
|
121
|
+
* @returns Formatted text
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* format('Alert', 'white', 'bgRed', ['bold', 'underline']);
|
|
125
|
+
* format('Success', 'white', 'bgGreen', ['bold']);
|
|
126
|
+
*/
|
|
127
|
+
export function format(text, color, bgColor, styles) {
|
|
128
|
+
let result = text;
|
|
129
|
+
// Apply styles first
|
|
130
|
+
if (styles && styles.length > 0) {
|
|
131
|
+
const styleStr = styles.map((s) => STYLES[s]).join('');
|
|
132
|
+
result = `${styleStr}${result}`;
|
|
133
|
+
}
|
|
134
|
+
// Apply background
|
|
135
|
+
if (bgColor) {
|
|
136
|
+
const bgCode = BG_COLORS[bgColor];
|
|
137
|
+
if (bgCode) {
|
|
138
|
+
result = `${bgCode}${result}`;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// Apply foreground color
|
|
142
|
+
if (color) {
|
|
143
|
+
const colorCode = COLORS[color];
|
|
144
|
+
if (colorCode) {
|
|
145
|
+
result = `${colorCode}${result}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return `${result}${COLORS.reset}`;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Make text bold
|
|
152
|
+
* @param text - Text to bold
|
|
153
|
+
* @returns Bold text
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* bold('Important');
|
|
157
|
+
* bold(colorize('Alert', 'red'));
|
|
158
|
+
*/
|
|
159
|
+
export function bold(text) {
|
|
160
|
+
return `${STYLES.bold}${text}${COLORS.reset}`;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Make text dim
|
|
164
|
+
* @param text - Text to dim
|
|
165
|
+
* @returns Dimmed text
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* dim('Disabled feature');
|
|
169
|
+
* dim('Secondary text');
|
|
170
|
+
*/
|
|
171
|
+
export function dim(text) {
|
|
172
|
+
return `${STYLES.dim}${text}${COLORS.reset}`;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Make text italic
|
|
176
|
+
* @param text - Text to italicize
|
|
177
|
+
* @returns Italic text
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* italic('Note: This is important');
|
|
181
|
+
*/
|
|
182
|
+
export function italic(text) {
|
|
183
|
+
return `${STYLES.italic}${text}${COLORS.reset}`;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Underline text
|
|
187
|
+
* @param text - Text to underline
|
|
188
|
+
* @returns Underlined text
|
|
189
|
+
*
|
|
190
|
+
* @example
|
|
191
|
+
* underline('Click here');
|
|
192
|
+
*/
|
|
193
|
+
export function underline(text) {
|
|
194
|
+
return `${STYLES.underline}${text}${COLORS.reset}`;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Strikethrough text
|
|
198
|
+
* @param text - Text to strikethrough
|
|
199
|
+
* @returns Strikethrough text
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* strikethrough('Deprecated feature');
|
|
203
|
+
*/
|
|
204
|
+
export function strikethrough(text) {
|
|
205
|
+
return `${STYLES.strikethrough}${text}${COLORS.reset}`;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Strip all ANSI color and style codes
|
|
209
|
+
* @param text - Text with ANSI codes
|
|
210
|
+
* @returns Plain text without codes
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const colored = colorize('Hello', 'red');
|
|
214
|
+
* const plain = stripColors(colored);
|
|
215
|
+
* // plain = 'Hello'
|
|
216
|
+
*
|
|
217
|
+
* @example
|
|
218
|
+
* const text = bold(colorize('Error: ', 'red')) + 'Something went wrong';
|
|
219
|
+
* const clean = stripColors(text);
|
|
220
|
+
* // clean = 'Error: Something went wrong'
|
|
221
|
+
*/
|
|
222
|
+
export function stripColors(text) {
|
|
223
|
+
return text.replace(/\x1b\[[0-9;]*m/g, '');
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Check if text contains ANSI codes
|
|
227
|
+
* @param text - Text to check
|
|
228
|
+
* @returns True if contains ANSI codes
|
|
229
|
+
*
|
|
230
|
+
* @example
|
|
231
|
+
* hasColors(colorize('Hello', 'red')); // true
|
|
232
|
+
* hasColors('plain text'); // false
|
|
233
|
+
*/
|
|
234
|
+
export function hasColors(text) {
|
|
235
|
+
return /\x1b\[[0-9;]*m/.test(text);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Get ANSI color code for color name
|
|
239
|
+
* @param color - Color name
|
|
240
|
+
* @returns ANSI code or empty string
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* getColorCode('red'); // '\x1b[31m'
|
|
244
|
+
* getColorCode('brightGreen'); // '\x1b[92m'
|
|
245
|
+
*/
|
|
246
|
+
export function getColorCode(color) {
|
|
247
|
+
return COLORS[color] || '';
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Get background color code
|
|
251
|
+
* @param bgColor - Background color name
|
|
252
|
+
* @returns ANSI code or empty string
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* getBgColorCode('bgRed'); // '\x1b[41m'
|
|
256
|
+
*/
|
|
257
|
+
export function getBgColorCode(bgColor) {
|
|
258
|
+
return BG_COLORS[bgColor] || '';
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Get style code
|
|
262
|
+
* @param style - Style name
|
|
263
|
+
* @returns ANSI code or empty string
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* getStyleCode('bold'); // '\x1b[1m'
|
|
267
|
+
*/
|
|
268
|
+
export function getStyleCode(style) {
|
|
269
|
+
return STYLES[style] || '';
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Create a palette of colors for logging
|
|
273
|
+
* @returns Object with preset log level colors
|
|
274
|
+
*
|
|
275
|
+
* @example
|
|
276
|
+
* const palette = getLogPalette();
|
|
277
|
+
* console.log(palette.success('Task completed'));
|
|
278
|
+
* console.log(palette.error('An error occurred'));
|
|
279
|
+
*/
|
|
280
|
+
export function getLogPalette() {
|
|
281
|
+
return {
|
|
282
|
+
success: (text) => colorize(text, 'green'),
|
|
283
|
+
error: (text) => colorize(text, 'red'),
|
|
284
|
+
warn: (text) => colorize(text, 'yellow'),
|
|
285
|
+
info: (text) => colorize(text, 'blue'),
|
|
286
|
+
debug: (text) => colorize(text, 'cyan'),
|
|
287
|
+
secondary: (text) => dim(text),
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* List all available colors
|
|
292
|
+
* @returns Array of color names
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* const colors = getAvailableColors();
|
|
296
|
+
* colors.forEach(color => {
|
|
297
|
+
* console.log(colorize(color, color as ColorName));
|
|
298
|
+
* });
|
|
299
|
+
*/
|
|
300
|
+
export function getAvailableColors() {
|
|
301
|
+
return Object.keys(COLORS).filter((k) => k !== 'reset');
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Create a colorized bar for progress
|
|
305
|
+
* @param percentage - Progress percentage (0-100)
|
|
306
|
+
* @param width - Bar width in characters
|
|
307
|
+
* @param color - Color name
|
|
308
|
+
* @returns Progress bar string
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* console.log(createProgressBar(75, 20, 'green'));
|
|
312
|
+
* // ███████████████░░░░ 75%
|
|
313
|
+
*/
|
|
314
|
+
export function createProgressBar(percentage, width = 20, color = 'green') {
|
|
315
|
+
const filled = Math.round((percentage / 100) * width);
|
|
316
|
+
const empty = width - filled;
|
|
317
|
+
const bar = '█'.repeat(filled) + '░'.repeat(empty);
|
|
318
|
+
return `${colorize(bar, color)} ${percentage}%`;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Create table-like output with aligned columns
|
|
322
|
+
* @param rows - Array of row data
|
|
323
|
+
* @param columnWidths - Width of each column
|
|
324
|
+
* @param headerColor - Color for header
|
|
325
|
+
* @returns Formatted table string
|
|
326
|
+
*
|
|
327
|
+
* @example
|
|
328
|
+
* const rows = [
|
|
329
|
+
* ['Name', 'Age', 'Role'],
|
|
330
|
+
* ['John', '30', 'Admin'],
|
|
331
|
+
* ['Jane', '28', 'User']
|
|
332
|
+
* ];
|
|
333
|
+
* console.log(createTable(rows, [10, 5, 10]));
|
|
334
|
+
*/
|
|
335
|
+
export function createTable(rows, columnWidths, headerColor = 'cyan') {
|
|
336
|
+
return rows
|
|
337
|
+
.map((row, index) => {
|
|
338
|
+
const formatted = row
|
|
339
|
+
.map((cell, colIndex) => {
|
|
340
|
+
const width = columnWidths[colIndex] || 10;
|
|
341
|
+
const padded = cell.padEnd(width);
|
|
342
|
+
return index === 0 ? colorize(padded, headerColor) : padded;
|
|
343
|
+
})
|
|
344
|
+
.join(' | ');
|
|
345
|
+
return formatted;
|
|
346
|
+
})
|
|
347
|
+
.join('\n');
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Convert hex color to ANSI approximation
|
|
351
|
+
* @param hex - Hex color (e.g., '#FF0000')
|
|
352
|
+
* @returns ANSI color name
|
|
353
|
+
*
|
|
354
|
+
* @example
|
|
355
|
+
* hexToAnsi('#FF0000'); // 'red'
|
|
356
|
+
* hexToAnsi('#00FF00'); // 'green'
|
|
357
|
+
* hexToAnsi('#0000FF'); // 'blue'
|
|
358
|
+
*/
|
|
359
|
+
export function hexToAnsi(hex) {
|
|
360
|
+
const clean = hex.replace('#', '').toUpperCase();
|
|
361
|
+
const r = parseInt(clean.substring(0, 2), 16);
|
|
362
|
+
const g = parseInt(clean.substring(2, 4), 16);
|
|
363
|
+
const b = parseInt(clean.substring(4, 6), 16);
|
|
364
|
+
const max = Math.max(r, g, b);
|
|
365
|
+
const min = Math.min(r, g, b);
|
|
366
|
+
if (max === 0)
|
|
367
|
+
return 'black';
|
|
368
|
+
if (r === max && g === 0 && b === 0)
|
|
369
|
+
return r > 128 ? 'brightRed' : 'red';
|
|
370
|
+
if (g === max && r === 0 && b === 0)
|
|
371
|
+
return g > 128 ? 'brightGreen' : 'green';
|
|
372
|
+
if (b === max && r === 0 && g === 0)
|
|
373
|
+
return b > 128 ? 'brightBlue' : 'blue';
|
|
374
|
+
if (r === g && g === b)
|
|
375
|
+
return r > 128 ? 'white' : 'black';
|
|
376
|
+
// Default fallback based on dominant color
|
|
377
|
+
if (r > g && r > b)
|
|
378
|
+
return r > 128 ? 'brightRed' : 'red';
|
|
379
|
+
if (g > r && g > b)
|
|
380
|
+
return g > 128 ? 'brightGreen' : 'green';
|
|
381
|
+
if (b > r && b > g)
|
|
382
|
+
return b > 128 ? 'brightBlue' : 'blue';
|
|
383
|
+
return 'white';
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Wrap text to width with color preservation
|
|
387
|
+
* @param text - Text to wrap (with ANSI codes)
|
|
388
|
+
* @param width - Wrap width
|
|
389
|
+
* @returns Wrapped text
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* const colored = colorize('This is a long line', 'red');
|
|
393
|
+
* console.log(wrapText(colored, 10));
|
|
394
|
+
*/
|
|
395
|
+
export function wrapText(text, width) {
|
|
396
|
+
const clean = stripColors(text);
|
|
397
|
+
const words = clean.split(' ');
|
|
398
|
+
let lines = [];
|
|
399
|
+
let currentLine = '';
|
|
400
|
+
for (const word of words) {
|
|
401
|
+
if ((currentLine + word).length > width) {
|
|
402
|
+
if (currentLine)
|
|
403
|
+
lines.push(currentLine);
|
|
404
|
+
currentLine = word;
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
currentLine += (currentLine ? ' ' : '') + word;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
if (currentLine)
|
|
411
|
+
lines.push(currentLine);
|
|
412
|
+
return lines.join('\n');
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Create a colored heading
|
|
416
|
+
* @param text - Heading text
|
|
417
|
+
* @param char - Character for underline
|
|
418
|
+
* @param color - Color name
|
|
419
|
+
* @returns Colored heading with underline
|
|
420
|
+
*
|
|
421
|
+
* @example
|
|
422
|
+
* console.log(createHeading('Section Title', '=', 'cyan'));
|
|
423
|
+
*/
|
|
424
|
+
export function createHeading(text, char = '=', color = 'cyan') {
|
|
425
|
+
const colored = colorize(text, color);
|
|
426
|
+
const underline = colorize(char.repeat(text.length), color);
|
|
427
|
+
return `${colored}\n${underline}`;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Create a colored badge
|
|
431
|
+
* @param text - Badge text
|
|
432
|
+
* @param color - Color name
|
|
433
|
+
* @returns Colored badge
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* console.log(createBadge('NEW', 'brightGreen'));
|
|
437
|
+
* console.log(createBadge('v1.0', 'brightBlue'));
|
|
438
|
+
*/
|
|
439
|
+
export function createBadge(text, color = 'cyan') {
|
|
440
|
+
return bg(` ${text} `, color);
|
|
441
|
+
}
|
|
442
|
+
//# sourceMappingURL=color-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-formatter.js","sourceRoot":"","sources":["../../src/utils/color-formatter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,uBAAuB;AACvB,MAAM,MAAM,GAAG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