@vee-stack/delta-cli 2.0.9 → 2.0.11
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/dist/adapters/analysis.adapter.d.ts +29 -0
- package/dist/analyzer/commands/analyze.d.ts +14 -0
- package/dist/analyzer/commands/config.d.ts +12 -0
- package/dist/analyzer/commands/report.d.ts +11 -0
- package/dist/analyzer/generators/report.generator.d.ts +43 -0
- package/dist/analyzer/index.d.ts +8 -0
- package/dist/analyzer/scanners/project.scanner.d.ts +29 -0
- package/dist/analyzer/validators/contracts.validator.d.ts +27 -0
- package/dist/analyzer/validators/maintainability.validator.d.ts +27 -0
- package/dist/analyzer/validators/observability.validator.d.ts +27 -0
- package/dist/analyzer/validators/performance.validator.d.ts +27 -0
- package/dist/analyzer/validators/security.validator.d.ts +27 -0
- package/dist/analyzer/validators/soc.validator.d.ts +27 -0
- package/dist/auth/device-auth.d.ts +18 -0
- package/dist/auth/secure-auth.d.ts +35 -0
- package/dist/bundle.mjs +422 -0
- package/dist/commands/analyze.d.ts +12 -0
- package/dist/commands/auth-new.d.ts +6 -0
- package/dist/commands/auth.d.ts +17 -0
- package/dist/commands/config.d.ts +8 -0
- package/dist/commands/deploy.d.ts +5 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/logout.d.ts +2 -0
- package/dist/commands/plugins.d.ts +7 -0
- package/dist/commands/status.d.ts +5 -0
- package/dist/commands/sync.d.ts +5 -0
- package/dist/commands/whoami.d.ts +4 -0
- package/dist/components/Dashboard.d.ts +8 -0
- package/dist/components/DeltaApp.d.ts +13 -0
- package/dist/components/UnifiedManager.d.ts +10 -0
- package/dist/core/audit.d.ts +60 -0
- package/dist/core/completion.d.ts +79 -0
- package/dist/core/contracts.d.ts +127 -0
- package/dist/core/engine.d.ts +26 -0
- package/dist/core/exit-codes.d.ts +19 -0
- package/dist/core/hooks.d.ts +50 -0
- package/dist/core/{index.js → index.d.ts} +1 -1
- package/dist/core/policy.d.ts +24 -0
- package/dist/core/profiles.d.ts +45 -0
- package/dist/core/wizard.d.ts +28 -0
- package/dist/interactive/index.d.ts +5 -0
- package/dist/plugins/GitStatusPlugin.d.ts +25 -0
- package/dist/providers/ai-provider.d.ts +21 -0
- package/dist/providers/local-provider.d.ts +21 -0
- package/dist/providers/remote-provider.d.ts +15 -0
- package/dist/telemetry/wrapper.d.ts +18 -0
- package/dist/types/api.d.ts +46 -0
- package/dist/ui.d.ts +52 -0
- package/dist/welcome.d.ts +8 -0
- package/package.json +8 -10
- package/dist/adapters/analysis.adapter.js +0 -42
- package/dist/analyzer/commands/analyze.js +0 -220
- package/dist/analyzer/commands/config.js +0 -83
- package/dist/analyzer/commands/report.js +0 -38
- package/dist/analyzer/generators/report.generator.js +0 -123
- package/dist/analyzer/index.js +0 -44
- package/dist/analyzer/scanners/project.scanner.js +0 -92
- package/dist/analyzer/validators/contracts.validator.js +0 -42
- package/dist/analyzer/validators/maintainability.validator.js +0 -40
- package/dist/analyzer/validators/observability.validator.js +0 -39
- package/dist/analyzer/validators/performance.validator.js +0 -42
- package/dist/analyzer/validators/security.validator.js +0 -66
- package/dist/analyzer/validators/soc.validator.js +0 -75
- package/dist/auth/device-auth.js +0 -261
- package/dist/auth/secure-auth.js +0 -401
- package/dist/commands/analyze.js +0 -393
- package/dist/commands/auth-new.js +0 -37
- package/dist/commands/auth.js +0 -131
- package/dist/commands/config.js +0 -51
- package/dist/commands/deploy.js +0 -6
- package/dist/commands/init.js +0 -47
- package/dist/commands/logout.js +0 -31
- package/dist/commands/plugins.js +0 -21
- package/dist/commands/status.js +0 -82
- package/dist/commands/sync.js +0 -6
- package/dist/commands/whoami.js +0 -72
- package/dist/components/Dashboard.js +0 -167
- package/dist/components/DeltaApp.js +0 -57
- package/dist/components/UnifiedManager.js +0 -372
- package/dist/core/audit.js +0 -184
- package/dist/core/completion.js +0 -305
- package/dist/core/contracts.js +0 -6
- package/dist/core/engine.js +0 -130
- package/dist/core/exit-codes.js +0 -79
- package/dist/core/hooks.js +0 -181
- package/dist/core/policy.js +0 -115
- package/dist/core/profiles.js +0 -161
- package/dist/core/wizard.js +0 -203
- package/dist/index.js +0 -403
- package/dist/interactive/index.js +0 -11
- package/dist/plugins/GitStatusPlugin.js +0 -93
- package/dist/providers/ai-provider.js +0 -74
- package/dist/providers/local-provider.js +0 -304
- package/dist/providers/remote-provider.js +0 -100
- package/dist/telemetry/wrapper.js +0 -114
- package/dist/types/api.js +0 -3
- package/dist/ui.js +0 -226
- package/dist/welcome.js +0 -91
package/dist/ui.js
DELETED
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Professional UI Components for Delta CLI
|
|
3
|
-
*/
|
|
4
|
-
import chalk from 'chalk';
|
|
5
|
-
import ora from 'ora';
|
|
6
|
-
import Table from 'cli-table3';
|
|
7
|
-
import prompts from 'prompts';
|
|
8
|
-
// Icons and symbols
|
|
9
|
-
export const icons = {
|
|
10
|
-
success: chalk.green('✔'),
|
|
11
|
-
error: chalk.red('✖'),
|
|
12
|
-
warning: chalk.yellow('⚠'),
|
|
13
|
-
info: chalk.blue('ℹ'),
|
|
14
|
-
arrow: chalk.cyan('→'),
|
|
15
|
-
bullet: chalk.dim('•'),
|
|
16
|
-
star: chalk.yellow('★'),
|
|
17
|
-
check: chalk.green('✓'),
|
|
18
|
-
cross: chalk.red('✗'),
|
|
19
|
-
loading: chalk.cyan('⏳'),
|
|
20
|
-
rocket: chalk.magenta('🚀'),
|
|
21
|
-
lock: chalk.yellow('🔒'),
|
|
22
|
-
user: chalk.blue('👤'),
|
|
23
|
-
package: chalk.cyan('📦'),
|
|
24
|
-
chart: chalk.green('📊'),
|
|
25
|
-
folder: chalk.yellow('📁'),
|
|
26
|
-
gear: chalk.gray('⚙️'),
|
|
27
|
-
link: chalk.blue('🔗'),
|
|
28
|
-
sparkles: chalk.yellow('✨'),
|
|
29
|
-
dot: chalk.cyan('⏵'),
|
|
30
|
-
};
|
|
31
|
-
// Spinner management
|
|
32
|
-
let currentSpinner = null;
|
|
33
|
-
export function startSpinner(text) {
|
|
34
|
-
if (currentSpinner) {
|
|
35
|
-
currentSpinner.stop();
|
|
36
|
-
}
|
|
37
|
-
currentSpinner = ora({
|
|
38
|
-
text: chalk.cyan(text),
|
|
39
|
-
spinner: 'dots',
|
|
40
|
-
color: 'cyan',
|
|
41
|
-
}).start();
|
|
42
|
-
return currentSpinner;
|
|
43
|
-
}
|
|
44
|
-
export function stopSpinner(success = true, text) {
|
|
45
|
-
if (currentSpinner) {
|
|
46
|
-
if (success) {
|
|
47
|
-
currentSpinner.succeed(text ? chalk.green(text) : undefined);
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
currentSpinner.fail(text ? chalk.red(text) : undefined);
|
|
51
|
-
}
|
|
52
|
-
currentSpinner = null;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
export function updateSpinnerText(text) {
|
|
56
|
-
if (currentSpinner) {
|
|
57
|
-
currentSpinner.text = chalk.cyan(text);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
// Headers and sections
|
|
61
|
-
export function printHeader(title) {
|
|
62
|
-
console.log();
|
|
63
|
-
console.log(chalk.bold(chalk.cyan(` ${icons.rocket} ${title}`)));
|
|
64
|
-
console.log(chalk.dim(' ' + '─'.repeat(title.length + 4)));
|
|
65
|
-
}
|
|
66
|
-
export function printSection(title) {
|
|
67
|
-
console.log();
|
|
68
|
-
console.log(chalk.bold(chalk.white(` ${icons.dot} ${title}`)));
|
|
69
|
-
}
|
|
70
|
-
export function printSubSection(title) {
|
|
71
|
-
console.log(chalk.dim(` ${icons.bullet} ${title}`));
|
|
72
|
-
}
|
|
73
|
-
// Success/Error/Warning messages
|
|
74
|
-
export function printSuccess(message) {
|
|
75
|
-
console.log(` ${icons.success} ${chalk.green(message)}`);
|
|
76
|
-
}
|
|
77
|
-
export function printError(message, details) {
|
|
78
|
-
console.log(` ${icons.error} ${chalk.red(message)}`);
|
|
79
|
-
if (details) {
|
|
80
|
-
console.log(chalk.dim(` ${details}`));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
export function printWarning(message) {
|
|
84
|
-
console.log(` ${icons.warning} ${chalk.yellow(message)}`);
|
|
85
|
-
}
|
|
86
|
-
export function printInfo(message) {
|
|
87
|
-
console.log(` ${icons.info} ${chalk.blue(message)}`);
|
|
88
|
-
}
|
|
89
|
-
// Key-value pairs
|
|
90
|
-
export function printKeyValue(key, value, keyColor = chalk.gray) {
|
|
91
|
-
console.log(` ${keyColor(key.padEnd(20))} ${chalk.white(value)}`);
|
|
92
|
-
}
|
|
93
|
-
// Table creation
|
|
94
|
-
export function createTable(headers) {
|
|
95
|
-
return new Table({
|
|
96
|
-
head: headers.map(h => chalk.bold(chalk.cyan(h))),
|
|
97
|
-
style: {
|
|
98
|
-
head: [],
|
|
99
|
-
border: [chalk.dim('gray')],
|
|
100
|
-
},
|
|
101
|
-
chars: {
|
|
102
|
-
top: '─',
|
|
103
|
-
'top-mid': '┬',
|
|
104
|
-
'top-left': '┌',
|
|
105
|
-
'top-right': '┐',
|
|
106
|
-
bottom: '─',
|
|
107
|
-
'bottom-mid': '┴',
|
|
108
|
-
'bottom-left': '└',
|
|
109
|
-
'bottom-right': '┘',
|
|
110
|
-
left: '│',
|
|
111
|
-
'left-mid': '├',
|
|
112
|
-
mid: '─',
|
|
113
|
-
'mid-mid': '┼',
|
|
114
|
-
right: '│',
|
|
115
|
-
'right-mid': '┤',
|
|
116
|
-
middle: '│',
|
|
117
|
-
},
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
// Interactive prompts wrapper
|
|
121
|
-
export async function confirm(message, initial = true) {
|
|
122
|
-
const response = await prompts({
|
|
123
|
-
type: 'confirm',
|
|
124
|
-
name: 'value',
|
|
125
|
-
message: chalk.cyan(message),
|
|
126
|
-
initial,
|
|
127
|
-
});
|
|
128
|
-
return response.value ?? false;
|
|
129
|
-
}
|
|
130
|
-
export async function select(message, choices) {
|
|
131
|
-
const response = await prompts({
|
|
132
|
-
type: 'select',
|
|
133
|
-
name: 'value',
|
|
134
|
-
message: chalk.cyan(message),
|
|
135
|
-
choices: choices.map(c => ({
|
|
136
|
-
title: c.title,
|
|
137
|
-
value: c.value,
|
|
138
|
-
description: c.description,
|
|
139
|
-
})),
|
|
140
|
-
});
|
|
141
|
-
return response.value ?? null;
|
|
142
|
-
}
|
|
143
|
-
export async function input(message, initial, validate) {
|
|
144
|
-
const response = await prompts({
|
|
145
|
-
type: 'text',
|
|
146
|
-
name: 'value',
|
|
147
|
-
message: chalk.cyan(message),
|
|
148
|
-
initial,
|
|
149
|
-
validate,
|
|
150
|
-
});
|
|
151
|
-
return response.value ?? null;
|
|
152
|
-
}
|
|
153
|
-
export async function password(message) {
|
|
154
|
-
const response = await prompts({
|
|
155
|
-
type: 'password',
|
|
156
|
-
name: 'value',
|
|
157
|
-
message: chalk.cyan(message),
|
|
158
|
-
});
|
|
159
|
-
return response.value ?? null;
|
|
160
|
-
}
|
|
161
|
-
// Progress bar for file operations
|
|
162
|
-
export function printProgress(current, total, prefix = 'Progress') {
|
|
163
|
-
const percentage = Math.round((current / total) * 100);
|
|
164
|
-
const filled = Math.round((current / total) * 20);
|
|
165
|
-
const empty = 20 - filled;
|
|
166
|
-
const bar = chalk.green('█'.repeat(filled)) + chalk.gray('░'.repeat(empty));
|
|
167
|
-
process.stdout.write(`\r ${chalk.cyan(prefix)} ${bar} ${chalk.white(`${percentage}%`)} (${current}/${total})`);
|
|
168
|
-
if (current === total) {
|
|
169
|
-
process.stdout.write('\n');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
// Box drawing
|
|
173
|
-
export function printBox(title, lines) {
|
|
174
|
-
const maxLength = Math.max(title.length, ...lines.map(l => l.length));
|
|
175
|
-
const width = maxLength + 4;
|
|
176
|
-
console.log(chalk.cyan(' ┌' + '─'.repeat(width - 2) + '┐'));
|
|
177
|
-
console.log(chalk.cyan(` │ ${chalk.bold(title).padEnd(width - 3)}│`));
|
|
178
|
-
console.log(chalk.cyan(' ├' + '─'.repeat(width - 2) + '┤'));
|
|
179
|
-
lines.forEach(line => {
|
|
180
|
-
console.log(chalk.cyan(` │ ${line.padEnd(width - 3)}│`));
|
|
181
|
-
});
|
|
182
|
-
console.log(chalk.cyan(' └' + '─'.repeat(width - 2) + '┘'));
|
|
183
|
-
}
|
|
184
|
-
// Format bytes
|
|
185
|
-
export function formatBytes(bytes) {
|
|
186
|
-
if (bytes === 0)
|
|
187
|
-
return '0 B';
|
|
188
|
-
const k = 1024;
|
|
189
|
-
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
190
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
191
|
-
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
192
|
-
}
|
|
193
|
-
// Format duration
|
|
194
|
-
export function formatDuration(ms) {
|
|
195
|
-
if (ms < 1000)
|
|
196
|
-
return `${ms}ms`;
|
|
197
|
-
if (ms < 60000)
|
|
198
|
-
return `${(ms / 1000).toFixed(1)}s`;
|
|
199
|
-
return `${(ms / 60000).toFixed(1)}m`;
|
|
200
|
-
}
|
|
201
|
-
// Command hint
|
|
202
|
-
export function printCommandHint(command, description) {
|
|
203
|
-
console.log(` ${chalk.dim('$')} ${chalk.cyan(command)} ${chalk.gray(description)}`);
|
|
204
|
-
}
|
|
205
|
-
// Divider
|
|
206
|
-
export function printDivider() {
|
|
207
|
-
console.log(chalk.dim(' ' + '─'.repeat(60)));
|
|
208
|
-
}
|
|
209
|
-
// Welcome message
|
|
210
|
-
export function printWelcome() {
|
|
211
|
-
console.log();
|
|
212
|
-
console.log(chalk.cyan(' ╭──────────────────────────────────────────────╮'));
|
|
213
|
-
console.log(chalk.cyan(' │') +
|
|
214
|
-
' ' +
|
|
215
|
-
chalk.bold(chalk.magenta('🚀 Delta CLI')) +
|
|
216
|
-
chalk.dim(' - Code Analysis & Documentation ') +
|
|
217
|
-
chalk.cyan('│'));
|
|
218
|
-
console.log(chalk.cyan(' ├──────────────────────────────────────────────┤'));
|
|
219
|
-
console.log(chalk.cyan(' │') +
|
|
220
|
-
' ' +
|
|
221
|
-
chalk.gray('Local-first analysis with cloud power ') +
|
|
222
|
-
chalk.cyan('│'));
|
|
223
|
-
console.log(chalk.cyan(' ╰──────────────────────────────────────────────╯'));
|
|
224
|
-
console.log();
|
|
225
|
-
}
|
|
226
|
-
//# sourceMappingURL=ui.js.map
|
package/dist/welcome.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import gradient from 'gradient-string';
|
|
3
|
-
import figlet from 'figlet';
|
|
4
|
-
import updateNotifier from 'update-notifier';
|
|
5
|
-
import chalk from 'chalk';
|
|
6
|
-
import { readFileSync } from 'fs';
|
|
7
|
-
import { fileURLToPath } from 'url';
|
|
8
|
-
import { dirname, join } from 'path';
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
|
-
// Read package.json for version info
|
|
12
|
-
const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf8'));
|
|
13
|
-
// Check for updates
|
|
14
|
-
const notifier = updateNotifier({
|
|
15
|
-
pkg,
|
|
16
|
-
updateCheckInterval: 1000 * 60 * 60, // 1 hour
|
|
17
|
-
});
|
|
18
|
-
// Define gradient themes
|
|
19
|
-
export const gradients = {
|
|
20
|
-
delta: gradient(['#00d4ff', '#7b2cbf', '#ff006e']),
|
|
21
|
-
cyber: gradient(['#00f5ff', '#0080ff', '#8000ff']),
|
|
22
|
-
sunset: gradient(['#ff4e50', '#fca311', '#e85d04']),
|
|
23
|
-
neon: gradient(['#39ff14', '#00ffff', '#ff00ff']),
|
|
24
|
-
ocean: gradient(['#0066ff', '#00ccff', '#66ffff']),
|
|
25
|
-
fire: gradient(['#ff4e00', '#ff9500', '#ffcc00']),
|
|
26
|
-
};
|
|
27
|
-
// Print animated logo
|
|
28
|
-
export function printLogo(variant = 'delta') {
|
|
29
|
-
const text = figlet.textSync('DELTA', {
|
|
30
|
-
font: 'Big Money-nw',
|
|
31
|
-
horizontalLayout: 'default',
|
|
32
|
-
verticalLayout: 'default',
|
|
33
|
-
});
|
|
34
|
-
console.log('\n' + gradients[variant](text) + '\n');
|
|
35
|
-
}
|
|
36
|
-
// Print minimal logo
|
|
37
|
-
export function printMinimalLogo() {
|
|
38
|
-
const text = figlet.textSync('Δ', {
|
|
39
|
-
font: 'ANSI Shadow',
|
|
40
|
-
horizontalLayout: 'default',
|
|
41
|
-
});
|
|
42
|
-
console.log(gradients.delta(text));
|
|
43
|
-
}
|
|
44
|
-
// Print welcome screen
|
|
45
|
-
export function printWelcome() {
|
|
46
|
-
console.clear();
|
|
47
|
-
printLogo();
|
|
48
|
-
console.log(chalk.dim(' ═══════════════════════════════════════════════════════════════'));
|
|
49
|
-
console.log();
|
|
50
|
-
console.log(chalk.white.bold(' 🚀 Delta CLI v2.0') +
|
|
51
|
-
chalk.gray(' — Next-gen code analysis & documentation'));
|
|
52
|
-
console.log();
|
|
53
|
-
console.log(chalk.gray(' Local-first architecture with ') +
|
|
54
|
-
chalk.cyan('cloud power') +
|
|
55
|
-
chalk.gray(' & ') +
|
|
56
|
-
chalk.magenta('AI intelligence'));
|
|
57
|
-
console.log();
|
|
58
|
-
console.log(chalk.dim(' ═══════════════════════════════════════════════════════════════'));
|
|
59
|
-
console.log();
|
|
60
|
-
// Update notification
|
|
61
|
-
if (notifier.update) {
|
|
62
|
-
console.log(chalk.yellow.bold(' ⚡ Update Available!'));
|
|
63
|
-
console.log(chalk.gray(` ${notifier.update.current} → ${notifier.update.latest}`));
|
|
64
|
-
console.log(chalk.cyan(` Run: npm install -g ${pkg.name}`));
|
|
65
|
-
console.log();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
// Print tips
|
|
69
|
-
export function printTips() {
|
|
70
|
-
const tips = [
|
|
71
|
-
{ cmd: 'delta login', desc: 'Authenticate with your account' },
|
|
72
|
-
{ cmd: 'delta analyze', desc: 'Run code analysis on current project' },
|
|
73
|
-
{ cmd: 'delta dashboard', desc: 'Open interactive dashboard' },
|
|
74
|
-
{ cmd: 'delta --help', desc: 'Show all available commands' },
|
|
75
|
-
];
|
|
76
|
-
console.log(chalk.bold.cyan(' Quick Start:'));
|
|
77
|
-
console.log();
|
|
78
|
-
tips.forEach(({ cmd, desc }) => {
|
|
79
|
-
console.log(chalk.gray(' • ') + chalk.cyan(cmd) + chalk.gray(` — ${desc}`));
|
|
80
|
-
});
|
|
81
|
-
console.log();
|
|
82
|
-
console.log(chalk.dim(' Press ') +
|
|
83
|
-
chalk.bold('Ctrl+T') +
|
|
84
|
-
chalk.dim(' for variants • ') +
|
|
85
|
-
chalk.bold('Tab') +
|
|
86
|
-
chalk.dim(' for agents • ') +
|
|
87
|
-
chalk.bold('Ctrl+P') +
|
|
88
|
-
chalk.dim(' for commands'));
|
|
89
|
-
console.log();
|
|
90
|
-
}
|
|
91
|
-
//# sourceMappingURL=welcome.js.map
|