@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,181 +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 __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.InitWizardCommand = void 0;
16
- const nest_commander_1 = require("nest-commander");
17
- const base_command_1 = require("../../infrastructure/cli/base-command");
18
- const wizard_service_1 = require("../../infrastructure/prompts/wizard.service");
19
- const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
20
- const catalog_loader_1 = require("../../infrastructure/catalog/catalog-loader");
21
- const common_1 = require("@nestjs/common");
22
- const services_1 = require("@evolith/core-domain/application/services");
23
- let InitWizardCommand = class InitWizardCommand extends base_command_1.BaseEvolithCommand {
24
- constructor(wizardService, promptService, catalogLoader, fileSystem) {
25
- super('InitWizardCommand', promptService);
26
- this.wizardService = wizardService;
27
- this.catalogLoader = catalogLoader;
28
- this.fileSystem = fileSystem;
29
- }
30
- async executeCommand(passedParam, options) {
31
- const useWizard = options?.wizard ?? true;
32
- const noInteractive = options?.noInteractive ?? false;
33
- if (!useWizard) {
34
- this.logger.log('Use "evolith init" for standard initialization');
35
- return;
36
- }
37
- const fs = this.fileSystem;
38
- const useCase = new services_1.InitializeProjectUseCase(fs, this.catalogLoader);
39
- const steps = [
40
- {
41
- id: 'project-name',
42
- title: 'Project Name',
43
- description: 'Enter your project name',
44
- run: async () => {
45
- const name = await this.promptService.text({
46
- message: 'What is your project name?',
47
- placeholder: 'my-evolith-project',
48
- validate: (value) => {
49
- if (!value || value.length < 3) {
50
- return 'Project name must be at least 3 characters';
51
- }
52
- return undefined;
53
- },
54
- });
55
- return { projectName: name };
56
- },
57
- },
58
- {
59
- id: 'runtime',
60
- title: 'Runtime Selection',
61
- description: 'Choose your runtime environment',
62
- run: async () => {
63
- const runtime = await this.promptService.select({
64
- message: 'Select runtime:',
65
- options: [
66
- { value: 'nodejs', label: 'Node.js' },
67
- { value: 'dotnet', label: '.NET' },
68
- { value: 'android', label: 'Android' },
69
- ],
70
- });
71
- return { runtime };
72
- },
73
- },
74
- {
75
- id: 'monorepo',
76
- title: 'Monorepo Configuration',
77
- description: 'Configure monorepo structure',
78
- run: async () => {
79
- const monorepo = await this.promptService.select({
80
- message: 'Monorepo setup:',
81
- options: [
82
- { value: 'none', label: 'Single project' },
83
- { value: 'npm', label: 'NPM workspaces' },
84
- { value: 'pnpm', label: 'pnpm workspaces' },
85
- ],
86
- });
87
- return { monorepo };
88
- },
89
- },
90
- {
91
- id: 'architecture',
92
- title: 'Architecture Pattern',
93
- description: 'Select architecture pattern',
94
- run: async () => {
95
- const arch = await this.promptService.select({
96
- message: 'Architecture:',
97
- options: [
98
- { value: 'clean', label: 'Clean Architecture' },
99
- { value: 'hexagonal', label: 'Hexagonal' },
100
- { value: 'layered', label: 'Layered' },
101
- ],
102
- });
103
- return { arch };
104
- },
105
- },
106
- ];
107
- try {
108
- const result = await this.wizardService.start({
109
- title: 'Evolith Project Initialization Wizard',
110
- steps,
111
- noInteractive,
112
- });
113
- if (result && result.projectName) {
114
- this.promptService.startSpinner('Creating project structure...');
115
- const initResult = await useCase.execute({
116
- name: result.projectName,
117
- runtime: result.runtime,
118
- monorepo: result.monorepo,
119
- architecture: result.arch,
120
- database: 'none',
121
- apiProtocol: 'rest',
122
- ciCd: 'none',
123
- observability: 'none',
124
- features: [],
125
- agents: [],
126
- }, process.cwd());
127
- this.promptService.stopSpinner();
128
- if (initResult.success) {
129
- this.promptService.showSuccess(`Project ${result.projectName} created successfully!`);
130
- this.promptService.showInfo(`Artifacts: ${initResult.artifacts.length}`);
131
- }
132
- else {
133
- this.promptService.showError('Failed to create project');
134
- }
135
- }
136
- }
137
- catch (error) {
138
- if (error instanceof Error && error.name === 'UserCancelledError') {
139
- this.promptService.showInfo('Initialization cancelled');
140
- return;
141
- }
142
- throw error;
143
- }
144
- }
145
- parseNoWizard() {
146
- return true;
147
- }
148
- parseNoInteractive() {
149
- return true;
150
- }
151
- };
152
- exports.InitWizardCommand = InitWizardCommand;
153
- __decorate([
154
- (0, nest_commander_1.Option)({
155
- flags: '--no-wizard',
156
- description: 'Use standard init instead of wizard',
157
- }),
158
- __metadata("design:type", Function),
159
- __metadata("design:paramtypes", []),
160
- __metadata("design:returntype", Boolean)
161
- ], InitWizardCommand.prototype, "parseNoWizard", null);
162
- __decorate([
163
- (0, nest_commander_1.Option)({
164
- flags: '--no-interactive',
165
- description: 'Run in non-interactive mode (CI/automation)',
166
- }),
167
- __metadata("design:type", Function),
168
- __metadata("design:paramtypes", []),
169
- __metadata("design:returntype", Boolean)
170
- ], InitWizardCommand.prototype, "parseNoInteractive", null);
171
- exports.InitWizardCommand = InitWizardCommand = __decorate([
172
- (0, nest_commander_1.Command)({
173
- name: 'init-wizard',
174
- description: 'Interactive wizard for project initialization',
175
- }),
176
- __param(3, (0, common_1.Inject)('IFileSystem')),
177
- __metadata("design:paramtypes", [wizard_service_1.WizardService,
178
- prompt_service_1.PromptService,
179
- catalog_loader_1.CatalogLoader, Object])
180
- ], InitWizardCommand);
181
- //# sourceMappingURL=init.wizard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.wizard.js","sourceRoot":"","sources":["../../../src/commands/init/init.wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,wEAA2E;AAC3E,gFAAwF;AACxF,gFAA4E;AAC5E,gFAA4E;AAC5E,2CAAwC;AAExC,wEAAqF;AAW9E,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,iCAAkB;IACvD,YACmB,aAA4B,EAC7C,aAA4B,EACX,aAA4B,EACL,UAAuB;QAE/D,KAAK,CAAC,mBAAmB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gBAC3D,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;gBAClE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAAC;gBACxD,OAAO;YACT,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAMD,aAAa;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,kBAAkB;QAChB,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AAtJY,8CAAiB;AA2I5B;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,qCAAqC;KACnD,CAAC;;;;sDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,kBAAkB;QACzB,WAAW,EAAE,6CAA6C;KAC3D,CAAC;;;;2DAGD;4BArJU,iBAAiB;IAJ7B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,+CAA+C;KAC7D,CAAC;IAMG,WAAA,IAAA,eAAM,EAAC,aAAa,CAAC,CAAA;qCAHU,8BAAa;QAC9B,8BAAa;QACI,8BAAa;GAJpC,iBAAiB,CAsJ7B"}
@@ -1,22 +0,0 @@
1
- import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
2
- import { PromptService } from '../../infrastructure/prompts/prompt.service';
3
- import { ConfigService } from '../../infrastructure/config/config.service';
4
- interface UpgradeCommandOptions {
5
- dryRun?: boolean;
6
- force?: boolean;
7
- core?: string;
8
- report?: boolean;
9
- }
10
- export declare class UpgradeCommand extends BaseEvolithCommand {
11
- constructor(promptService: PromptService, configService?: ConfigService);
12
- executeCommand(passedParam: string[], options?: UpgradeCommandOptions): Promise<void>;
13
- private printUpgradePlan;
14
- private getChangeIcon;
15
- private getRiskColor;
16
- private findCorePath;
17
- parseDryRun(): boolean;
18
- parseForce(): boolean;
19
- parseCore(val: string): string;
20
- parseReport(): boolean;
21
- }
22
- export {};
@@ -1,178 +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.UpgradeCommand = void 0;
16
- const nest_commander_1 = require("nest-commander");
17
- const chalk_1 = __importDefault(require("chalk"));
18
- const satellite_upgrade_service_1 = require("@evolith/core-domain/application/upgrade/satellite-upgrade.service");
19
- const base_command_1 = require("../../infrastructure/cli/base-command");
20
- const prompt_service_1 = require("../../infrastructure/prompts/prompt.service");
21
- const config_service_1 = require("../../infrastructure/config/config.service");
22
- let UpgradeCommand = class UpgradeCommand extends base_command_1.BaseEvolithCommand {
23
- constructor(promptService, configService) {
24
- super('UpgradeCommand', promptService, configService);
25
- }
26
- async executeCommand(passedParam, options) {
27
- const satellitePath = process.cwd();
28
- const corePath = options?.core || this.profile.core || this.findCorePath(satellitePath);
29
- const service = new satellite_upgrade_service_1.SatelliteUpgradeService();
30
- this.promptService.showIntro('Evolith SDK - Satélite Upgrade');
31
- this.promptService.startSpinner('Planning upgrade...');
32
- try {
33
- const plan = await service.planUpgrade({ satellitePath, corePath });
34
- this.promptService.stopSpinner();
35
- if (plan.changes.length === 0) {
36
- this.promptService.showSuccess('Satellite is already up to date');
37
- this.promptService.showOutro('No upgrade needed.');
38
- return;
39
- }
40
- this.printUpgradePlan(plan);
41
- if (options?.dryRun) {
42
- const _result = await service.executeUpgrade({
43
- satellitePath,
44
- corePath,
45
- dryRun: true,
46
- });
47
- this.promptService.showInfo('Dry run complete - no changes applied');
48
- this.promptService.showOutro('Dry run finished.');
49
- return;
50
- }
51
- if (plan.breakingChanges.length > 0 && !options?.force) {
52
- this.promptService.showWarning(`⚠ ${plan.breakingChanges.length} breaking change(s) detected`);
53
- this.promptService.showInfo('Use --force to proceed with breaking changes');
54
- this.promptService.showOutro('Upgrade cancelled.');
55
- return;
56
- }
57
- const confirm = await this.promptService.confirm(`Apply ${plan.changes.length} change(s)?`, true);
58
- if (!confirm) {
59
- this.promptService.showOutro('Upgrade cancelled.');
60
- return;
61
- }
62
- this.promptService.startSpinner('Applying upgrade...');
63
- const result = await service.executeUpgrade({
64
- satellitePath,
65
- corePath,
66
- force: options?.force,
67
- });
68
- this.promptService.stopSpinner();
69
- const report = await service.getUpgradeReport(result);
70
- console.log(`\n${chalk_1.default.bgCyan.black(' Upgrade Report ')}\n${report}\n`);
71
- if (result.success) {
72
- this.promptService.showSuccess(`Upgrade complete: ${result.changesApplied} change(s) applied`);
73
- }
74
- else {
75
- this.promptService.showError(`Upgrade completed with errors: ${result.errors.length}`);
76
- }
77
- this.promptService.showOutro(result.success ? 'Upgrade finished.' : 'Upgrade finished with errors.');
78
- }
79
- catch (error) {
80
- this.promptService.stopSpinner();
81
- throw error;
82
- }
83
- }
84
- printUpgradePlan(plan) {
85
- console.log(chalk_1.default.bold('\n📋 Upgrade Plan\n'));
86
- console.log(`${chalk_1.default.bold('Current Version:')} ${chalk_1.default.cyan(plan.currentVersion)}`);
87
- console.log(`${chalk_1.default.bold('Target Version:')} ${chalk_1.default.cyan(plan.targetVersion)}`);
88
- console.log(`${chalk_1.default.bold('Risk Level:')} ${plan.estimatedRisk === 'high' ? chalk_1.default.red(plan.estimatedRisk.toUpperCase()) : plan.estimatedRisk === 'medium' ? chalk_1.default.yellow(plan.estimatedRisk.toUpperCase()) : chalk_1.default.green(plan.estimatedRisk.toUpperCase())}`);
89
- console.log(`${chalk_1.default.bold('Total Changes:')} ${plan.changes.length}`);
90
- if (plan.breakingChanges.length > 0) {
91
- console.log(`${chalk_1.default.red('⚠ Breaking Changes:')} ${plan.breakingChanges.length}`);
92
- }
93
- console.log(chalk_1.default.cyan('\nChanges:'));
94
- for (const change of plan.changes) {
95
- const icon = this.getChangeIcon(change.type);
96
- const breaking = change.breaking ? chalk_1.default.red(' [BREAKING]') : '';
97
- console.log(` ${icon} ${change.description}${breaking}`);
98
- }
99
- console.log('');
100
- }
101
- getChangeIcon(type) {
102
- switch (type) {
103
- case 'add': return chalk_1.default.green('+');
104
- case 'modify': return chalk_1.default.yellow('~');
105
- case 'remove': return chalk_1.default.red('-');
106
- case 'migrate': return chalk_1.default.blue('»');
107
- default: return '?';
108
- }
109
- }
110
- getRiskColor(risk) {
111
- switch (risk) {
112
- case 'high': return 'high';
113
- case 'medium': return 'medium';
114
- default: return 'low';
115
- }
116
- }
117
- findCorePath(satellitePath) {
118
- return satellitePath;
119
- }
120
- parseDryRun() {
121
- return true;
122
- }
123
- parseForce() {
124
- return true;
125
- }
126
- parseCore(val) {
127
- return val;
128
- }
129
- parseReport() {
130
- return true;
131
- }
132
- };
133
- exports.UpgradeCommand = UpgradeCommand;
134
- __decorate([
135
- (0, nest_commander_1.Option)({
136
- flags: '-d, --dry-run',
137
- description: 'Ejecuta en modo simulacro sin alterar archivos',
138
- }),
139
- __metadata("design:type", Function),
140
- __metadata("design:paramtypes", []),
141
- __metadata("design:returntype", Boolean)
142
- ], UpgradeCommand.prototype, "parseDryRun", null);
143
- __decorate([
144
- (0, nest_commander_1.Option)({
145
- flags: '-f, --force',
146
- description: 'Force upgrade even with breaking changes',
147
- }),
148
- __metadata("design:type", Function),
149
- __metadata("design:paramtypes", []),
150
- __metadata("design:returntype", Boolean)
151
- ], UpgradeCommand.prototype, "parseForce", null);
152
- __decorate([
153
- (0, nest_commander_1.Option)({
154
- flags: '-c, --core [path]',
155
- description: 'Path to Evolith core repository',
156
- }),
157
- __metadata("design:type", Function),
158
- __metadata("design:paramtypes", [String]),
159
- __metadata("design:returntype", String)
160
- ], UpgradeCommand.prototype, "parseCore", null);
161
- __decorate([
162
- (0, nest_commander_1.Option)({
163
- flags: '--report',
164
- description: 'Show detailed upgrade report',
165
- }),
166
- __metadata("design:type", Function),
167
- __metadata("design:paramtypes", []),
168
- __metadata("design:returntype", Boolean)
169
- ], UpgradeCommand.prototype, "parseReport", null);
170
- exports.UpgradeCommand = UpgradeCommand = __decorate([
171
- (0, nest_commander_1.Command)({
172
- name: 'upgrade',
173
- description: 'Actualiza el repositorio satélite cuando el upstream Evolith recibe nuevas reglas',
174
- }),
175
- __metadata("design:paramtypes", [prompt_service_1.PromptService,
176
- config_service_1.ConfigService])
177
- ], UpgradeCommand);
178
- //# sourceMappingURL=upgrade.command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"upgrade.command.js","sourceRoot":"","sources":["../../../src/commands/init/upgrade.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAiD;AACjD,kDAA0B;AAC1B,kHAA0H;AAC1H,wEAA2E;AAC3E,gFAA4E;AAC5E,+EAA2E;AAapE,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,iCAAkB;IACpD,YACE,aAA4B,EAC5B,aAA6B;QAE7B,KAAK,CAAC,gBAAgB,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,WAAqB,EAAE,OAA+B;QACzE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;QACpC,MAAM,QAAQ,GAAG,OAAO,EAAE,IAAI,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,IAAI,CA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IACvB,CAAC;IAMD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,UAAU;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAMD,SAAS,CAAC,GAAW;QACnB,OAAO,GAAG,CAAC;IACb,CAAC;IAMD,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CACF,CAAA;AA5JY,wCAAc;AAiIzB;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,gDAAgD;KAC9D,CAAC;;;;iDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,0CAA0C;KACxD,CAAC;;;;gDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,iCAAiC;KAC/C,CAAC;;;;+CAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,UAAU;QACjB,WAAW,EAAE,8BAA8B;KAC5C,CAAC;;;;iDAGD;yBA3JU,cAAc;IAJ1B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,mFAAmF;KACjG,CAAC;qCAGiB,8BAAa;QACZ,8BAAa;GAHpB,cAAc,CA4J1B"}
@@ -1,17 +0,0 @@
1
- import { BaseEvolithCommand } from "../../infrastructure/cli/base-command";
2
- type McpTransport = "stdio" | "http";
3
- interface McpServeOptions {
4
- transport?: McpTransport;
5
- port?: number;
6
- apiKey?: string;
7
- noConfirm?: boolean;
8
- }
9
- export declare class McpServeCommand extends BaseEvolithCommand {
10
- constructor();
11
- executeCommand(passedParam: string[], options?: McpServeOptions): Promise<void>;
12
- parseTransport(val: string): McpTransport;
13
- parsePort(val: string): number;
14
- parseApiKey(val: string): string;
15
- parseNoConfirm(): boolean;
16
- }
17
- export {};
@@ -1,153 +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 __importDefault = (this && this.__importDefault) || function (mod) {
45
- return (mod && mod.__esModule) ? mod : { "default": mod };
46
- };
47
- Object.defineProperty(exports, "__esModule", { value: true });
48
- exports.McpServeCommand = void 0;
49
- const nest_commander_1 = require("nest-commander");
50
- const chalk_1 = __importDefault(require("chalk"));
51
- const base_command_1 = require("../../infrastructure/cli/base-command");
52
- let McpServeCommand = class McpServeCommand extends base_command_1.BaseEvolithCommand {
53
- constructor() {
54
- super("McpServeCommand");
55
- }
56
- async executeCommand(passedParam, options) {
57
- console.warn(chalk_1.default.yellow("⚠ Deprecation warning: smart-cli mcp will be removed in a future major version. " +
58
- "Please migrate to the standalone @evolith/mcp-server package. " +
59
- "Run `npx @evolith/mcp-server serve` or `evolith-mcp serve` instead."));
60
- const action = passedParam[0] || "serve";
61
- if (action === "serve") {
62
- const transport = options?.transport || "stdio";
63
- const port = options?.port || parseInt(process.env.PORT || "3000", 10);
64
- const apiKey = options?.apiKey || process.env.EVOLITH_API_KEY;
65
- const noConfirm = options?.noConfirm ?? false;
66
- if (transport === "http") {
67
- this.promptService.showIntro("Evolith SDK - MCP Server (HTTP)");
68
- this.logger.log(`Starting MCP server over HTTP on port ${port}...`);
69
- if (apiKey) {
70
- this.promptService.showInfo(chalk_1.default.cyan("API key authentication enabled"));
71
- }
72
- if (noConfirm) {
73
- this.promptService.showWarning(chalk_1.default.yellow("Confirmation prompts disabled (--no-confirm)"));
74
- }
75
- }
76
- else {
77
- this.promptService.showIntro("Evolith SDK - MCP Server (stdio)");
78
- this.logger.log("Starting MCP server over stdio...");
79
- if (noConfirm) {
80
- this.promptService.showWarning(chalk_1.default.yellow("Confirmation prompts disabled (--no-confirm)"));
81
- }
82
- }
83
- const { startMcpServer } = await Promise.resolve().then(() => __importStar(require("@evolith/mcp-server")));
84
- await startMcpServer({ transport, port, apiKey });
85
- return;
86
- }
87
- else if (action === "version") {
88
- this.promptService.showInfo("Evolith MCP Server v1.0.0");
89
- return;
90
- }
91
- else {
92
- this.logger.warn(`Unknown MCP action: ${action}`);
93
- this.promptService.showError(`Unknown action: ${action}. Use 'evolith mcp serve' to start the server.`);
94
- }
95
- }
96
- parseTransport(val) {
97
- return val;
98
- }
99
- parsePort(val) {
100
- return parseInt(val, 10) || 3000;
101
- }
102
- parseApiKey(val) {
103
- return val;
104
- }
105
- parseNoConfirm() {
106
- return true;
107
- }
108
- };
109
- exports.McpServeCommand = McpServeCommand;
110
- __decorate([
111
- (0, nest_commander_1.Option)({
112
- flags: "-t, --transport <stdio|http>",
113
- description: "Transport type: stdio (default) or http",
114
- }),
115
- __metadata("design:type", Function),
116
- __metadata("design:paramtypes", [String]),
117
- __metadata("design:returntype", String)
118
- ], McpServeCommand.prototype, "parseTransport", null);
119
- __decorate([
120
- (0, nest_commander_1.Option)({
121
- flags: "-p, --port <number>",
122
- description: "HTTP server port (default: 3000)",
123
- }),
124
- __metadata("design:type", Function),
125
- __metadata("design:paramtypes", [String]),
126
- __metadata("design:returntype", Number)
127
- ], McpServeCommand.prototype, "parsePort", null);
128
- __decorate([
129
- (0, nest_commander_1.Option)({
130
- flags: "--api-key <key>",
131
- description: "API key for authentication",
132
- }),
133
- __metadata("design:type", Function),
134
- __metadata("design:paramtypes", [String]),
135
- __metadata("design:returntype", String)
136
- ], McpServeCommand.prototype, "parseApiKey", null);
137
- __decorate([
138
- (0, nest_commander_1.Option)({
139
- flags: "--no-confirm",
140
- description: "Skip interactive confirmation prompts for mutative operations (CI/automation mode)",
141
- }),
142
- __metadata("design:type", Function),
143
- __metadata("design:paramtypes", []),
144
- __metadata("design:returntype", Boolean)
145
- ], McpServeCommand.prototype, "parseNoConfirm", null);
146
- exports.McpServeCommand = McpServeCommand = __decorate([
147
- (0, nest_commander_1.Command)({
148
- name: "mcp",
149
- description: "Start Evolith MCP server for AI agent integration",
150
- }),
151
- __metadata("design:paramtypes", [])
152
- ], McpServeCommand);
153
- //# sourceMappingURL=mcp-serve.command.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-serve.command.js","sourceRoot":"","sources":["../../../src/commands/mcp/mcp-serve.command.ts"],"names":[],"mappings":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D;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,kCAAkC;KAChD,CAAC;;;;gDAGD;AAMD;IAJC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,4BAA4B;KAC1C,CAAC;;;;kDAGD;AAOD;IALC,IAAA,uBAAM,EAAC;QACN,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,oFAAoF;KACvF,CAAC;;;;qDAGD;0BAhGU,eAAe;IAJ3B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,mDAAmD;KACjE,CAAC;;GACW,eAAe,CAiG3B"}
@@ -1,30 +0,0 @@
1
- import { ProposePhaseAdvanceUseCase } from '@evolith/core-domain/application/use-cases/propose-phase-advance.use-case';
2
- import { BaseEvolithCommand } from '../../infrastructure/cli/base-command';
3
- import { PromptService } from '../../infrastructure/prompts/prompt.service';
4
- interface PhaseAdvanceCommandOptions {
5
- from?: string;
6
- to?: string;
7
- project?: string;
8
- core?: string;
9
- format?: string;
10
- evaluatedBy?: string;
11
- initiative?: string;
12
- tenant?: string;
13
- webhookUrl?: string;
14
- }
15
- export declare class PhaseAdvanceCommand extends BaseEvolithCommand {
16
- private readonly useCase;
17
- constructor(useCase: ProposePhaseAdvanceUseCase, promptService: PromptService);
18
- executeCommand(inputs: string[], options?: PhaseAdvanceCommandOptions): Promise<void>;
19
- private printHuman;
20
- parseFrom(val: string): string;
21
- parseTo(val: string): string;
22
- parseProject(val: string): string;
23
- parseCore(val: string): string;
24
- parseFormat(val: string): string;
25
- parseEvaluatedBy(val: string): string;
26
- parseInitiative(val: string): string;
27
- parseTenant(val: string): string;
28
- parseWebhookUrl(val: string): string;
29
- }
30
- export {};