ccsini 0.1.43 → 0.1.44

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 (2) hide show
  1. package/dist/index.js +26 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27930,6 +27930,7 @@ var init_constants = __esm(() => {
27930
27930
  "**/dist/**",
27931
27931
  "**/.git/**",
27932
27932
  "**/*.bak",
27933
+ "**/*.conflict",
27933
27934
  "settings.*.json",
27934
27935
  "history.jsonl"
27935
27936
  ];
@@ -28019,7 +28020,7 @@ var {
28019
28020
  } = import__.default;
28020
28021
 
28021
28022
  // src/version.ts
28022
- var VERSION = "0.1.43";
28023
+ var VERSION = "0.1.44";
28023
28024
 
28024
28025
  // src/commands/init.ts
28025
28026
  init_source();
@@ -29378,6 +29379,24 @@ async function pushSync(client, masterKey, deviceName, configDir, onProgress, se
29378
29379
  const diffs = diffManifests(localManifest, remoteManifest);
29379
29380
  const toPush = diffs.filter((d) => d.action === "push" || d.action === "merge");
29380
29381
  progress(`${toPush.length} files to push`);
29382
+ if (remoteManifest) {
29383
+ const merges = toPush.filter((d) => d.action === "merge" && d.remoteHash);
29384
+ for (const diff of merges) {
29385
+ try {
29386
+ let encrypted;
29387
+ try {
29388
+ encrypted = await client.downloadBlob(blobKey(diff.path, diff.remoteHash));
29389
+ } catch {
29390
+ encrypted = await client.downloadBlob(diff.remoteHash);
29391
+ }
29392
+ const decrypted = decryptFile(masterKey, diff.path, encrypted);
29393
+ const conflictPath = join6(claudeDir, `${diff.path}.conflict`);
29394
+ await mkdir2(dirname(conflictPath), { recursive: true });
29395
+ await writeFile5(conflictPath, decrypted);
29396
+ progress(`Saved conflict backup: ${diff.path}.conflict`);
29397
+ } catch {}
29398
+ }
29399
+ }
29381
29400
  let uploaded = 0;
29382
29401
  const failedPaths = new Set;
29383
29402
  const chunks = chunkArray(toPush, MAX_CONCURRENT_TRANSFERS);
@@ -29505,11 +29524,16 @@ async function pullSync(client, masterKey, deviceName, configDir, onProgress, se
29505
29524
  if (localEntry && entry) {
29506
29525
  const result = mergeLastWriteWins(localContent, remoteContent, localEntry.modified, entry.modified);
29507
29526
  await writeFile5(localPath2, result.content);
29508
- await writeFile5(`${localPath2}.bak`, result.backupContent);
29527
+ await writeFile5(`${localPath2}.conflict`, result.backupContent);
29509
29528
  downloaded++;
29510
29529
  progress(`Downloading ${downloaded}/${toPull.length}: ${diff.path}`);
29511
29530
  return;
29512
29531
  }
29532
+ await writeFile5(`${localPath2}.conflict`, localContent);
29533
+ await writeFile5(localPath2, remoteContent);
29534
+ downloaded++;
29535
+ progress(`Downloading ${downloaded}/${toPull.length}: ${diff.path} (conflict saved)`);
29536
+ return;
29513
29537
  }
29514
29538
  const localPath = join6(claudeDir, diff.path);
29515
29539
  await mkdir2(dirname(localPath), { recursive: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccsini",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "Claude Code seamless sync across devices",
5
5
  "type": "module",
6
6
  "bin": {