jdi-cli 0.1.0
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/AGENTS.md +209 -0
- package/ARCHITECTURE.md +210 -0
- package/COMMANDS.md +241 -0
- package/CREATE-EXAMPLE.md +385 -0
- package/CREATE.md +315 -0
- package/EXTENSION.md +141 -0
- package/LICENSE +21 -0
- package/MEMORY.md +471 -0
- package/PORTABILITY.md +438 -0
- package/README.md +789 -0
- package/bin/git-hooks/post-commit +16 -0
- package/bin/git-hooks/pre-commit +21 -0
- package/bin/jdi-build.ps1 +381 -0
- package/bin/jdi-build.sh +332 -0
- package/bin/jdi-doctor.ps1 +403 -0
- package/bin/jdi-doctor.sh +400 -0
- package/bin/jdi-install-caveman.ps1 +97 -0
- package/bin/jdi-install-caveman.sh +99 -0
- package/bin/jdi-install-playwright.ps1 +319 -0
- package/bin/jdi-install-playwright.sh +284 -0
- package/bin/jdi-install.ps1 +154 -0
- package/bin/jdi-install.sh +132 -0
- package/bin/jdi-uninstall.ps1 +309 -0
- package/bin/jdi-uninstall.sh +264 -0
- package/bin/jdi-update.ps1 +215 -0
- package/bin/jdi-update.sh +209 -0
- package/bin/jdi.js +460 -0
- package/bin/lib/jdi-monitor.ps1 +66 -0
- package/bin/lib/jdi-monitor.sh +74 -0
- package/bin/lib/jdi-truncate.ps1 +96 -0
- package/bin/lib/jdi-truncate.sh +99 -0
- package/bin/lib/ui.js +197 -0
- package/core/agents/jdi-adopter.md +465 -0
- package/core/agents/jdi-architect.md +894 -0
- package/core/agents/jdi-asker.md +153 -0
- package/core/agents/jdi-bootstrap.md +247 -0
- package/core/agents/jdi-planner.md +254 -0
- package/core/agents/jdi-researcher.md +303 -0
- package/core/commands/jdi-adopt.md +155 -0
- package/core/commands/jdi-bootstrap.md +81 -0
- package/core/commands/jdi-create.md +80 -0
- package/core/commands/jdi-discuss.md +80 -0
- package/core/commands/jdi-do.md +200 -0
- package/core/commands/jdi-loop.md +315 -0
- package/core/commands/jdi-new.md +131 -0
- package/core/commands/jdi-plan.md +73 -0
- package/core/commands/jdi-ship.md +146 -0
- package/core/commands/jdi-verify.md +159 -0
- package/core/skills/clean-code/SKILL.md +261 -0
- package/core/skills/dry/SKILL.md +150 -0
- package/core/skills/frontend-rules/SKILL.md +386 -0
- package/core/skills/frontend-validator/SKILL.md +567 -0
- package/core/skills/kiss/SKILL.md +178 -0
- package/core/skills/solid/SKILL.md +281 -0
- package/core/skills/yagni/SKILL.md +207 -0
- package/core/templates/agent.md +72 -0
- package/core/templates/doer-specialist.md +216 -0
- package/core/templates/reviewer-specialist.md +405 -0
- package/core/templates/skill.md +66 -0
- package/package.json +70 -0
- package/runtimes/antigravity/agents.md +74 -0
- package/runtimes/antigravity/skills/clean-code/SKILL.md +252 -0
- package/runtimes/antigravity/skills/dry/SKILL.md +141 -0
- package/runtimes/antigravity/skills/frontend-rules/SKILL.md +376 -0
- package/runtimes/antigravity/skills/frontend-validator/SKILL.md +559 -0
- package/runtimes/antigravity/skills/jdi-adopt/SKILL.md +155 -0
- package/runtimes/antigravity/skills/jdi-adopter/SKILL.md +436 -0
- package/runtimes/antigravity/skills/jdi-architect/SKILL.md +872 -0
- package/runtimes/antigravity/skills/jdi-asker/SKILL.md +125 -0
- package/runtimes/antigravity/skills/jdi-asker/references/context-template.md +34 -0
- package/runtimes/antigravity/skills/jdi-asker/references/decision-format.md +19 -0
- package/runtimes/antigravity/skills/jdi-asker/scripts/find_phase_dir.sh +25 -0
- package/runtimes/antigravity/skills/jdi-bootstrap/SKILL.md +81 -0
- package/runtimes/antigravity/skills/jdi-create/SKILL.md +80 -0
- package/runtimes/antigravity/skills/jdi-discuss/SKILL.md +80 -0
- package/runtimes/antigravity/skills/jdi-discuss/scripts/run_command.sh +62 -0
- package/runtimes/antigravity/skills/jdi-do/SKILL.md +200 -0
- package/runtimes/antigravity/skills/jdi-loop/SKILL.md +315 -0
- package/runtimes/antigravity/skills/jdi-new/SKILL.md +131 -0
- package/runtimes/antigravity/skills/jdi-plan/SKILL.md +73 -0
- package/runtimes/antigravity/skills/jdi-planner/SKILL.md +225 -0
- package/runtimes/antigravity/skills/jdi-researcher/SKILL.md +274 -0
- package/runtimes/antigravity/skills/jdi-ship/SKILL.md +146 -0
- package/runtimes/antigravity/skills/jdi-verify/SKILL.md +159 -0
- package/runtimes/antigravity/skills/kiss/SKILL.md +169 -0
- package/runtimes/antigravity/skills/solid/SKILL.md +272 -0
- package/runtimes/antigravity/skills/yagni/SKILL.md +198 -0
- package/runtimes/claude/CLAUDE.md +91 -0
- package/runtimes/claude/agents/jdi-adopter.md +430 -0
- package/runtimes/claude/agents/jdi-architect.md +864 -0
- package/runtimes/claude/agents/jdi-asker.md +119 -0
- package/runtimes/claude/agents/jdi-bootstrap.md +213 -0
- package/runtimes/claude/agents/jdi-planner.md +221 -0
- package/runtimes/claude/agents/jdi-researcher.md +269 -0
- package/runtimes/claude/commands/jdi-adopt.md +155 -0
- package/runtimes/claude/commands/jdi-bootstrap.md +81 -0
- package/runtimes/claude/commands/jdi-create.md +80 -0
- package/runtimes/claude/commands/jdi-discuss.md +80 -0
- package/runtimes/claude/commands/jdi-do.md +200 -0
- package/runtimes/claude/commands/jdi-loop.md +315 -0
- package/runtimes/claude/commands/jdi-new.md +131 -0
- package/runtimes/claude/commands/jdi-plan.md +73 -0
- package/runtimes/claude/commands/jdi-ship.md +146 -0
- package/runtimes/claude/commands/jdi-verify.md +159 -0
- package/runtimes/claude/settings.example.json +132 -0
- package/runtimes/claude/skills/clean-code/SKILL.md +247 -0
- package/runtimes/claude/skills/dry/SKILL.md +136 -0
- package/runtimes/claude/skills/frontend-rules/SKILL.md +369 -0
- package/runtimes/claude/skills/frontend-validator/SKILL.md +553 -0
- package/runtimes/claude/skills/kiss/SKILL.md +164 -0
- package/runtimes/claude/skills/solid/SKILL.md +267 -0
- package/runtimes/claude/skills/yagni/SKILL.md +193 -0
- package/runtimes/copilot/agents/jdi-adopter.agent.md +430 -0
- package/runtimes/copilot/agents/jdi-architect.agent.md +864 -0
- package/runtimes/copilot/agents/jdi-asker.agent.md +119 -0
- package/runtimes/copilot/agents/jdi-bootstrap.agent.md +213 -0
- package/runtimes/copilot/agents/jdi-planner.agent.md +221 -0
- package/runtimes/copilot/agents/jdi-researcher.agent.md +269 -0
- package/runtimes/copilot/copilot-instructions.md +80 -0
- package/runtimes/copilot/prompts/jdi-adopt.prompt.md +155 -0
- package/runtimes/copilot/prompts/jdi-bootstrap.prompt.md +81 -0
- package/runtimes/copilot/prompts/jdi-create.prompt.md +80 -0
- package/runtimes/copilot/prompts/jdi-discuss.prompt.md +80 -0
- package/runtimes/copilot/prompts/jdi-do.prompt.md +200 -0
- package/runtimes/copilot/prompts/jdi-loop.prompt.md +315 -0
- package/runtimes/copilot/prompts/jdi-new.prompt.md +131 -0
- package/runtimes/copilot/prompts/jdi-plan.prompt.md +73 -0
- package/runtimes/copilot/prompts/jdi-ship.prompt.md +146 -0
- package/runtimes/copilot/prompts/jdi-verify.prompt.md +159 -0
- package/runtimes/opencode/AGENTS.md +87 -0
- package/runtimes/opencode/agents/jdi-adopter.md +434 -0
- package/runtimes/opencode/agents/jdi-architect.md +861 -0
- package/runtimes/opencode/agents/jdi-asker.md +123 -0
- package/runtimes/opencode/agents/jdi-bootstrap.md +217 -0
- package/runtimes/opencode/agents/jdi-planner.md +225 -0
- package/runtimes/opencode/agents/jdi-researcher.md +273 -0
- package/runtimes/opencode/commands/jdi-adopt.md +155 -0
- package/runtimes/opencode/commands/jdi-bootstrap.md +81 -0
- package/runtimes/opencode/commands/jdi-create.md +80 -0
- package/runtimes/opencode/commands/jdi-discuss.md +80 -0
- package/runtimes/opencode/commands/jdi-do.md +200 -0
- package/runtimes/opencode/commands/jdi-loop.md +315 -0
- package/runtimes/opencode/commands/jdi-new.md +131 -0
- package/runtimes/opencode/commands/jdi-plan.md +73 -0
- package/runtimes/opencode/commands/jdi-ship.md +146 -0
- package/runtimes/opencode/commands/jdi-verify.md +159 -0
- package/runtimes/opencode/opencode.example.jsonc +169 -0
- package/runtimes/opencode/skills/clean-code/SKILL.md +247 -0
- package/runtimes/opencode/skills/dry/SKILL.md +136 -0
- package/runtimes/opencode/skills/frontend-rules/SKILL.md +369 -0
- package/runtimes/opencode/skills/frontend-validator/SKILL.md +553 -0
- package/runtimes/opencode/skills/kiss/SKILL.md +164 -0
- package/runtimes/opencode/skills/solid/SKILL.md +267 -0
- package/runtimes/opencode/skills/yagni/SKILL.md +193 -0
- package/templates-jdi-folder/config.json +18 -0
- package/templates-jdi-folder/registry.md +31 -0
- package/templates-jdi-folder/reviewers.md +33 -0
- package/templates-jdi-folder/skills-registry.md +32 -0
- package/templates-jdi-folder/specialists.md +39 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# jdi-truncate.sh — markdown-aware truncation pra context budget
|
|
3
|
+
#
|
|
4
|
+
# Uso:
|
|
5
|
+
# jdi-truncate.sh <path> [char_budget]
|
|
6
|
+
#
|
|
7
|
+
# Estrategia:
|
|
8
|
+
# - Preserva YAML frontmatter inteiro
|
|
9
|
+
# - Preserva TODAS as linhas de heading (#, ##, ...)
|
|
10
|
+
# - Preserva 1a linha nao-vazia de cada secao
|
|
11
|
+
# - Resto vira "[... N lines omitted]"
|
|
12
|
+
# - Footer aponta pro arquivo original
|
|
13
|
+
#
|
|
14
|
+
# Se file <= budget, ecoa inteiro. Output sempre pra stdout.
|
|
15
|
+
|
|
16
|
+
set -euo pipefail
|
|
17
|
+
|
|
18
|
+
PATH_IN="${1:-}"
|
|
19
|
+
BUDGET="${2:-8192}"
|
|
20
|
+
|
|
21
|
+
if [ -z "$PATH_IN" ]; then
|
|
22
|
+
echo "uso: jdi-truncate.sh <path> [char_budget]" >&2
|
|
23
|
+
exit 1
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [ ! -f "$PATH_IN" ]; then
|
|
27
|
+
echo "arquivo nao encontrado: $PATH_IN" >&2
|
|
28
|
+
exit 1
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
SIZE=$(wc -c < "$PATH_IN" | tr -d ' ')
|
|
32
|
+
|
|
33
|
+
if [ "$SIZE" -le "$BUDGET" ]; then
|
|
34
|
+
cat "$PATH_IN"
|
|
35
|
+
exit 0
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
awk -v file="$PATH_IN" '
|
|
39
|
+
BEGIN {
|
|
40
|
+
in_frontmatter = 0
|
|
41
|
+
frontmatter_done = 0
|
|
42
|
+
paragraph_kept = 0
|
|
43
|
+
omitted = 0
|
|
44
|
+
}
|
|
45
|
+
{
|
|
46
|
+
line = $0
|
|
47
|
+
|
|
48
|
+
# Frontmatter (so se comecar na linha 1)
|
|
49
|
+
if (NR == 1 && line == "---") {
|
|
50
|
+
in_frontmatter = 1
|
|
51
|
+
print line
|
|
52
|
+
next
|
|
53
|
+
}
|
|
54
|
+
if (in_frontmatter) {
|
|
55
|
+
print line
|
|
56
|
+
if (line == "---") {
|
|
57
|
+
in_frontmatter = 0
|
|
58
|
+
frontmatter_done = 1
|
|
59
|
+
}
|
|
60
|
+
next
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
# Heading — sempre preserva
|
|
64
|
+
if (line ~ /^#{1,6}[[:space:]]/) {
|
|
65
|
+
if (omitted > 0) {
|
|
66
|
+
print "[... " omitted " lines omitted]"
|
|
67
|
+
omitted = 0
|
|
68
|
+
}
|
|
69
|
+
print line
|
|
70
|
+
paragraph_kept = 0
|
|
71
|
+
next
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Linha vazia
|
|
75
|
+
if (line ~ /^[[:space:]]*$/) {
|
|
76
|
+
if (paragraph_kept == 0) {
|
|
77
|
+
print line
|
|
78
|
+
} else {
|
|
79
|
+
omitted++
|
|
80
|
+
}
|
|
81
|
+
next
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
# Linha de conteudo
|
|
85
|
+
if (paragraph_kept == 0) {
|
|
86
|
+
print line
|
|
87
|
+
paragraph_kept = 1
|
|
88
|
+
} else {
|
|
89
|
+
omitted++
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
END {
|
|
93
|
+
if (omitted > 0) {
|
|
94
|
+
print "[... " omitted " lines omitted]"
|
|
95
|
+
}
|
|
96
|
+
print ""
|
|
97
|
+
print "[Truncated by jdi-truncate. Read " file " for full content]"
|
|
98
|
+
}
|
|
99
|
+
' "$PATH_IN"
|
package/bin/lib/ui.js
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// ANSI escape codes — sem deps externas
|
|
4
|
+
const isTTY = process.stdout.isTTY;
|
|
5
|
+
const supportsColor = isTTY && !process.env.NO_COLOR;
|
|
6
|
+
|
|
7
|
+
const c = {
|
|
8
|
+
reset: supportsColor ? '\x1b[0m' : '',
|
|
9
|
+
bold: supportsColor ? '\x1b[1m' : '',
|
|
10
|
+
dim: supportsColor ? '\x1b[2m' : '',
|
|
11
|
+
italic: supportsColor ? '\x1b[3m' : '',
|
|
12
|
+
underline: supportsColor ? '\x1b[4m' : '',
|
|
13
|
+
|
|
14
|
+
black: supportsColor ? '\x1b[30m' : '',
|
|
15
|
+
red: supportsColor ? '\x1b[31m' : '',
|
|
16
|
+
green: supportsColor ? '\x1b[32m' : '',
|
|
17
|
+
yellow: supportsColor ? '\x1b[33m' : '',
|
|
18
|
+
blue: supportsColor ? '\x1b[34m' : '',
|
|
19
|
+
magenta: supportsColor ? '\x1b[35m' : '',
|
|
20
|
+
cyan: supportsColor ? '\x1b[36m' : '',
|
|
21
|
+
white: supportsColor ? '\x1b[37m' : '',
|
|
22
|
+
gray: supportsColor ? '\x1b[90m' : '',
|
|
23
|
+
|
|
24
|
+
bgBlue: supportsColor ? '\x1b[44m' : '',
|
|
25
|
+
bgGreen: supportsColor ? '\x1b[42m' : '',
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// ASCII banner do JDI
|
|
29
|
+
const BANNER = [
|
|
30
|
+
'',
|
|
31
|
+
`${c.cyan}${c.bold} ██╗██████╗ ██╗${c.reset}`,
|
|
32
|
+
`${c.cyan}${c.bold} ██║██╔══██╗██║${c.reset}`,
|
|
33
|
+
`${c.cyan}${c.bold} ██║██║ ██║██║${c.reset}`,
|
|
34
|
+
`${c.cyan}${c.bold}██ ██║██║ ██║██║${c.reset}`,
|
|
35
|
+
`${c.cyan}${c.bold}╚█████╔╝██████╔╝██║${c.reset}`,
|
|
36
|
+
`${c.cyan}${c.bold} ╚════╝ ╚═════╝ ╚═╝${c.reset}`,
|
|
37
|
+
'',
|
|
38
|
+
`${c.dim} Just Do It ${c.reset}${c.gray}— workflow enxuto, multi-runtime${c.reset}`,
|
|
39
|
+
'',
|
|
40
|
+
];
|
|
41
|
+
|
|
42
|
+
function banner() {
|
|
43
|
+
console.log(BANNER.join('\n'));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Box drawing
|
|
47
|
+
function box(title, lines, opts = {}) {
|
|
48
|
+
const color = opts.color || c.cyan;
|
|
49
|
+
const width = Math.max(
|
|
50
|
+
title.length + 4,
|
|
51
|
+
...lines.map((l) => stripAnsi(l).length + 4),
|
|
52
|
+
50
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
const top = `${color}╭${'─'.repeat(width - 2)}╮${c.reset}`;
|
|
56
|
+
const bottom = `${color}╰${'─'.repeat(width - 2)}╯${c.reset}`;
|
|
57
|
+
const titleLine = `${color}│${c.reset} ${c.bold}${title}${c.reset}${' '.repeat(width - 3 - title.length)}${color}│${c.reset}`;
|
|
58
|
+
const sep = `${color}├${'─'.repeat(width - 2)}┤${c.reset}`;
|
|
59
|
+
|
|
60
|
+
console.log(top);
|
|
61
|
+
console.log(titleLine);
|
|
62
|
+
console.log(sep);
|
|
63
|
+
for (const line of lines) {
|
|
64
|
+
const visibleLen = stripAnsi(line).length;
|
|
65
|
+
const padding = ' '.repeat(Math.max(0, width - 3 - visibleLen));
|
|
66
|
+
console.log(`${color}│${c.reset} ${line}${padding}${color}│${c.reset}`);
|
|
67
|
+
}
|
|
68
|
+
console.log(bottom);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function stripAnsi(str) {
|
|
72
|
+
return str.replace(/\x1b\[[0-9;]*m/g, '');
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// Symbols
|
|
76
|
+
const sym = {
|
|
77
|
+
success: `${c.green}✓${c.reset}`,
|
|
78
|
+
error: `${c.red}✗${c.reset}`,
|
|
79
|
+
warn: `${c.yellow}⚠${c.reset}`,
|
|
80
|
+
info: `${c.cyan}ℹ${c.reset}`,
|
|
81
|
+
arrow: `${c.cyan}→${c.reset}`,
|
|
82
|
+
dot: `${c.gray}·${c.reset}`,
|
|
83
|
+
bullet: `${c.cyan}●${c.reset}`,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
// Step printers
|
|
87
|
+
function step(msg) {
|
|
88
|
+
console.log(`${sym.arrow} ${msg}`);
|
|
89
|
+
}
|
|
90
|
+
function ok(msg) {
|
|
91
|
+
console.log(` ${sym.success} ${msg}`);
|
|
92
|
+
}
|
|
93
|
+
function fail(msg) {
|
|
94
|
+
console.log(` ${sym.error} ${c.red}${msg}${c.reset}`);
|
|
95
|
+
}
|
|
96
|
+
function warn(msg) {
|
|
97
|
+
console.log(` ${sym.warn} ${c.yellow}${msg}${c.reset}`);
|
|
98
|
+
}
|
|
99
|
+
function info(msg) {
|
|
100
|
+
console.log(` ${sym.info} ${c.dim}${msg}${c.reset}`);
|
|
101
|
+
}
|
|
102
|
+
function dim(msg) {
|
|
103
|
+
console.log(` ${c.gray}${msg}${c.reset}`);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function header(title) {
|
|
107
|
+
console.log('');
|
|
108
|
+
console.log(`${c.bold}${c.cyan}${title}${c.reset}`);
|
|
109
|
+
console.log(`${c.gray}${'─'.repeat(Math.min(60, title.length + 10))}${c.reset}`);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function divider() {
|
|
113
|
+
console.log(`${c.gray}${'─'.repeat(60)}${c.reset}`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Spinner
|
|
117
|
+
const SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
118
|
+
|
|
119
|
+
function spinner(msg) {
|
|
120
|
+
if (!isTTY) {
|
|
121
|
+
console.log(`${sym.arrow} ${msg}...`);
|
|
122
|
+
return {
|
|
123
|
+
stop: () => {},
|
|
124
|
+
success: (s) => ok(s || msg),
|
|
125
|
+
fail: (s) => fail(s || msg),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
let i = 0;
|
|
130
|
+
let active = true;
|
|
131
|
+
const interval = setInterval(() => {
|
|
132
|
+
if (!active) return;
|
|
133
|
+
process.stdout.write(`\r${c.cyan}${SPINNER_FRAMES[i]}${c.reset} ${msg} `);
|
|
134
|
+
i = (i + 1) % SPINNER_FRAMES.length;
|
|
135
|
+
}, 80);
|
|
136
|
+
|
|
137
|
+
return {
|
|
138
|
+
stop: () => {
|
|
139
|
+
active = false;
|
|
140
|
+
clearInterval(interval);
|
|
141
|
+
process.stdout.write('\r' + ' '.repeat(80) + '\r');
|
|
142
|
+
},
|
|
143
|
+
success: (s) => {
|
|
144
|
+
active = false;
|
|
145
|
+
clearInterval(interval);
|
|
146
|
+
process.stdout.write('\r' + ' '.repeat(80) + '\r');
|
|
147
|
+
ok(s || msg);
|
|
148
|
+
},
|
|
149
|
+
fail: (s) => {
|
|
150
|
+
active = false;
|
|
151
|
+
clearInterval(interval);
|
|
152
|
+
process.stdout.write('\r' + ' '.repeat(80) + '\r');
|
|
153
|
+
fail(s || msg);
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
// Pretty success summary box
|
|
159
|
+
function successSummary(title, lines) {
|
|
160
|
+
console.log('');
|
|
161
|
+
box(`${c.green}${title}${c.reset}`, lines, { color: c.green });
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function errorSummary(title, lines) {
|
|
165
|
+
console.log('');
|
|
166
|
+
box(`${c.red}${title}${c.reset}`, lines, { color: c.red });
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// Hint pra proximo passo
|
|
170
|
+
function nextSteps(steps) {
|
|
171
|
+
console.log('');
|
|
172
|
+
console.log(`${c.bold}${c.cyan}Proximos passos:${c.reset}`);
|
|
173
|
+
for (let i = 0; i < steps.length; i++) {
|
|
174
|
+
console.log(` ${c.cyan}${i + 1}.${c.reset} ${steps[i]}`);
|
|
175
|
+
}
|
|
176
|
+
console.log('');
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
module.exports = {
|
|
180
|
+
c,
|
|
181
|
+
sym,
|
|
182
|
+
banner,
|
|
183
|
+
box,
|
|
184
|
+
step,
|
|
185
|
+
ok,
|
|
186
|
+
fail,
|
|
187
|
+
warn,
|
|
188
|
+
info,
|
|
189
|
+
dim,
|
|
190
|
+
header,
|
|
191
|
+
divider,
|
|
192
|
+
spinner,
|
|
193
|
+
successSummary,
|
|
194
|
+
errorSummary,
|
|
195
|
+
nextSteps,
|
|
196
|
+
stripAnsi,
|
|
197
|
+
};
|