ccjk 12.0.7 → 12.0.8

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 (299) hide show
  1. package/package.json +1 -1
  2. package/dist/chunks/agent-teams.mjs +0 -136
  3. package/dist/chunks/agent.mjs +0 -1439
  4. package/dist/chunks/agents.mjs +0 -3778
  5. package/dist/chunks/api-cli.mjs +0 -132
  6. package/dist/chunks/api-providers.mjs +0 -129
  7. package/dist/chunks/api.mjs +0 -112
  8. package/dist/chunks/auto-bootstrap.mjs +0 -358
  9. package/dist/chunks/auto-init.mjs +0 -7584
  10. package/dist/chunks/auto-updater.mjs +0 -410
  11. package/dist/chunks/banner.mjs +0 -188
  12. package/dist/chunks/bash.mjs +0 -187
  13. package/dist/chunks/boost.mjs +0 -397
  14. package/dist/chunks/ccjk-agents.mjs +0 -414
  15. package/dist/chunks/ccjk-all.mjs +0 -1028
  16. package/dist/chunks/ccjk-config.mjs +0 -261
  17. package/dist/chunks/ccjk-hooks.mjs +0 -1074
  18. package/dist/chunks/ccjk-mcp.mjs +0 -761
  19. package/dist/chunks/ccjk-setup.mjs +0 -763
  20. package/dist/chunks/ccjk-skills.mjs +0 -514
  21. package/dist/chunks/ccr.mjs +0 -98
  22. package/dist/chunks/ccu.mjs +0 -40
  23. package/dist/chunks/check-updates.mjs +0 -108
  24. package/dist/chunks/claude-code-config-manager.mjs +0 -750
  25. package/dist/chunks/claude-code-incremental-manager.mjs +0 -623
  26. package/dist/chunks/claude-config.mjs +0 -236
  27. package/dist/chunks/claude-wrapper.mjs +0 -85
  28. package/dist/chunks/cleanup-migration.mjs +0 -20
  29. package/dist/chunks/cli-hook.mjs +0 -2285
  30. package/dist/chunks/cloud-sync.mjs +0 -29
  31. package/dist/chunks/codex-config-switch.mjs +0 -451
  32. package/dist/chunks/codex-provider-manager.mjs +0 -236
  33. package/dist/chunks/codex-uninstaller.mjs +0 -404
  34. package/dist/chunks/codex.mjs +0 -2077
  35. package/dist/chunks/commands.mjs +0 -108
  36. package/dist/chunks/commands2.mjs +0 -413
  37. package/dist/chunks/commit.mjs +0 -138
  38. package/dist/chunks/completion.mjs +0 -515
  39. package/dist/chunks/config-consolidator.mjs +0 -172
  40. package/dist/chunks/config-switch.mjs +0 -317
  41. package/dist/chunks/config.mjs +0 -379
  42. package/dist/chunks/config2.mjs +0 -477
  43. package/dist/chunks/config3.mjs +0 -470
  44. package/dist/chunks/constants.mjs +0 -133
  45. package/dist/chunks/context-loader.mjs +0 -343
  46. package/dist/chunks/context.mjs +0 -372
  47. package/dist/chunks/convoy-manager.mjs +0 -880
  48. package/dist/chunks/dashboard.mjs +0 -476
  49. package/dist/chunks/doctor.mjs +0 -964
  50. package/dist/chunks/evolution.mjs +0 -382
  51. package/dist/chunks/features.mjs +0 -698
  52. package/dist/chunks/fish.mjs +0 -181
  53. package/dist/chunks/fs-operations.mjs +0 -192
  54. package/dist/chunks/health-alerts.mjs +0 -304
  55. package/dist/chunks/health-check.mjs +0 -532
  56. package/dist/chunks/help.mjs +0 -340
  57. package/dist/chunks/hook-installer.mjs +0 -45
  58. package/dist/chunks/index.mjs +0 -24
  59. package/dist/chunks/index10.mjs +0 -1171
  60. package/dist/chunks/index11.mjs +0 -1008
  61. package/dist/chunks/index12.mjs +0 -193
  62. package/dist/chunks/index13.mjs +0 -218
  63. package/dist/chunks/index14.mjs +0 -663
  64. package/dist/chunks/index2.mjs +0 -19
  65. package/dist/chunks/index3.mjs +0 -19092
  66. package/dist/chunks/index4.mjs +0 -8
  67. package/dist/chunks/index5.mjs +0 -7600
  68. package/dist/chunks/index6.mjs +0 -171
  69. package/dist/chunks/index7.mjs +0 -3583
  70. package/dist/chunks/index8.mjs +0 -19
  71. package/dist/chunks/index9.mjs +0 -616
  72. package/dist/chunks/init.mjs +0 -1606
  73. package/dist/chunks/installer.mjs +0 -690
  74. package/dist/chunks/installer2.mjs +0 -179
  75. package/dist/chunks/interview.mjs +0 -2927
  76. package/dist/chunks/json-config.mjs +0 -60
  77. package/dist/chunks/linux.mjs +0 -3863
  78. package/dist/chunks/macos.mjs +0 -69
  79. package/dist/chunks/main.mjs +0 -635
  80. package/dist/chunks/manager.mjs +0 -1048
  81. package/dist/chunks/marketplace.mjs +0 -949
  82. package/dist/chunks/mcp-cli.mjs +0 -204
  83. package/dist/chunks/mcp-performance.mjs +0 -187
  84. package/dist/chunks/mcp.mjs +0 -1231
  85. package/dist/chunks/menu.mjs +0 -652
  86. package/dist/chunks/metrics-display.mjs +0 -153
  87. package/dist/chunks/migrator.mjs +0 -178
  88. package/dist/chunks/monitor.mjs +0 -1856
  89. package/dist/chunks/notification.mjs +0 -1864
  90. package/dist/chunks/onboarding.mjs +0 -385
  91. package/dist/chunks/package.mjs +0 -3
  92. package/dist/chunks/paradigm.mjs +0 -74
  93. package/dist/chunks/permission-manager.mjs +0 -132
  94. package/dist/chunks/permissions.mjs +0 -265
  95. package/dist/chunks/persistence-manager.mjs +0 -794
  96. package/dist/chunks/persistence.mjs +0 -667
  97. package/dist/chunks/platform.mjs +0 -391
  98. package/dist/chunks/plugin.mjs +0 -1936
  99. package/dist/chunks/powershell.mjs +0 -213
  100. package/dist/chunks/prompts.mjs +0 -241
  101. package/dist/chunks/providers.mjs +0 -260
  102. package/dist/chunks/quick-actions.mjs +0 -320
  103. package/dist/chunks/quick-provider.mjs +0 -682
  104. package/dist/chunks/quick-setup.mjs +0 -412
  105. package/dist/chunks/remote.mjs +0 -497
  106. package/dist/chunks/session.mjs +0 -878
  107. package/dist/chunks/sessions.mjs +0 -106
  108. package/dist/chunks/silent-updater.mjs +0 -396
  109. package/dist/chunks/simple-config.mjs +0 -98
  110. package/dist/chunks/skill.mjs +0 -117
  111. package/dist/chunks/skill2.mjs +0 -9003
  112. package/dist/chunks/skills-sync.mjs +0 -6460
  113. package/dist/chunks/skills.mjs +0 -567
  114. package/dist/chunks/slash-commands.mjs +0 -207
  115. package/dist/chunks/smart-defaults.mjs +0 -412
  116. package/dist/chunks/smart-guide.mjs +0 -194
  117. package/dist/chunks/startup.mjs +0 -487
  118. package/dist/chunks/stats.mjs +0 -410
  119. package/dist/chunks/status.mjs +0 -289
  120. package/dist/chunks/team.mjs +0 -63
  121. package/dist/chunks/thinking.mjs +0 -626
  122. package/dist/chunks/trace.mjs +0 -57
  123. package/dist/chunks/uninstall.mjs +0 -849
  124. package/dist/chunks/update.mjs +0 -167
  125. package/dist/chunks/upgrade-manager.mjs +0 -204
  126. package/dist/chunks/version-checker.mjs +0 -881
  127. package/dist/chunks/vim.mjs +0 -903
  128. package/dist/chunks/windows.mjs +0 -14
  129. package/dist/chunks/workflows.mjs +0 -633
  130. package/dist/chunks/wsl.mjs +0 -129
  131. package/dist/chunks/zero-config.mjs +0 -374
  132. package/dist/chunks/zsh.mjs +0 -182
  133. package/dist/cli.d.mts +0 -1
  134. package/dist/cli.d.ts +0 -1
  135. package/dist/cli.mjs +0 -2199
  136. package/dist/i18n/locales/en/agent-teams.json +0 -18
  137. package/dist/i18n/locales/en/agentBrowser.json +0 -79
  138. package/dist/i18n/locales/en/agents.json +0 -135
  139. package/dist/i18n/locales/en/api.json +0 -63
  140. package/dist/i18n/locales/en/ccjk-agents.json +0 -33
  141. package/dist/i18n/locales/en/ccjk-all.json +0 -23
  142. package/dist/i18n/locales/en/ccjk-skills.json +0 -22
  143. package/dist/i18n/locales/en/ccjk.json +0 -276
  144. package/dist/i18n/locales/en/ccr.json +0 -65
  145. package/dist/i18n/locales/en/claude-md.json +0 -73
  146. package/dist/i18n/locales/en/cli.json +0 -152
  147. package/dist/i18n/locales/en/cloud-setup.json +0 -31
  148. package/dist/i18n/locales/en/cloud-sync.json +0 -147
  149. package/dist/i18n/locales/en/cloud.json +0 -40
  150. package/dist/i18n/locales/en/cloudPlugins.json +0 -118
  151. package/dist/i18n/locales/en/codex.json +0 -127
  152. package/dist/i18n/locales/en/cometix.json +0 -29
  153. package/dist/i18n/locales/en/common.json +0 -68
  154. package/dist/i18n/locales/en/config.json +0 -108
  155. package/dist/i18n/locales/en/configuration.json +0 -226
  156. package/dist/i18n/locales/en/context.json +0 -85
  157. package/dist/i18n/locales/en/dashboard.json +0 -78
  158. package/dist/i18n/locales/en/errors.json +0 -26
  159. package/dist/i18n/locales/en/evolution.json +0 -54
  160. package/dist/i18n/locales/en/hooks.json +0 -74
  161. package/dist/i18n/locales/en/hooksSync.json +0 -133
  162. package/dist/i18n/locales/en/installation.json +0 -83
  163. package/dist/i18n/locales/en/interview.json +0 -104
  164. package/dist/i18n/locales/en/language.json +0 -19
  165. package/dist/i18n/locales/en/lsp.json +0 -78
  166. package/dist/i18n/locales/en/marketplace.json +0 -116
  167. package/dist/i18n/locales/en/mcp.json +0 -178
  168. package/dist/i18n/locales/en/memory.json +0 -92
  169. package/dist/i18n/locales/en/menu.json +0 -143
  170. package/dist/i18n/locales/en/multi-config.json +0 -79
  171. package/dist/i18n/locales/en/notification.json +0 -307
  172. package/dist/i18n/locales/en/permissions.json +0 -95
  173. package/dist/i18n/locales/en/persistence.json +0 -127
  174. package/dist/i18n/locales/en/plugins.json +0 -146
  175. package/dist/i18n/locales/en/quick-actions.json +0 -78
  176. package/dist/i18n/locales/en/registry.json +0 -54
  177. package/dist/i18n/locales/en/remote.json +0 -93
  178. package/dist/i18n/locales/en/sandbox.json +0 -44
  179. package/dist/i18n/locales/en/setup.json +0 -44
  180. package/dist/i18n/locales/en/shencha.json +0 -14
  181. package/dist/i18n/locales/en/skills.json +0 -100
  182. package/dist/i18n/locales/en/skillsSync.json +0 -74
  183. package/dist/i18n/locales/en/smartGuide.json +0 -49
  184. package/dist/i18n/locales/en/stats.json +0 -20
  185. package/dist/i18n/locales/en/subagent.json +0 -69
  186. package/dist/i18n/locales/en/superpowers.json +0 -117
  187. package/dist/i18n/locales/en/team.json +0 -7
  188. package/dist/i18n/locales/en/thinking.json +0 -65
  189. package/dist/i18n/locales/en/tools.json +0 -42
  190. package/dist/i18n/locales/en/uninstall.json +0 -56
  191. package/dist/i18n/locales/en/updater.json +0 -29
  192. package/dist/i18n/locales/en/vim.json +0 -169
  193. package/dist/i18n/locales/en/workflow.json +0 -55
  194. package/dist/i18n/locales/en/workspace.json +0 -108
  195. package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
  196. package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -79
  197. package/dist/i18n/locales/zh-CN/agents.json +0 -135
  198. package/dist/i18n/locales/zh-CN/api.json +0 -63
  199. package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
  200. package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
  201. package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
  202. package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
  203. package/dist/i18n/locales/zh-CN/ccr.json +0 -65
  204. package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
  205. package/dist/i18n/locales/zh-CN/cli.json +0 -152
  206. package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
  207. package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
  208. package/dist/i18n/locales/zh-CN/cloud.json +0 -40
  209. package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
  210. package/dist/i18n/locales/zh-CN/codex.json +0 -127
  211. package/dist/i18n/locales/zh-CN/cometix.json +0 -29
  212. package/dist/i18n/locales/zh-CN/common.json +0 -68
  213. package/dist/i18n/locales/zh-CN/config.json +0 -108
  214. package/dist/i18n/locales/zh-CN/configuration.json +0 -224
  215. package/dist/i18n/locales/zh-CN/context.json +0 -85
  216. package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
  217. package/dist/i18n/locales/zh-CN/errors.json +0 -26
  218. package/dist/i18n/locales/zh-CN/evolution.json +0 -54
  219. package/dist/i18n/locales/zh-CN/hooks.json +0 -74
  220. package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
  221. package/dist/i18n/locales/zh-CN/installation.json +0 -83
  222. package/dist/i18n/locales/zh-CN/interview.json +0 -104
  223. package/dist/i18n/locales/zh-CN/language.json +0 -19
  224. package/dist/i18n/locales/zh-CN/lsp.json +0 -78
  225. package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
  226. package/dist/i18n/locales/zh-CN/mcp.json +0 -178
  227. package/dist/i18n/locales/zh-CN/memory.json +0 -92
  228. package/dist/i18n/locales/zh-CN/menu.json +0 -143
  229. package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
  230. package/dist/i18n/locales/zh-CN/notification.json +0 -307
  231. package/dist/i18n/locales/zh-CN/permissions.json +0 -95
  232. package/dist/i18n/locales/zh-CN/persistence.json +0 -127
  233. package/dist/i18n/locales/zh-CN/plugins.json +0 -146
  234. package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
  235. package/dist/i18n/locales/zh-CN/registry.json +0 -54
  236. package/dist/i18n/locales/zh-CN/remote.json +0 -93
  237. package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
  238. package/dist/i18n/locales/zh-CN/setup.json +0 -44
  239. package/dist/i18n/locales/zh-CN/shencha.json +0 -14
  240. package/dist/i18n/locales/zh-CN/skills.json +0 -100
  241. package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
  242. package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
  243. package/dist/i18n/locales/zh-CN/stats.json +0 -20
  244. package/dist/i18n/locales/zh-CN/subagent.json +0 -69
  245. package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
  246. package/dist/i18n/locales/zh-CN/team.json +0 -7
  247. package/dist/i18n/locales/zh-CN/thinking.json +0 -65
  248. package/dist/i18n/locales/zh-CN/tools.json +0 -42
  249. package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
  250. package/dist/i18n/locales/zh-CN/updater.json +0 -29
  251. package/dist/i18n/locales/zh-CN/vim.json +0 -169
  252. package/dist/i18n/locales/zh-CN/workflow.json +0 -55
  253. package/dist/i18n/locales/zh-CN/workspace.json +0 -108
  254. package/dist/index.d.mts +0 -5295
  255. package/dist/index.d.ts +0 -5295
  256. package/dist/index.mjs +0 -4941
  257. package/dist/shared/ccjk.B364Fu0N.mjs +0 -1819
  258. package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
  259. package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
  260. package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
  261. package/dist/shared/ccjk.BFxsJM0k.mjs +0 -599
  262. package/dist/shared/ccjk.BIxuVL3_.mjs +0 -25
  263. package/dist/shared/ccjk.BRZ9ww8S.mjs +0 -142
  264. package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
  265. package/dist/shared/ccjk.BrPUmTqm.mjs +0 -266
  266. package/dist/shared/ccjk.BtB1e5jm.mjs +0 -171
  267. package/dist/shared/ccjk.BwfbSKN2.mjs +0 -1051
  268. package/dist/shared/ccjk.BxSmJ8B7.mjs +0 -243
  269. package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
  270. package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
  271. package/dist/shared/ccjk.CL4Yat0G.mjs +0 -303
  272. package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
  273. package/dist/shared/ccjk.CePkJq2S.mjs +0 -223
  274. package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
  275. package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
  276. package/dist/shared/ccjk.Cjj8SVrn.mjs +0 -54
  277. package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
  278. package/dist/shared/ccjk.D5MFQT7w.mjs +0 -400
  279. package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
  280. package/dist/shared/ccjk.D8ZLYSZZ.mjs +0 -299
  281. package/dist/shared/ccjk.DG_o24cZ.mjs +0 -88
  282. package/dist/shared/ccjk.DLLw-h4Y.mjs +0 -460
  283. package/dist/shared/ccjk.DOwtZMk8.mjs +0 -4019
  284. package/dist/shared/ccjk.DS7UESmF.mjs +0 -2451
  285. package/dist/shared/ccjk.DTdjs-qK.mjs +0 -1447
  286. package/dist/shared/ccjk.DXRAZcix.mjs +0 -66
  287. package/dist/shared/ccjk.DsYaCCx4.mjs +0 -317
  288. package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
  289. package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
  290. package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
  291. package/dist/shared/ccjk.SPoXMvZD.mjs +0 -1242
  292. package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
  293. package/dist/shared/ccjk.UIvifqNE.mjs +0 -1486
  294. package/dist/shared/ccjk._dESH4Rk.mjs +0 -111
  295. package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
  296. package/dist/shared/ccjk.c-ETfBZ_.mjs +0 -617
  297. package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
  298. package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
  299. package/dist/shared/ccjk.waa2ikKJ.mjs +0 -351
@@ -1,849 +0,0 @@
1
- import a from './index2.mjs';
2
- import { i as inquirer } from './index3.mjs';
3
- import { ZCF_CONFIG_FILE, DEFAULT_CODE_TOOL_TYPE, isCodeToolType } from './constants.mjs';
4
- import { i18n, ensureI18nInitialized } from './index5.mjs';
5
- import { readZcfConfig } from './ccjk-config.mjs';
6
- import { r as resolveCodeType } from '../shared/ccjk.Cjj8SVrn.mjs';
7
- import { h as handleExitPromptError, a as handleGeneralError } from '../shared/ccjk.BIxuVL3_.mjs';
8
- import { a as addNumbersToChoices } from '../shared/ccjk.BFQ7yr5S.mjs';
9
- import { p as promptBoolean } from '../shared/ccjk.DOwtZMk8.mjs';
10
- import { promises } from 'node:fs';
11
- import { homedir } from 'node:os';
12
- import { exec as q } from './main.mjs';
13
- import { readJsonConfig, writeJsonConfig } from './json-config.mjs';
14
- import { m as moveToTrash } from '../shared/ccjk.BRZ9ww8S.mjs';
15
- import { j as join } from '../shared/ccjk.bQ7Dh1g4.mjs';
16
- import '../shared/ccjk.BAGoDD49.mjs';
17
- import 'node:readline';
18
- import 'stream';
19
- import 'node:tty';
20
- import 'node:process';
21
- import 'node:async_hooks';
22
- import '../shared/ccjk.Cjgrln_h.mjs';
23
- import 'node:util';
24
- import 'tty';
25
- import 'fs';
26
- import 'child_process';
27
- import 'node:path';
28
- import 'node:crypto';
29
- import 'buffer';
30
- import 'string_decoder';
31
- import 'node:url';
32
- import '../shared/ccjk.BBtCGd_g.mjs';
33
- import './index6.mjs';
34
- import './fs-operations.mjs';
35
- import 'node:fs/promises';
36
- import '../shared/ccjk.RyizuzOI.mjs';
37
- import './smart-defaults.mjs';
38
- import 'node:child_process';
39
- import './platform.mjs';
40
- import '../shared/ccjk.BrPUmTqm.mjs';
41
- import 'module';
42
- import 'node:stream';
43
- import 'globby';
44
-
45
- async function pathExists(p) {
46
- try {
47
- await promises.access(p);
48
- return true;
49
- } catch {
50
- return false;
51
- }
52
- }
53
- class ZcfUninstaller {
54
- _lang;
55
- // Reserved for future i18n support
56
- conflictResolution = /* @__PURE__ */ new Map();
57
- constructor(lang = "en") {
58
- this._lang = lang;
59
- this.conflictResolution.set("claude-code", ["mcps"]);
60
- void this._lang;
61
- }
62
- /**
63
- * 1. Remove outputStyle field from settings.json and output-styles directory
64
- */
65
- async removeOutputStyles() {
66
- const result = {
67
- success: false,
68
- removed: [],
69
- removedConfigs: [],
70
- errors: [],
71
- warnings: []
72
- };
73
- try {
74
- const settingsPath = join(homedir(), ".claude", "settings.json");
75
- const outputStylesPath = join(homedir(), ".claude", "output-styles");
76
- if (await pathExists(settingsPath)) {
77
- const settings = readJsonConfig(settingsPath) || {};
78
- if (settings.outputStyle) {
79
- delete settings.outputStyle;
80
- writeJsonConfig(settingsPath, settings);
81
- result.removedConfigs.push("outputStyle field from settings.json");
82
- }
83
- } else {
84
- result.warnings.push(i18n.t("uninstall:settingsJsonNotFound"));
85
- }
86
- if (await pathExists(outputStylesPath)) {
87
- const trashResult = await moveToTrash(outputStylesPath);
88
- if (!trashResult[0]?.success) {
89
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
90
- }
91
- result.removed.push("~/.claude/output-styles/");
92
- } else {
93
- result.warnings.push(i18n.t("uninstall:outputStylesDirectoryNotFound"));
94
- }
95
- result.success = true;
96
- } catch (error) {
97
- result.errors.push(`Failed to remove output styles: ${error.message}`);
98
- }
99
- return result;
100
- }
101
- /**
102
- * 2. Remove custom commands directory (commands/ccjk/)
103
- */
104
- async removeCustomCommands() {
105
- const result = {
106
- success: false,
107
- removed: [],
108
- removedConfigs: [],
109
- errors: [],
110
- warnings: []
111
- };
112
- try {
113
- const commandsPath = join(homedir(), ".claude", "commands", "ccjk");
114
- if (await pathExists(commandsPath)) {
115
- const trashResult = await moveToTrash(commandsPath);
116
- if (!trashResult[0]?.success) {
117
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
118
- }
119
- result.removed.push("commands/ccjk/");
120
- result.success = true;
121
- } else {
122
- result.warnings.push(i18n.t("uninstall:commandsNotFound"));
123
- result.success = true;
124
- }
125
- } catch (error) {
126
- result.errors.push(`Failed to remove custom commands: ${error.message}`);
127
- }
128
- return result;
129
- }
130
- /**
131
- * 3. Remove custom agents directory (agents/ccjk/)
132
- */
133
- async removeCustomAgents() {
134
- const result = {
135
- success: false,
136
- removed: [],
137
- removedConfigs: [],
138
- errors: [],
139
- warnings: []
140
- };
141
- try {
142
- const agentsPath = join(homedir(), ".claude", "agents", "ccjk");
143
- if (await pathExists(agentsPath)) {
144
- const trashResult = await moveToTrash(agentsPath);
145
- if (!trashResult[0]?.success) {
146
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
147
- }
148
- result.removed.push("agents/ccjk/");
149
- result.success = true;
150
- } else {
151
- result.warnings.push(i18n.t("uninstall:agentsNotFound"));
152
- result.success = true;
153
- }
154
- } catch (error) {
155
- result.errors.push(`Failed to remove custom agents: ${error.message}`);
156
- }
157
- return result;
158
- }
159
- /**
160
- * 4. Remove global memory file (CLAUDE.md)
161
- */
162
- async removeClaudeMd() {
163
- const result = {
164
- success: false,
165
- removed: [],
166
- removedConfigs: [],
167
- errors: [],
168
- warnings: []
169
- };
170
- try {
171
- const claudeMdPath = join(homedir(), ".claude", "CLAUDE.md");
172
- if (await pathExists(claudeMdPath)) {
173
- const trashResult = await moveToTrash(claudeMdPath);
174
- if (!trashResult[0]?.success) {
175
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
176
- }
177
- result.removed.push("CLAUDE.md");
178
- result.success = true;
179
- } else {
180
- result.warnings.push(i18n.t("uninstall:claudeMdNotFound"));
181
- result.success = true;
182
- }
183
- } catch (error) {
184
- result.errors.push(`Failed to remove CLAUDE.md: ${error.message}`);
185
- }
186
- return result;
187
- }
188
- /**
189
- * 5. Remove permissions and environment variables
190
- */
191
- async removePermissionsAndEnvs() {
192
- const result = {
193
- success: false,
194
- removed: [],
195
- removedConfigs: [],
196
- errors: [],
197
- warnings: []
198
- };
199
- try {
200
- const settingsPath = join(homedir(), ".claude", "settings.json");
201
- if (await pathExists(settingsPath)) {
202
- const settings = readJsonConfig(settingsPath) || {};
203
- let modified = false;
204
- if (settings.permissions) {
205
- delete settings.permissions;
206
- result.removedConfigs.push("permissions configuration");
207
- modified = true;
208
- }
209
- if (settings.env) {
210
- delete settings.env;
211
- result.removedConfigs.push("environment variables");
212
- modified = true;
213
- }
214
- if (modified) {
215
- writeJsonConfig(settingsPath, settings);
216
- }
217
- result.success = true;
218
- } else {
219
- result.warnings.push(i18n.t("uninstall:settingsJsonNotFound"));
220
- result.success = true;
221
- }
222
- } catch (error) {
223
- result.errors.push(`Failed to remove permissions and envs: ${error.message}`);
224
- }
225
- return result;
226
- }
227
- /**
228
- * 6. Remove MCP servers from .claude.json (mcpServers field only)
229
- */
230
- async removeMcps() {
231
- const result = {
232
- success: false,
233
- removed: [],
234
- removedConfigs: [],
235
- errors: [],
236
- warnings: []
237
- };
238
- try {
239
- const claudeJsonPath = join(homedir(), ".claude.json");
240
- if (await pathExists(claudeJsonPath)) {
241
- const config = readJsonConfig(claudeJsonPath) || {};
242
- if (config.mcpServers) {
243
- delete config.mcpServers;
244
- writeJsonConfig(claudeJsonPath, config);
245
- result.removedConfigs.push("mcpServers from .claude.json");
246
- }
247
- result.success = true;
248
- } else {
249
- result.warnings.push(i18n.t("uninstall:claudeJsonNotFound"));
250
- result.success = true;
251
- }
252
- } catch (error) {
253
- result.errors.push(`Failed to remove MCP servers: ${error.message}`);
254
- }
255
- return result;
256
- }
257
- /**
258
- * 7. Uninstall Claude Code Router and remove configuration
259
- */
260
- async uninstallCcr() {
261
- const result = {
262
- success: false,
263
- removed: [],
264
- removedConfigs: [],
265
- errors: [],
266
- warnings: []
267
- };
268
- try {
269
- const ccrPath = join(homedir(), ".claude-code-router");
270
- if (await pathExists(ccrPath)) {
271
- const trashResult = await moveToTrash(ccrPath);
272
- if (!trashResult[0]?.success) {
273
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
274
- }
275
- result.removed.push(".claude-code-router/");
276
- }
277
- try {
278
- await q("npm", ["uninstall", "-g", "@musistudio/claude-code-router"]);
279
- result.removed.push("@musistudio/claude-code-router package");
280
- result.success = true;
281
- } catch (npmError) {
282
- if (npmError.message.includes("not found") || npmError.message.includes("not installed")) {
283
- result.warnings.push(i18n.t("uninstall:ccrPackageNotFound"));
284
- result.success = true;
285
- } else {
286
- result.errors.push(`Failed to uninstall CCR package: ${npmError.message}`);
287
- }
288
- }
289
- } catch (error) {
290
- result.errors.push(`Failed to uninstall CCR: ${error.message}`);
291
- }
292
- return result;
293
- }
294
- /**
295
- * 8. Uninstall CCometixLine
296
- */
297
- async uninstallCcline() {
298
- const result = {
299
- success: false,
300
- removed: [],
301
- removedConfigs: [],
302
- errors: [],
303
- warnings: []
304
- };
305
- try {
306
- await q("npm", ["uninstall", "-g", "@cometix/ccline"]);
307
- result.removed.push("@cometix/ccline package");
308
- result.success = true;
309
- } catch (error) {
310
- if (error.message.includes("not found") || error.message.includes("not installed")) {
311
- result.warnings.push(i18n.t("uninstall:cclinePackageNotFound"));
312
- result.success = true;
313
- } else {
314
- result.errors.push(`Failed to uninstall CCometixLine: ${error.message}`);
315
- }
316
- }
317
- return result;
318
- }
319
- /**
320
- * 9. Uninstall Claude Code and remove entire .claude.json
321
- */
322
- async uninstallClaudeCode() {
323
- const result = {
324
- success: false,
325
- removed: [],
326
- removedConfigs: [],
327
- errors: [],
328
- warnings: []
329
- };
330
- try {
331
- const claudeJsonPath = join(homedir(), ".claude.json");
332
- if (await pathExists(claudeJsonPath)) {
333
- const trashResult = await moveToTrash(claudeJsonPath);
334
- if (!trashResult[0]?.success) {
335
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
336
- }
337
- result.removed.push(".claude.json (includes MCP configuration)");
338
- }
339
- try {
340
- const { uninstallCodeTool } = await import('./installer.mjs');
341
- const success = await uninstallCodeTool("claude-code");
342
- if (success) {
343
- result.removed.push("@anthropic-ai/claude-code");
344
- result.success = true;
345
- } else {
346
- result.errors.push(i18n.t("uninstall:uninstallFailed", { codeType: i18n.t("common:claudeCode"), message: "" }));
347
- }
348
- } catch (npmError) {
349
- if (npmError.message.includes("not found") || npmError.message.includes("not installed")) {
350
- result.warnings.push(i18n.t("uninstall:claudeCodePackageNotFound"));
351
- result.success = true;
352
- } else {
353
- result.errors.push(i18n.t("uninstall:uninstallFailed", { codeType: i18n.t("common:claudeCode"), message: `: ${npmError.message}` }));
354
- }
355
- }
356
- } catch (error) {
357
- result.errors.push(i18n.t("uninstall:uninstallFailed", { codeType: i18n.t("common:claudeCode"), message: `: ${error.message}` }));
358
- }
359
- return result;
360
- }
361
- /**
362
- * 10. Remove backup files
363
- */
364
- async removeBackups() {
365
- const result = {
366
- success: false,
367
- removed: [],
368
- removedConfigs: [],
369
- errors: [],
370
- warnings: []
371
- };
372
- try {
373
- const backupPath = join(homedir(), ".claude", "backup");
374
- if (await pathExists(backupPath)) {
375
- const trashResult = await moveToTrash(backupPath);
376
- if (!trashResult[0]?.success) {
377
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
378
- }
379
- result.removed.push("backup/");
380
- result.success = true;
381
- } else {
382
- result.warnings.push(i18n.t("uninstall:backupsNotFound"));
383
- result.success = true;
384
- }
385
- } catch (error) {
386
- result.errors.push(`Failed to remove backups: ${error.message}`);
387
- }
388
- return result;
389
- }
390
- /**
391
- * 11. Remove CCJK preference configuration
392
- */
393
- async removeZcfConfig() {
394
- const result = {
395
- success: false,
396
- removed: [],
397
- removedConfigs: [],
398
- errors: [],
399
- warnings: []
400
- };
401
- try {
402
- const zcfConfigPath = ZCF_CONFIG_FILE;
403
- const relativeName = zcfConfigPath.replace(homedir(), "~");
404
- if (await pathExists(zcfConfigPath)) {
405
- const trashResult = await moveToTrash(zcfConfigPath);
406
- if (!trashResult[0]?.success) {
407
- result.warnings.push(trashResult[0]?.error || "Failed to move to trash");
408
- }
409
- result.removed.push(relativeName);
410
- result.success = true;
411
- } else {
412
- result.warnings.push(i18n.t("uninstall:ccjkConfigNotFound"));
413
- result.success = true;
414
- }
415
- } catch (error) {
416
- result.errors.push(`Failed to remove CCJK config: ${error.message}`);
417
- }
418
- return result;
419
- }
420
- /**
421
- * Complete uninstall - remove all directories and packages
422
- */
423
- async completeUninstall() {
424
- const result = {
425
- success: true,
426
- removed: [],
427
- removedConfigs: [],
428
- errors: [],
429
- warnings: []
430
- };
431
- try {
432
- const backupPath = await this.createBackupBeforeUninstall();
433
- if (backupPath) {
434
- console.log(a.green(`
435
- \u2714 ${i18n.t("uninstall:backupCreated", { path: backupPath })}`));
436
- console.log(a.cyan(` ${i18n.t("uninstall:backupLocation")}: ${backupPath}`));
437
- console.log(a.gray(` ${i18n.t("uninstall:backupRestoreHint")}`));
438
- console.log();
439
- }
440
- const directoriesToRemove = [
441
- { path: join(homedir(), ".claude"), name: "~/.claude/" },
442
- { path: join(homedir(), ".claude.json"), name: "~/.claude.json" },
443
- { path: join(homedir(), ".claude-code-router"), name: "~/.claude-code-router/" }
444
- ];
445
- for (const dir of directoriesToRemove) {
446
- try {
447
- if (await pathExists(dir.path)) {
448
- const trashResult = await moveToTrash(dir.path);
449
- if (!trashResult[0]?.success) {
450
- result.warnings.push(`Failed to move ${dir.name} to trash: ${trashResult[0]?.error || "Unknown error"}`);
451
- }
452
- result.removed.push(dir.name);
453
- }
454
- } catch (error) {
455
- result.warnings.push(`Failed to remove ${dir.name}: ${error.message}`);
456
- }
457
- }
458
- const packagesToUninstall = [
459
- "@musistudio/claude-code-router",
460
- "@cometix/ccline",
461
- "@anthropic-ai/claude-code"
462
- ];
463
- for (const pkg of packagesToUninstall) {
464
- try {
465
- await q("npm", ["uninstall", "-g", pkg]);
466
- result.removed.push(`${pkg} package`);
467
- } catch (error) {
468
- if (error.message.includes("not found") || error.message.includes("not installed")) {
469
- if (pkg.includes("claude-code-router")) {
470
- result.warnings.push(i18n.t("uninstall:ccrPackageNotFound"));
471
- } else if (pkg.includes("ccline")) {
472
- result.warnings.push(i18n.t("uninstall:cclinePackageNotFound"));
473
- } else {
474
- result.warnings.push(i18n.t("uninstall:claudeCodePackageNotFound"));
475
- }
476
- } else {
477
- result.warnings.push(`Failed to uninstall ${pkg}: ${error.message}`);
478
- }
479
- }
480
- }
481
- } catch (error) {
482
- result.errors.push(`Complete uninstall failed: ${error.message}`);
483
- result.success = false;
484
- }
485
- return result;
486
- }
487
- /**
488
- * Custom uninstall with conflict resolution
489
- */
490
- async customUninstall(selectedItems) {
491
- const resolvedItems = this.resolveConflicts(selectedItems);
492
- const results = [];
493
- for (const item of resolvedItems) {
494
- try {
495
- const result = await this.executeUninstallItem(item);
496
- results.push(result);
497
- } catch (error) {
498
- results.push({
499
- success: false,
500
- removed: [],
501
- removedConfigs: [],
502
- errors: [`Failed to execute ${item}: ${error.message}`],
503
- warnings: []
504
- });
505
- }
506
- }
507
- return results;
508
- }
509
- /**
510
- * Resolve conflicts between uninstall items
511
- */
512
- resolveConflicts(items) {
513
- const resolved = [...items];
514
- for (const [primary, conflicts] of this.conflictResolution) {
515
- if (resolved.includes(primary)) {
516
- conflicts.forEach((conflict) => {
517
- const index = resolved.indexOf(conflict);
518
- if (index > -1) {
519
- resolved.splice(index, 1);
520
- }
521
- });
522
- }
523
- }
524
- return resolved;
525
- }
526
- /**
527
- * Execute uninstall for a specific item
528
- */
529
- async executeUninstallItem(item) {
530
- switch (item) {
531
- case "output-styles":
532
- return await this.removeOutputStyles();
533
- case "commands":
534
- return await this.removeCustomCommands();
535
- case "agents":
536
- return await this.removeCustomAgents();
537
- case "claude-md":
538
- return await this.removeClaudeMd();
539
- case "permissions-envs":
540
- return await this.removePermissionsAndEnvs();
541
- case "mcps":
542
- return await this.removeMcps();
543
- case "ccr":
544
- return await this.uninstallCcr();
545
- case "ccline":
546
- return await this.uninstallCcline();
547
- case "claude-code":
548
- return await this.uninstallClaudeCode();
549
- case "backups":
550
- return await this.removeBackups();
551
- case "ccjk-config":
552
- return await this.removeZcfConfig();
553
- default:
554
- return {
555
- success: false,
556
- removed: [],
557
- removedConfigs: [],
558
- errors: [`Unknown uninstall item: ${item}`],
559
- warnings: []
560
- };
561
- }
562
- }
563
- /**
564
- * Create backup before complete uninstall
565
- * Saves important files to ~/.ccjk/uninstall_backups/ to prevent loss
566
- */
567
- async createBackupBeforeUninstall() {
568
- try {
569
- const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -5);
570
- const backupDir = join(homedir(), ".ccjk", "uninstall_backups", `backup_${timestamp}`);
571
- await promises.mkdir(backupDir, { recursive: true });
572
- const filesToBackup = [
573
- { src: join(homedir(), ".claude", "settings.json"), name: "settings.json" },
574
- { src: join(homedir(), ".claude", "claude.json"), name: "claude.json" },
575
- { src: join(homedir(), ".claude", "CLAUDE.md"), name: "CLAUDE.md" },
576
- { src: join(homedir(), ".claude", "keybindings.json"), name: "keybindings.json" }
577
- ];
578
- let backedUpCount = 0;
579
- for (const file of filesToBackup) {
580
- if (await pathExists(file.src)) {
581
- try {
582
- await promises.copyFile(file.src, join(backupDir, file.name));
583
- backedUpCount++;
584
- } catch (error) {
585
- console.warn(`Failed to backup ${file.name}: ${error.message}`);
586
- }
587
- }
588
- }
589
- return backedUpCount > 0 ? backupDir : null;
590
- } catch (error) {
591
- console.error(`Failed to create backup: ${error.message}`);
592
- return null;
593
- }
594
- }
595
- }
596
-
597
- async function uninstall(options = {}) {
598
- try {
599
- ensureI18nInitialized();
600
- let codeType;
601
- if (options.codeType) {
602
- try {
603
- codeType = await resolveCodeType(options.codeType);
604
- } catch (error) {
605
- const errorMessage = error instanceof Error ? error.message : String(error);
606
- console.error(a.red(`${i18n.t("errors:generalError")} ${errorMessage}`));
607
- const config = readZcfConfig();
608
- codeType = config?.codeToolType && isCodeToolType(config.codeToolType) ? config.codeToolType : DEFAULT_CODE_TOOL_TYPE;
609
- }
610
- } else {
611
- const config = readZcfConfig();
612
- codeType = config?.codeToolType && isCodeToolType(config.codeToolType) ? config.codeToolType : DEFAULT_CODE_TOOL_TYPE;
613
- }
614
- const uninstaller = new ZcfUninstaller(options.lang || "en");
615
- if (codeType === "codex") {
616
- const { runCodexUninstall } = await import('./codex.mjs').then(function (n) { return n.n; });
617
- await runCodexUninstall();
618
- return;
619
- }
620
- if (options.mode && options.mode !== "interactive") {
621
- if (options.mode === "complete") {
622
- await executeCompleteUninstall(uninstaller);
623
- return;
624
- } else if (options.mode === "custom" && options.items) {
625
- let items;
626
- if (typeof options.items === "string") {
627
- items = options.items.split(",").map((item) => item.trim());
628
- } else {
629
- items = options.items;
630
- }
631
- await executeCustomUninstall(uninstaller, items);
632
- return;
633
- }
634
- }
635
- await showInteractiveUninstall(uninstaller);
636
- } catch (error) {
637
- if (!handleExitPromptError(error)) {
638
- handleGeneralError(error);
639
- }
640
- }
641
- }
642
- async function showInteractiveUninstall(uninstaller) {
643
- console.log(a.green.bold(i18n.t("uninstall:title")));
644
- console.log("");
645
- const { mainChoice } = await inquirer.prompt({
646
- type: "list",
647
- name: "mainChoice",
648
- message: i18n.t("uninstall:selectMainOption"),
649
- choices: addNumbersToChoices([
650
- {
651
- name: `${i18n.t("uninstall:completeUninstall")} - ${a.gray(i18n.t("uninstall:completeUninstallDesc"))}`,
652
- value: "complete",
653
- short: i18n.t("uninstall:completeUninstall")
654
- },
655
- {
656
- name: `${i18n.t("uninstall:customUninstall")} - ${a.gray(i18n.t("uninstall:customUninstallDesc"))}`,
657
- value: "custom",
658
- short: i18n.t("uninstall:customUninstall")
659
- }
660
- ])
661
- });
662
- if (!mainChoice) {
663
- console.log(a.yellow(i18n.t("common:cancelled")));
664
- return;
665
- }
666
- if (mainChoice === "complete") {
667
- await executeCompleteUninstall(uninstaller);
668
- } else {
669
- await showCustomUninstallMenu(uninstaller);
670
- }
671
- }
672
- async function showCustomUninstallMenu(uninstaller) {
673
- console.log("");
674
- console.log(a.green(i18n.t("uninstall:selectCustomItems")));
675
- const { customItems } = await inquirer.prompt({
676
- type: "checkbox",
677
- name: "customItems",
678
- message: `${i18n.t("uninstall:selectItemsToRemove")} ${i18n.t("common:multiSelectHint")}`,
679
- choices: [
680
- {
681
- name: i18n.t("uninstall:outputStyles"),
682
- value: "output-styles"
683
- },
684
- {
685
- name: i18n.t("uninstall:commands"),
686
- value: "commands"
687
- },
688
- {
689
- name: i18n.t("uninstall:agents"),
690
- value: "agents"
691
- },
692
- {
693
- name: i18n.t("uninstall:claudeMd"),
694
- value: "claude-md"
695
- },
696
- {
697
- name: i18n.t("uninstall:permissionsEnvs"),
698
- value: "permissions-envs"
699
- },
700
- {
701
- name: i18n.t("uninstall:mcps"),
702
- value: "mcps"
703
- },
704
- {
705
- name: i18n.t("uninstall:ccr"),
706
- value: "ccr"
707
- },
708
- {
709
- name: i18n.t("uninstall:ccline"),
710
- value: "ccline"
711
- },
712
- {
713
- name: i18n.t("uninstall:claudeCode"),
714
- value: "claude-code"
715
- },
716
- {
717
- name: i18n.t("uninstall:backups"),
718
- value: "backups"
719
- },
720
- {
721
- name: i18n.t("uninstall:ccjkConfig"),
722
- value: "ccjk-config"
723
- }
724
- ],
725
- validate: (answers) => {
726
- if (answers.length === 0) {
727
- return i18n.t("uninstall:selectAtLeastOne");
728
- }
729
- return true;
730
- }
731
- });
732
- if (!customItems || customItems.length === 0) {
733
- console.log(a.yellow(i18n.t("common:cancelled")));
734
- return;
735
- }
736
- await executeCustomUninstall(uninstaller, customItems);
737
- }
738
- async function executeCompleteUninstall(uninstaller) {
739
- console.log("");
740
- console.log(a.red.bold(i18n.t("uninstall:executingComplete")));
741
- console.log(a.yellow(i18n.t("uninstall:completeWarning")));
742
- const confirm = await promptBoolean({
743
- message: i18n.t("uninstall:confirmComplete"),
744
- defaultValue: false
745
- });
746
- if (!confirm) {
747
- console.log(a.yellow(i18n.t("common:cancelled")));
748
- return;
749
- }
750
- console.log("");
751
- console.log(a.green(i18n.t("uninstall:processingComplete")));
752
- const result = await uninstaller.completeUninstall();
753
- displayUninstallResult("complete", [result]);
754
- }
755
- async function executeCustomUninstall(uninstaller, items) {
756
- console.log("");
757
- console.log(a.green(i18n.t("uninstall:executingCustom")));
758
- console.log(a.gray(i18n.t("uninstall:selectedItems")));
759
- items.forEach((item) => {
760
- console.log(` \u2022 ${i18n.t(`uninstall:${item}`)}`);
761
- });
762
- const confirm = await promptBoolean({
763
- message: i18n.t("uninstall:confirmCustom"),
764
- defaultValue: false
765
- });
766
- if (!confirm) {
767
- console.log(a.yellow(i18n.t("common:cancelled")));
768
- return;
769
- }
770
- console.log("");
771
- console.log(a.green(i18n.t("uninstall:processingCustom")));
772
- const results = await uninstaller.customUninstall(items);
773
- displayUninstallResult("custom", results);
774
- }
775
- function displayUninstallResult(mode, results) {
776
- console.log("");
777
- console.log(a.green("\u2500".repeat(50)));
778
- let totalSuccess = 0;
779
- let totalErrors = 0;
780
- let totalWarnings = 0;
781
- results.forEach((result) => {
782
- if (result.success) {
783
- totalSuccess++;
784
- }
785
- if (result.removed && result.removed.length > 0) {
786
- console.log(a.green(`\u{1F5D1}\uFE0F ${i18n.t("uninstall:movedToTrash")}:`));
787
- result.removed.forEach((item) => {
788
- console.log(a.gray(` \u2022 ${item}`));
789
- });
790
- }
791
- if (result.removedConfigs && result.removedConfigs.length > 0) {
792
- console.log(a.green(`\u2714 ${i18n.t("uninstall:removedConfigs")}:`));
793
- result.removedConfigs.forEach((item) => {
794
- console.log(a.gray(` \u2022 ${item}`));
795
- });
796
- }
797
- if (result.errors && result.errors.length > 0) {
798
- totalErrors += result.errors.length;
799
- console.log(a.red(`\u2716 ${i18n.t("uninstall:errors")}:`));
800
- result.errors.forEach((error) => {
801
- console.log(a.red(` \u2022 ${error}`));
802
- });
803
- }
804
- if (result.warnings && result.warnings.length > 0) {
805
- totalWarnings += result.warnings.length;
806
- console.log(a.yellow(`\u26A0 ${i18n.t("uninstall:warnings")}:`));
807
- result.warnings.forEach((warning) => {
808
- console.log(a.yellow(` \u2022 ${warning}`));
809
- });
810
- }
811
- });
812
- const totalRemovedFiles = results.reduce((count, result) => count + (result.removed?.length || 0), 0);
813
- const totalRemovedConfigs = results.reduce((count, result) => count + (result.removedConfigs?.length || 0), 0);
814
- console.log("");
815
- console.log(a.green("\u2500".repeat(50)));
816
- if (mode === "complete") {
817
- if (totalErrors === 0) {
818
- console.log(a.green.bold(`\u2714 ${i18n.t("uninstall:completeSuccess")}`));
819
- } else {
820
- console.log(a.yellow.bold(`\u26A0 ${i18n.t("uninstall:completePartialSuccess")}`));
821
- }
822
- } else {
823
- if (totalRemovedFiles > 0 && totalRemovedConfigs > 0) {
824
- console.log(a.green.bold(`\u2714 ${i18n.t("uninstall:customSuccessBoth", {
825
- fileCount: totalRemovedFiles,
826
- configCount: totalRemovedConfigs
827
- })}`));
828
- } else if (totalRemovedFiles > 0) {
829
- console.log(a.green.bold(`\u2714 ${i18n.t("uninstall:customSuccessFiles", {
830
- count: totalRemovedFiles
831
- })}`));
832
- } else if (totalRemovedConfigs > 0) {
833
- console.log(a.green.bold(`\u2714 ${i18n.t("uninstall:customSuccessConfigs", {
834
- count: totalRemovedConfigs
835
- })}`));
836
- } else {
837
- console.log(a.green.bold(`\u2714 ${i18n.t("uninstall:customSuccess", { count: totalSuccess })}`));
838
- }
839
- if (totalErrors > 0) {
840
- console.log(a.red(`\u2716 ${i18n.t("uninstall:errorsCount", { count: totalErrors })}`));
841
- }
842
- if (totalWarnings > 0) {
843
- console.log(a.yellow(`\u26A0 ${i18n.t("uninstall:warningsCount", { count: totalWarnings })}`));
844
- }
845
- }
846
- console.log("");
847
- }
848
-
849
- export { uninstall };