@vee-stack/delta-cli 2.0.8 → 2.0.9

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.
Files changed (109) hide show
  1. package/dist/adapters/analysis.adapter.js +42 -0
  2. package/dist/analyzer/commands/analyze.js +74 -114
  3. package/dist/auth/device-auth.js +261 -0
  4. package/dist/auth/secure-auth.js +45 -16
  5. package/dist/commands/analyze.js +30 -27
  6. package/dist/commands/auth.js +13 -16
  7. package/dist/commands/status.js +2 -2
  8. package/dist/commands/whoami.js +6 -6
  9. package/dist/components/Dashboard.js +3 -5
  10. package/dist/components/DeltaApp.js +1 -1
  11. package/dist/components/UnifiedManager.js +48 -20
  12. package/dist/core/completion.js +14 -3
  13. package/dist/core/engine.js +10 -4
  14. package/dist/core/exit-codes.js +12 -4
  15. package/dist/core/wizard.js +1 -1
  16. package/dist/index.js +21 -5
  17. package/dist/providers/remote-provider.js +2 -2
  18. package/dist/telemetry/wrapper.js +114 -0
  19. package/dist/ui.js +9 -2
  20. package/dist/welcome.js +14 -4
  21. package/package.json +3 -1
  22. package/dist/apps/cli/src/analyzer/commands/analyze.js +0 -256
  23. package/dist/apps/cli/src/analyzer/commands/config.js +0 -83
  24. package/dist/apps/cli/src/analyzer/commands/report.js +0 -38
  25. package/dist/apps/cli/src/analyzer/generators/report.generator.js +0 -123
  26. package/dist/apps/cli/src/analyzer/index.js +0 -44
  27. package/dist/apps/cli/src/analyzer/scanners/project.scanner.js +0 -92
  28. package/dist/apps/cli/src/analyzer/validators/contracts.validator.js +0 -42
  29. package/dist/apps/cli/src/analyzer/validators/maintainability.validator.js +0 -40
  30. package/dist/apps/cli/src/analyzer/validators/observability.validator.js +0 -39
  31. package/dist/apps/cli/src/analyzer/validators/performance.validator.js +0 -42
  32. package/dist/apps/cli/src/analyzer/validators/security.validator.js +0 -66
  33. package/dist/apps/cli/src/analyzer/validators/soc.validator.js +0 -75
  34. package/dist/apps/cli/src/auth/secure-auth.js +0 -312
  35. package/dist/apps/cli/src/commands/analyze.js +0 -286
  36. package/dist/apps/cli/src/commands/auth-new.js +0 -37
  37. package/dist/apps/cli/src/commands/auth.js +0 -122
  38. package/dist/apps/cli/src/commands/config.js +0 -49
  39. package/dist/apps/cli/src/commands/deploy.js +0 -6
  40. package/dist/apps/cli/src/commands/init.js +0 -47
  41. package/dist/apps/cli/src/commands/logout.js +0 -23
  42. package/dist/apps/cli/src/commands/plugins.js +0 -21
  43. package/dist/apps/cli/src/commands/status.js +0 -80
  44. package/dist/apps/cli/src/commands/sync.js +0 -6
  45. package/dist/apps/cli/src/commands/whoami.js +0 -115
  46. package/dist/apps/cli/src/components/Dashboard.js +0 -168
  47. package/dist/apps/cli/src/components/DeltaApp.js +0 -56
  48. package/dist/apps/cli/src/components/UnifiedManager.js +0 -324
  49. package/dist/apps/cli/src/core/audit.js +0 -184
  50. package/dist/apps/cli/src/core/completion.js +0 -294
  51. package/dist/apps/cli/src/core/contracts.js +0 -6
  52. package/dist/apps/cli/src/core/engine.js +0 -124
  53. package/dist/apps/cli/src/core/exit-codes.js +0 -71
  54. package/dist/apps/cli/src/core/hooks.js +0 -181
  55. package/dist/apps/cli/src/core/index.js +0 -7
  56. package/dist/apps/cli/src/core/policy.js +0 -115
  57. package/dist/apps/cli/src/core/profiles.js +0 -161
  58. package/dist/apps/cli/src/core/wizard.js +0 -203
  59. package/dist/apps/cli/src/index.js +0 -636
  60. package/dist/apps/cli/src/interactive/index.js +0 -11
  61. package/dist/apps/cli/src/plugins/GitStatusPlugin.js +0 -99
  62. package/dist/apps/cli/src/providers/ai-provider.js +0 -74
  63. package/dist/apps/cli/src/providers/local-provider.js +0 -302
  64. package/dist/apps/cli/src/providers/remote-provider.js +0 -100
  65. package/dist/apps/cli/src/types/api.js +0 -3
  66. package/dist/apps/cli/src/ui.js +0 -219
  67. package/dist/apps/cli/src/welcome.js +0 -81
  68. package/dist/bundle.js +0 -504
  69. package/dist/packages/domain/src/constitution/contracts/index.js +0 -43
  70. package/dist/packages/domain/src/constitution/contracts/ts.rules.js +0 -268
  71. package/dist/packages/domain/src/constitution/index.js +0 -139
  72. package/dist/packages/domain/src/constitution/maintainability/index.js +0 -43
  73. package/dist/packages/domain/src/constitution/maintainability/ts.rules.js +0 -344
  74. package/dist/packages/domain/src/constitution/observability/index.js +0 -43
  75. package/dist/packages/domain/src/constitution/observability/ts.rules.js +0 -307
  76. package/dist/packages/domain/src/constitution/performance/index.js +0 -43
  77. package/dist/packages/domain/src/constitution/performance/ts.rules.js +0 -325
  78. package/dist/packages/domain/src/constitution/security/index.js +0 -50
  79. package/dist/packages/domain/src/constitution/security/ts.rules.js +0 -267
  80. package/dist/packages/domain/src/constitution/soc/index.js +0 -43
  81. package/dist/packages/domain/src/constitution/soc/ts.rules.js +0 -360
  82. package/dist/packages/domain/src/contracts/analysis.contract.js +0 -18
  83. package/dist/packages/domain/src/contracts/index.js +0 -7
  84. package/dist/packages/domain/src/contracts/projects.contract.js +0 -18
  85. package/dist/packages/domain/src/control/registry/rules.registry.js +0 -29
  86. package/dist/packages/domain/src/control/schemas/policies.js +0 -6
  87. package/dist/packages/domain/src/core/analysis/discovery.js +0 -163
  88. package/dist/packages/domain/src/core/analysis/engine.contract.js +0 -298
  89. package/dist/packages/domain/src/core/analysis/engine.js +0 -77
  90. package/dist/packages/domain/src/core/analysis/index.js +0 -14
  91. package/dist/packages/domain/src/core/analysis/orchestrator.js +0 -242
  92. package/dist/packages/domain/src/core/comparison/engine.js +0 -29
  93. package/dist/packages/domain/src/core/comparison/index.js +0 -5
  94. package/dist/packages/domain/src/core/documentation/index.js +0 -5
  95. package/dist/packages/domain/src/core/documentation/pipeline.js +0 -41
  96. package/dist/packages/domain/src/core/fs/adapter.js +0 -111
  97. package/dist/packages/domain/src/core/fs/index.js +0 -5
  98. package/dist/packages/domain/src/core/parser/unified-parser.js +0 -166
  99. package/dist/packages/domain/src/index.js +0 -33
  100. package/dist/packages/domain/src/plugin/registry.js +0 -195
  101. package/dist/packages/domain/src/plugin/types.js +0 -6
  102. package/dist/packages/domain/src/ports/analysis.engine.js +0 -7
  103. package/dist/packages/domain/src/ports/audit.logger.js +0 -7
  104. package/dist/packages/domain/src/ports/project.repository.js +0 -7
  105. package/dist/packages/domain/src/rules/index.js +0 -134
  106. package/dist/packages/domain/src/types/analysis.js +0 -6
  107. package/dist/packages/domain/src/types/errors.js +0 -53
  108. package/dist/packages/domain/src/types/fs.js +0 -6
  109. package/dist/packages/domain/src/types/index.js +0 -7
@@ -1,219 +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(' │') + ' ' + chalk.bold(chalk.magenta('🚀 Delta CLI')) + chalk.dim(' - Code Analysis & Documentation ') + chalk.cyan('│'));
214
- console.log(chalk.cyan(' ├──────────────────────────────────────────────┤'));
215
- console.log(chalk.cyan(' │') + ' ' + chalk.gray('Local-first analysis with cloud power ') + chalk.cyan('│'));
216
- console.log(chalk.cyan(' ╰──────────────────────────────────────────────╯'));
217
- console.log();
218
- }
219
- //# sourceMappingURL=ui.js.map
@@ -1,81 +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') + chalk.gray(' — Next-gen code analysis & documentation'));
51
- console.log();
52
- console.log(chalk.gray(' Local-first architecture with ') + chalk.cyan('cloud power') + chalk.gray(' & ') + chalk.magenta('AI intelligence'));
53
- console.log();
54
- console.log(chalk.dim(' ═══════════════════════════════════════════════════════════════'));
55
- console.log();
56
- // Update notification
57
- if (notifier.update) {
58
- console.log(chalk.yellow.bold(' ⚡ Update Available!'));
59
- console.log(chalk.gray(` ${notifier.update.current} → ${notifier.update.latest}`));
60
- console.log(chalk.cyan(` Run: npm install -g ${pkg.name}`));
61
- console.log();
62
- }
63
- }
64
- // Print tips
65
- export function printTips() {
66
- const tips = [
67
- { cmd: 'delta login', desc: 'Authenticate with your account' },
68
- { cmd: 'delta analyze', desc: 'Run code analysis on current project' },
69
- { cmd: 'delta dashboard', desc: 'Open interactive dashboard' },
70
- { cmd: 'delta --help', desc: 'Show all available commands' },
71
- ];
72
- console.log(chalk.bold.cyan(' Quick Start:'));
73
- console.log();
74
- tips.forEach(({ cmd, desc }) => {
75
- console.log(chalk.gray(' • ') + chalk.cyan(cmd) + chalk.gray(` — ${desc}`));
76
- });
77
- console.log();
78
- console.log(chalk.dim(' Press ') + chalk.bold('Ctrl+T') + chalk.dim(' for variants • ') + chalk.bold('Tab') + chalk.dim(' for agents • ') + chalk.bold('Ctrl+P') + chalk.dim(' for commands'));
79
- console.log();
80
- }
81
- //# sourceMappingURL=welcome.js.map