@evolith/smart-cli 1.1.2 → 1.1.4
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/.tsbuildinfo +1 -0
- package/dist/app.module.d.ts +2 -0
- package/dist/app.module.js +134 -0
- package/dist/app.module.js.map +1 -0
- package/dist/commands/adr/adr.command.d.ts +34 -0
- package/dist/commands/adr/adr.command.js +351 -0
- package/dist/commands/adr/adr.command.js.map +1 -0
- package/dist/commands/agents/agents.command.d.ts +14 -0
- package/dist/commands/agents/agents.command.js +61 -0
- package/dist/commands/agents/agents.command.js.map +1 -0
- package/dist/commands/agents/index.d.ts +1 -0
- package/dist/commands/agents/index.js +6 -0
- package/dist/commands/agents/index.js.map +1 -0
- package/dist/commands/alias/alias.command.d.ts +16 -0
- package/dist/commands/alias/alias.command.js +95 -0
- package/dist/commands/alias/alias.command.js.map +1 -0
- package/dist/commands/api/api.catalog.d.ts +38 -0
- package/dist/commands/api/api.catalog.js +167 -0
- package/dist/commands/api/api.catalog.js.map +1 -0
- package/dist/commands/api/api.command.d.ts +21 -0
- package/dist/commands/api/api.command.js +162 -0
- package/dist/commands/api/api.command.js.map +1 -0
- package/dist/commands/architecture/scaffold/index.d.ts +2 -0
- package/dist/commands/architecture/scaffold/index.js +6 -0
- package/dist/commands/architecture/scaffold/index.js.map +1 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.d.ts +15 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js +20 -0
- package/dist/commands/architecture/scaffold/scaffold-strategy.js.map +1 -0
- package/dist/commands/architecture/scaffold.command.d.ts +16 -0
- package/dist/commands/architecture/scaffold.command.js +328 -0
- package/dist/commands/architecture/scaffold.command.js.map +1 -0
- package/dist/commands/completion/completion.command.d.ts +28 -0
- package/dist/commands/completion/completion.command.js +321 -0
- package/dist/commands/completion/completion.command.js.map +1 -0
- package/dist/commands/docs/docs.command.d.ts +17 -0
- package/dist/commands/docs/docs.command.js +292 -0
- package/dist/commands/docs/docs.command.js.map +1 -0
- package/dist/commands/drift/drift.command.d.ts +28 -0
- package/dist/commands/drift/drift.command.js +292 -0
- package/dist/commands/drift/drift.command.js.map +1 -0
- package/dist/commands/fixtures/fixtures.command.d.ts +21 -0
- package/dist/commands/fixtures/fixtures.command.js +310 -0
- package/dist/commands/fixtures/fixtures.command.js.map +1 -0
- package/dist/commands/gate/gate.command.d.ts +29 -0
- package/dist/commands/gate/gate.command.js +193 -0
- package/dist/commands/gate/gate.command.js.map +1 -0
- package/dist/commands/history/history.command.d.ts +29 -0
- package/dist/commands/history/history.command.js +237 -0
- package/dist/commands/history/history.command.js.map +1 -0
- package/dist/commands/init/agents.command.d.ts +24 -0
- package/dist/commands/init/agents.command.js +330 -0
- package/dist/commands/init/agents.command.js.map +1 -0
- package/dist/commands/init/init.command.d.ts +26 -0
- package/dist/commands/init/init.command.js +170 -0
- package/dist/commands/init/init.command.js.map +1 -0
- package/dist/commands/init/init.wizard.d.ts +19 -0
- package/dist/commands/init/init.wizard.js +181 -0
- package/dist/commands/init/init.wizard.js.map +1 -0
- package/dist/commands/init/upgrade.command.d.ts +22 -0
- package/dist/commands/init/upgrade.command.js +178 -0
- package/dist/commands/init/upgrade.command.js.map +1 -0
- package/dist/commands/mcp/mcp-serve.command.d.ts +17 -0
- package/dist/commands/mcp/mcp-serve.command.js +153 -0
- package/dist/commands/mcp/mcp-serve.command.js.map +1 -0
- package/dist/commands/phase/phase-advance.command.d.ts +30 -0
- package/dist/commands/phase/phase-advance.command.js +206 -0
- package/dist/commands/phase/phase-advance.command.js.map +1 -0
- package/dist/commands/profile/profile.command.d.ts +18 -0
- package/dist/commands/profile/profile.command.js +198 -0
- package/dist/commands/profile/profile.command.js.map +1 -0
- package/dist/commands/sdlc/gate-status.command.d.ts +10 -0
- package/dist/commands/sdlc/gate-status.command.js +162 -0
- package/dist/commands/sdlc/gate-status.command.js.map +1 -0
- package/dist/commands/sdlc/generate-domain.command.d.ts +8 -0
- package/dist/commands/sdlc/generate-domain.command.js +165 -0
- package/dist/commands/sdlc/generate-domain.command.js.map +1 -0
- package/dist/commands/sdlc/handoff.command.d.ts +27 -0
- package/dist/commands/sdlc/handoff.command.js +275 -0
- package/dist/commands/sdlc/handoff.command.js.map +1 -0
- package/dist/commands/sdlc/sdlc.command.d.ts +5 -0
- package/dist/commands/sdlc/sdlc.command.js +44 -0
- package/dist/commands/sdlc/sdlc.command.js.map +1 -0
- package/dist/commands/standards/standards.command.d.ts +30 -0
- package/dist/commands/standards/standards.command.js +283 -0
- package/dist/commands/standards/standards.command.js.map +1 -0
- package/dist/commands/update/update.command.d.ts +21 -0
- package/dist/commands/update/update.command.js +214 -0
- package/dist/commands/update/update.command.js.map +1 -0
- package/dist/commands/upgrade/index.d.ts +1 -0
- package/dist/commands/upgrade/index.js +6 -0
- package/dist/commands/upgrade/index.js.map +1 -0
- package/dist/commands/upgrade/upgrade.command.d.ts +14 -0
- package/dist/commands/upgrade/upgrade.command.js +58 -0
- package/dist/commands/upgrade/upgrade.command.js.map +1 -0
- package/dist/commands/validate/validate.command.d.ts +43 -0
- package/dist/commands/validate/validate.command.js +528 -0
- package/dist/commands/validate/validate.command.js.map +1 -0
- package/dist/config/alias.service.d.ts +14 -0
- package/dist/config/alias.service.js +103 -0
- package/dist/config/alias.service.js.map +1 -0
- package/dist/contributions/contribution-validator.d.ts +16 -0
- package/dist/contributions/contribution-validator.js +34 -0
- package/dist/contributions/contribution-validator.js.map +1 -0
- package/dist/contributions/index.d.ts +1 -0
- package/dist/contributions/index.js +6 -0
- package/dist/contributions/index.js.map +1 -0
- package/dist/infrastructure/adapters/agent-registry.service.d.ts +30 -0
- package/dist/infrastructure/adapters/agent-registry.service.js +175 -0
- package/dist/infrastructure/adapters/agent-registry.service.js.map +1 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.d.ts +19 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.js +125 -0
- package/dist/infrastructure/architecture/nx-workspace.strategy.js.map +1 -0
- package/dist/infrastructure/architecture/topology-catalog.d.ts +17 -0
- package/dist/infrastructure/architecture/topology-catalog.js +69 -0
- package/dist/infrastructure/architecture/topology-catalog.js.map +1 -0
- package/dist/infrastructure/catalog/catalog-loader.d.ts +21 -0
- package/dist/infrastructure/catalog/catalog-loader.js +144 -0
- package/dist/infrastructure/catalog/catalog-loader.js.map +1 -0
- package/dist/infrastructure/cli/base-command.d.ts +14 -0
- package/dist/infrastructure/cli/base-command.js +41 -0
- package/dist/infrastructure/cli/base-command.js.map +1 -0
- package/dist/infrastructure/cli/command-executor.d.ts +20 -0
- package/dist/infrastructure/cli/command-executor.js +110 -0
- package/dist/infrastructure/cli/command-executor.js.map +1 -0
- package/dist/infrastructure/cli/providers/index.d.ts +52 -0
- package/dist/infrastructure/cli/providers/index.js +175 -0
- package/dist/infrastructure/cli/providers/index.js.map +1 -0
- package/dist/infrastructure/config/config.service.d.ts +34 -0
- package/dist/infrastructure/config/config.service.js +126 -0
- package/dist/infrastructure/config/config.service.js.map +1 -0
- package/dist/infrastructure/filesystem/file-manager.service.d.ts +12 -0
- package/dist/infrastructure/filesystem/file-manager.service.js +79 -0
- package/dist/infrastructure/filesystem/file-manager.service.js.map +1 -0
- package/dist/infrastructure/formatters/output-formatter.service.d.ts +28 -0
- package/dist/infrastructure/formatters/output-formatter.service.js +199 -0
- package/dist/infrastructure/formatters/output-formatter.service.js.map +1 -0
- package/dist/infrastructure/observability/command-watcher.d.ts +45 -0
- package/dist/infrastructure/observability/command-watcher.js +199 -0
- package/dist/infrastructure/observability/command-watcher.js.map +1 -0
- package/dist/infrastructure/observability/error-reporter.d.ts +47 -0
- package/dist/infrastructure/observability/error-reporter.js +163 -0
- package/dist/infrastructure/observability/error-reporter.js.map +1 -0
- package/dist/infrastructure/observability/index.d.ts +11 -0
- package/dist/infrastructure/observability/index.js +31 -0
- package/dist/infrastructure/observability/index.js.map +1 -0
- package/dist/infrastructure/observability/otel-tracing.d.ts +4 -0
- package/dist/infrastructure/observability/otel-tracing.js +34 -0
- package/dist/infrastructure/observability/otel-tracing.js.map +1 -0
- package/dist/infrastructure/observability/structured-logger.d.ts +53 -0
- package/dist/infrastructure/observability/structured-logger.js +123 -0
- package/dist/infrastructure/observability/structured-logger.js.map +1 -0
- package/dist/infrastructure/observability/timing.d.ts +23 -0
- package/dist/infrastructure/observability/timing.js +140 -0
- package/dist/infrastructure/observability/timing.js.map +1 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.d.ts +46 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js +181 -0
- package/dist/infrastructure/observability/tool-usage-telemetry.service.js.map +1 -0
- package/dist/infrastructure/plugins/plugin-loader.d.ts +10 -0
- package/dist/infrastructure/plugins/plugin-loader.js +145 -0
- package/dist/infrastructure/plugins/plugin-loader.js.map +1 -0
- package/dist/infrastructure/plugins/plugin.module.d.ts +4 -0
- package/dist/infrastructure/plugins/plugin.module.js +28 -0
- package/dist/infrastructure/plugins/plugin.module.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-group.d.ts +3 -0
- package/dist/infrastructure/prompts/init-prompt-group.js +115 -0
- package/dist/infrastructure/prompts/init-prompt-group.js.map +1 -0
- package/dist/infrastructure/prompts/init-prompt-options.d.ts +10 -0
- package/dist/infrastructure/prompts/init-prompt-options.js +40 -0
- package/dist/infrastructure/prompts/init-prompt-options.js.map +1 -0
- package/dist/infrastructure/prompts/progress.service.d.ts +24 -0
- package/dist/infrastructure/prompts/progress.service.js +180 -0
- package/dist/infrastructure/prompts/progress.service.js.map +1 -0
- package/dist/infrastructure/prompts/prompt.service.d.ts +42 -0
- package/dist/infrastructure/prompts/prompt.service.js +142 -0
- package/dist/infrastructure/prompts/prompt.service.js.map +1 -0
- package/dist/infrastructure/prompts/wizard.service.d.ts +27 -0
- package/dist/infrastructure/prompts/wizard.service.js +163 -0
- package/dist/infrastructure/prompts/wizard.service.js.map +1 -0
- package/dist/infrastructure/providers/config-parser.provider.d.ts +15 -0
- package/dist/infrastructure/providers/config-parser.provider.js +68 -0
- package/dist/infrastructure/providers/config-parser.provider.js.map +1 -0
- package/dist/infrastructure/providers/logger.provider.d.ts +10 -0
- package/dist/infrastructure/providers/logger.provider.js +84 -0
- package/dist/infrastructure/providers/logger.provider.js.map +1 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.d.ts +34 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js +129 -0
- package/dist/infrastructure/providers/mock-filesystem.provider.js.map +1 -0
- package/dist/infrastructure/providers/node-filesystem.provider.d.ts +23 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js +117 -0
- package/dist/infrastructure/providers/node-filesystem.provider.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.js +27 -0
- package/dist/main.js.map +1 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +6 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/plugin-registry.d.ts +22 -0
- package/dist/plugins/plugin-registry.js +33 -0
- package/dist/plugins/plugin-registry.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,28 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,292 @@
|
|
|
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
|
+
const topology_catalog_1 = require("../../infrastructure/architecture/topology-catalog");
|
|
24
|
+
let DriftCommand = class DriftCommand extends base_command_1.BaseEvolithCommand {
|
|
25
|
+
constructor(promptService) {
|
|
26
|
+
super('DriftCommand', promptService);
|
|
27
|
+
}
|
|
28
|
+
async executeCommand(_passedParam, options) {
|
|
29
|
+
const projectPath = options?.path || process.cwd();
|
|
30
|
+
let declaredLevel;
|
|
31
|
+
if (options?.level) {
|
|
32
|
+
const normalized = (0, topology_catalog_1.toLegacyLevel)(options.level);
|
|
33
|
+
if (!normalized) {
|
|
34
|
+
throw new Error(`Nivel desconocido: "${options.level}". Use un id del eje progresivo ` +
|
|
35
|
+
`(modular-monolith, distributed-modules, microservices) o el alias legacy F1/F2/F3.`);
|
|
36
|
+
}
|
|
37
|
+
declaredLevel = normalized;
|
|
38
|
+
}
|
|
39
|
+
const json = options?.format === 'json' || options?.json === true;
|
|
40
|
+
const commandId = 'evolith drift detect';
|
|
41
|
+
const startedAt = Date.now();
|
|
42
|
+
const meta = {
|
|
43
|
+
command: commandId,
|
|
44
|
+
executedAt: new Date().toISOString(),
|
|
45
|
+
durationMs: 0,
|
|
46
|
+
correlationId: (0, node_crypto_1.randomUUID)(),
|
|
47
|
+
schemaVersion: gate_evidence_1.OUTPUT_ENVELOPE_SCHEMA_VERSION,
|
|
48
|
+
};
|
|
49
|
+
const service = new architecture_drift_service_1.ArchitectureDriftService();
|
|
50
|
+
if (options?.trend) {
|
|
51
|
+
try {
|
|
52
|
+
const result = await service.getDriftTrend(projectPath);
|
|
53
|
+
if (json) {
|
|
54
|
+
console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(result, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
await this.showTrend(service, projectPath);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
catch (error) {
|
|
61
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
62
|
+
if (json) {
|
|
63
|
+
console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (options?.history) {
|
|
72
|
+
try {
|
|
73
|
+
const history = await service.getDriftHistory(projectPath);
|
|
74
|
+
if (json) {
|
|
75
|
+
console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(history, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
await this.showHistory(service, projectPath);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
83
|
+
if (json) {
|
|
84
|
+
console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
throw error;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
this.promptService.startSpinner('Detecting architecture drift...');
|
|
93
|
+
try {
|
|
94
|
+
const report = await service.detectDrift({
|
|
95
|
+
projectPath,
|
|
96
|
+
declaredLevel,
|
|
97
|
+
storeHistory: true,
|
|
98
|
+
});
|
|
99
|
+
this.promptService.stopSpinner();
|
|
100
|
+
if (json) {
|
|
101
|
+
console.log(JSON.stringify((0, gate_evidence_1.createSuccessEnvelope)(report, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.printDriftReport(report);
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
this.promptService.stopSpinner();
|
|
108
|
+
if (json) {
|
|
109
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
110
|
+
console.log(JSON.stringify((0, gate_evidence_1.createErrorEnvelope)('INTERNAL_ERROR', message, { ...meta, durationMs: Date.now() - startedAt }), null, 2));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
throw error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
printDriftReport(report) {
|
|
118
|
+
console.log(chalk_1.default.bold('\n📐 Architecture Drift Report\n'));
|
|
119
|
+
const levelIcon = report.driftDetected ? chalk_1.default.red('⚠') : chalk_1.default.green('✓');
|
|
120
|
+
console.log(`${levelIcon} ${chalk_1.default.bold('Declared Level:')} ${chalk_1.default.cyan(report.declaredLevel)}`);
|
|
121
|
+
console.log(` ${chalk_1.default.bold('Detected Level:')} ${chalk_1.default.cyan(report.detectedLevel)}`);
|
|
122
|
+
if (report.declaredLevel !== report.detectedLevel) {
|
|
123
|
+
console.log(` ${chalk_1.default.red('⚠ LEVEL DRIFT DETECTED')}`);
|
|
124
|
+
}
|
|
125
|
+
console.log(`\n${chalk_1.default.bold('Overall Score:')} ${this.getScoreColor(report.overallScore)}${report.overallScore}%`);
|
|
126
|
+
console.log(`${chalk_1.default.bold('Drift Severity:')} ${this.getSeverityColor(report.driftSeverity)}${report.driftSeverity.toUpperCase()}`);
|
|
127
|
+
if (report.newViolations.length > 0) {
|
|
128
|
+
console.log(chalk_1.default.red(`\n🆕 New Violations (${report.newViolations.length}):`));
|
|
129
|
+
this.printViolations(report.newViolations);
|
|
130
|
+
}
|
|
131
|
+
if (report.persistentViolations.length > 0) {
|
|
132
|
+
console.log(chalk_1.default.yellow(`\n⚠ Persistent Violations (${report.persistentViolations.length}):`));
|
|
133
|
+
this.printViolations(report.persistentViolations);
|
|
134
|
+
}
|
|
135
|
+
if (report.resolvedViolations.length > 0) {
|
|
136
|
+
console.log(chalk_1.default.green(`\n✓ Resolved Violations (${report.resolvedViolations.length}):`));
|
|
137
|
+
this.printViolations(report.resolvedViolations);
|
|
138
|
+
}
|
|
139
|
+
if (report.newViolations.length === 0 && report.persistentViolations.length === 0) {
|
|
140
|
+
console.log(chalk_1.default.green('\n✓ No architecture drift detected. Codebase is compliant.'));
|
|
141
|
+
}
|
|
142
|
+
console.log(`\n${chalk_1.default.gray(`History stored at: ${report.historyPath}`)}`);
|
|
143
|
+
console.log('');
|
|
144
|
+
}
|
|
145
|
+
printViolations(violations) {
|
|
146
|
+
for (const v of violations) {
|
|
147
|
+
const icon = v.blocking ? chalk_1.default.red('⛔') : chalk_1.default.yellow('⚠');
|
|
148
|
+
const severity = v.severity === 'MUST' ? chalk_1.default.red('[MUST]') : v.severity === 'SHOULD' ? chalk_1.default.yellow('[SHOULD]') : chalk_1.default.gray('[COULD]');
|
|
149
|
+
console.log(` ${icon} ${severity} ${v.ruleId}: ${v.title}`);
|
|
150
|
+
console.log(` ${chalk_1.default.gray(v.description)}`);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
async showTrend(service, projectPath) {
|
|
154
|
+
const { trend, entries } = await service.getDriftTrend(projectPath);
|
|
155
|
+
console.log(chalk_1.default.bold('\n📈 Architecture Drift Trend\n'));
|
|
156
|
+
console.log(`${chalk_1.default.bold('Trend:')} ${this.getTrendColor(trend)}${trend.toUpperCase()}`);
|
|
157
|
+
if (entries.length > 0) {
|
|
158
|
+
console.log(`\n${chalk_1.default.gray('Last ' + entries.length + ' scans:')}`);
|
|
159
|
+
for (const entry of entries) {
|
|
160
|
+
const date = new Date(entry.timestamp).toLocaleDateString();
|
|
161
|
+
const score = this.getScoreColor(entry.overallScore);
|
|
162
|
+
console.log(` ${date} - Score: ${score}${entry.overallScore}% - Violations: ${entry.violationsCount} (${entry.blockingViolationsCount} blocking)`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
console.log(chalk_1.default.gray('\nNo history available. Run drift detection first.'));
|
|
167
|
+
}
|
|
168
|
+
console.log('');
|
|
169
|
+
}
|
|
170
|
+
async showHistory(service, projectPath) {
|
|
171
|
+
const history = await service.getDriftHistory(projectPath);
|
|
172
|
+
console.log(chalk_1.default.bold('\n📋 Architecture Drift History\n'));
|
|
173
|
+
if (history.length === 0) {
|
|
174
|
+
console.log(chalk_1.default.gray('No drift history available. Run drift detection first.'));
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
console.log(`Total scans: ${history.length}`);
|
|
178
|
+
for (const entry of history.slice(-10)) {
|
|
179
|
+
const date = new Date(entry.timestamp).toLocaleString();
|
|
180
|
+
console.log(`\n ${chalk_1.default.cyan(date)}`);
|
|
181
|
+
console.log(` Level: ${entry.declaredLevel} → ${entry.detectedLevel}`);
|
|
182
|
+
console.log(` Score: ${this.getScoreColor(entry.overallScore)}${entry.overallScore}%`);
|
|
183
|
+
console.log(` Violations: ${entry.violationsCount} (${entry.blockingViolationsCount} blocking)`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
console.log('');
|
|
187
|
+
}
|
|
188
|
+
getScoreColor(score) {
|
|
189
|
+
if (score >= 90)
|
|
190
|
+
return chalk_1.default.green;
|
|
191
|
+
if (score >= 70)
|
|
192
|
+
return chalk_1.default.yellow;
|
|
193
|
+
return chalk_1.default.red;
|
|
194
|
+
}
|
|
195
|
+
getSeverityColor(severity) {
|
|
196
|
+
switch (severity) {
|
|
197
|
+
case 'critical': return chalk_1.default.red;
|
|
198
|
+
case 'high': return chalk_1.default.redBright;
|
|
199
|
+
case 'medium': return chalk_1.default.yellow;
|
|
200
|
+
case 'low': return chalk_1.default.blue;
|
|
201
|
+
default: return chalk_1.default.green;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
getTrendColor(trend) {
|
|
205
|
+
switch (trend) {
|
|
206
|
+
case 'improving': return chalk_1.default.green;
|
|
207
|
+
case 'degrading': return chalk_1.default.red;
|
|
208
|
+
default: return chalk_1.default.yellow;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
parsePath(val) {
|
|
212
|
+
return val;
|
|
213
|
+
}
|
|
214
|
+
parseLevel(val) {
|
|
215
|
+
return val;
|
|
216
|
+
}
|
|
217
|
+
parseJson() {
|
|
218
|
+
return true;
|
|
219
|
+
}
|
|
220
|
+
parseHistory() {
|
|
221
|
+
return true;
|
|
222
|
+
}
|
|
223
|
+
parseTrend() {
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
parseFormat(val) {
|
|
227
|
+
return val;
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
exports.DriftCommand = DriftCommand;
|
|
231
|
+
__decorate([
|
|
232
|
+
(0, nest_commander_1.Option)({
|
|
233
|
+
flags: '-p, --path [path]',
|
|
234
|
+
description: 'Project path to analyze (default: current directory)',
|
|
235
|
+
}),
|
|
236
|
+
__metadata("design:type", Function),
|
|
237
|
+
__metadata("design:paramtypes", [String]),
|
|
238
|
+
__metadata("design:returntype", String)
|
|
239
|
+
], DriftCommand.prototype, "parsePath", null);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, nest_commander_1.Option)({
|
|
242
|
+
flags: '-l, --level [level]',
|
|
243
|
+
description: 'Declared progressive-axis topology: modular-monolith, distributed-modules, microservices (F1/F2/F3 accepted as legacy aliases)',
|
|
244
|
+
}),
|
|
245
|
+
__metadata("design:type", Function),
|
|
246
|
+
__metadata("design:paramtypes", [String]),
|
|
247
|
+
__metadata("design:returntype", String)
|
|
248
|
+
], DriftCommand.prototype, "parseLevel", null);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, nest_commander_1.Option)({
|
|
251
|
+
flags: '--json',
|
|
252
|
+
description: 'Output report as JSON',
|
|
253
|
+
}),
|
|
254
|
+
__metadata("design:type", Function),
|
|
255
|
+
__metadata("design:paramtypes", []),
|
|
256
|
+
__metadata("design:returntype", Boolean)
|
|
257
|
+
], DriftCommand.prototype, "parseJson", null);
|
|
258
|
+
__decorate([
|
|
259
|
+
(0, nest_commander_1.Option)({
|
|
260
|
+
flags: '--history',
|
|
261
|
+
description: 'Show drift history',
|
|
262
|
+
}),
|
|
263
|
+
__metadata("design:type", Function),
|
|
264
|
+
__metadata("design:paramtypes", []),
|
|
265
|
+
__metadata("design:returntype", Boolean)
|
|
266
|
+
], DriftCommand.prototype, "parseHistory", null);
|
|
267
|
+
__decorate([
|
|
268
|
+
(0, nest_commander_1.Option)({
|
|
269
|
+
flags: '--trend',
|
|
270
|
+
description: 'Show drift trend analysis',
|
|
271
|
+
}),
|
|
272
|
+
__metadata("design:type", Function),
|
|
273
|
+
__metadata("design:paramtypes", []),
|
|
274
|
+
__metadata("design:returntype", Boolean)
|
|
275
|
+
], DriftCommand.prototype, "parseTrend", null);
|
|
276
|
+
__decorate([
|
|
277
|
+
(0, nest_commander_1.Option)({
|
|
278
|
+
flags: '-f, --format [string]',
|
|
279
|
+
description: 'Output format: json (ADR-0073 envelope) or human (default)',
|
|
280
|
+
}),
|
|
281
|
+
__metadata("design:type", Function),
|
|
282
|
+
__metadata("design:paramtypes", [String]),
|
|
283
|
+
__metadata("design:returntype", String)
|
|
284
|
+
], DriftCommand.prototype, "parseFormat", null);
|
|
285
|
+
exports.DriftCommand = DriftCommand = __decorate([
|
|
286
|
+
(0, nest_commander_1.Command)({
|
|
287
|
+
name: 'drift',
|
|
288
|
+
description: 'Detect architecture drift along the progressive maturity axis (modular-monolith → distributed-modules → microservices)',
|
|
289
|
+
}),
|
|
290
|
+
__metadata("design:paramtypes", [prompt_service_1.PromptService])
|
|
291
|
+
], DriftCommand);
|
|
292
|
+
//# sourceMappingURL=drift.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAC5E,yFAAmF;AAe5E,IAAM,YAAY,GAAlB,MAAM,YAAa,SAAQ,iCAAkB;IAClD,YAAY,a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GD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,uBAAuB;QAC9B,WAAW,EAAE,4DAA4D;KAC1E,CAAC;;;;+CAGD;uBApQU,YAAY;IAJxB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,wHAAwH;KACtI,CAAC;qCAE2B,8BAAa;GAD7B,YAAY,CAqQxB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 {};
|
|
@@ -0,0 +1,310 @@
|
|
|
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
|