@wundr.io/cli 1.0.10 → 1.0.12

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 (269) hide show
  1. package/bin/wundr.js +8 -4
  2. package/package.json +23 -23
  3. package/src/ai/ai-service.ts +16 -17
  4. package/src/ai/claude-client.ts +16 -16
  5. package/src/ai/conversation-manager.ts +29 -29
  6. package/src/cli.ts +4 -4
  7. package/src/commands/ai.ts +246 -78
  8. package/src/commands/alignment.ts +74 -74
  9. package/src/commands/analyze-optimized.ts +111 -78
  10. package/src/commands/analyze.ts +14 -14
  11. package/src/commands/batch.ts +179 -42
  12. package/src/commands/chat.ts +37 -30
  13. package/src/commands/claude-init.ts +41 -45
  14. package/src/commands/claude-setup.ts +204 -119
  15. package/src/commands/computer-setup.ts +85 -43
  16. package/src/commands/create-command.ts +4 -4
  17. package/src/commands/create.ts +27 -27
  18. package/src/commands/dashboard.ts +24 -24
  19. package/src/commands/govern.ts +25 -25
  20. package/src/commands/governance.ts +34 -34
  21. package/src/commands/guardian.ts +56 -56
  22. package/src/commands/init.ts +25 -22
  23. package/src/commands/orchestrator.ts +68 -41
  24. package/src/commands/performance-optimizer.ts +34 -35
  25. package/src/commands/plugins.ts +27 -27
  26. package/src/commands/project-update.ts +175 -72
  27. package/src/commands/rag.ts +185 -78
  28. package/src/commands/session.ts +35 -35
  29. package/src/commands/setup.ts +40 -344
  30. package/src/commands/test-init.ts +3 -3
  31. package/src/commands/test.ts +4 -4
  32. package/src/commands/watch.ts +28 -29
  33. package/src/commands/worktree.ts +49 -49
  34. package/src/context/context-manager.ts +10 -10
  35. package/src/context/session-manager.ts +41 -41
  36. package/src/framework/command-interface.ts +520 -0
  37. package/src/framework/command-registry.ts +942 -0
  38. package/src/framework/completion-exporter.ts +383 -0
  39. package/src/framework/debug-logger.ts +519 -0
  40. package/src/framework/error-handler.ts +867 -0
  41. package/src/framework/help-generator.ts +540 -0
  42. package/src/framework/index.ts +169 -0
  43. package/src/framework/interactive-repl.ts +703 -0
  44. package/src/framework/output-formatter.ts +834 -0
  45. package/src/framework/progress-manager.ts +539 -0
  46. package/src/index.ts +4 -4
  47. package/src/interactive/interactive-mode.ts +16 -16
  48. package/src/lib/conflict-resolution.ts +799 -9
  49. package/src/lib/merge-strategy.ts +529 -7
  50. package/src/lib/safety-mechanisms.ts +422 -18
  51. package/src/lib/state-detection.ts +1015 -13
  52. package/src/nlp/command-mapper.ts +29 -29
  53. package/src/nlp/command-parser.ts +17 -17
  54. package/src/nlp/intent-classifier.ts +7 -7
  55. package/src/nlp/intent-parser.ts +54 -52
  56. package/src/plugins/plugin-manager.ts +61 -39
  57. package/src/tests/computer-setup-integration.test.ts +46 -15
  58. package/src/types/modules.d.ts +424 -1
  59. package/src/utils/backup-rollback-manager.ts +11 -8
  60. package/src/utils/config-manager.ts +3 -3
  61. package/src/utils/error-handler.ts +2 -2
  62. package/src/utils/logger.ts +22 -22
  63. package/templates/batch/ci-cd.yaml +7 -7
  64. package/test-suites/api/health.spec.ts +20 -23
  65. package/test-suites/helpers/test-config.ts +14 -13
  66. package/test-suites/ui/accessibility.spec.ts +27 -22
  67. package/test-suites/ui/smoke.spec.ts +26 -21
  68. package/LICENSE +0 -21
  69. package/dist/ai/ai-service.d.ts +0 -152
  70. package/dist/ai/ai-service.d.ts.map +0 -1
  71. package/dist/ai/ai-service.js +0 -430
  72. package/dist/ai/ai-service.js.map +0 -1
  73. package/dist/ai/claude-client.d.ts +0 -130
  74. package/dist/ai/claude-client.d.ts.map +0 -1
  75. package/dist/ai/claude-client.js +0 -340
  76. package/dist/ai/claude-client.js.map +0 -1
  77. package/dist/ai/conversation-manager.d.ts +0 -164
  78. package/dist/ai/conversation-manager.d.ts.map +0 -1
  79. package/dist/ai/conversation-manager.js +0 -614
  80. package/dist/ai/conversation-manager.js.map +0 -1
  81. package/dist/ai/index.d.ts +0 -5
  82. package/dist/ai/index.d.ts.map +0 -1
  83. package/dist/ai/index.js +0 -8
  84. package/dist/ai/index.js.map +0 -1
  85. package/dist/cli.d.ts +0 -36
  86. package/dist/cli.d.ts.map +0 -1
  87. package/dist/cli.js +0 -192
  88. package/dist/cli.js.map +0 -1
  89. package/dist/commands/ai.d.ts +0 -89
  90. package/dist/commands/ai.d.ts.map +0 -1
  91. package/dist/commands/ai.js +0 -799
  92. package/dist/commands/ai.js.map +0 -1
  93. package/dist/commands/alignment.d.ts +0 -78
  94. package/dist/commands/alignment.d.ts.map +0 -1
  95. package/dist/commands/alignment.js +0 -817
  96. package/dist/commands/alignment.js.map +0 -1
  97. package/dist/commands/analyze-optimized.d.ts +0 -14
  98. package/dist/commands/analyze-optimized.d.ts.map +0 -1
  99. package/dist/commands/analyze-optimized.js +0 -600
  100. package/dist/commands/analyze-optimized.js.map +0 -1
  101. package/dist/commands/analyze.d.ts +0 -65
  102. package/dist/commands/analyze.d.ts.map +0 -1
  103. package/dist/commands/analyze.js +0 -435
  104. package/dist/commands/analyze.js.map +0 -1
  105. package/dist/commands/batch.d.ts +0 -71
  106. package/dist/commands/batch.d.ts.map +0 -1
  107. package/dist/commands/batch.js +0 -738
  108. package/dist/commands/batch.js.map +0 -1
  109. package/dist/commands/chat.d.ts +0 -71
  110. package/dist/commands/chat.d.ts.map +0 -1
  111. package/dist/commands/chat.js +0 -674
  112. package/dist/commands/chat.js.map +0 -1
  113. package/dist/commands/claude-init.d.ts +0 -28
  114. package/dist/commands/claude-init.d.ts.map +0 -1
  115. package/dist/commands/claude-init.js +0 -591
  116. package/dist/commands/claude-init.js.map +0 -1
  117. package/dist/commands/claude-setup.d.ts +0 -119
  118. package/dist/commands/claude-setup.d.ts.map +0 -1
  119. package/dist/commands/claude-setup.js +0 -1073
  120. package/dist/commands/claude-setup.js.map +0 -1
  121. package/dist/commands/computer-setup-commands.d.ts +0 -53
  122. package/dist/commands/computer-setup-commands.d.ts.map +0 -1
  123. package/dist/commands/computer-setup-commands.js +0 -705
  124. package/dist/commands/computer-setup-commands.js.map +0 -1
  125. package/dist/commands/computer-setup.d.ts +0 -7
  126. package/dist/commands/computer-setup.d.ts.map +0 -1
  127. package/dist/commands/computer-setup.js +0 -849
  128. package/dist/commands/computer-setup.js.map +0 -1
  129. package/dist/commands/create-command.d.ts +0 -7
  130. package/dist/commands/create-command.d.ts.map +0 -1
  131. package/dist/commands/create-command.js +0 -158
  132. package/dist/commands/create-command.js.map +0 -1
  133. package/dist/commands/create.d.ts +0 -74
  134. package/dist/commands/create.d.ts.map +0 -1
  135. package/dist/commands/create.js +0 -556
  136. package/dist/commands/create.js.map +0 -1
  137. package/dist/commands/dashboard.d.ts +0 -91
  138. package/dist/commands/dashboard.d.ts.map +0 -1
  139. package/dist/commands/dashboard.js +0 -538
  140. package/dist/commands/dashboard.js.map +0 -1
  141. package/dist/commands/govern.d.ts +0 -70
  142. package/dist/commands/govern.d.ts.map +0 -1
  143. package/dist/commands/govern.js +0 -481
  144. package/dist/commands/govern.js.map +0 -1
  145. package/dist/commands/governance.d.ts +0 -17
  146. package/dist/commands/governance.d.ts.map +0 -1
  147. package/dist/commands/governance.js +0 -703
  148. package/dist/commands/governance.js.map +0 -1
  149. package/dist/commands/guardian.d.ts +0 -20
  150. package/dist/commands/guardian.d.ts.map +0 -1
  151. package/dist/commands/guardian.js +0 -597
  152. package/dist/commands/guardian.js.map +0 -1
  153. package/dist/commands/init.d.ts +0 -59
  154. package/dist/commands/init.d.ts.map +0 -1
  155. package/dist/commands/init.js +0 -650
  156. package/dist/commands/init.js.map +0 -1
  157. package/dist/commands/orchestrator.d.ts +0 -7
  158. package/dist/commands/orchestrator.d.ts.map +0 -1
  159. package/dist/commands/orchestrator.js +0 -571
  160. package/dist/commands/orchestrator.js.map +0 -1
  161. package/dist/commands/performance-optimizer.d.ts +0 -30
  162. package/dist/commands/performance-optimizer.d.ts.map +0 -1
  163. package/dist/commands/performance-optimizer.js +0 -650
  164. package/dist/commands/performance-optimizer.js.map +0 -1
  165. package/dist/commands/plugins.d.ts +0 -87
  166. package/dist/commands/plugins.d.ts.map +0 -1
  167. package/dist/commands/plugins.js +0 -685
  168. package/dist/commands/plugins.js.map +0 -1
  169. package/dist/commands/rag.d.ts +0 -7
  170. package/dist/commands/rag.d.ts.map +0 -1
  171. package/dist/commands/rag.js +0 -748
  172. package/dist/commands/rag.js.map +0 -1
  173. package/dist/commands/session.d.ts +0 -41
  174. package/dist/commands/session.d.ts.map +0 -1
  175. package/dist/commands/session.js +0 -441
  176. package/dist/commands/session.js.map +0 -1
  177. package/dist/commands/setup.d.ts +0 -29
  178. package/dist/commands/setup.d.ts.map +0 -1
  179. package/dist/commands/setup.js +0 -397
  180. package/dist/commands/setup.js.map +0 -1
  181. package/dist/commands/test-init.d.ts +0 -9
  182. package/dist/commands/test-init.d.ts.map +0 -1
  183. package/dist/commands/test-init.js +0 -222
  184. package/dist/commands/test-init.js.map +0 -1
  185. package/dist/commands/test.d.ts +0 -25
  186. package/dist/commands/test.d.ts.map +0 -1
  187. package/dist/commands/test.js +0 -217
  188. package/dist/commands/test.js.map +0 -1
  189. package/dist/commands/vp.d.ts +0 -7
  190. package/dist/commands/vp.d.ts.map +0 -1
  191. package/dist/commands/vp.js +0 -571
  192. package/dist/commands/vp.js.map +0 -1
  193. package/dist/commands/watch.d.ts +0 -76
  194. package/dist/commands/watch.d.ts.map +0 -1
  195. package/dist/commands/watch.js +0 -613
  196. package/dist/commands/watch.js.map +0 -1
  197. package/dist/commands/worktree.d.ts +0 -63
  198. package/dist/commands/worktree.d.ts.map +0 -1
  199. package/dist/commands/worktree.js +0 -774
  200. package/dist/commands/worktree.js.map +0 -1
  201. package/dist/context/context-manager.d.ts +0 -155
  202. package/dist/context/context-manager.d.ts.map +0 -1
  203. package/dist/context/context-manager.js +0 -383
  204. package/dist/context/context-manager.js.map +0 -1
  205. package/dist/context/index.d.ts +0 -3
  206. package/dist/context/index.d.ts.map +0 -1
  207. package/dist/context/index.js +0 -6
  208. package/dist/context/index.js.map +0 -1
  209. package/dist/context/session-manager.d.ts +0 -207
  210. package/dist/context/session-manager.d.ts.map +0 -1
  211. package/dist/context/session-manager.js +0 -686
  212. package/dist/context/session-manager.js.map +0 -1
  213. package/dist/index.d.ts +0 -8
  214. package/dist/index.d.ts.map +0 -1
  215. package/dist/index.js +0 -51
  216. package/dist/index.js.map +0 -1
  217. package/dist/interactive/interactive-mode.d.ts +0 -76
  218. package/dist/interactive/interactive-mode.d.ts.map +0 -1
  219. package/dist/interactive/interactive-mode.js +0 -732
  220. package/dist/interactive/interactive-mode.js.map +0 -1
  221. package/dist/nlp/command-mapper.d.ts +0 -174
  222. package/dist/nlp/command-mapper.d.ts.map +0 -1
  223. package/dist/nlp/command-mapper.js +0 -624
  224. package/dist/nlp/command-mapper.js.map +0 -1
  225. package/dist/nlp/command-parser.d.ts +0 -106
  226. package/dist/nlp/command-parser.d.ts.map +0 -1
  227. package/dist/nlp/command-parser.js +0 -417
  228. package/dist/nlp/command-parser.js.map +0 -1
  229. package/dist/nlp/index.d.ts +0 -5
  230. package/dist/nlp/index.d.ts.map +0 -1
  231. package/dist/nlp/index.js +0 -8
  232. package/dist/nlp/index.js.map +0 -1
  233. package/dist/nlp/intent-classifier.d.ts +0 -59
  234. package/dist/nlp/intent-classifier.d.ts.map +0 -1
  235. package/dist/nlp/intent-classifier.js +0 -384
  236. package/dist/nlp/intent-classifier.js.map +0 -1
  237. package/dist/nlp/intent-parser.d.ts +0 -152
  238. package/dist/nlp/intent-parser.d.ts.map +0 -1
  239. package/dist/nlp/intent-parser.js +0 -744
  240. package/dist/nlp/intent-parser.js.map +0 -1
  241. package/dist/plugins/plugin-manager.d.ts +0 -120
  242. package/dist/plugins/plugin-manager.d.ts.map +0 -1
  243. package/dist/plugins/plugin-manager.js +0 -595
  244. package/dist/plugins/plugin-manager.js.map +0 -1
  245. package/dist/types/index.d.ts +0 -224
  246. package/dist/types/index.d.ts.map +0 -1
  247. package/dist/types/index.js +0 -3
  248. package/dist/types/index.js.map +0 -1
  249. package/dist/utils/backup-rollback-manager.d.ts +0 -72
  250. package/dist/utils/backup-rollback-manager.d.ts.map +0 -1
  251. package/dist/utils/backup-rollback-manager.js +0 -289
  252. package/dist/utils/backup-rollback-manager.js.map +0 -1
  253. package/dist/utils/claude-config-installer.d.ts +0 -98
  254. package/dist/utils/claude-config-installer.d.ts.map +0 -1
  255. package/dist/utils/claude-config-installer.js +0 -678
  256. package/dist/utils/claude-config-installer.js.map +0 -1
  257. package/dist/utils/config-manager.d.ts +0 -73
  258. package/dist/utils/config-manager.d.ts.map +0 -1
  259. package/dist/utils/config-manager.js +0 -339
  260. package/dist/utils/config-manager.js.map +0 -1
  261. package/dist/utils/error-handler.d.ts +0 -46
  262. package/dist/utils/error-handler.d.ts.map +0 -1
  263. package/dist/utils/error-handler.js +0 -169
  264. package/dist/utils/error-handler.js.map +0 -1
  265. package/dist/utils/logger.d.ts +0 -25
  266. package/dist/utils/logger.d.ts.map +0 -1
  267. package/dist/utils/logger.js +0 -105
  268. package/dist/utils/logger.js.map +0 -1
  269. package/src/commands/computer-setup-commands.ts +0 -872
@@ -14,18 +14,14 @@ import { Command } from 'commander';
14
14
  import inquirer from 'inquirer';
15
15
  import ora from 'ora';
16
16
 
17
- import {
18
- createConflictResolver,
19
- } from '../lib/conflict-resolution';
17
+ import { createConflictResolver } from '../lib/conflict-resolution';
20
18
  import {
21
19
  MergeStrategyManager,
22
20
  MergeResult,
23
21
  threeWayMerge,
24
22
  detectFileType,
25
23
  } from '../lib/merge-strategy';
26
- import {
27
- createSafetyManager,
28
- } from '../lib/safety-mechanisms';
24
+ import { createSafetyManager } from '../lib/safety-mechanisms';
29
25
  import {
30
26
  detectProjectState,
31
27
  CustomizationInfo,
@@ -38,17 +34,17 @@ import { logger } from '../utils/logger';
38
34
  import type {
39
35
  ConflictResolver,
40
36
  UpdateConflict,
41
- ConflictResolutionResult} from '../lib/conflict-resolution';
37
+ ConflictResolutionResult,
38
+ } from '../lib/conflict-resolution';
42
39
  import type {
43
40
  SafetyManager,
44
41
  UpdateBackup,
45
- UpdateTransaction} from '../lib/safety-mechanisms';
46
- import type {
47
- ProjectState} from '../lib/state-detection';
42
+ UpdateTransaction,
43
+ } from '../lib/safety-mechanisms';
44
+ import type { ProjectState } from '../lib/state-detection';
48
45
  import type { PluginManager } from '../plugins/plugin-manager';
49
46
  import type { ConfigManager } from '../utils/config-manager';
50
47
 
51
-
52
48
  /**
53
49
  * Update options from CLI flags
54
50
  */
@@ -163,7 +159,10 @@ export class ProjectUpdateManager {
163
159
  private updateLog: UpdateLogEntry[] = [];
164
160
  private spinner: ReturnType<typeof ora> | null = null;
165
161
 
166
- constructor(projectRoot: string, options: Partial<ProjectUpdateOptions> = {}) {
162
+ constructor(
163
+ projectRoot: string,
164
+ options: Partial<ProjectUpdateOptions> = {}
165
+ ) {
167
166
  this.projectRoot = projectRoot;
168
167
  this.options = { ...DEFAULT_UPDATE_OPTIONS, ...options };
169
168
 
@@ -210,13 +209,23 @@ export class ProjectUpdateManager {
210
209
  this.log('detect', 'state', 'success', `Version: ${currentVersion}`);
211
210
 
212
211
  // Step 2: Check if update is needed
213
- const needsUpdate = currentState.isWundrOutdated ||
214
- currentState.isPartialInstallation ||
215
- this.options.force;
212
+ const needsUpdate =
213
+ currentState.isWundrOutdated ||
214
+ currentState.isPartialInstallation ||
215
+ this.options.force;
216
216
 
217
217
  if (!needsUpdate && !this.options.force) {
218
218
  console.log(chalk.green('\nProject is up to date!'));
219
- return this.createResult(true, currentVersion, currentVersion, [], [], null, [], startTime);
219
+ return this.createResult(
220
+ true,
221
+ currentVersion,
222
+ currentVersion,
223
+ [],
224
+ [],
225
+ null,
226
+ [],
227
+ startTime
228
+ );
220
229
  }
221
230
 
222
231
  // Step 3: Show update plan
@@ -227,7 +236,16 @@ export class ProjectUpdateManager {
227
236
  const confirmed = await this.confirmUpdate(currentState);
228
237
  if (!confirmed) {
229
238
  console.log(chalk.yellow('\nUpdate cancelled by user.'));
230
- return this.createResult(false, currentVersion, currentVersion, [], [], null, ['Cancelled by user'], startTime);
239
+ return this.createResult(
240
+ false,
241
+ currentVersion,
242
+ currentVersion,
243
+ [],
244
+ [],
245
+ null,
246
+ ['Cancelled by user'],
247
+ startTime
248
+ );
231
249
  }
232
250
  }
233
251
 
@@ -240,11 +258,16 @@ export class ProjectUpdateManager {
240
258
  filesToBackup,
241
259
  'Pre-update backup',
242
260
  currentVersion,
243
- this.options.version || 'latest',
261
+ this.options.version || 'latest'
244
262
  );
245
263
  this.stopSpinner();
246
264
  console.log(chalk.green(`Backup created: ${backup.id}`));
247
- this.log('backup', backup.path, 'success', `${backup.files.length} files backed up`);
265
+ this.log(
266
+ 'backup',
267
+ backup.path,
268
+ 'success',
269
+ `${backup.files.length} files backed up`
270
+ );
248
271
  }
249
272
 
250
273
  // Step 6: Start transaction
@@ -256,7 +279,7 @@ export class ProjectUpdateManager {
256
279
  const { filesUpdated, conflicts, errors } = await this.performUpdates(
257
280
  components,
258
281
  currentState,
259
- transaction,
282
+ transaction
260
283
  );
261
284
 
262
285
  // Step 8: Resolve conflicts
@@ -280,7 +303,9 @@ export class ProjectUpdateManager {
280
303
 
281
304
  // Success
282
305
  const toVersion = this.options.version || 'latest';
283
- console.log(chalk.green(`\nProject updated successfully to ${toVersion}!`));
306
+ console.log(
307
+ chalk.green(`\nProject updated successfully to ${toVersion}!`)
308
+ );
284
309
 
285
310
  return this.createResult(
286
311
  true,
@@ -290,9 +315,8 @@ export class ProjectUpdateManager {
290
315
  conflicts,
291
316
  backup,
292
317
  errors,
293
- startTime,
318
+ startTime
294
319
  );
295
-
296
320
  } catch (error) {
297
321
  // Rollback on failure
298
322
  if (this.options.rollbackOnFailure && backup) {
@@ -303,7 +327,6 @@ export class ProjectUpdateManager {
303
327
  }
304
328
  throw error;
305
329
  }
306
-
307
330
  } catch (error: any) {
308
331
  logger.error('Project update failed', error);
309
332
  this.log('update', 'project', 'failure', error.message);
@@ -317,7 +340,7 @@ export class ProjectUpdateManager {
317
340
  [],
318
341
  null,
319
342
  [error.message],
320
- startTime,
343
+ startTime
321
344
  );
322
345
  }
323
346
  }
@@ -382,9 +405,18 @@ export class ProjectUpdateManager {
382
405
  private async showUpdatePlan(state: ProjectState): Promise<void> {
383
406
  console.log(chalk.cyan('\n========== Update Plan ==========\n'));
384
407
 
385
- console.log(chalk.white('Current Version:'), chalk.yellow(state.wundrVersion || 'Not installed'));
386
- console.log(chalk.white('Target Version:'), chalk.green(this.options.version || state.latestWundrVersion || 'latest'));
387
- console.log(chalk.white('Health Score:'), chalk.yellow(`${state.healthScore}/100`));
408
+ console.log(
409
+ chalk.white('Current Version:'),
410
+ chalk.yellow(state.wundrVersion || 'Not installed')
411
+ );
412
+ console.log(
413
+ chalk.white('Target Version:'),
414
+ chalk.green(this.options.version || state.latestWundrVersion || 'latest')
415
+ );
416
+ console.log(
417
+ chalk.white('Health Score:'),
418
+ chalk.yellow(`${state.healthScore}/100`)
419
+ );
388
420
 
389
421
  if (state.recommendations.length > 0) {
390
422
  console.log(chalk.white('\nRecommendations:'));
@@ -399,17 +431,26 @@ export class ProjectUpdateManager {
399
431
  console.log(` - ${file}`);
400
432
  }
401
433
  if (state.customizations.customizedFiles.length > 5) {
402
- console.log(chalk.gray(` ... and ${state.customizations.customizedFiles.length - 5} more`));
434
+ console.log(
435
+ chalk.gray(
436
+ ` ... and ${state.customizations.customizedFiles.length - 5} more`
437
+ )
438
+ );
403
439
  }
404
440
  }
405
441
 
406
442
  if (state.conflicts.hasConflicts) {
407
443
  console.log(chalk.yellow('\nDetected Conflicts:'));
408
444
  for (const conflict of state.conflicts.conflicts) {
409
- const severityColor = conflict.severity === 'error' ? chalk.red :
410
- conflict.severity === 'warning' ? chalk.yellow :
411
- chalk.gray;
412
- console.log(severityColor(` [${conflict.severity}] ${conflict.description}`));
445
+ const severityColor =
446
+ conflict.severity === 'error'
447
+ ? chalk.red
448
+ : conflict.severity === 'warning'
449
+ ? chalk.yellow
450
+ : chalk.gray;
451
+ console.log(
452
+ severityColor(` [${conflict.severity}] ${conflict.description}`)
453
+ );
413
454
  }
414
455
  }
415
456
 
@@ -482,7 +523,7 @@ export class ProjectUpdateManager {
482
523
  private async performUpdates(
483
524
  components: UpdateComponent[],
484
525
  state: ProjectState,
485
- transaction: UpdateTransaction,
526
+ transaction: UpdateTransaction
486
527
  ): Promise<{
487
528
  filesUpdated: string[];
488
529
  conflicts: UpdateConflict[];
@@ -496,7 +537,7 @@ export class ProjectUpdateManager {
496
537
  let componentsToUpdate = components;
497
538
  if (this.options.components.length > 0) {
498
539
  componentsToUpdate = components.filter(c =>
499
- this.options.components.includes(c.name),
540
+ this.options.components.includes(c.name)
500
541
  );
501
542
  }
502
543
 
@@ -508,7 +549,11 @@ export class ProjectUpdateManager {
508
549
  }
509
550
 
510
551
  try {
511
- const result = await this.updateComponent(component, state, transaction);
552
+ const result = await this.updateComponent(
553
+ component,
554
+ state,
555
+ transaction
556
+ );
512
557
 
513
558
  filesUpdated.push(...result.updated);
514
559
  conflicts.push(...result.conflicts);
@@ -517,7 +562,12 @@ export class ProjectUpdateManager {
517
562
  errors.push(...result.errors);
518
563
  }
519
564
 
520
- this.log('update', component.name, 'success', `${result.updated.length} files updated`);
565
+ this.log(
566
+ 'update',
567
+ component.name,
568
+ 'success',
569
+ `${result.updated.length} files updated`
570
+ );
521
571
  } catch (error: any) {
522
572
  errors.push(`Component ${component.name}: ${error.message}`);
523
573
  this.log('update', component.name, 'failure', error.message);
@@ -535,7 +585,7 @@ export class ProjectUpdateManager {
535
585
  private async updateComponent(
536
586
  component: UpdateComponent,
537
587
  state: ProjectState,
538
- transaction: UpdateTransaction,
588
+ transaction: UpdateTransaction
539
589
  ): Promise<{
540
590
  updated: string[];
541
591
  conflicts: UpdateConflict[];
@@ -597,11 +647,10 @@ export class ProjectUpdateManager {
597
647
  // Create update conflicts
598
648
  for (const conflict of mergeResult.conflicts) {
599
649
  conflicts.push(
600
- this.conflictResolver.createUpdateConflict(conflict, filePath),
650
+ this.conflictResolver.createUpdateConflict(conflict, filePath)
601
651
  );
602
652
  }
603
653
  }
604
-
605
654
  } catch (error: any) {
606
655
  errors.push(`File ${filePath}: ${error.message}`);
607
656
  transaction.failOperation(filePath, error.message);
@@ -616,7 +665,7 @@ export class ProjectUpdateManager {
616
665
  */
617
666
  private async getTargetContent(
618
667
  filePath: string,
619
- component: UpdateComponent,
668
+ component: UpdateComponent
620
669
  ): Promise<string | null> {
621
670
  // In real implementation, would fetch from wundr registry
622
671
  // For now, return null (no update available)
@@ -634,7 +683,7 @@ export class ProjectUpdateManager {
634
683
  conflicts: UpdateConflict[],
635
684
  backup: UpdateBackup | null,
636
685
  errors: string[],
637
- startTime: number,
686
+ startTime: number
638
687
  ): UpdateResult {
639
688
  return {
640
689
  success,
@@ -658,7 +707,12 @@ export class ProjectUpdateManager {
658
707
  /**
659
708
  * Log an update action
660
709
  */
661
- private log(action: string, target: string, status: 'success' | 'failure' | 'skipped', details?: string): void {
710
+ private log(
711
+ action: string,
712
+ target: string,
713
+ status: 'success' | 'failure' | 'skipped',
714
+ details?: string
715
+ ): void {
662
716
  this.updateLog.push({
663
717
  timestamp: new Date().toISOString(),
664
718
  action,
@@ -675,9 +729,12 @@ export class ProjectUpdateManager {
675
729
  const logPath = path.join(this.projectRoot, '.wundr-update.log');
676
730
 
677
731
  try {
678
- const content = this.updateLog.map(entry =>
679
- `[${entry.timestamp}] ${entry.action.toUpperCase()} ${entry.target} - ${entry.status}${entry.details ? `: ${entry.details}` : ''}`,
680
- ).join('\n');
732
+ const content = this.updateLog
733
+ .map(
734
+ entry =>
735
+ `[${entry.timestamp}] ${entry.action.toUpperCase()} ${entry.target} - ${entry.status}${entry.details ? `: ${entry.details}` : ''}`
736
+ )
737
+ .join('\n');
681
738
 
682
739
  await fs.writeFile(logPath, content);
683
740
  } catch (error) {
@@ -718,7 +775,7 @@ export class ProjectUpdateCommands {
718
775
  constructor(
719
776
  private program: Command,
720
777
  private configManager: ConfigManager,
721
- private pluginManager: PluginManager,
778
+ private pluginManager: PluginManager
722
779
  ) {
723
780
  this.registerCommands();
724
781
  }
@@ -733,17 +790,25 @@ export class ProjectUpdateCommands {
733
790
  updateCmd
734
791
  .command('project')
735
792
  .description('Update the entire project')
736
- .option('--dry-run', 'Show what would be done without making changes', false)
793
+ .option(
794
+ '--dry-run',
795
+ 'Show what would be done without making changes',
796
+ false
797
+ )
737
798
  .option('-f, --force', 'Force update without prompts', false)
738
799
  .option('--skip-backup', 'Skip creating backup before update', false)
739
- .option('-c, --components <names>', 'Specific components to update (comma-separated)', '')
800
+ .option(
801
+ '-c, --components <names>',
802
+ 'Specific components to update (comma-separated)',
803
+ ''
804
+ )
740
805
  .option('-v, --version <version>', 'Target version to update to')
741
806
  .option('--no-interactive', 'Disable interactive mode')
742
807
  .option('--verbose', 'Enable verbose output', false)
743
808
  .option('--show-diff', 'Show differences during update', true)
744
809
  .option('--auto-resolve', 'Automatically resolve conflicts', false)
745
810
  .option('--no-rollback', 'Disable rollback on failure')
746
- .action(async (options) => {
811
+ .action(async options => {
747
812
  await this.updateProject(options);
748
813
  });
749
814
 
@@ -752,7 +817,7 @@ export class ProjectUpdateCommands {
752
817
  .command('check')
753
818
  .description('Check if updates are available')
754
819
  .option('--verbose', 'Show detailed information')
755
- .action(async (options) => {
820
+ .action(async options => {
756
821
  await this.checkUpdates(options);
757
822
  });
758
823
 
@@ -761,7 +826,7 @@ export class ProjectUpdateCommands {
761
826
  .command('history')
762
827
  .description('Show update history')
763
828
  .option('-n, --limit <number>', 'Number of entries to show', '10')
764
- .action(async (options) => {
829
+ .action(async options => {
765
830
  await this.showHistory(options);
766
831
  });
767
832
 
@@ -779,7 +844,7 @@ export class ProjectUpdateCommands {
779
844
  .command('cleanup')
780
845
  .description('Clean up old backups')
781
846
  .option('-k, --keep <number>', 'Number of backups to keep', '5')
782
- .action(async (options) => {
847
+ .action(async options => {
783
848
  await this.cleanup(options);
784
849
  });
785
850
  }
@@ -793,7 +858,9 @@ export class ProjectUpdateCommands {
793
858
  dryRun: options.dryRun,
794
859
  force: options.force,
795
860
  skipBackup: options.skipBackup,
796
- components: options.components ? options.components.split(',').map((c: string) => c.trim()) : [],
861
+ components: options.components
862
+ ? options.components.split(',').map((c: string) => c.trim())
863
+ : [],
797
864
  version: options.version || null,
798
865
  interactive: options.interactive !== false,
799
866
  verbose: options.verbose,
@@ -813,7 +880,7 @@ export class ProjectUpdateCommands {
813
880
  'WUNDR_UPDATE_FAILED',
814
881
  'Project update failed',
815
882
  { options },
816
- true,
883
+ true
817
884
  );
818
885
  }
819
886
  }
@@ -830,9 +897,18 @@ export class ProjectUpdateCommands {
830
897
  spinner.succeed('Update check complete');
831
898
 
832
899
  console.log(chalk.cyan('\n========== Update Status ==========\n'));
833
- console.log(chalk.white('Current Version:'), chalk.yellow(state.wundrVersion || 'Not installed'));
834
- console.log(chalk.white('Health Score:'), chalk.yellow(`${state.healthScore}/100`));
835
- console.log(chalk.white('Needs Update:'), state.isWundrOutdated ? chalk.red('Yes') : chalk.green('No'));
900
+ console.log(
901
+ chalk.white('Current Version:'),
902
+ chalk.yellow(state.wundrVersion || 'Not installed')
903
+ );
904
+ console.log(
905
+ chalk.white('Health Score:'),
906
+ chalk.yellow(`${state.healthScore}/100`)
907
+ );
908
+ console.log(
909
+ chalk.white('Needs Update:'),
910
+ state.isWundrOutdated ? chalk.red('Yes') : chalk.green('No')
911
+ );
836
912
 
837
913
  if (state.recommendations.length > 0) {
838
914
  console.log(chalk.white('\nRecommendations:'));
@@ -840,7 +916,9 @@ export class ProjectUpdateCommands {
840
916
  console.log(chalk.gray(` - ${rec}`));
841
917
  }
842
918
 
843
- console.log(chalk.cyan('\nRun `wundr update project` to apply updates.'));
919
+ console.log(
920
+ chalk.cyan('\nRun `wundr update project` to apply updates.')
921
+ );
844
922
  }
845
923
 
846
924
  console.log(chalk.cyan('\n====================================\n'));
@@ -880,7 +958,10 @@ export class ProjectUpdateCommands {
880
958
  /**
881
959
  * Rollback to previous state
882
960
  */
883
- private async rollback(backupId: string | undefined, options: any): Promise<void> {
961
+ private async rollback(
962
+ backupId: string | undefined,
963
+ options: any
964
+ ): Promise<void> {
884
965
  const safetyManager = createSafetyManager({ projectRoot: process.cwd() });
885
966
 
886
967
  if (options.list) {
@@ -895,7 +976,7 @@ export class ProjectUpdateCommands {
895
976
  for (const backup of backups) {
896
977
  console.log(
897
978
  ` ${chalk.white(backup.id)} - ${chalk.gray(new Date(backup.timestamp).toLocaleString())} ` +
898
- `(${backup.files.length} files)`,
979
+ `(${backup.files.length} files)`
899
980
  );
900
981
  }
901
982
  console.log(chalk.cyan('\n=======================================\n'));
@@ -905,9 +986,9 @@ export class ProjectUpdateCommands {
905
986
  let backup: UpdateBackup | null;
906
987
 
907
988
  if (backupId) {
908
- backup = await safetyManager.listBackups().then(
909
- backups => backups.find(b => b.id === backupId) || null,
910
- );
989
+ backup = await safetyManager
990
+ .listBackups()
991
+ .then(backups => backups.find(b => b.id === backupId) || null);
911
992
  } else {
912
993
  backup = await safetyManager.getLatestBackup();
913
994
  }
@@ -950,7 +1031,11 @@ export class ProjectUpdateCommands {
950
1031
  const keepCount = parseInt(options.keep, 10);
951
1032
 
952
1033
  if (backups.length <= keepCount) {
953
- console.log(chalk.green(`Only ${backups.length} backup(s) found. Nothing to clean up.`));
1034
+ console.log(
1035
+ chalk.green(
1036
+ `Only ${backups.length} backup(s) found. Nothing to clean up.`
1037
+ )
1038
+ );
954
1039
  return;
955
1040
  }
956
1041
 
@@ -994,20 +1079,29 @@ export function createProjectUpdateCommand(): Command {
994
1079
  cmd
995
1080
  .command('project')
996
1081
  .description('Update the entire project')
997
- .option('--dry-run', 'Show what would be done without making changes', false)
1082
+ .option(
1083
+ '--dry-run',
1084
+ 'Show what would be done without making changes',
1085
+ false
1086
+ )
998
1087
  .option('-f, --force', 'Force update without prompts', false)
999
1088
  .option('--skip-backup', 'Skip creating backup before update', false)
1000
- .option('-c, --components <names>', 'Specific components to update (comma-separated)')
1089
+ .option(
1090
+ '-c, --components <names>',
1091
+ 'Specific components to update (comma-separated)'
1092
+ )
1001
1093
  .option('-v, --version <version>', 'Target version to update to')
1002
1094
  .option('--no-interactive', 'Disable interactive mode')
1003
1095
  .option('--verbose', 'Enable verbose output', false)
1004
1096
  .option('--auto-resolve', 'Automatically resolve conflicts', false)
1005
- .action(async (options) => {
1097
+ .action(async options => {
1006
1098
  const updateOptions: Partial<ProjectUpdateOptions> = {
1007
1099
  dryRun: options.dryRun,
1008
1100
  force: options.force,
1009
1101
  skipBackup: options.skipBackup,
1010
- components: options.components ? options.components.split(',').map((c: string) => c.trim()) : [],
1102
+ components: options.components
1103
+ ? options.components.split(',').map((c: string) => c.trim())
1104
+ : [],
1011
1105
  version: options.version || null,
1012
1106
  interactive: options.interactive !== false,
1013
1107
  verbose: options.verbose,
@@ -1031,9 +1125,18 @@ export function createProjectUpdateCommand(): Command {
1031
1125
  const state = await detectProjectState();
1032
1126
  spinner.succeed();
1033
1127
 
1034
- console.log(chalk.white('\nCurrent Version:'), chalk.yellow(state.wundrVersion || 'Not installed'));
1035
- console.log(chalk.white('Health Score:'), chalk.yellow(`${state.healthScore}/100`));
1036
- console.log(chalk.white('Needs Update:'), state.isWundrOutdated ? chalk.red('Yes') : chalk.green('No'));
1128
+ console.log(
1129
+ chalk.white('\nCurrent Version:'),
1130
+ chalk.yellow(state.wundrVersion || 'Not installed')
1131
+ );
1132
+ console.log(
1133
+ chalk.white('Health Score:'),
1134
+ chalk.yellow(`${state.healthScore}/100`)
1135
+ );
1136
+ console.log(
1137
+ chalk.white('Needs Update:'),
1138
+ state.isWundrOutdated ? chalk.red('Yes') : chalk.green('No')
1139
+ );
1037
1140
 
1038
1141
  if (state.recommendations.length > 0) {
1039
1142
  console.log(chalk.white('\nRecommendations:'));