ccsini 0.1.31 → 0.1.32

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 +31 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -27913,7 +27913,11 @@ var init_constants = __esm(() => {
27913
27913
  "projects/**/*.jsonl",
27914
27914
  "plugins/**",
27915
27915
  "plans/**",
27916
- "todos/**"
27916
+ "todos/**",
27917
+ "tasks/**",
27918
+ "transcripts/**",
27919
+ "**/*.lock",
27920
+ "**/dist/**"
27917
27921
  ];
27918
27922
  });
27919
27923
 
@@ -27996,7 +28000,7 @@ var {
27996
28000
  } = import__.default;
27997
28001
 
27998
28002
  // src/version.ts
27999
- var VERSION = "0.1.31";
28003
+ var VERSION = "0.1.32";
28000
28004
 
28001
28005
  // src/commands/init.ts
28002
28006
  init_source();
@@ -29236,23 +29240,38 @@ async function pushSync(client, masterKey, deviceName, configDir, onProgress) {
29236
29240
  const toPush = diffs.filter((d) => d.action === "push" || d.action === "merge");
29237
29241
  progress(`${toPush.length} files to push`);
29238
29242
  let uploaded = 0;
29243
+ const failedPaths = new Set;
29239
29244
  const chunks = chunkArray(toPush, MAX_CONCURRENT_TRANSFERS);
29240
29245
  for (const chunk of chunks) {
29241
29246
  await Promise.all(chunk.map(async (diff) => {
29242
- try {
29243
- const filePath = join6(claudeDir, diff.path);
29244
- const content = await readFile6(filePath);
29245
- const encrypted = encryptFile(masterKey, diff.path, content);
29246
- await client.uploadBlob(diff.localHash, encrypted);
29247
- bytesTransferred += encrypted.length;
29248
- uploaded++;
29249
- progress(`Uploading ${uploaded}/${toPush.length}: ${diff.path}`);
29250
- } catch (e) {
29251
- errors2.push(`Push ${diff.path}: ${e.message}`);
29247
+ const MAX_RETRIES = 3;
29248
+ for (let attempt = 1;attempt <= MAX_RETRIES; attempt++) {
29249
+ try {
29250
+ const filePath = join6(claudeDir, diff.path);
29251
+ const content = await readFile6(filePath);
29252
+ const encrypted = encryptFile(masterKey, diff.path, content);
29253
+ await client.uploadBlob(diff.localHash, encrypted);
29254
+ bytesTransferred += encrypted.length;
29255
+ uploaded++;
29256
+ progress(`Uploading ${uploaded}/${toPush.length}: ${diff.path}`);
29257
+ return;
29258
+ } catch (e) {
29259
+ if (attempt < MAX_RETRIES) {
29260
+ await new Promise((r) => setTimeout(r, 500 * attempt));
29261
+ } else {
29262
+ failedPaths.add(diff.path);
29263
+ errors2.push(`Push ${diff.path}: ${e.message}`);
29264
+ }
29265
+ }
29252
29266
  }
29253
29267
  }));
29254
29268
  }
29255
29269
  progress("Saving manifest...");
29270
+ if (failedPaths.size > 0) {
29271
+ for (const path2 of failedPaths) {
29272
+ delete localManifest.files[path2];
29273
+ }
29274
+ }
29256
29275
  const manifestJson = JSON.stringify(localManifest);
29257
29276
  const manifestEnc = encryptFile(masterKey, "__manifest__", new TextEncoder().encode(manifestJson));
29258
29277
  await client.putManifest(manifestEnc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccsini",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "Claude Code seamless sync across devices",
5
5
  "type": "module",
6
6
  "bin": {