zen-fs-config 0.3.22 → 0.3.24
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 +5 -14
- package/dist/index.mjs +5 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -667,20 +667,11 @@ var ConfigRepo = class {
|
|
|
667
667
|
*/
|
|
668
668
|
async syncMetaToReplicas() {
|
|
669
669
|
this.assertNotDisposed();
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
try {
|
|
676
|
-
await replica.syncable.writeFile(BACKENDS_FILE, content);
|
|
677
|
-
await replica.syncable.writeFile(vPath, vContent);
|
|
678
|
-
console.log(`[ConfigRepo] Synced ${BACKENDS_FILE} + .version to replica ${id}`);
|
|
679
|
-
} catch (err) {
|
|
680
|
-
console.error(`[ConfigRepo] Failed to sync ${BACKENDS_FILE} to ${id}:`, err.message);
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
} catch {
|
|
670
|
+
const results = await this.flush();
|
|
671
|
+
for (const result of results) {
|
|
672
|
+
console.log(
|
|
673
|
+
`[ConfigRepo] syncMetaToReplicas: ${result.pairId} +${result.filesCreated}/~${result.filesUpdated}/-${result.filesDeleted} skip:${result.filesSkipped} ${result.durationMs}ms`
|
|
674
|
+
);
|
|
684
675
|
}
|
|
685
676
|
}
|
|
686
677
|
getSyncStatuses() {
|
package/dist/index.mjs
CHANGED
|
@@ -618,20 +618,11 @@ var ConfigRepo = class {
|
|
|
618
618
|
*/
|
|
619
619
|
async syncMetaToReplicas() {
|
|
620
620
|
this.assertNotDisposed();
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
try {
|
|
627
|
-
await replica.syncable.writeFile(BACKENDS_FILE, content);
|
|
628
|
-
await replica.syncable.writeFile(vPath, vContent);
|
|
629
|
-
console.log(`[ConfigRepo] Synced ${BACKENDS_FILE} + .version to replica ${id}`);
|
|
630
|
-
} catch (err) {
|
|
631
|
-
console.error(`[ConfigRepo] Failed to sync ${BACKENDS_FILE} to ${id}:`, err.message);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
} catch {
|
|
621
|
+
const results = await this.flush();
|
|
622
|
+
for (const result of results) {
|
|
623
|
+
console.log(
|
|
624
|
+
`[ConfigRepo] syncMetaToReplicas: ${result.pairId} +${result.filesCreated}/~${result.filesUpdated}/-${result.filesDeleted} skip:${result.filesSkipped} ${result.durationMs}ms`
|
|
625
|
+
);
|
|
635
626
|
}
|
|
636
627
|
}
|
|
637
628
|
getSyncStatuses() {
|