ccjk 9.10.1 → 9.10.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.
@@ -1,4 +1,4 @@
1
- const version = "9.10.1";
1
+ const version = "9.10.2";
2
2
  const homepage = "https://github.com/miounet11/ccjk";
3
3
 
4
4
  export { homepage, version };
@@ -416,6 +416,14 @@ class ZcfUninstaller {
416
416
  warnings: []
417
417
  };
418
418
  try {
419
+ const backupPath = await this.createBackupBeforeUninstall();
420
+ if (backupPath) {
421
+ console.log(ansis.green(`
422
+ \u2714 ${i18n.t("uninstall:backupCreated", { path: backupPath })}`));
423
+ console.log(ansis.cyan(` ${i18n.t("uninstall:backupLocation")}: ${backupPath}`));
424
+ console.log(ansis.gray(` ${i18n.t("uninstall:backupRestoreHint")}`));
425
+ console.log();
426
+ }
419
427
  const directoriesToRemove = [
420
428
  { path: join(homedir(), ".claude"), name: "~/.claude/" },
421
429
  { path: join(homedir(), ".claude.json"), name: "~/.claude.json" },
@@ -539,6 +547,38 @@ class ZcfUninstaller {
539
547
  };
540
548
  }
541
549
  }
550
+ /**
551
+ * Create backup before complete uninstall
552
+ * Saves important files to ~/.ccjk/uninstall_backups/ to prevent loss
553
+ */
554
+ async createBackupBeforeUninstall() {
555
+ try {
556
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-").slice(0, -5);
557
+ const backupDir = join(homedir(), ".ccjk", "uninstall_backups", `backup_${timestamp}`);
558
+ await promises.mkdir(backupDir, { recursive: true });
559
+ const filesToBackup = [
560
+ { src: join(homedir(), ".claude", "settings.json"), name: "settings.json" },
561
+ { src: join(homedir(), ".claude", "claude.json"), name: "claude.json" },
562
+ { src: join(homedir(), ".claude", "CLAUDE.md"), name: "CLAUDE.md" },
563
+ { src: join(homedir(), ".claude", "keybindings.json"), name: "keybindings.json" }
564
+ ];
565
+ let backedUpCount = 0;
566
+ for (const file of filesToBackup) {
567
+ if (await pathExists(file.src)) {
568
+ try {
569
+ await promises.copyFile(file.src, join(backupDir, file.name));
570
+ backedUpCount++;
571
+ } catch (error) {
572
+ console.warn(`Failed to backup ${file.name}: ${error.message}`);
573
+ }
574
+ }
575
+ }
576
+ return backedUpCount > 0 ? backupDir : null;
577
+ } catch (error) {
578
+ console.error(`Failed to create backup: ${error.message}`);
579
+ return null;
580
+ }
581
+ }
542
582
  }
543
583
 
544
584
  async function uninstall(options = {}) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ccjk",
3
3
  "type": "module",
4
- "version": "9.10.1",
4
+ "version": "9.10.2",
5
5
  "packageManager": "pnpm@10.17.1",
6
6
  "description": "CCJK v9.0.0 - Revolutionary AI Development Platform with Enterprise Security, Streaming Cloud Sync, CRDT Conflict Resolution, and Unified V3 Architecture",
7
7
  "author": {