@pkcprotocol/pkc-js 0.0.146 → 0.0.148

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 (102) hide show
  1. package/README.md +88 -55
  2. package/dist/browser/clients/base-client-manager.js +14 -2
  3. package/dist/browser/clients/base-client-manager.js.map +1 -1
  4. package/dist/browser/errors.d.ts +3 -0
  5. package/dist/browser/errors.js +3 -0
  6. package/dist/browser/errors.js.map +1 -1
  7. package/dist/browser/generated-version.d.ts +1 -1
  8. package/dist/browser/generated-version.js +1 -1
  9. package/dist/browser/pkc-error.d.ts +1 -1
  10. package/dist/browser/publications/comment/comment-client-manager.d.ts +15 -3
  11. package/dist/browser/publications/comment/comment-client-manager.js +221 -10
  12. package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
  13. package/dist/browser/publications/comment/comment.js +1 -0
  14. package/dist/browser/publications/comment/comment.js.map +1 -1
  15. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js +1 -1
  16. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js.map +1 -1
  17. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.d.ts +2 -2
  18. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js +21 -17
  19. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -1
  20. package/dist/browser/runtime/node/community/challenges/index.js +1 -1
  21. package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
  22. package/dist/browser/runtime/node/community/db-handler.d.ts +5 -1
  23. package/dist/browser/runtime/node/community/db-handler.js +64 -12
  24. package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
  25. package/dist/browser/runtime/node/community/local-community/challenges.js +21 -11
  26. package/dist/browser/runtime/node/community/local-community/challenges.js.map +1 -1
  27. package/dist/browser/runtime/node/community/local-community/db-state.js +95 -13
  28. package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
  29. package/dist/browser/runtime/node/community/local-community/editing.js +92 -22
  30. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  31. package/dist/browser/runtime/node/community/local-community/lifecycle.d.ts +2 -0
  32. package/dist/browser/runtime/node/community/local-community/lifecycle.js +72 -20
  33. package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
  34. package/dist/browser/runtime/node/community/local-community/publication-store.js +9 -0
  35. package/dist/browser/runtime/node/community/local-community/publication-store.js.map +1 -1
  36. package/dist/browser/runtime/node/community/local-community.d.ts +1 -0
  37. package/dist/browser/runtime/node/community/local-community.js +3 -0
  38. package/dist/browser/runtime/node/community/local-community.js.map +1 -1
  39. package/dist/browser/runtime/node/util.d.ts +9 -0
  40. package/dist/browser/runtime/node/util.js +141 -25
  41. package/dist/browser/runtime/node/util.js.map +1 -1
  42. package/dist/browser/test/test-util.d.ts +7 -1
  43. package/dist/browser/test/test-util.js +45 -16
  44. package/dist/browser/test/test-util.js.map +1 -1
  45. package/dist/bundled/bundle-manifest.json +40 -40
  46. package/dist/bundled/challenges.js +1 -1
  47. package/dist/bundled/chunks/{helia-for-pkc-PaZmkxgn.js → helia-for-pkc-BUVgQgXa.js} +33 -33
  48. package/dist/bundled/chunks/{local-community-CeuVhBBn.js → local-community-GWqz4s3g.js} +1 -1
  49. package/dist/bundled/chunks/{local-community-BY1ouP1-.js → local-community-dVaQtJNM.js} +292 -91
  50. package/dist/bundled/chunks/{node-BXilwSVE.js → node-fEBX1Nar.js} +162 -16
  51. package/dist/bundled/chunks/{page-sort-scoring-DgSzIxmE.js → page-sort-scoring-DbI7k_K5.js} +1 -1
  52. package/dist/bundled/chunks/{rpc-local-community-BK_HGb_u.js → rpc-local-community-ouDezuGZ.js} +146 -47
  53. package/dist/bundled/chunks/{util-Bnqvxk-6.js → util-B81IOt07.js} +4 -1
  54. package/dist/bundled/chunks/{util-DRSzW-LU.js → util-DofMBAFz.js} +1 -1
  55. package/dist/bundled/chunks/{validate-package-factories-MG5ehoSU.js → validate-package-factories-Bi1OLIPw.js} +2 -2
  56. package/dist/bundled/index.js +1 -1
  57. package/dist/bundled/page-sorts.js +1 -1
  58. package/dist/bundled/rpc/src/index.js +4 -4
  59. package/dist/node/clients/base-client-manager.js +14 -2
  60. package/dist/node/clients/base-client-manager.js.map +1 -1
  61. package/dist/node/errors.d.ts +3 -0
  62. package/dist/node/errors.js +3 -0
  63. package/dist/node/errors.js.map +1 -1
  64. package/dist/node/generated-version.d.ts +1 -1
  65. package/dist/node/generated-version.js +1 -1
  66. package/dist/node/pkc-error.d.ts +1 -1
  67. package/dist/node/publications/comment/comment-client-manager.d.ts +15 -3
  68. package/dist/node/publications/comment/comment-client-manager.js +221 -10
  69. package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
  70. package/dist/node/publications/comment/comment.js +1 -0
  71. package/dist/node/publications/comment/comment.js.map +1 -1
  72. package/dist/node/runtime/node/community/challenges/exclude/exclude.js +1 -1
  73. package/dist/node/runtime/node/community/challenges/exclude/exclude.js.map +1 -1
  74. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.d.ts +2 -2
  75. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js +21 -17
  76. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -1
  77. package/dist/node/runtime/node/community/challenges/index.js +1 -1
  78. package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
  79. package/dist/node/runtime/node/community/db-handler.d.ts +5 -1
  80. package/dist/node/runtime/node/community/db-handler.js +64 -12
  81. package/dist/node/runtime/node/community/db-handler.js.map +1 -1
  82. package/dist/node/runtime/node/community/local-community/challenges.js +21 -11
  83. package/dist/node/runtime/node/community/local-community/challenges.js.map +1 -1
  84. package/dist/node/runtime/node/community/local-community/db-state.js +95 -13
  85. package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
  86. package/dist/node/runtime/node/community/local-community/editing.js +92 -22
  87. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  88. package/dist/node/runtime/node/community/local-community/lifecycle.d.ts +2 -0
  89. package/dist/node/runtime/node/community/local-community/lifecycle.js +72 -20
  90. package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
  91. package/dist/node/runtime/node/community/local-community/publication-store.js +9 -0
  92. package/dist/node/runtime/node/community/local-community/publication-store.js.map +1 -1
  93. package/dist/node/runtime/node/community/local-community.d.ts +1 -0
  94. package/dist/node/runtime/node/community/local-community.js +3 -0
  95. package/dist/node/runtime/node/community/local-community.js.map +1 -1
  96. package/dist/node/runtime/node/util.d.ts +9 -0
  97. package/dist/node/runtime/node/util.js +141 -25
  98. package/dist/node/runtime/node/util.js.map +1 -1
  99. package/dist/node/test/test-util.d.ts +7 -1
  100. package/dist/node/test/test-util.js +45 -16
  101. package/dist/node/test/test-util.js.map +1 -1
  102. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-Bnqvxk-6.js";
3
- import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, Ar as setNativeFunctions$1, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Br as t$3, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dt as parseJsonWithPKCErrorIfFails, Er as monitorCommunitiesDirectory, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as NAME_RESOLVED_TRUE_TTL_MS, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lr as t$5, Lt as RpcCidParamSchema, M as parseRawPages, Mr as findCommunitiesEntry, Nn as verifyChallengeVerification, Nr as toCommunitiesEntry, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pt as RpcAnchorPublishPreparationResultSchema, Qr as nativeFunctions$2, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, Sr as getDefaultDataPath, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tr as listCommunitiesSync, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as t$2, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vr as n$3, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wr as t$4, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Yt as RpcFetchCommunityListParamSchema, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qr as NAME_RESOLVED_FALSE_TTL_MS, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-BK_HGb_u.js";
4
- import { s as getHeliaDebugContext } from "./util-DRSzW-LU.js";
2
+ import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lr as FailedToFetchPageIpfsFromGatewaysError, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-B81IOt07.js";
3
+ import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Cr as getDefaultDataPath, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dr as monitorCommunitiesDirectory, Dt as parseJsonWithPKCErrorIfFails, Er as listCommunitiesSync, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Fr as toCommunitiesEntry, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gr as t$2, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Hr as t$3, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as t$4, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lt as RpcCidParamSchema, M as parseRawPages, Mr as setNativeFunctions$1, Nn as verifyChallengeVerification, Nr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Pt as RpcAnchorPublishPreparationResultSchema, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as n$3, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xr as NAME_RESOLVED_TRUE_TTL_MS, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVED_FALSE_TTL_MS, Yt as RpcFetchCommunityListParamSchema, Zr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, ei as nativeFunctions$2, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zr as t$5, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-ouDezuGZ.js";
4
+ import { s as getHeliaDebugContext } from "./util-DofMBAFz.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -28599,10 +28599,34 @@ async function loadAllPagesUnderCommunityToFindComment(opts) {
28599
28599
  //#endregion
28600
28600
  //#region dist/node/publications/comment/comment-client-manager.js
28601
28601
  const fetchCommentLogger = logger_default("pkc-js:comment:client-manager:fetchAndVerifyCommentCid");
28602
+ const TRANSIENT_FETCH_RETRY_MIN_DELAY_MS = 1e3;
28603
+ const TRANSIENT_FETCH_RETRY_MAX_DELAY_MS = 3e4;
28604
+ const PARENT_PAGE_ERROR_CODES_NOT_WORTH_A_RETRY = new Set([
28605
+ "ERR_REPLIES_PAGE_IS_INVALID",
28606
+ "ERR_POSTS_PAGE_IS_INVALID",
28607
+ "ERR_PAGE_SIGNATURE_IS_INVALID",
28608
+ "ERR_PAGE_COMMENT_IS_INVALID",
28609
+ "ERR_INVALID_PAGE_IPFS_SCHEMA",
28610
+ "ERR_CALCULATED_CID_DOES_NOT_MATCH",
28611
+ "ERR_OVER_DOWNLOAD_LIMIT",
28612
+ "ERR_INVALID_JSON"
28613
+ ]);
28614
+ function isParentPageFetchErrorWorthARetry(err) {
28615
+ if (!(err instanceof PKCError)) return false;
28616
+ if (PARENT_PAGE_ERROR_CODES_NOT_WORTH_A_RETRY.has(err.code)) return false;
28617
+ if (err instanceof FailedToFetchPageIpfsFromGatewaysError) {
28618
+ for (const gatewayError of Object.values(err.details.gatewayToError)) if (isParentPageFetchErrorWorthARetry(gatewayError)) return true;
28619
+ return false;
28620
+ }
28621
+ return true;
28622
+ }
28623
+ const POST_NOT_IN_POST_UPDATES = "post-not-in-post-updates";
28602
28624
  var CommentClientsManager = class extends PublicationClientsManager {
28603
28625
  constructor(comment) {
28604
28626
  super(comment);
28605
28627
  this._postForUpdating = void 0;
28628
+ this._transientFetchRetry = { attempts: 0 };
28629
+ this._commentUpdateLookupsStarted = 0;
28606
28630
  this._comment = comment;
28607
28631
  this._fetchingUpdateForReplyUsingPageCidsPromise = void 0;
28608
28632
  this._parentFirstPageCidsAlreadyLoaded = /* @__PURE__ */ new Set();
@@ -28612,6 +28636,28 @@ var CommentClientsManager = class extends PublicationClientsManager {
28612
28636
  if (this._freshHandlerAbortController) this._freshHandlerAbortController.abort();
28613
28637
  this._freshHandlerAbortController = new AbortController();
28614
28638
  }
28639
+ _cancelTransientFetchRetry() {
28640
+ clearTimeout(this._transientFetchRetry.timer);
28641
+ this._transientFetchRetry = { attempts: 0 };
28642
+ }
28643
+ _dropPendingTransientFetchRetry() {
28644
+ clearTimeout(this._transientFetchRetry.timer);
28645
+ this._transientFetchRetry.timer = void 0;
28646
+ }
28647
+ _scheduleTransientFetchRetry(lookup, log) {
28648
+ clearTimeout(this._transientFetchRetry.timer);
28649
+ const delayMs = Math.min(TRANSIENT_FETCH_RETRY_MIN_DELAY_MS * 2 ** this._transientFetchRetry.attempts, TRANSIENT_FETCH_RETRY_MAX_DELAY_MS);
28650
+ this._transientFetchRetry.attempts++;
28651
+ log.trace("Comment", this._comment.cid, "will retry its CommentUpdate lookup in", delayMs, "ms");
28652
+ const timer = setTimeout(() => {
28653
+ if (this._transientFetchRetry.timer !== timer) return;
28654
+ this._transientFetchRetry.timer = void 0;
28655
+ if (this._comment.state !== "updating") return;
28656
+ lookup().catch((error) => log.error("Comment", this._comment.cid, "failed to retry its CommentUpdate lookup", error));
28657
+ }, delayMs);
28658
+ if (typeof timer === "object" && "unref" in timer) timer.unref();
28659
+ this._transientFetchRetry.timer = timer;
28660
+ }
28615
28661
  _combinedAbortSignalForRetry() {
28616
28662
  return linkAbortSignals([this._comment._getStopAbortSignal(), this._freshHandlerAbortController?.signal]);
28617
28663
  }
@@ -28725,6 +28771,7 @@ var CommentClientsManager = class extends PublicationClientsManager {
28725
28771
  }
28726
28772
  async _fetchPostCommentUpdateIpfsP2P(subIpns, timestampRanges, log, abortSignal) {
28727
28773
  const attemptedPathsToLoadErrors = {};
28774
+ const pathsNotInTheirFolder = [];
28728
28775
  const kuboRpcOrHelia = this.getDefaultKuboRpcClientOrHelia();
28729
28776
  for (const timestampRange of timestampRanges) {
28730
28777
  const folderCid = subIpns.postUpdates[timestampRange];
@@ -28735,6 +28782,11 @@ var CommentClientsManager = class extends PublicationClientsManager {
28735
28782
  judgedLookup = await this._isPostUpdateFileAlreadyJudged(folderCid, path, log, abortSignal);
28736
28783
  } catch (e) {
28737
28784
  throwIfAbortSignalAborted(abortSignal);
28785
+ if (e instanceof PKCError && e.code === "ERR_IPFS_PATH_NOT_IN_FOLDER") {
28786
+ log.trace("Post", this._comment.cid, "has no CommentUpdate at", path, "trying the next timestamp range");
28787
+ pathsNotInTheirFolder.push(path);
28788
+ continue;
28789
+ }
28738
28790
  log.trace(`Timed out resolving CommentUpdate path (${path}) with IPFS P2P. Trying the next timestamp range`);
28739
28791
  attemptedPathsToLoadErrors[path] = e;
28740
28792
  continue;
@@ -28762,6 +28814,15 @@ var CommentClientsManager = class extends PublicationClientsManager {
28762
28814
  });
28763
28815
  } catch (e) {
28764
28816
  throwIfAbortSignalAborted(abortSignal);
28817
+ if (e instanceof PKCError && !this._shouldWeFetchCommentUpdateFromNextTimestamp(e)) {
28818
+ this._comment._invalidCommentUpdateMfsPaths.add(path);
28819
+ e.details = {
28820
+ ...e.details,
28821
+ commentUpdatePath: path,
28822
+ postCid: this._comment.cid
28823
+ };
28824
+ throw e;
28825
+ }
28765
28826
  log.trace(`Failed to fetch CommentUpdate from path (${path}) with IPFS P2P. Trying the next timestamp range`);
28766
28827
  attemptedPathsToLoadErrors[path] = e;
28767
28828
  continue;
@@ -28797,13 +28858,23 @@ var CommentClientsManager = class extends PublicationClientsManager {
28797
28858
  throw e;
28798
28859
  }
28799
28860
  }
28861
+ if (pathsNotInTheirFolder.length === timestampRanges.length) return POST_NOT_IN_POST_UPDATES;
28800
28862
  throw new PKCError("ERR_FAILED_TO_FETCH_COMMENT_UPDATE_FROM_ALL_POST_UPDATES_RANGES", {
28801
28863
  timestampRanges,
28802
28864
  attemptedPathsToLoadErrors,
28865
+ pathsNotInTheirFolder,
28803
28866
  postCid: this._comment.cid,
28804
28867
  commentDepth: this._comment.depth
28805
28868
  });
28806
28869
  }
28870
+ _didEveryGatewayAnswerNotFound(err) {
28871
+ if (!(err instanceof FailedToFetchCommentUpdateFromGatewaysError)) return false;
28872
+ const gatewayUrls = Object.keys(this._pkc.clients.ipfsGateways);
28873
+ return gatewayUrls.length > 0 && gatewayUrls.every((gatewayUrl) => {
28874
+ const gatewayError = err.details.gatewayToError[gatewayUrl];
28875
+ return gatewayError?.code === "ERR_FAILED_TO_FETCH_IPFS_VIA_GATEWAY" && gatewayError.details?.status === 404;
28876
+ });
28877
+ }
28807
28878
  _shouldWeFetchCommentUpdateFromNextTimestamp(err) {
28808
28879
  if (!(err instanceof PKCError)) return false;
28809
28880
  if (err.code === "ERR_COMMENT_UPDATE_SIGNATURE_IS_INVALID" || err.code === "ERR_INVALID_COMMENT_UPDATE_SCHEMA" || err.code === "ERR_OVER_DOWNLOAD_LIMIT" || err.code === "ERR_INVALID_JSON") return false;
@@ -28843,6 +28914,7 @@ var CommentClientsManager = class extends PublicationClientsManager {
28843
28914
  }
28844
28915
  async _fetchPostCommentUpdateFromGateways(subIpns, timestampRanges, log, abortSignal) {
28845
28916
  const attemptedPathsToLoadErrors = {};
28917
+ const pathsNotInTheirFolder = [];
28846
28918
  let commentUpdate;
28847
28919
  const validateCommentFromGateway = async (res) => {
28848
28920
  if (typeof res.resText !== "string") throw Error("Gateway response has no body");
@@ -28886,6 +28958,11 @@ var CommentClientsManager = class extends PublicationClientsManager {
28886
28958
  return;
28887
28959
  } catch (e) {
28888
28960
  throwIfAbortSignalAborted(abortSignal);
28961
+ if (this._didEveryGatewayAnswerNotFound(e)) {
28962
+ log.trace("Post", this._comment.cid, "has no CommentUpdate at", path, "trying the next timestamp range");
28963
+ pathsNotInTheirFolder.push(path);
28964
+ continue;
28965
+ }
28889
28966
  if (this._shouldWeFetchCommentUpdateFromNextTimestamp(e)) {
28890
28967
  attemptedPathsToLoadErrors[path] = e;
28891
28968
  log.trace(`Failed to fetch CommentUpdate from path (${path}) from gateways. Trying the next timestamp range`);
@@ -28896,9 +28973,11 @@ var CommentClientsManager = class extends PublicationClientsManager {
28896
28973
  }
28897
28974
  }
28898
28975
  }
28976
+ if (pathsNotInTheirFolder.length === timestampRanges.length) return POST_NOT_IN_POST_UPDATES;
28899
28977
  throw new PKCError("ERR_FAILED_TO_FETCH_COMMENT_UPDATE_FROM_ALL_POST_UPDATES_RANGES", {
28900
28978
  timestampRanges,
28901
28979
  attemptedPathsToLoadErrors,
28980
+ pathsNotInTheirFolder,
28902
28981
  commentCid: this._comment.cid,
28903
28982
  commentDepth: this._comment.depth
28904
28983
  });
@@ -28947,6 +29026,7 @@ var CommentClientsManager = class extends PublicationClientsManager {
28947
29026
  args: [e]
28948
29027
  }
28949
29028
  });
29029
+ return "fetch-failed";
28950
29030
  } else {
28951
29031
  log.error("Received a non retriable error when attempting to load post commentUpdate. Will be emitting error", this._comment.cid, e);
28952
29032
  this._comment._changeCommentStateEmitEventEmitStateChangeEvent({
@@ -28962,7 +29042,10 @@ var CommentClientsManager = class extends PublicationClientsManager {
28962
29042
  } finally {
28963
29043
  linkedAbortSignal.dispose();
28964
29044
  }
28965
- if (newCommentUpdate) this._useLoadedCommentUpdateIfNewInfo(newCommentUpdate, subIpfs, log);
29045
+ if (newCommentUpdate === POST_NOT_IN_POST_UPDATES) {
29046
+ log("Post", this._comment.cid, "is not under the postUpdates of this community record");
29047
+ this._comment._setUpdatingStateWithEmissionIfNewState("waiting-retry");
29048
+ } else if (newCommentUpdate) this._useLoadedCommentUpdateIfNewInfo(newCommentUpdate, subIpfs, log);
28966
29049
  else if (newCommentUpdate === void 0) {
28967
29050
  log.trace(`Comment`, this._comment.cid, "has no newer CommentUpdate under postUpdates");
28968
29051
  this._comment._setUpdatingStateWithEmissionIfNewState("waiting-retry");
@@ -29154,6 +29237,14 @@ var CommentClientsManager = class extends PublicationClientsManager {
29154
29237
  ].filter((update) => !!update).sort((a, b) => b.commentUpdate.updatedAt - a.commentUpdate.updatedAt)[0];
29155
29238
  }
29156
29239
  async handleUpdateEventFromCommunity(community) {
29240
+ this._dropPendingTransientFetchRetry();
29241
+ const lookup = ++this._commentUpdateLookupsStarted;
29242
+ const fetchFailed = await this._fetchPostCommentUpdateOnCommunityRecord(community);
29243
+ if (lookup !== this._commentUpdateLookupsStarted) return;
29244
+ if (fetchFailed) this._scheduleTransientFetchRetry(() => this.handleUpdateEventFromCommunity(community), logger_default("pkc-js:comment:update"));
29245
+ else if (this._transientFetchRetry.timer === void 0) this._transientFetchRetry.attempts = 0;
29246
+ }
29247
+ async _fetchPostCommentUpdateOnCommunityRecord(community) {
29157
29248
  const log = logger_default("pkc-js:comment:update");
29158
29249
  if (!this._comment.cid) {
29159
29250
  log("comment.cid is not defined because comment is publishing, waiting until cid is defined");
@@ -29178,9 +29269,14 @@ var CommentClientsManager = class extends PublicationClientsManager {
29178
29269
  log.trace("Comment", this._comment.cid, "is current with the record's pages, nothing to fetch from postUpdates");
29179
29270
  this._comment._setUpdatingStateWithEmissionIfNewState("waiting-retry");
29180
29271
  } else try {
29181
- await this.useCommunityPostUpdatesToFetchCommentUpdateForPost(community.raw.communityIpfs);
29272
+ return await this.useCommunityPostUpdatesToFetchCommentUpdateForPost(community.raw.communityIpfs) === "fetch-failed";
29182
29273
  } catch (e) {
29183
29274
  if (isAbortError(e)) return;
29275
+ if (e instanceof PKCError && e.code === "ERR_COMMUNITY_HAS_NO_POST_UPDATES") {
29276
+ log("Post", this._comment.cid, "can't fetch its CommentUpdate, the community record has no postUpdates yet");
29277
+ this._comment._setUpdatingStateWithEmissionIfNewState("waiting-retry");
29278
+ return;
29279
+ }
29184
29280
  log.error("Failed to use community update to fetch new CommentUpdate", e);
29185
29281
  this._comment._changeCommentStateEmitEventEmitStateChangeEvent({
29186
29282
  newUpdatingState: "failed",
@@ -29229,8 +29325,24 @@ var CommentClientsManager = class extends PublicationClientsManager {
29229
29325
  return;
29230
29326
  }
29231
29327
  const pageSortName = this._chooseWhichPagesBasedOnParentAndReplyTimestamp(parentCommentInstance.timestamp);
29232
- let curPageCid = parentCommentInstance.replies.pageCids[pageSortName];
29233
- if (!curPageCid) throw Error("Parent comment does not have any new or old pages");
29328
+ const firstPageCid = parentCommentInstance.replies.pageCids[pageSortName];
29329
+ if (!firstPageCid) {
29330
+ this._comment._changeCommentStateEmitEventEmitStateChangeEvent({
29331
+ newUpdatingState: "waiting-retry",
29332
+ event: {
29333
+ name: "error",
29334
+ args: [new PKCError("ERR_FAILED_TO_FIND_REPLY_COMMENT_UPDATE_WITHIN_PARENT_COMMENT_PAGE_CIDS", {
29335
+ replyCid: this._comment.cid,
29336
+ parentCommentCid: parentCommentInstance.cid,
29337
+ pageSortName,
29338
+ reason: "sort-not-in-page-cids",
29339
+ parentPageCids: parentCommentInstance.replies.pageCids
29340
+ })]
29341
+ }
29342
+ });
29343
+ return;
29344
+ }
29345
+ let curPageCid = firstPageCid;
29234
29346
  if (this._parentFirstPageCidsAlreadyLoaded.has(curPageCid)) {
29235
29347
  log(`Reply`, this._comment.cid, `:SKIPPING: Page CID ${curPageCid} already loaded parent page cid`);
29236
29348
  return;
@@ -29251,7 +29363,6 @@ var CommentClientsManager = class extends PublicationClientsManager {
29251
29363
  });
29252
29364
  break;
29253
29365
  }
29254
- if (pageCidsSearchedForNewUpdate.length === 0) this._parentFirstPageCidsAlreadyLoaded.add(curPageCid);
29255
29366
  const replyWithinParentPage = findCommentInParsedPages(pageLoaded, this._comment.cid)?.raw;
29256
29367
  const replyWithinUpdatingPages = this._findCommentInPagesOfUpdatingCommentsOrCommunity({ parent: parentCommentInstance });
29257
29368
  pageCidsSearchedForNewUpdate.push({
@@ -29275,13 +29386,20 @@ var CommentClientsManager = class extends PublicationClientsManager {
29275
29386
  curPageCid = pageLoaded.nextCid;
29276
29387
  }
29277
29388
  log("Searched for new comment update of comment", this._comment.cid, "in the following pageCids of page sort", pageSortName, "of parent comment:", parentCommentInstance.cid, pageCidsSearchedForNewUpdate, "and found", newCommentUpdate ? "a new comment update" : "no new comment update");
29389
+ const pageFetchError = pageCidsSearchedForNewUpdate.find((searched) => searched.error)?.error;
29390
+ const pageFetchFailed = pageFetchError !== void 0 && isParentPageFetchErrorWorthARetry(pageFetchError);
29391
+ if (!pageFetchFailed) this._parentFirstPageCidsAlreadyLoaded.add(firstPageCid);
29278
29392
  if (newCommentUpdate) this._useLoadedCommentUpdateIfNewInfo({ commentUpdate: newCommentUpdate.commentUpdate }, communityWithSignature, log);
29279
- else if (!replyFoundWithoutNewerUpdate) throw new PKCError("ERR_FAILED_TO_FIND_REPLY_COMMENT_UPDATE_WITHIN_PARENT_COMMENT_PAGE_CIDS", {
29280
- replyCid: this._comment.cid,
29281
- parentCommentCid: parentCommentInstance.cid,
29282
- pageSortName,
29283
- pageCidsSearchedForNewUpdate
29284
- });
29393
+ else if (!replyFoundWithoutNewerUpdate || pageFetchError) {
29394
+ const reason = pageFetchFailed ? "page-fetch-failed" : pageFetchError ? "page-invalid" : "reply-not-in-pages";
29395
+ throw new PKCError("ERR_FAILED_TO_FIND_REPLY_COMMENT_UPDATE_WITHIN_PARENT_COMMENT_PAGE_CIDS", {
29396
+ replyCid: this._comment.cid,
29397
+ parentCommentCid: parentCommentInstance.cid,
29398
+ pageSortName,
29399
+ reason,
29400
+ pageCidsSearchedForNewUpdate
29401
+ });
29402
+ }
29285
29403
  }
29286
29404
  async handleErrorEventFromCommunity(error) {
29287
29405
  if (this._comment.state === "publishing") return super.handleErrorEventFromCommunity(error);
@@ -29352,6 +29470,14 @@ var CommentClientsManager = class extends PublicationClientsManager {
29352
29470
  this.updateNameResolverState(newState, resolverKey);
29353
29471
  }
29354
29472
  async handleUpdateEventFromPostToFetchReplyCommentUpdate(postInstance) {
29473
+ this._dropPendingTransientFetchRetry();
29474
+ const lookup = ++this._commentUpdateLookupsStarted;
29475
+ const fetchFailed = await this._fetchReplyCommentUpdateOnPostUpdate(postInstance);
29476
+ if (lookup !== this._commentUpdateLookupsStarted) return;
29477
+ if (fetchFailed) this._scheduleTransientFetchRetry(() => this.handleUpdateEventFromPostToFetchReplyCommentUpdate(postInstance), logger_default("pkc-js:comment:update"));
29478
+ else if (this._transientFetchRetry.timer === void 0) this._transientFetchRetry.attempts = 0;
29479
+ }
29480
+ async _fetchReplyCommentUpdateOnPostUpdate(postInstance) {
29355
29481
  if (!this._comment.cid) throw Error("comment.cid should be defined");
29356
29482
  const log = logger_default("pkc-js:comment:update:handleUpdateEventFromPost");
29357
29483
  log("Received update event from post", postInstance.cid, "for reply", this._comment.cid, "with depth", this._comment.depth);
@@ -29383,9 +29509,27 @@ var CommentClientsManager = class extends PublicationClientsManager {
29383
29509
  return;
29384
29510
  }
29385
29511
  if (this._fetchingUpdateForReplyUsingPageCidsPromise) await this._fetchingUpdateForReplyUsingPageCidsPromise;
29512
+ let fetchFailed = false;
29386
29513
  this._fetchingUpdateForReplyUsingPageCidsPromise = this.usePageCidsOfParentToFetchCommentUpdateForReply(postInstance, repliesCommunity).catch((error) => {
29387
29514
  if (isAbortError(error)) return;
29515
+ const reason = error instanceof PKCError && error.code === "ERR_FAILED_TO_FIND_REPLY_COMMENT_UPDATE_WITHIN_PARENT_COMMENT_PAGE_CIDS" ? error.details.reason : void 0;
29516
+ if (reason === "reply-not-in-pages") {
29517
+ log("Reply", this._comment.cid, "is not in its parent's pages yet", error.details);
29518
+ this._comment._setUpdatingStateWithEmissionIfNewState("waiting-retry");
29519
+ return;
29520
+ }
29388
29521
  log.error("Failed to fetch reply commentUpdate update from parent pages", error);
29522
+ if (reason === "page-fetch-failed") {
29523
+ this._comment._changeCommentStateEmitEventEmitStateChangeEvent({
29524
+ newUpdatingState: "waiting-retry",
29525
+ event: {
29526
+ name: "error",
29527
+ args: [error]
29528
+ }
29529
+ });
29530
+ fetchFailed = true;
29531
+ return;
29532
+ }
29389
29533
  this._comment._changeCommentStateEmitEventEmitStateChangeEvent({
29390
29534
  newUpdatingState: "failed",
29391
29535
  event: {
@@ -29398,6 +29542,7 @@ var CommentClientsManager = class extends PublicationClientsManager {
29398
29542
  });
29399
29543
  await this._fetchingUpdateForReplyUsingPageCidsPromise;
29400
29544
  this._fetchingUpdateForReplyUsingPageCidsPromise = void 0;
29545
+ return fetchFailed;
29401
29546
  }
29402
29547
  async _createPostInstanceWithStateTranslation() {
29403
29548
  if (!this._comment.postCid) throw Error("comment.postCid needs to be defined to fetch comment update of reply");
@@ -30316,6 +30461,7 @@ var Comment = class extends Publication {
30316
30461
  const log = logger_default("pkc-js:comment:update:_stopUpdateLoop");
30317
30462
  if (!this.cid) return;
30318
30463
  this._commentIpfsloadingOperation?.stop();
30464
+ this._clientsManager._cancelTransientFetchRetry();
30319
30465
  if (this._updateRpcSubscriptionId) {
30320
30466
  const subscriptionId = this._updateRpcSubscriptionId;
30321
30467
  this._updateRpcSubscriptionId = void 0;
@@ -35956,7 +36102,7 @@ var PKC$1 = class extends PKCTypedEmitter {
35956
36102
  this.clients.libp2pJsClients = {};
35957
36103
  if (!this.libp2pJsClientsOptions) return;
35958
36104
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
35959
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-PaZmkxgn.js");
36105
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-BUVgQgXa.js");
35960
36106
  for (const clientOptions of this.libp2pJsClientsOptions) {
35961
36107
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
35962
36108
  ...clientOptions,
@@ -36323,7 +36469,7 @@ var PKC$1 = class extends PKCTypedEmitter {
36323
36469
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
36324
36470
  log.trace("Received community options to create a local community instance:", options);
36325
36471
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
36326
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-CeuVhBBn.js");
36472
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-GWqz4s3g.js");
36327
36473
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
36328
36474
  const community = new LocalCommunity(this);
36329
36475
  if (isLocalCommunity) {
@@ -1,4 +1,4 @@
1
- import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-Bnqvxk-6.js";
1
+ import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-B81IOt07.js";
2
2
  //#region dist/node/pages/page-sort-scoring.js
3
3
  function validatePageSortFile(rawFile) {
4
4
  const validated = PageSortFileSchema.parse(rawFile);