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.
- package/dist/index.js +31 -12
- 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.
|
|
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
|
-
|
|
29243
|
-
|
|
29244
|
-
|
|
29245
|
-
|
|
29246
|
-
|
|
29247
|
-
|
|
29248
|
-
|
|
29249
|
-
|
|
29250
|
-
|
|
29251
|
-
|
|
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);
|