@evolith/smart-cli 1.1.1 → 1.1.2

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 (197) hide show
  1. package/README.md +22 -13
  2. package/package.json +1 -1
  3. package/dist/app.module.d.ts +0 -2
  4. package/dist/app.module.js +0 -134
  5. package/dist/app.module.js.map +0 -1
  6. package/dist/commands/adr/adr.command.d.ts +0 -34
  7. package/dist/commands/adr/adr.command.js +0 -351
  8. package/dist/commands/adr/adr.command.js.map +0 -1
  9. package/dist/commands/agents/agents.command.d.ts +0 -14
  10. package/dist/commands/agents/agents.command.js +0 -61
  11. package/dist/commands/agents/agents.command.js.map +0 -1
  12. package/dist/commands/agents/index.d.ts +0 -1
  13. package/dist/commands/agents/index.js +0 -6
  14. package/dist/commands/agents/index.js.map +0 -1
  15. package/dist/commands/alias/alias.command.d.ts +0 -16
  16. package/dist/commands/alias/alias.command.js +0 -95
  17. package/dist/commands/alias/alias.command.js.map +0 -1
  18. package/dist/commands/api/api.catalog.d.ts +0 -38
  19. package/dist/commands/api/api.catalog.js +0 -167
  20. package/dist/commands/api/api.catalog.js.map +0 -1
  21. package/dist/commands/api/api.command.d.ts +0 -21
  22. package/dist/commands/api/api.command.js +0 -162
  23. package/dist/commands/api/api.command.js.map +0 -1
  24. package/dist/commands/architecture/scaffold/index.d.ts +0 -2
  25. package/dist/commands/architecture/scaffold/index.js +0 -6
  26. package/dist/commands/architecture/scaffold/index.js.map +0 -1
  27. package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +0 -15
  28. package/dist/commands/architecture/scaffold/scaffold-strategy.js +0 -20
  29. package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +0 -1
  30. package/dist/commands/architecture/scaffold.command.d.ts +0 -16
  31. package/dist/commands/architecture/scaffold.command.js +0 -321
  32. package/dist/commands/architecture/scaffold.command.js.map +0 -1
  33. package/dist/commands/completion/completion.command.d.ts +0 -28
  34. package/dist/commands/completion/completion.command.js +0 -321
  35. package/dist/commands/completion/completion.command.js.map +0 -1
  36. package/dist/commands/docs/docs.command.d.ts +0 -17
  37. package/dist/commands/docs/docs.command.js +0 -292
  38. package/dist/commands/docs/docs.command.js.map +0 -1
  39. package/dist/commands/drift/drift.command.d.ts +0 -28
  40. package/dist/commands/drift/drift.command.js +0 -283
  41. package/dist/commands/drift/drift.command.js.map +0 -1
  42. package/dist/commands/fixtures/fixtures.command.d.ts +0 -21
  43. package/dist/commands/fixtures/fixtures.command.js +0 -310
  44. package/dist/commands/fixtures/fixtures.command.js.map +0 -1
  45. package/dist/commands/gate/gate.command.d.ts +0 -29
  46. package/dist/commands/gate/gate.command.js +0 -193
  47. package/dist/commands/gate/gate.command.js.map +0 -1
  48. package/dist/commands/history/history.command.d.ts +0 -29
  49. package/dist/commands/history/history.command.js +0 -237
  50. package/dist/commands/history/history.command.js.map +0 -1
  51. package/dist/commands/init/agents.command.d.ts +0 -24
  52. package/dist/commands/init/agents.command.js +0 -330
  53. package/dist/commands/init/agents.command.js.map +0 -1
  54. package/dist/commands/init/init.command.d.ts +0 -26
  55. package/dist/commands/init/init.command.js +0 -170
  56. package/dist/commands/init/init.command.js.map +0 -1
  57. package/dist/commands/init/init.wizard.d.ts +0 -19
  58. package/dist/commands/init/init.wizard.js +0 -181
  59. package/dist/commands/init/init.wizard.js.map +0 -1
  60. package/dist/commands/init/upgrade.command.d.ts +0 -22
  61. package/dist/commands/init/upgrade.command.js +0 -178
  62. package/dist/commands/init/upgrade.command.js.map +0 -1
  63. package/dist/commands/mcp/mcp-serve.command.d.ts +0 -17
  64. package/dist/commands/mcp/mcp-serve.command.js +0 -153
  65. package/dist/commands/mcp/mcp-serve.command.js.map +0 -1
  66. package/dist/commands/phase/phase-advance.command.d.ts +0 -30
  67. package/dist/commands/phase/phase-advance.command.js +0 -206
  68. package/dist/commands/phase/phase-advance.command.js.map +0 -1
  69. package/dist/commands/profile/profile.command.d.ts +0 -18
  70. package/dist/commands/profile/profile.command.js +0 -198
  71. package/dist/commands/profile/profile.command.js.map +0 -1
  72. package/dist/commands/sdlc/gate-status.command.d.ts +0 -10
  73. package/dist/commands/sdlc/gate-status.command.js +0 -162
  74. package/dist/commands/sdlc/gate-status.command.js.map +0 -1
  75. package/dist/commands/sdlc/generate-domain.command.d.ts +0 -8
  76. package/dist/commands/sdlc/generate-domain.command.js +0 -165
  77. package/dist/commands/sdlc/generate-domain.command.js.map +0 -1
  78. package/dist/commands/sdlc/handoff.command.d.ts +0 -27
  79. package/dist/commands/sdlc/handoff.command.js +0 -275
  80. package/dist/commands/sdlc/handoff.command.js.map +0 -1
  81. package/dist/commands/sdlc/sdlc.command.d.ts +0 -5
  82. package/dist/commands/sdlc/sdlc.command.js +0 -44
  83. package/dist/commands/sdlc/sdlc.command.js.map +0 -1
  84. package/dist/commands/standards/standards.command.d.ts +0 -30
  85. package/dist/commands/standards/standards.command.js +0 -283
  86. package/dist/commands/standards/standards.command.js.map +0 -1
  87. package/dist/commands/update/update.command.d.ts +0 -21
  88. package/dist/commands/update/update.command.js +0 -214
  89. package/dist/commands/update/update.command.js.map +0 -1
  90. package/dist/commands/upgrade/index.d.ts +0 -1
  91. package/dist/commands/upgrade/index.js +0 -6
  92. package/dist/commands/upgrade/index.js.map +0 -1
  93. package/dist/commands/upgrade/upgrade.command.d.ts +0 -14
  94. package/dist/commands/upgrade/upgrade.command.js +0 -58
  95. package/dist/commands/upgrade/upgrade.command.js.map +0 -1
  96. package/dist/commands/validate/validate.command.d.ts +0 -43
  97. package/dist/commands/validate/validate.command.js +0 -514
  98. package/dist/commands/validate/validate.command.js.map +0 -1
  99. package/dist/config/alias.service.d.ts +0 -14
  100. package/dist/config/alias.service.js +0 -103
  101. package/dist/config/alias.service.js.map +0 -1
  102. package/dist/contributions/contribution-validator.d.ts +0 -16
  103. package/dist/contributions/contribution-validator.js +0 -34
  104. package/dist/contributions/contribution-validator.js.map +0 -1
  105. package/dist/contributions/index.d.ts +0 -1
  106. package/dist/contributions/index.js +0 -6
  107. package/dist/contributions/index.js.map +0 -1
  108. package/dist/infrastructure/adapters/agent-registry.service.d.ts +0 -30
  109. package/dist/infrastructure/adapters/agent-registry.service.js +0 -175
  110. package/dist/infrastructure/adapters/agent-registry.service.js.map +0 -1
  111. package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +0 -19
  112. package/dist/infrastructure/architecture/nx-workspace.strategy.js +0 -125
  113. package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +0 -1
  114. package/dist/infrastructure/catalog/catalog-loader.d.ts +0 -21
  115. package/dist/infrastructure/catalog/catalog-loader.js +0 -144
  116. package/dist/infrastructure/catalog/catalog-loader.js.map +0 -1
  117. package/dist/infrastructure/cli/base-command.d.ts +0 -14
  118. package/dist/infrastructure/cli/base-command.js +0 -41
  119. package/dist/infrastructure/cli/base-command.js.map +0 -1
  120. package/dist/infrastructure/cli/command-executor.d.ts +0 -20
  121. package/dist/infrastructure/cli/command-executor.js +0 -110
  122. package/dist/infrastructure/cli/command-executor.js.map +0 -1
  123. package/dist/infrastructure/cli/providers/index.d.ts +0 -52
  124. package/dist/infrastructure/cli/providers/index.js +0 -175
  125. package/dist/infrastructure/cli/providers/index.js.map +0 -1
  126. package/dist/infrastructure/config/config.service.d.ts +0 -34
  127. package/dist/infrastructure/config/config.service.js +0 -126
  128. package/dist/infrastructure/config/config.service.js.map +0 -1
  129. package/dist/infrastructure/filesystem/file-manager.service.d.ts +0 -12
  130. package/dist/infrastructure/filesystem/file-manager.service.js +0 -79
  131. package/dist/infrastructure/filesystem/file-manager.service.js.map +0 -1
  132. package/dist/infrastructure/formatters/output-formatter.service.d.ts +0 -28
  133. package/dist/infrastructure/formatters/output-formatter.service.js +0 -199
  134. package/dist/infrastructure/formatters/output-formatter.service.js.map +0 -1
  135. package/dist/infrastructure/observability/command-watcher.d.ts +0 -45
  136. package/dist/infrastructure/observability/command-watcher.js +0 -199
  137. package/dist/infrastructure/observability/command-watcher.js.map +0 -1
  138. package/dist/infrastructure/observability/error-reporter.d.ts +0 -47
  139. package/dist/infrastructure/observability/error-reporter.js +0 -163
  140. package/dist/infrastructure/observability/error-reporter.js.map +0 -1
  141. package/dist/infrastructure/observability/index.d.ts +0 -11
  142. package/dist/infrastructure/observability/index.js +0 -31
  143. package/dist/infrastructure/observability/index.js.map +0 -1
  144. package/dist/infrastructure/observability/otel-tracing.d.ts +0 -4
  145. package/dist/infrastructure/observability/otel-tracing.js +0 -34
  146. package/dist/infrastructure/observability/otel-tracing.js.map +0 -1
  147. package/dist/infrastructure/observability/structured-logger.d.ts +0 -53
  148. package/dist/infrastructure/observability/structured-logger.js +0 -123
  149. package/dist/infrastructure/observability/structured-logger.js.map +0 -1
  150. package/dist/infrastructure/observability/timing.d.ts +0 -23
  151. package/dist/infrastructure/observability/timing.js +0 -140
  152. package/dist/infrastructure/observability/timing.js.map +0 -1
  153. package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +0 -46
  154. package/dist/infrastructure/observability/tool-usage-telemetry.service.js +0 -181
  155. package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +0 -1
  156. package/dist/infrastructure/plugins/plugin-loader.d.ts +0 -10
  157. package/dist/infrastructure/plugins/plugin-loader.js +0 -145
  158. package/dist/infrastructure/plugins/plugin-loader.js.map +0 -1
  159. package/dist/infrastructure/plugins/plugin.module.d.ts +0 -4
  160. package/dist/infrastructure/plugins/plugin.module.js +0 -28
  161. package/dist/infrastructure/plugins/plugin.module.js.map +0 -1
  162. package/dist/infrastructure/prompts/init-prompt-group.d.ts +0 -3
  163. package/dist/infrastructure/prompts/init-prompt-group.js +0 -115
  164. package/dist/infrastructure/prompts/init-prompt-group.js.map +0 -1
  165. package/dist/infrastructure/prompts/init-prompt-options.d.ts +0 -10
  166. package/dist/infrastructure/prompts/init-prompt-options.js +0 -40
  167. package/dist/infrastructure/prompts/init-prompt-options.js.map +0 -1
  168. package/dist/infrastructure/prompts/progress.service.d.ts +0 -24
  169. package/dist/infrastructure/prompts/progress.service.js +0 -180
  170. package/dist/infrastructure/prompts/progress.service.js.map +0 -1
  171. package/dist/infrastructure/prompts/prompt.service.d.ts +0 -42
  172. package/dist/infrastructure/prompts/prompt.service.js +0 -142
  173. package/dist/infrastructure/prompts/prompt.service.js.map +0 -1
  174. package/dist/infrastructure/prompts/wizard.service.d.ts +0 -27
  175. package/dist/infrastructure/prompts/wizard.service.js +0 -163
  176. package/dist/infrastructure/prompts/wizard.service.js.map +0 -1
  177. package/dist/infrastructure/providers/config-parser.provider.d.ts +0 -15
  178. package/dist/infrastructure/providers/config-parser.provider.js +0 -68
  179. package/dist/infrastructure/providers/config-parser.provider.js.map +0 -1
  180. package/dist/infrastructure/providers/logger.provider.d.ts +0 -10
  181. package/dist/infrastructure/providers/logger.provider.js +0 -84
  182. package/dist/infrastructure/providers/logger.provider.js.map +0 -1
  183. package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +0 -34
  184. package/dist/infrastructure/providers/mock-filesystem.provider.js +0 -129
  185. package/dist/infrastructure/providers/mock-filesystem.provider.js.map +0 -1
  186. package/dist/infrastructure/providers/node-filesystem.provider.d.ts +0 -23
  187. package/dist/infrastructure/providers/node-filesystem.provider.js +0 -117
  188. package/dist/infrastructure/providers/node-filesystem.provider.js.map +0 -1
  189. package/dist/main.d.ts +0 -2
  190. package/dist/main.js +0 -27
  191. package/dist/main.js.map +0 -1
  192. package/dist/plugins/index.d.ts +0 -1
  193. package/dist/plugins/index.js +0 -6
  194. package/dist/plugins/index.js.map +0 -1
  195. package/dist/plugins/plugin-registry.d.ts +0 -22
  196. package/dist/plugins/plugin-registry.js +0 -33
  197. package/dist/plugins/plugin-registry.js.map +0 -1
@@ -1,28 +0,0 @@
1
- import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
2
- import { PromptService } from '../../infrastructure/prompts/prompt.service';
3
- interface DriftOptions {
4
- path?: string;
5
- level?: string;
6
- format?: string;
7
- json?: boolean;
8
- history?: boolean;
9
- trend?: boolean;
10
- }
11
- export declare class DriftCommand extends BaseEvolithCommand {
12
- constructor(promptService: PromptService);
13
- executeCommand(_passedParam: string[], options?: DriftOptions): Promise<void>;
14
- private printDriftReport;
15
- private printViolations;
16
- private showTrend;
17
- private showHistory;
18
- private getScoreColor;
19
- private getSeverityColor;
20
- private getTrendColor;
21
- parsePath(val: string): string;
22
- parseLevel(val: string): string;
23
- parseJson(): boolean;
24
- parseHistory(): boolean;
25
- parseTrend(): boolean;
26
- parseFormat(val: string): string;
27
- }
28
- export {};
@@ -1,283 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.DriftCommand = void 0;
16
- const nest_commander_1 = require("nest-commander");
17
- const node_crypto_1 = require("node:crypto");
18
- const chalk_1 = __importDefault(require("chalk"));
19
- const architecture_drift_service_1 = require("@evolith/core-domain/application/validators/architecture-drift.service");
20
- const gate_evidence_1 = require("@evolith/core-domain/domain/gate-evidence");
21
- const base_command_1 = require("../../infrastructure/cli/base-command");
22
- const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
23
- let DriftCommand = class DriftCommand extends base_command_1.BaseEvolithCommand {
24
- constructor(promptService) {
25
- super('DriftCommand', promptService);
26
- }
27
- async executeCommand(_passedParam, options) {
28
- const projectPath = options?.path || process.cwd();
29
- const declaredLevel = options?.level;
30
- const json = options?.format === 'json' || options?.json === true;
31
- const commandId = 'evolith drift detect';
32
- const startedAt = Date.now();
33
- const meta = {
34
- command: commandId,
35
- executedAt: new Date().toISOString(),
36
- durationMs: 0,
37
- correlationId: (0, node_crypto_1.randomUUID)(),
38
- schemaVersion: gate_evidence_1.OUTPUT_ENVELOPE_SCHEMA_VERSION,
39
- };
40
- const service = new architecture_drift_service_1.ArchitectureDriftService();
41
- if (options?.trend) {
42
- try {
43
- const result = await service.getDriftTrend(projectPath);
44
- if (json) {
45
- console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(result, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
46
- }
47
- else {
48
- await this.showTrend(service, projectPath);
49
- }
50
- }
51
- catch (error) {
52
- const message = error instanceof Error ? error.message : String(error);
53
- if (json) {
54
- console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
55
- }
56
- else {
57
- throw error;
58
- }
59
- }
60
- return;
61
- }
62
- if (options?.history) {
63
- try {
64
- const history = await service.getDriftHistory(projectPath);
65
- if (json) {
66
- console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(history, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
67
- }
68
- else {
69
- await this.showHistory(service, projectPath);
70
- }
71
- }
72
- catch (error) {
73
- const message = error instanceof Error ? error.message : String(error);
74
- if (json) {
75
- console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
76
- }
77
- else {
78
- throw error;
79
- }
80
- }
81
- return;
82
- }
83
- this.promptService.startSpinner('Detecting architecture drift...');
84
- try {
85
- const report = await service.detectDrift({
86
- projectPath,
87
- declaredLevel,
88
- storeHistory: true,
89
- });
90
- this.promptService.stopSpinner();
91
- if (json) {
92
- console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(report, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
93
- return;
94
- }
95
- this.printDriftReport(report);
96
- }
97
- catch (error) {
98
- this.promptService.stopSpinner();
99
- if (json) {
100
- const message = error instanceof Error ? error.message : String(error);
101
- console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
102
- }
103
- else {
104
- throw error;
105
- }
106
- }
107
- }
108
- printDriftReport(report) {
109
- console.log(chalk_1.default.bold('\n📐 Architecture Drift Report\n'));
110
- const levelIcon = report.driftDetected ? chalk_1.default.red('⚠') : chalk_1.default.green('✓');
111
- console.log(`${levelIcon} ${chalk_1.default.bold('Declared Level:')} ${chalk_1.default.cyan(report.declaredLevel)}`);
112
- console.log(` ${chalk_1.default.bold('Detected Level:')} ${chalk_1.default.cyan(report.detectedLevel)}`);
113
- if (report.declaredLevel !== report.detectedLevel) {
114
- console.log(` ${chalk_1.default.red('⚠ LEVEL DRIFT DETECTED')}`);
115
- }
116
- console.log(`\n${chalk_1.default.bold('Overall Score:')} ${this.getScoreColor(report.overallScore)}${report.overallScore}%`);
117
- console.log(`${chalk_1.default.bold('Drift Severity:')} ${this.getSeverityColor(report.driftSeverity)}${report.driftSeverity.toUpperCase()}`);
118
- if (report.newViolations.length > 0) {
119
- console.log(chalk_1.default.red(`\n🆕 New Violations (${report.newViolations.length}):`));
120
- this.printViolations(report.newViolations);
121
- }
122
- if (report.persistentViolations.length > 0) {
123
- console.log(chalk_1.default.yellow(`\n⚠ Persistent Violations (${report.persistentViolations.length}):`));
124
- this.printViolations(report.persistentViolations);
125
- }
126
- if (report.resolvedViolations.length > 0) {
127
- console.log(chalk_1.default.green(`\n✓ Resolved Violations (${report.resolvedViolations.length}):`));
128
- this.printViolations(report.resolvedViolations);
129
- }
130
- if (report.newViolations.length === 0 && report.persistentViolations.length === 0) {
131
- console.log(chalk_1.default.green('\n✓ No architecture drift detected. Codebase is compliant.'));
132
- }
133
- console.log(`\n${chalk_1.default.gray(`History stored at: ${report.historyPath}`)}`);
134
- console.log('');
135
- }
136
- printViolations(violations) {
137
- for (const v of violations) {
138
- const icon = v.blocking ? chalk_1.default.red('⛔') : chalk_1.default.yellow('⚠');
139
- const severity = v.severity === 'MUST' ? chalk_1.default.red('[MUST]') : v.severity === 'SHOULD' ? chalk_1.default.yellow('[SHOULD]') : chalk_1.default.gray('[COULD]');
140
- console.log(` ${icon} ${severity} ${v.ruleId}: ${v.title}`);
141
- console.log(` ${chalk_1.default.gray(v.description)}`);
142
- }
143
- }
144
- async showTrend(service, projectPath) {
145
- const { trend, entries } = await service.getDriftTrend(projectPath);
146
- console.log(chalk_1.default.bold('\n📈 Architecture Drift Trend\n'));
147
- console.log(`${chalk_1.default.bold('Trend:')} ${this.getTrendColor(trend)}${trend.toUpperCase()}`);
148
- if (entries.length > 0) {
149
- console.log(`\n${chalk_1.default.gray('Last ' + entries.length + ' scans:')}`);
150
- for (const entry of entries) {
151
- const date = new Date(entry.timestamp).toLocaleDateString();
152
- const score = this.getScoreColor(entry.overallScore);
153
- console.log(` ${date} - Score: ${score}${entry.overallScore}% - Violations: ${entry.violationsCount} (${entry.blockingViolationsCount} blocking)`);
154
- }
155
- }
156
- else {
157
- console.log(chalk_1.default.gray('\nNo history available. Run drift detection first.'));
158
- }
159
- console.log('');
160
- }
161
- async showHistory(service, projectPath) {
162
- const history = await service.getDriftHistory(projectPath);
163
- console.log(chalk_1.default.bold('\n📋 Architecture Drift History\n'));
164
- if (history.length === 0) {
165
- console.log(chalk_1.default.gray('No drift history available. Run drift detection first.'));
166
- }
167
- else {
168
- console.log(`Total scans: ${history.length}`);
169
- for (const entry of history.slice(-10)) {
170
- const date = new Date(entry.timestamp).toLocaleString();
171
- console.log(`\n ${chalk_1.default.cyan(date)}`);
172
- console.log(` Level: ${entry.declaredLevel} → ${entry.detectedLevel}`);
173
- console.log(` Score: ${this.getScoreColor(entry.overallScore)}${entry.overallScore}%`);
174
- console.log(` Violations: ${entry.violationsCount} (${entry.blockingViolationsCount} blocking)`);
175
- }
176
- }
177
- console.log('');
178
- }
179
- getScoreColor(score) {
180
- if (score >= 90)
181
- return chalk_1.default.green;
182
- if (score >= 70)
183
- return chalk_1.default.yellow;
184
- return chalk_1.default.red;
185
- }
186
- getSeverityColor(severity) {
187
- switch (severity) {
188
- case 'critical': return chalk_1.default.red;
189
- case 'high': return chalk_1.default.redBright;
190
- case 'medium': return chalk_1.default.yellow;
191
- case 'low': return chalk_1.default.blue;
192
- default: return chalk_1.default.green;
193
- }
194
- }
195
- getTrendColor(trend) {
196
- switch (trend) {
197
- case 'improving': return chalk_1.default.green;
198
- case 'degrading': return chalk_1.default.red;
199
- default: return chalk_1.default.yellow;
200
- }
201
- }
202
- parsePath(val) {
203
- return val;
204
- }
205
- parseLevel(val) {
206
- return val;
207
- }
208
- parseJson() {
209
- return true;
210
- }
211
- parseHistory() {
212
- return true;
213
- }
214
- parseTrend() {
215
- return true;
216
- }
217
- parseFormat(val) {
218
- return val;
219
- }
220
- };
221
- exports.DriftCommand = DriftCommand;
222
- __decorate([
223
- (0, nest_commander_1.Option)({
224
- flags: '-p, --path [path]',
225
- description: 'Project path to analyze (default: current directory)',
226
- }),
227
- __metadata("design:type", Function),
228
- __metadata("design:paramtypes", [String]),
229
- __metadata("design:returntype", String)
230
- ], DriftCommand.prototype, "parsePath", null);
231
- __decorate([
232
- (0, nest_commander_1.Option)({
233
- flags: '-l, --level [level]',
234
- description: 'Declared architecture level (F1, F2, F3)',
235
- }),
236
- __metadata("design:type", Function),
237
- __metadata("design:paramtypes", [String]),
238
- __metadata("design:returntype", String)
239
- ], DriftCommand.prototype, "parseLevel", null);
240
- __decorate([
241
- (0, nest_commander_1.Option)({
242
- flags: '--json',
243
- description: 'Output report as JSON',
244
- }),
245
- __metadata("design:type", Function),
246
- __metadata("design:paramtypes", []),
247
- __metadata("design:returntype", Boolean)
248
- ], DriftCommand.prototype, "parseJson", null);
249
- __decorate([
250
- (0, nest_commander_1.Option)({
251
- flags: '--history',
252
- description: 'Show drift history',
253
- }),
254
- __metadata("design:type", Function),
255
- __metadata("design:paramtypes", []),
256
- __metadata("design:returntype", Boolean)
257
- ], DriftCommand.prototype, "parseHistory", null);
258
- __decorate([
259
- (0, nest_commander_1.Option)({
260
- flags: '--trend',
261
- description: 'Show drift trend analysis',
262
- }),
263
- __metadata("design:type", Function),
264
- __metadata("design:paramtypes", []),
265
- __metadata("design:returntype", Boolean)
266
- ], DriftCommand.prototype, "parseTrend", null);
267
- __decorate([
268
- (0, nest_commander_1.Option)({
269
- flags: '-f, --format [string]',
270
- description: 'Output format: json (ADR-0073 envelope) or human (default)',
271
- }),
272
- __metadata("design:type", Function),
273
- __metadata("design:paramtypes", [String]),
274
- __metadata("design:returntype", String)
275
- ], DriftCommand.prototype, "parseFormat", null);
276
- exports.DriftCommand = DriftCommand = __decorate([
277
- (0, nest_commander_1.Command)({
278
- name: 'drift',
279
- description: 'Detect architecture drift from declared architecture level (F1/F2/F3)',
280
- }),
281
- __metadata("design:paramtypes", [prompt_service_1.PromptService])
282
- ], DriftCommand);
283
- //# sourceMappingURL=drift.command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"drift.command.js","sourceRoot":"","sources":["../../../src/commands/drift/drift.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,6CAAyC;AACzC,kDAA0B;AAC1B,uHAA+I;AAC/I,6EAAuI;AACvI,wEAA2E;AAC3E,gFAA4E;AAerE,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,iCAAkB;IAClD,YAAY,aAA4B;QACtC,KAAK,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;IACvC,CAAC;IAED,KAAK,CAAC,cAAc,CAClB,YAAsB,EACtB,OAAsB;QAEtB,MAAM,WAAW,GAAG,OAAO,EAAE,IAAI,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;QAC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CAAC;IACb,CAAC;IAMD,SAAS;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,YAAY;QACV,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,WAAW,CAAC,GAAW;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAA;AAxPY,oCAAY;AA6MvB;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,sDAAsD;KACpE,CAAC;;;;6CAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,0CAA0C;KACxD,CAAC;;;;8CAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,QAAQ;QACf,WAAW,EAAE,uBAAuB;KACrC,CAAC;;;;6CAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,WAAW;QAClB,WAAW,EAAE,oBAAoB;KAClC,CAAC;;;;gDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,SAAS;QAChB,WAAW,EAAE,2BAA2B;KACzC,CAAC;;;;8CAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,4DAA4D;KAC1E,CAAC;;;;+CAGD;uBAvPU,YAAY;IAJxB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,uEAAuE;KACrF,CAAC;qCAE2B,8BAAa;GAD7B,YAAY,CAwPxB"}
@@ -1,21 +0,0 @@
1
- import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
2
- import { IFileSystem } from '@evolith/core-domain/domain/interfaces';
3
- import { PromptService } from '../../infrastructure/prompts/prompt.service';
4
- interface FixturesCommandOptions {
5
- dir?: string;
6
- dryRun?: boolean;
7
- type?: string;
8
- }
9
- export declare class FixturesCommand extends BaseEvolithCommand {
10
- private readonly fileSystem;
11
- constructor(fileSystem: IFileSystem, promptService: PromptService);
12
- executeCommand(passedParam: string[], options?: FixturesCommandOptions): Promise<void>;
13
- private generateFixtures;
14
- private generateEvolithFixtures;
15
- private generateAdrFixtures;
16
- private generateRulesetFixtures;
17
- parseDir(val: string): string;
18
- parseDryRun(): boolean;
19
- parseType(val: string): string;
20
- }
21
- export {};
@@ -1,310 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
22
- return c > 3 && r && Object.defineProperty(target, key, r), r;
23
- };
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- var __metadata = (this && this.__metadata) || function (k, v) {
42
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
43
- };
44
- var __param = (this && this.__param) || function (paramIndex, decorator) {
45
- return function (target, key) { decorator(target, key, paramIndex); }
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.FixturesCommand = void 0;
49
- const nest_commander_1 = require("nest-commander");
50
- const common_1 = require("@nestjs/common");
51
- const base_command_1 = require("../../infrastructure/cli/base-command");
52
- const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
53
- const path = __importStar(require("path"));
54
- let FixturesCommand = class FixturesCommand extends base_command_1.BaseEvolithCommand {
55
- constructor(fileSystem, promptService) {
56
- super('FixturesCommand', promptService);
57
- this.fileSystem = fileSystem;
58
- }
59
- async executeCommand(passedParam, options) {
60
- const fixtureType = (passedParam?.[0] || options?.type || 'demo');
61
- const targetDir = options?.dir || process.cwd();
62
- const dryRun = !!options?.dryRun;
63
- if (!['demo', 'adr', 'ruleset', 'evolith', 'full'].includes(fixtureType)) {
64
- this.promptService.showError(`Invalid fixture type: ${fixtureType}. Valid types: demo, adr, ruleset, evolith, full`);
65
- return;
66
- }
67
- this.promptService.showIntro(`Evolith Fixtures — ${fixtureType}`);
68
- if (dryRun) {
69
- this.promptService.showInfo('[DRY RUN] Files will not be written');
70
- }
71
- const files = this.generateFixtures(fixtureType);
72
- this.promptService.showInfo(`Fixture type: ${fixtureType}`);
73
- this.promptService.showInfo(`Target directory: ${targetDir}`);
74
- this.promptService.showInfo(`Files to create: ${files.length}`);
75
- if (dryRun) {
76
- for (const file of files) {
77
- this.promptService.showInfo(` [dry-run] ${file.relativePath}`);
78
- }
79
- this.promptService.showOutro('DRY RUN — no files written');
80
- return;
81
- }
82
- this.promptService.startSpinner('Writing fixture files...');
83
- const created = [];
84
- const errors = [];
85
- for (const file of files) {
86
- try {
87
- const fullPath = path.join(targetDir, file.relativePath);
88
- await this.fileSystem.ensureDir(path.dirname(fullPath));
89
- await this.fileSystem.writeFile(fullPath, file.content);
90
- created.push(file.relativePath);
91
- }
92
- catch (err) {
93
- errors.push(`${file.relativePath}: ${err instanceof Error ? err.message : String(err)}`);
94
- }
95
- }
96
- this.promptService.stopSpinner();
97
- if (errors.length === 0) {
98
- this.promptService.showSuccess(`✓ ${created.length} fixture files created`);
99
- for (const file of created) {
100
- this.promptService.showInfo(` - ${file}`);
101
- }
102
- }
103
- else {
104
- this.promptService.showError(`✗ ${errors.length} errors`);
105
- for (const err of errors) {
106
- this.promptService.showError(` - ${err}`);
107
- }
108
- }
109
- this.promptService.showOutro(errors.length === 0 ? 'Fixtures ready' : 'Completed with errors');
110
- }
111
- generateFixtures(type) {
112
- switch (type) {
113
- case 'evolith':
114
- return this.generateEvolithFixtures();
115
- case 'adr':
116
- return this.generateAdrFixtures();
117
- case 'ruleset':
118
- return this.generateRulesetFixtures();
119
- case 'demo':
120
- return [...this.generateEvolithFixtures(), ...this.generateAdrFixtures()];
121
- case 'full':
122
- return [...this.generateEvolithFixtures(), ...this.generateAdrFixtures(), ...this.generateRulesetFixtures()];
123
- }
124
- }
125
- generateEvolithFixtures() {
126
- return [
127
- {
128
- relativePath: 'evolith.yaml',
129
- content: [
130
- 'coreRef:',
131
- ' version: "1.0.0"',
132
- ' path: "../evolith"',
133
- 'governance:',
134
- ' version: "1.0"',
135
- 'product:',
136
- ' name: "demo-project"',
137
- ' type: "library"',
138
- 'phases:',
139
- ' - "phase-0"',
140
- ' - "phase-1"',
141
- ' - "phase-2"',
142
- '',
143
- ].join('\n'),
144
- },
145
- ];
146
- }
147
- generateAdrFixtures() {
148
- return [
149
- {
150
- relativePath: 'docs/adr/0001-record-architecture-decisions.md',
151
- content: [
152
- '# ADR-0001: Record Architecture Decisions',
153
- '',
154
- '**Status:** Accepted',
155
- '**Date:** 2026-06-01',
156
- '',
157
- '## Context',
158
- '',
159
- 'We need to record the architectural decisions made on this project.',
160
- '',
161
- '## Decision',
162
- '',
163
- 'We will use Architecture Decision Records (ADRs) as described by Michael Nygard.',
164
- '',
165
- '## Consequences',
166
- '',
167
- '- ADRs are stored in `docs/adr/`',
168
- '- Each ADR follows the standard template',
169
- '',
170
- ].join('\n'),
171
- },
172
- {
173
- relativePath: 'docs/adr/0002-use-clean-architecture.md',
174
- content: [
175
- '# ADR-0002: Use Clean Architecture',
176
- '',
177
- '**Status:** Accepted',
178
- '**Date:** 2026-06-01',
179
- '',
180
- '## Context',
181
- '',
182
- 'The application needs a clear separation of concerns to remain maintainable as it grows.',
183
- '',
184
- '## Decision',
185
- '',
186
- 'We will adopt Clean Architecture with domain, application, infrastructure, and presentation layers.',
187
- '',
188
- '## Consequences',
189
- '',
190
- '- Domain layer has zero external dependencies',
191
- '- Use cases encapsulate business rules',
192
- '- Infrastructure depends on abstractions, not concretions',
193
- '',
194
- ].join('\n'),
195
- },
196
- {
197
- relativePath: 'docs/adr/0003-use-nestjs-for-backend.md',
198
- content: [
199
- '# ADR-0003: Use NestJS for Backend',
200
- '',
201
- '**Status:** Accepted',
202
- '**Date:** 2026-06-01',
203
- '',
204
- '## Context',
205
- '',
206
- 'The backend requires a structured framework with built-in DI, modularity, and testing support.',
207
- '',
208
- '## Decision',
209
- '',
210
- 'We will use NestJS with TypeScript for the backend services.',
211
- '',
212
- '## Consequences',
213
- '',
214
- '- Dependency injection is built-in via NestJS DI',
215
- '- Modules provide clear boundaries',
216
- '- Testing utilities are available out of the box',
217
- '',
218
- ].join('\n'),
219
- },
220
- ];
221
- }
222
- generateRulesetFixtures() {
223
- return [
224
- {
225
- relativePath: 'rulesets/architecture.yaml',
226
- content: [
227
- 'ruleset:',
228
- ' id: "architecture-conventions"',
229
- ' version: "1.0"',
230
- ' rules:',
231
- ' - id: "F1"',
232
- ' title: "Domain layer isolation"',
233
- ' description: "Domain layer must not depend on infrastructure"',
234
- ' severity: "error"',
235
- ' - id: "F2"',
236
- ' title: "Use case naming"',
237
- ' description: "Use cases must follow <Verb><Noun>UseCase pattern"',
238
- ' severity: "warning"',
239
- '',
240
- ].join('\n'),
241
- },
242
- {
243
- relativePath: 'rulesets/naming.yaml',
244
- content: [
245
- 'ruleset:',
246
- ' id: "naming-conventions"',
247
- ' version: "1.0"',
248
- ' rules:',
249
- ' - id: "N1"',
250
- ' title: "File naming"',
251
- ' description: "Files must use kebab-case"',
252
- ' severity: "error"',
253
- ' - id: "N2"',
254
- ' title: "Class naming"',
255
- ' description: "Classes must use PascalCase"',
256
- ' severity: "error"',
257
- '',
258
- ].join('\n'),
259
- },
260
- ];
261
- }
262
- parseDir(val) {
263
- return val;
264
- }
265
- parseDryRun() {
266
- return true;
267
- }
268
- parseType(val) {
269
- return val;
270
- }
271
- };
272
- exports.FixturesCommand = FixturesCommand;
273
- __decorate([
274
- (0, nest_commander_1.Option)({
275
- flags: '-d, --dir <directory>',
276
- description: 'Target directory for fixtures (default: current directory)',
277
- }),
278
- __metadata("design:type", Function),
279
- __metadata("design:paramtypes", [String]),
280
- __metadata("design:returntype", String)
281
- ], FixturesCommand.prototype, "parseDir", null);
282
- __decorate([
283
- (0, nest_commander_1.Option)({
284
- flags: '-n, --dry-run',
285
- description: 'Preview files without writing',
286
- }),
287
- __metadata("design:type", Function),
288
- __metadata("design:paramtypes", []),
289
- __metadata("design:returntype", Boolean)
290
- ], FixturesCommand.prototype, "parseDryRun", null);
291
- __decorate([
292
- (0, nest_commander_1.Option)({
293
- flags: '-t, --type <type>',
294
- description: 'Fixture type: demo, adr, ruleset, evolith, full',
295
- }),
296
- __metadata("design:type", Function),
297
- __metadata("design:paramtypes", [String]),
298
- __metadata("design:returntype", String)
299
- ], FixturesCommand.prototype, "parseType", null);
300
- exports.FixturesCommand = FixturesCommand = __decorate([
301
- (0, common_1.Injectable)(),
302
- (0, nest_commander_1.Command)({
303
- name: 'fixtures',
304
- arguments: '[type]',
305
- description: 'Seed reproducible fixtures and sample data for demos and tests',
306
- }),
307
- __param(0, (0, common_1.Inject)('IFileSystem')),
308
- __metadata("design:paramtypes", [Object, prompt_service_1.PromptService])
309
- ], FixturesCommand);
310
- //# sourceMappingURL=fixtures.command.js.map