@pkcprotocol/pkc-js 0.0.33 → 0.0.34
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/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/runtime/node/community/local-community.js +26 -2
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/runtime/node/community/local-community.js +26 -2
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.34";
|
|
@@ -537,8 +537,32 @@ export class LocalCommunity extends RpcLocalCommunity {
|
|
|
537
537
|
const latestComment = this._dbHandler.queryLatestCommentCid();
|
|
538
538
|
this._dbHandler.commitTransaction();
|
|
539
539
|
const stats = this._dbHandler.queryCommunityStats();
|
|
540
|
-
if (commentUpdateRowsToPublishToIpfs.length > 0)
|
|
541
|
-
|
|
540
|
+
if (commentUpdateRowsToPublishToIpfs.length > 0) {
|
|
541
|
+
try {
|
|
542
|
+
await this._syncPostUpdatesWithIpfs(commentUpdateRowsToPublishToIpfs);
|
|
543
|
+
}
|
|
544
|
+
catch (e) {
|
|
545
|
+
const err = e;
|
|
546
|
+
const isMfsTimeout = err.message.includes("Timed out writing to MFS path") || err.message.includes("Timed out removing MFS paths");
|
|
547
|
+
if (isMfsTimeout) {
|
|
548
|
+
// Workaround for ipfs/kubo#10842: deeply nested MFS paths hang, but rm of the community root is fast.
|
|
549
|
+
log.error(`MFS sync stuck for community ${this.address} - auto-nuking /${this.address} and forcing a full republish. See https://github.com/ipfs/kubo/issues/10842 for upstream context.`);
|
|
550
|
+
const kuboRpc = this._clientsManager.getDefaultKuboRpcClient();
|
|
551
|
+
try {
|
|
552
|
+
await kuboRpc._client.files.rm("/" + this.address, {
|
|
553
|
+
recursive: true,
|
|
554
|
+
//@ts-expect-error force is not in FilesRmOptions
|
|
555
|
+
force: true
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
catch (rmErr) {
|
|
559
|
+
log.error(`Auto-nuke files.rm of /${this.address} failed:`, rmErr);
|
|
560
|
+
}
|
|
561
|
+
this._dbHandler.forceUpdateOnAllComments();
|
|
562
|
+
}
|
|
563
|
+
throw e;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
542
566
|
const newPostUpdates = await this._calculateNewPostUpdates();
|
|
543
567
|
const newModQueue = await this._pageGenerator.generateModQueuePages();
|
|
544
568
|
const kuboRpcClient = this._clientsManager.getDefaultKuboRpcClient();
|