@pkcprotocol/pkc-js 0.0.63 → 0.0.65

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 (239) hide show
  1. package/dist/browser/clients/base-client-manager.js +14 -14
  2. package/dist/browser/clients/base-client-manager.js.map +1 -1
  3. package/dist/browser/community/community-client-manager.js +9 -11
  4. package/dist/browser/community/community-client-manager.js.map +1 -1
  5. package/dist/browser/community/community-gateway-selection.js +4 -4
  6. package/dist/browser/community/community-gateway-selection.js.map +1 -1
  7. package/dist/browser/community/community-wire.js +3 -3
  8. package/dist/browser/community/community-wire.js.map +1 -1
  9. package/dist/browser/community/remote-community.d.ts +1 -1
  10. package/dist/browser/community/remote-community.js +10 -7
  11. package/dist/browser/community/remote-community.js.map +1 -1
  12. package/dist/browser/community/rpc-local-community.js +3 -3
  13. package/dist/browser/community/rpc-local-community.js.map +1 -1
  14. package/dist/browser/community/rpc-remote-community.js +5 -5
  15. package/dist/browser/community/rpc-remote-community.js.map +1 -1
  16. package/dist/browser/community/schema.js +5 -5
  17. package/dist/browser/community/schema.js.map +1 -1
  18. package/dist/browser/errors.d.ts +1 -0
  19. package/dist/browser/errors.js +1 -0
  20. package/dist/browser/errors.js.map +1 -1
  21. package/dist/browser/generated-version.d.ts +1 -1
  22. package/dist/browser/generated-version.js +1 -1
  23. package/dist/browser/helia/helia-for-pkc.js +52 -6
  24. package/dist/browser/helia/helia-for-pkc.js.map +1 -1
  25. package/dist/browser/helia/types.d.ts +2 -0
  26. package/dist/browser/helia/util.d.ts +18 -0
  27. package/dist/browser/helia/util.js +123 -0
  28. package/dist/browser/helia/util.js.map +1 -1
  29. package/dist/browser/pages/pages-client-manager.js +11 -15
  30. package/dist/browser/pages/pages-client-manager.js.map +1 -1
  31. package/dist/browser/pages/util.js +9 -9
  32. package/dist/browser/pages/util.js.map +1 -1
  33. package/dist/browser/pkc/pkc-client-manager.js +6 -6
  34. package/dist/browser/pkc/pkc-client-manager.js.map +1 -1
  35. package/dist/browser/pkc/pkc.js +7 -7
  36. package/dist/browser/pkc/pkc.js.map +1 -1
  37. package/dist/browser/pkc-error.d.ts +1 -1
  38. package/dist/browser/publications/comment/comment-client-manager.js +5 -5
  39. package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
  40. package/dist/browser/publications/comment/comment.js +15 -15
  41. package/dist/browser/publications/comment/comment.js.map +1 -1
  42. package/dist/browser/publications/comment/schema.js +17 -17
  43. package/dist/browser/publications/comment/schema.js.map +1 -1
  44. package/dist/browser/publications/comment-edit/schema.js +7 -7
  45. package/dist/browser/publications/comment-edit/schema.js.map +1 -1
  46. package/dist/browser/publications/comment-moderation/schema.js +11 -7
  47. package/dist/browser/publications/comment-moderation/schema.js.map +1 -1
  48. package/dist/browser/publications/community-edit/schema.js +6 -6
  49. package/dist/browser/publications/community-edit/schema.js.map +1 -1
  50. package/dist/browser/publications/publication-author.js +3 -3
  51. package/dist/browser/publications/publication-author.js.map +1 -1
  52. package/dist/browser/publications/publication-client-manager.js +4 -4
  53. package/dist/browser/publications/publication-client-manager.js.map +1 -1
  54. package/dist/browser/publications/publication.js +9 -9
  55. package/dist/browser/publications/publication.js.map +1 -1
  56. package/dist/browser/publications/vote/schema.js +11 -7
  57. package/dist/browser/publications/vote/schema.js.map +1 -1
  58. package/dist/browser/publications/vote/vote.js.map +1 -1
  59. package/dist/browser/pubsub-messages/schema.js +5 -5
  60. package/dist/browser/pubsub-messages/schema.js.map +1 -1
  61. package/dist/browser/rpc/src/index.js +12 -12
  62. package/dist/browser/rpc/src/index.js.map +1 -1
  63. package/dist/browser/runtime/browser/localforage-lru.js +2 -2
  64. package/dist/browser/runtime/browser/localforage-lru.js.map +1 -1
  65. package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js +3 -3
  66. package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js.map +1 -1
  67. package/dist/browser/runtime/node/community/challenges/index.js +3 -3
  68. package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
  69. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +4 -4
  70. package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -1
  71. package/dist/browser/runtime/node/community/db-handler.js +32 -32
  72. package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
  73. package/dist/browser/runtime/node/community/local-community/challenges.js +7 -7
  74. package/dist/browser/runtime/node/community/local-community/challenges.js.map +1 -1
  75. package/dist/browser/runtime/node/community/local-community/comment-updates.js +5 -5
  76. package/dist/browser/runtime/node/community/local-community/comment-updates.js.map +1 -1
  77. package/dist/browser/runtime/node/community/local-community/db-state.js +8 -8
  78. package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
  79. package/dist/browser/runtime/node/community/local-community/editing.js +6 -6
  80. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  81. package/dist/browser/runtime/node/community/local-community/ipns-publishing.js +10 -7
  82. package/dist/browser/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
  83. package/dist/browser/runtime/node/community/local-community/lifecycle.js +4 -4
  84. package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
  85. package/dist/browser/runtime/node/community/local-community/publication-store.js +13 -19
  86. package/dist/browser/runtime/node/community/local-community/publication-store.js.map +1 -1
  87. package/dist/browser/runtime/node/community/local-community/publication-validation.js +10 -10
  88. package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
  89. package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js +5 -5
  90. package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
  91. package/dist/browser/runtime/node/community/local-community.js +7 -7
  92. package/dist/browser/runtime/node/community/local-community.js.map +1 -1
  93. package/dist/browser/runtime/node/community/page-generator.js +5 -7
  94. package/dist/browser/runtime/node/community/page-generator.js.map +1 -1
  95. package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js +2 -2
  96. package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -1
  97. package/dist/browser/runtime/node/sqlite-lru-cache.js +2 -2
  98. package/dist/browser/runtime/node/sqlite-lru-cache.js.map +1 -1
  99. package/dist/browser/runtime/node/util.js +8 -6
  100. package/dist/browser/runtime/node/util.js.map +1 -1
  101. package/dist/browser/schema/schema.js +3 -3
  102. package/dist/browser/schema/schema.js.map +1 -1
  103. package/dist/browser/signer/constants.d.ts +1 -2
  104. package/dist/browser/signer/constants.js +9 -1
  105. package/dist/browser/signer/constants.js.map +1 -1
  106. package/dist/browser/signer/signatures.js +14 -12
  107. package/dist/browser/signer/signatures.js.map +1 -1
  108. package/dist/browser/stats.js +5 -5
  109. package/dist/browser/stats.js.map +1 -1
  110. package/dist/browser/test/test-util.d.ts +9 -10
  111. package/dist/browser/test/test-util.js +25 -37
  112. package/dist/browser/test/test-util.js.map +1 -1
  113. package/dist/browser/util.js +18 -17
  114. package/dist/browser/util.js.map +1 -1
  115. package/dist/bundled/bundle-manifest.json +61 -190
  116. package/dist/bundled/chunks/{helia-for-pkc-C6vMsrJ-.js → helia-for-pkc-h-rjuHh7.js} +46 -3
  117. package/dist/bundled/chunks/{local-community-BQmiwsV4.js → local-community-DEWf2apw.js} +170 -121
  118. package/dist/bundled/chunks/{local-community-BoIoFZHk.js → local-community-DdDpaZqk.js} +1 -1
  119. package/dist/bundled/chunks/{node-G40jxRL2.js → node-CrnvA79m.js} +40 -37
  120. package/dist/bundled/chunks/{rpc-local-community-D4-NEPJb.js → rpc-local-community-CpN6R3ZN.js} +337 -108
  121. package/dist/bundled/chunks/{schema-SPGmy_14.js → schema-Db4geGeo.js} +248 -3900
  122. package/dist/bundled/chunks/{util-CJ6nXIW9.js → util-DrHyKxFe.js} +98 -2
  123. package/dist/bundled/index.js +1 -1
  124. package/dist/bundled/rpc/src/index.js +18 -22
  125. package/dist/node/clients/base-client-manager.js +14 -14
  126. package/dist/node/clients/base-client-manager.js.map +1 -1
  127. package/dist/node/community/community-client-manager.js +9 -11
  128. package/dist/node/community/community-client-manager.js.map +1 -1
  129. package/dist/node/community/community-gateway-selection.js +4 -4
  130. package/dist/node/community/community-gateway-selection.js.map +1 -1
  131. package/dist/node/community/community-wire.js +3 -3
  132. package/dist/node/community/community-wire.js.map +1 -1
  133. package/dist/node/community/remote-community.d.ts +1 -1
  134. package/dist/node/community/remote-community.js +10 -7
  135. package/dist/node/community/remote-community.js.map +1 -1
  136. package/dist/node/community/rpc-local-community.js +3 -3
  137. package/dist/node/community/rpc-local-community.js.map +1 -1
  138. package/dist/node/community/rpc-remote-community.js +5 -5
  139. package/dist/node/community/rpc-remote-community.js.map +1 -1
  140. package/dist/node/community/schema.js +5 -5
  141. package/dist/node/community/schema.js.map +1 -1
  142. package/dist/node/errors.d.ts +1 -0
  143. package/dist/node/errors.js +1 -0
  144. package/dist/node/errors.js.map +1 -1
  145. package/dist/node/generated-version.d.ts +1 -1
  146. package/dist/node/generated-version.js +1 -1
  147. package/dist/node/helia/helia-for-pkc.js +52 -6
  148. package/dist/node/helia/helia-for-pkc.js.map +1 -1
  149. package/dist/node/helia/types.d.ts +2 -0
  150. package/dist/node/helia/util.d.ts +18 -0
  151. package/dist/node/helia/util.js +123 -0
  152. package/dist/node/helia/util.js.map +1 -1
  153. package/dist/node/pages/pages-client-manager.js +11 -15
  154. package/dist/node/pages/pages-client-manager.js.map +1 -1
  155. package/dist/node/pages/util.js +9 -9
  156. package/dist/node/pages/util.js.map +1 -1
  157. package/dist/node/pkc/pkc-client-manager.js +6 -6
  158. package/dist/node/pkc/pkc-client-manager.js.map +1 -1
  159. package/dist/node/pkc/pkc.js +7 -7
  160. package/dist/node/pkc/pkc.js.map +1 -1
  161. package/dist/node/pkc-error.d.ts +1 -1
  162. package/dist/node/publications/comment/comment-client-manager.js +5 -5
  163. package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
  164. package/dist/node/publications/comment/comment.js +15 -15
  165. package/dist/node/publications/comment/comment.js.map +1 -1
  166. package/dist/node/publications/comment/schema.js +17 -17
  167. package/dist/node/publications/comment/schema.js.map +1 -1
  168. package/dist/node/publications/comment-edit/schema.js +7 -7
  169. package/dist/node/publications/comment-edit/schema.js.map +1 -1
  170. package/dist/node/publications/comment-moderation/schema.js +11 -7
  171. package/dist/node/publications/comment-moderation/schema.js.map +1 -1
  172. package/dist/node/publications/community-edit/schema.js +6 -6
  173. package/dist/node/publications/community-edit/schema.js.map +1 -1
  174. package/dist/node/publications/publication-author.js +3 -3
  175. package/dist/node/publications/publication-author.js.map +1 -1
  176. package/dist/node/publications/publication-client-manager.js +4 -4
  177. package/dist/node/publications/publication-client-manager.js.map +1 -1
  178. package/dist/node/publications/publication.js +9 -9
  179. package/dist/node/publications/publication.js.map +1 -1
  180. package/dist/node/publications/vote/schema.js +11 -7
  181. package/dist/node/publications/vote/schema.js.map +1 -1
  182. package/dist/node/publications/vote/vote.js.map +1 -1
  183. package/dist/node/pubsub-messages/schema.js +5 -5
  184. package/dist/node/pubsub-messages/schema.js.map +1 -1
  185. package/dist/node/rpc/src/index.js +12 -12
  186. package/dist/node/rpc/src/index.js.map +1 -1
  187. package/dist/node/runtime/browser/localforage-lru.js +2 -2
  188. package/dist/node/runtime/browser/localforage-lru.js.map +1 -1
  189. package/dist/node/runtime/node/addresses-rewriter-proxy-server.js +3 -3
  190. package/dist/node/runtime/node/addresses-rewriter-proxy-server.js.map +1 -1
  191. package/dist/node/runtime/node/community/challenges/index.js +3 -3
  192. package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
  193. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +4 -4
  194. package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -1
  195. package/dist/node/runtime/node/community/db-handler.js +32 -32
  196. package/dist/node/runtime/node/community/db-handler.js.map +1 -1
  197. package/dist/node/runtime/node/community/local-community/challenges.js +7 -7
  198. package/dist/node/runtime/node/community/local-community/challenges.js.map +1 -1
  199. package/dist/node/runtime/node/community/local-community/comment-updates.js +5 -5
  200. package/dist/node/runtime/node/community/local-community/comment-updates.js.map +1 -1
  201. package/dist/node/runtime/node/community/local-community/db-state.js +8 -8
  202. package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
  203. package/dist/node/runtime/node/community/local-community/editing.js +6 -6
  204. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  205. package/dist/node/runtime/node/community/local-community/ipns-publishing.js +10 -7
  206. package/dist/node/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
  207. package/dist/node/runtime/node/community/local-community/lifecycle.js +4 -4
  208. package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
  209. package/dist/node/runtime/node/community/local-community/publication-store.js +13 -19
  210. package/dist/node/runtime/node/community/local-community/publication-store.js.map +1 -1
  211. package/dist/node/runtime/node/community/local-community/publication-validation.js +10 -10
  212. package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
  213. package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js +5 -5
  214. package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
  215. package/dist/node/runtime/node/community/local-community.js +7 -7
  216. package/dist/node/runtime/node/community/local-community.js.map +1 -1
  217. package/dist/node/runtime/node/community/page-generator.js +5 -7
  218. package/dist/node/runtime/node/community/page-generator.js.map +1 -1
  219. package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js +2 -2
  220. package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -1
  221. package/dist/node/runtime/node/sqlite-lru-cache.js +2 -2
  222. package/dist/node/runtime/node/sqlite-lru-cache.js.map +1 -1
  223. package/dist/node/runtime/node/util.js +8 -6
  224. package/dist/node/runtime/node/util.js.map +1 -1
  225. package/dist/node/schema/schema.js +3 -3
  226. package/dist/node/schema/schema.js.map +1 -1
  227. package/dist/node/signer/constants.d.ts +1 -2
  228. package/dist/node/signer/constants.js +9 -1
  229. package/dist/node/signer/constants.js.map +1 -1
  230. package/dist/node/signer/signatures.js +14 -12
  231. package/dist/node/signer/signatures.js.map +1 -1
  232. package/dist/node/stats.js +5 -5
  233. package/dist/node/stats.js.map +1 -1
  234. package/dist/node/test/test-util.d.ts +9 -10
  235. package/dist/node/test/test-util.js +25 -37
  236. package/dist/node/test/test-util.js.map +1 -1
  237. package/dist/node/util.js +18 -17
  238. package/dist/node/util.js.map +1 -1
  239. package/package.json +2 -2
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-BQmiwsV4.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-DEWf2apw.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { B as isIpfsCid, Cn as CommentUpdateForChallengeVerificationSchema, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dt as refreshTrackedCommentAliases, E as createAbortError, En as CommentUpdateSchema, Et as listUpdatingCommunities, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Pt as untrackUpdatingComment, Q as isStringDomain, Qn as FailedToFetchCommentIpfsFromGatewaysError, Rt as pTimeout, St as findUpdatingComment, Tt as listUpdatingComments, Xn as require_commonjs, Zn as require_retry, _t as timestamp, a as ChallengeRequestMessageSchema, ar as logger_default, b as areEquivalentCommunityAddresses, br as parsedType, cn as PubsubTopicSchema, cr as setErrorMap, ct as resolveWhenPredicateIsTrue, ft as shortifyAddress, ir as messages, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, or as require_supports_color, ot as removeUndefinedValuesRecursively, pt as shortifyCid, r as ChallengeMessageSchema, rr as PKCError, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, ut as retryKuboIpfsAdd, vn as CommentIpfsSchema, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wt as listStartedCommunities, xr as stringifyPrimitive, xt as findStartedCommunity, y as version_default, yr as joinValues, z as isAbortError } from "./schema-SPGmy_14.js";
3
- import { $ as RepliesPages, $t as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCidParamSchema, At as verifyCommunityEdit, B as setNativeFunctions$1, Bn as RpcFetchCidResultSchema, Bt as getCommunityPublicKeyFromWire, Cn as parseRpcCommentEventWithPKCErrorIfItFails, Ct as verifyChallengeVerification, D as createKuboRpcClient, Dn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Dt as verifyCommentPubsubMessage, Et as verifyCommentModeration, Fn as RpcExportCommunityModLogsParamSchema, Gn as RpcUnsubscribeParamSchema, H as CommentClientsManager, Hn as RpcResolveAuthorNameResultSchema, Ht as decode, I as listCommunitiesSync, In as RpcExportCommunityModLogsResultSchema, It as normalizeCreatePublicationAuthor, L as monitorCommunitiesDirectory, Ln as RpcExportCommunityParamSchema, Lt as buildRuntimeCommunityFields, Mn as RpcCommunityIdentifierParamSchema, Mt as buildRuntimeAuthor, N as getDefaultDataPath, Nn as RpcCommunityPageParamSchema, Nt as cleanWireAuthor, On as RpcAuthorNameParamSchema, Ot as verifyCommentUpdate, Pn as RpcEditCommunityParamSchema, Pt as getAuthorNameFromRuntime, Q as parseRawPages, Rn as RpcExportCommunityResultSchema, Rt as getCommunityAddressFromRecord, Sn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Tn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Tt as verifyCommentIpfs, Un as RpcSubscriptionIdResultSchema, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcPublishChallengeAnswersParamSchema, Vt as normalizeCommunityInputFromCommunity, Wn as RpcSuccessResultSchema, Wt as getBufferedPKCAddressFromPublicKey, X as findCommentInPageInstanceRecursively, Xn as require_undici, Xt as parseCidStringSchemaWithPKCErrorIfItFails, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as nativeFunctions$2, _n as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, at as PKCTypedEmitter, bn as parseDecryptedChallengeWithPKCErrorIfItFails, c as AddressesRewriterProxyServer, ct as signChallengeAnswer, dn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, en as parseCommentIpfsSchemaWithPKCErrorIfItFails, et as PublicationClientsManager, f as KeyvBetterSqlite3, fn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, ft as signComment, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, hn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, in as parseCommunityAddressWithPKCErrorIfItFails, jn as RpcCommentRepliesPageParamSchema, jt as verifyVote, kn as RpcCancelExportParamSchema, ln as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, m as decodeRpcChallengePubsubMsg, mt as signCommentModeration, n as RpcRemoteCommunity, nn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, nt as InflightFetchManager, o as TrackedInstanceRegistry, ot as require_lib$1, p as decodeRpcChallengeAnswerPubsubMsg, pt as signCommentEdit, rn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, s as LRUCache, sn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tt as PKCClientsManager, u as RemoteCommunity, un as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ut as signChallengeRequest, v as createSigner, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, vt as signCommunityEdit, wn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, wt as verifyCommentEdit, x as encryptEd25519AesGcm, xn as parseJsonWithPKCErrorIfFails, xt as verifyChallengeMessage, y as decryptEd25519AesGcm, yn as parseDecryptedChallengeVerification, yt as signVote, zn as RpcFetchCidParamSchema, zt as getCommunityNameFromWire } from "./rpc-local-community-D4-NEPJb.js";
4
- import { n as getHeliaDebugContext } from "./util-CJ6nXIW9.js";
2
+ import { B as isIpfsCid, Cn as CommentUpdateForChallengeVerificationSchema, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dt as refreshTrackedCommentAliases, E as createAbortError, En as CommentUpdateSchema, Et as listUpdatingCommunities, Fr as stringifyPrimitive, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Nr as joinValues, Pr as parsedType, Pt as untrackUpdatingComment, Q as isStringDomain, Qn as n$1, Rt as pTimeout, Sr as setErrorMap, St as findUpdatingComment, Tt as listUpdatingComments, Xn as n$2, _r as PKCError, _t as timestamp, a as ChallengeRequestMessageSchema, b as areEquivalentCommunityAddresses, br as require_supports_color, cn as PubsubTopicSchema, ct as resolveWhenPredicateIsTrue, dr as require_retry, er as t$1, fr as FailedToFetchCommentIpfsFromGatewaysError, ft as shortifyAddress, ir as r, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, nr as e$1, ot as removeUndefinedValuesRecursively, pt as shortifyCid, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, tr as e, ut as retryKuboIpfsAdd, vn as CommentIpfsSchema, vr as messages, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wt as listStartedCommunities, xt as findStartedCommunity, y as version_default, yr as logger_default, z as isAbortError } from "./schema-Db4geGeo.js";
3
+ import { $ as RepliesPages, $n as t$5, $t as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCidParamSchema, At as verifyCommunityEdit, B as setNativeFunctions$1, Bn as RpcFetchCidResultSchema, Bt as getCommunityPublicKeyFromWire, Cn as parseRpcCommentEventWithPKCErrorIfItFails, Ct as verifyChallengeVerification, D as createKuboRpcClient, Dn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Dt as verifyCommentPubsubMessage, Et as verifyCommentModeration, Fn as RpcExportCommunityModLogsParamSchema, Gn as RpcUnsubscribeParamSchema, H as CommentClientsManager, Hn as RpcResolveAuthorNameResultSchema, Ht as decode, I as listCommunitiesSync, In as RpcExportCommunityModLogsResultSchema, It as normalizeCreatePublicationAuthor, Kn as t$4, L as monitorCommunitiesDirectory, Ln as RpcExportCommunityParamSchema, Lt as buildRuntimeCommunityFields, Mn as RpcCommunityIdentifierParamSchema, Mt as buildRuntimeAuthor, N as getDefaultDataPath, Nn as RpcCommunityPageParamSchema, Nt as cleanWireAuthor, On as RpcAuthorNameParamSchema, Ot as verifyCommentUpdate, Pn as RpcEditCommunityParamSchema, Pt as getAuthorNameFromRuntime, Q as parseRawPages, Qn as t$2, Rn as RpcExportCommunityResultSchema, Rt as getCommunityAddressFromRecord, Sn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Tn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Tt as verifyCommentIpfs, Un as RpcSubscriptionIdResultSchema, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcPublishChallengeAnswersParamSchema, Vt as normalizeCommunityInputFromCommunity, Wn as RpcSuccessResultSchema, Wt as getBufferedPKCAddressFromPublicKey, X as findCommentInPageInstanceRecursively, Xn as n$3, Xt as parseCidStringSchemaWithPKCErrorIfItFails, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as t$3, _n as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, at as PKCTypedEmitter, bn as parseDecryptedChallengeWithPKCErrorIfItFails, c as AddressesRewriterProxyServer, ct as signChallengeAnswer, dn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, en as parseCommentIpfsSchemaWithPKCErrorIfItFails, et as PublicationClientsManager, f as KeyvBetterSqlite3, fn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, ft as signComment, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, hn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, in as parseCommunityAddressWithPKCErrorIfItFails, ir as require_undici, jn as RpcCommentRepliesPageParamSchema, jt as verifyVote, kn as RpcCancelExportParamSchema, ln as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, m as decodeRpcChallengePubsubMsg, mt as signCommentModeration, n as RpcRemoteCommunity, nn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, nt as InflightFetchManager, o as TrackedInstanceRegistry, ot as require_lib$1, p as decodeRpcChallengeAnswerPubsubMsg, pt as signCommentEdit, rn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, rr as nativeFunctions$2, s as LRUCache, sn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tt as PKCClientsManager, u as RemoteCommunity, un as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ut as signChallengeRequest, v as createSigner, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, vt as signCommunityEdit, wn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, wt as verifyCommentEdit, x as encryptEd25519AesGcm, xn as parseJsonWithPKCErrorIfFails, xt as verifyChallengeMessage, y as decryptEd25519AesGcm, yn as parseDecryptedChallengeVerification, yt as signVote, zn as RpcFetchCidParamSchema, zt as getCommunityNameFromWire } from "./rpc-local-community-CpN6R3ZN.js";
4
+ import { r as getHeliaDebugContext } from "./util-DrHyKxFe.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -143,10 +143,15 @@ if (Number(process.versions.node.split(".")[0]) >= 18) {
143
143
  }
144
144
  if (typeof globalThis.WebSocket === "undefined") Reflect.set(globalThis, "WebSocket", import_undici.WebSocket);
145
145
  //#endregion
146
+ //#region node_modules/remeda/dist/sortBy.js
147
+ function t(...t) {
148
+ return t$2(n, t);
149
+ }
150
+ const n = (e, t) => [...e].sort(t);
151
+ //#endregion
146
152
  //#region dist/node/publications/publication.js
147
153
  var import_retry = /* @__PURE__ */ __toESM(require_retry(), 1);
148
154
  var import_lib = require_lib$1();
149
- var import_commonjs = /* @__PURE__ */ __toESM(require_commonjs(), 1);
150
155
  var Publication = class extends import_lib.TypedEmitter {
151
156
  constructor(pkc) {
152
157
  super();
@@ -468,7 +473,7 @@ var Publication = class extends import_lib.TypedEmitter {
468
473
  return;
469
474
  }
470
475
  if (pubsubMsgParsed.type === "CHALLENGEREQUEST" || pubsubMsgParsed.type === "CHALLENGEANSWER") log.trace("Received unrelated pubsub message of type", pubsubMsgParsed.type);
471
- else if (!Object.values(this._challengeExchanges).some((exchange) => import_commonjs.isDeepEqual(pubsubMsgParsed.challengeRequestId, exchange.challengeRequest.challengeRequestId))) log.trace(`Received pubsub message with different challenge request id, ignoring it`);
476
+ else if (!Object.values(this._challengeExchanges).some((exchange) => t$3(pubsubMsgParsed.challengeRequestId, exchange.challengeRequest.challengeRequestId))) log.trace(`Received pubsub message with different challenge request id, ignoring it`);
472
477
  else if (pubsubMsgParsed.type === "CHALLENGE") return this._handleIncomingChallengePubsubMessage(pubsubMsgParsed);
473
478
  else if (pubsubMsgParsed.type === "CHALLENGEVERIFICATION") return this._handleIncomingChallengeVerificationPubsubMessage(pubsubMsgParsed);
474
479
  }
@@ -589,7 +594,7 @@ var Publication = class extends import_lib.TypedEmitter {
589
594
  this.emit("statechange", newState);
590
595
  }
591
596
  _setRpcClientState(newState) {
592
- const currentRpcUrl = import_commonjs.keys.strict(this.clients.pkcRpcClients)[0];
597
+ const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
593
598
  if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
594
599
  this.clients.pkcRpcClients[currentRpcUrl].state = newState;
595
600
  this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
@@ -805,7 +810,7 @@ var Publication = class extends import_lib.TypedEmitter {
805
810
  };
806
811
  const omitEncrypted = (msg) => {
807
812
  if (!msg) return void 0;
808
- return import_commonjs.omit(msg, ["encrypted"]);
813
+ return n$1(msg, ["encrypted"]);
809
814
  };
810
815
  return Object.values(this._challengeExchanges).map((exchange) => ({
811
816
  challengeRequest: omitEncrypted(exchange.challengeRequest),
@@ -905,7 +910,7 @@ var Publication = class extends import_lib.TypedEmitter {
905
910
  }
906
911
  }
907
912
  _getPubsubProviders() {
908
- const providers = this.clients.libp2pJsClients && import_commonjs.keys.strict(this.clients.libp2pJsClients).length > 0 ? import_commonjs.keys.strict(this.clients.libp2pJsClients) : import_commonjs.keys.strict(this.clients.pubsubKuboRpcClients);
913
+ const providers = this.clients.libp2pJsClients && t$1(this.clients.libp2pJsClients).length > 0 ? t$1(this.clients.libp2pJsClients) : t$1(this.clients.pubsubKuboRpcClients);
909
914
  if (providers.length === 0) throw new PKCError("ERR_NO_PUBSUB_PROVIDERS_AVAILABLE_TO_PUBLISH_OVER_PUBSUB", { providers });
910
915
  if (providers.length === 1) providers.push(providers[0]);
911
916
  return providers;
@@ -918,14 +923,14 @@ var Publication = class extends import_lib.TypedEmitter {
918
923
  if (challenge.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
919
924
  const encryptedFields = ["challenges"];
920
925
  log("Received a challenge from the local community", challenge);
921
- await this._handleIncomingChallengePubsubMessage(import_commonjs.omit(challenge, encryptedFields));
926
+ await this._handleIncomingChallengePubsubMessage(n$1(challenge, encryptedFields));
922
927
  }
923
928
  };
924
929
  community.on("challenge", communityChallengeListener);
925
930
  const communityChallengeVerificationListener = async (decryptedChallengeVerification) => {
926
931
  if (decryptedChallengeVerification.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
927
932
  log("Received a challenge verification from the local community", decryptedChallengeVerification);
928
- await this._handleIncomingChallengeVerificationPubsubMessage(import_commonjs.omit(decryptedChallengeVerification, ["comment", "commentUpdate"]));
933
+ await this._handleIncomingChallengeVerificationPubsubMessage(n$1(decryptedChallengeVerification, ["comment", "commentUpdate"]));
929
934
  }
930
935
  };
931
936
  community.on("challengeverification", communityChallengeVerificationListener);
@@ -1094,9 +1099,9 @@ var Comment = class extends Publication {
1094
1099
  const log = logger_default("pkc-js:comment:_initIpfsProps");
1095
1100
  this.raw.comment = props;
1096
1101
  this._initProps(props);
1097
- const unknownProps = import_commonjs.difference(import_commonjs.keys.strict(props), import_commonjs.keys.strict(CommentIpfsSchema.shape));
1102
+ const unknownProps = r(t$1(props), t$1(CommentIpfsSchema.shape));
1098
1103
  if (unknownProps.length > 0) {
1099
- const unknownPropsWithValues = import_commonjs.pick(props, unknownProps);
1104
+ const unknownPropsWithValues = t$4(props, unknownProps);
1100
1105
  log(`Found unknown props on loaded CommentIpfs (cid: ${this.cid})`, unknownPropsWithValues, "Full props:", props, "Will set them on the Comment instance");
1101
1106
  Object.assign(this, unknownPropsWithValues);
1102
1107
  }
@@ -1179,10 +1184,10 @@ var Comment = class extends Publication {
1179
1184
  const log = logger_default("pkc-js:comment:_initCommentUpdate");
1180
1185
  if ("depth" in props) {} else {
1181
1186
  this.raw.commentUpdate = props;
1182
- const unknownProps = import_commonjs.difference(import_commonjs.keys.strict(props), import_commonjs.keys.strict(CommentUpdateSchema.shape));
1187
+ const unknownProps = r(t$1(props), t$1(CommentUpdateSchema.shape));
1183
1188
  if (unknownProps.length > 0) {
1184
1189
  log("Found unknown props on CommentUpdate record", unknownProps, "Will set them on Comment instance");
1185
- Object.assign(this, import_commonjs.pick(props, unknownProps));
1190
+ Object.assign(this, t$4(props, unknownProps));
1186
1191
  }
1187
1192
  }
1188
1193
  this.upvoteCount = props.upvoteCount;
@@ -1237,7 +1242,7 @@ var Comment = class extends Publication {
1237
1242
  pageCids: {}
1238
1243
  });
1239
1244
  else if ("pages" in newReplies && newReplies.pages && "pageCids" in newReplies && newReplies.pageCids) {
1240
- if (!import_commonjs.isDeepEqual(this.replies.pageCids, newReplies.pageCids)) {
1245
+ if (!t$3(this.replies.pageCids, newReplies.pageCids)) {
1241
1246
  log.trace(`Updating the props of comment instance (${this.cid}) replies`);
1242
1247
  const parsedPages = parseRawPages(newReplies);
1243
1248
  this.replies.updateProps({
@@ -1251,10 +1256,9 @@ var Comment = class extends Publication {
1251
1256
  async _verifyChallengeVerificationCommentProps(decryptedVerification) {
1252
1257
  const log = logger_default("pkc-js:comment:publish:_verifyChallengeVerificationCommentProps");
1253
1258
  if (!this.raw.pubsubMessageToPublish) throw Error("comment._pubsubMsgToPublish should be defined at this point");
1254
- const keysToCompare = import_commonjs.keys.strict(import_commonjs.omit(this.raw.pubsubMessageToPublish, ["signature", "author"]));
1255
- const pubsubMsgFromCommentIpfs = import_commonjs.pick(decryptedVerification.comment, keysToCompare);
1256
- const pubsubMsgFromPublishedPubsubMsg = import_commonjs.pick(this.raw.pubsubMessageToPublish, keysToCompare);
1257
- if (!import_commonjs.isDeepEqual(pubsubMsgFromCommentIpfs, pubsubMsgFromPublishedPubsubMsg)) {
1259
+ const keysToCompare = t$1(n$1(this.raw.pubsubMessageToPublish, ["signature", "author"]));
1260
+ const pubsubMsgFromCommentIpfs = t$4(decryptedVerification.comment, keysToCompare);
1261
+ if (!t$3(pubsubMsgFromCommentIpfs, t$4(this.raw.pubsubMessageToPublish, keysToCompare))) {
1258
1262
  const error = new PKCError("ERR_COMMUNITY_CHANGED_COMMENT_PUBSUB_PUBLICATION_PROPS", {
1259
1263
  pubsubMsgFromSub: pubsubMsgFromCommentIpfs,
1260
1264
  originalPubsubMsg: this.raw.pubsubMessageToPublish
@@ -1356,10 +1360,10 @@ var Comment = class extends Publication {
1356
1360
  this.setCid(decryptedVerification.commentUpdate.cid);
1357
1361
  this._initIpfsProps(decryptedVerification.comment);
1358
1362
  this._initCommentUpdateFromChallengeVerificationProps(decryptedVerification.commentUpdate);
1359
- const unknownProps = import_commonjs.difference(import_commonjs.keys.strict(decryptedVerification.commentUpdate), import_commonjs.keys.strict(CommentUpdateForChallengeVerificationSchema.shape));
1363
+ const unknownProps = r(t$1(decryptedVerification.commentUpdate), t$1(CommentUpdateForChallengeVerificationSchema.shape));
1360
1364
  if (unknownProps.length > 0) {
1361
1365
  log("Found unknown props on decryptedVerification.commentUpdate record", unknownProps, "Will set them on Comment instance");
1362
- Object.assign(this, import_commonjs.pick(decryptedVerification.commentUpdate, unknownProps));
1366
+ Object.assign(this, t$4(decryptedVerification.commentUpdate, unknownProps));
1363
1367
  }
1364
1368
  this.emit("update", this);
1365
1369
  if (!this._pkc._pkcRpcClient) this._resolveAuthorNamesInBackground();
@@ -1551,7 +1555,7 @@ var Comment = class extends Publication {
1551
1555
  this.emit("updatingstatechange", this._updatingState);
1552
1556
  }
1553
1557
  _setRpcClientState(newState) {
1554
- const currentRpcUrl = import_commonjs.keys.strict(this.clients.pkcRpcClients)[0];
1558
+ const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
1555
1559
  if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
1556
1560
  this.clients.pkcRpcClients[currentRpcUrl].state = newState;
1557
1561
  this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
@@ -1783,7 +1787,7 @@ var Comment = class extends Publication {
1783
1787
  updatingCommentInstance.on("error", this._updatingCommentInstance.error);
1784
1788
  updatingCommentInstance.on("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
1785
1789
  updatingCommentInstance.on("statechange", this._updatingCommentInstance.statechange);
1786
- const clientKeys = import_commonjs.keys.strict(this.clients);
1790
+ const clientKeys = t$1(this.clients);
1787
1791
  for (const clientType of clientKeys) if (this.clients[clientType]) for (const clientUrl of Object.keys(this.clients[clientType])) this.clients[clientType][clientUrl].mirror(updatingCommentInstance.clients[clientType][clientUrl]);
1788
1792
  updatingCommentInstance._numOfListenersForUpdatingInstance++;
1789
1793
  this._useUpdatePropsFromUpdatingCommentIfPossible();
@@ -1841,7 +1845,7 @@ var Comment = class extends Publication {
1841
1845
  this._updatingCommentInstance.comment.removeListener("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
1842
1846
  this._updatingCommentInstance.comment.removeListener("update", this._updatingCommentInstance.update);
1843
1847
  this._updatingCommentInstance.comment.removeListener("error", this._updatingCommentInstance.error);
1844
- const clientKeys = import_commonjs.keys.strict(this.clients);
1848
+ const clientKeys = t$1(this.clients);
1845
1849
  for (const clientType of clientKeys) if (this.clients[clientType]) for (const clientUrl of Object.keys(this.clients[clientType])) this.clients[clientType][clientUrl].unmirror();
1846
1850
  this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance--;
1847
1851
  if (this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance === 0 && this._updatingCommentInstance.comment.state !== "stopped") {
@@ -2015,16 +2019,16 @@ var Stats = class {
2015
2019
  return 1 / (successAverageMs + 150) / (1 / (successAverageMs + 100) + 1 / 150) * .2 + (successCounts + .288) / (failureCounts * 2 + successCounts + 1) * .8;
2016
2020
  }
2017
2021
  async sortGatewaysAccordingToScore(type) {
2018
- const gatewayType = type === "ipfs" || type === "ipns" ? "ipfsGateways" : type === "pubsub-publish" || type === "pubsub-subscribe" ? import_commonjs.keys.strict(this._pkc.clients.pubsubKuboRpcClients).length > 0 ? "pubsubKuboRpcClients" : import_commonjs.keys.strict(this._pkc.clients.libp2pJsClients).length > 0 ? "libp2pJsClients" : void 0 : void 0;
2022
+ const gatewayType = type === "ipfs" || type === "ipns" ? "ipfsGateways" : type === "pubsub-publish" || type === "pubsub-subscribe" ? t$1(this._pkc.clients.pubsubKuboRpcClients).length > 0 ? "pubsubKuboRpcClients" : t$1(this._pkc.clients.libp2pJsClients).length > 0 ? "libp2pJsClients" : void 0 : void 0;
2019
2023
  assert(gatewayType, "Can't find the gateway type to sort");
2020
- const gateways = import_commonjs.keys.strict(this._pkc.clients[gatewayType]);
2024
+ const gateways = t$1(this._pkc.clients[gatewayType]);
2021
2025
  const score = async (gatewayUrl) => {
2022
2026
  const failureCounts = await this._pkc._storage.getItem(this._getFailuresCountKey(gatewayUrl, type)) || 0;
2023
2027
  const successCounts = await this._pkc._storage.getItem(this._getSuccessCountKey(gatewayUrl, type)) || 0;
2024
2028
  const successAverageMs = await this._pkc._storage.getItem(this._getSuccessAverageKey(gatewayUrl, type)) || 0;
2025
2029
  return this._gatewayScore(failureCounts, successCounts, successAverageMs);
2026
2030
  };
2027
- return import_commonjs.sortBy.strict(gateways, score);
2031
+ return t(gateways, score);
2028
2032
  }
2029
2033
  };
2030
2034
  //#endregion
@@ -6342,7 +6346,7 @@ var SqliteCache = class {
6342
6346
  key,
6343
6347
  now: now()
6344
6348
  });
6345
- if (!import_commonjs.isPlainObject(res) || !("value" in res)) return;
6349
+ if (!e(res) || !("value" in res)) return;
6346
6350
  let value = res.value;
6347
6351
  return import_cbor.default.decode(value);
6348
6352
  }
@@ -8564,7 +8568,7 @@ async function _setHttpRouterOptionsOnKuboNode(kuboClient, routingValue) {
8564
8568
  await _setProvideDhtSweepEnabledOnKuboNode(kuboClient, false);
8565
8569
  const endpointsBefore = Object.values(routingConfigBeforeChanging?.Routers || {}).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
8566
8570
  const endpointsAfter = Object.values(mergedRoutingValue.Routers).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
8567
- if (!import_commonjs.isDeepEqual(endpointsBefore.sort(), endpointsAfter.sort())) {
8571
+ if (!t$3(endpointsBefore.sort(), endpointsAfter.sort())) {
8568
8572
  log("Config on kubo node has been changed. PKC-js will send shutdown command to node", kuboClient._clientOptions.url, "Clients of pkc-js should restart ipfs node");
8569
8573
  const shutdownUrl = `${kuboClient._clientOptions.url}/shutdown`;
8570
8574
  try {
@@ -8851,8 +8855,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8851
8855
  _clientOptions: clientOptions,
8852
8856
  peers: async () => {
8853
8857
  const topics = await kuboRpcClient.pubsub.ls();
8854
- const topicPeers = import_commonjs.flattenDeep(await Promise.all(topics.map((topic) => kuboRpcClient.pubsub.peers(topic))));
8855
- return import_commonjs.unique(topicPeers.map((topicPeer) => topicPeer.toString()));
8858
+ return n$2(n$3(await Promise.all(topics.map((topic) => kuboRpcClient.pubsub.peers(topic)))).map((topicPeer) => topicPeer.toString()));
8856
8859
  },
8857
8860
  url: clientOptions.url.toString(),
8858
8861
  destroy: async () => {}
@@ -8863,7 +8866,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8863
8866
  this.clients.libp2pJsClients = {};
8864
8867
  if (!this.libp2pJsClientsOptions) return;
8865
8868
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
8866
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-C6vMsrJ-.js");
8869
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-h-rjuHh7.js");
8867
8870
  for (const clientOptions of this.libp2pJsClientsOptions) {
8868
8871
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
8869
8872
  ...clientOptions,
@@ -8956,7 +8959,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8956
8959
  }
8957
8960
  }
8958
8961
  async _initMissingFieldsOfPublicationBeforeSigning(pubOptions, log) {
8959
- const finalOptions = import_commonjs.clone(pubOptions);
8962
+ const finalOptions = t$5(pubOptions);
8960
8963
  if (!finalOptions.signer) throw Error("User did not provide a signer to create a local publication");
8961
8964
  let cleanedAuthor = cleanWireAuthor(normalizeCreatePublicationAuthor(finalOptions.author));
8962
8965
  if (cleanedAuthor) {
@@ -8964,7 +8967,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8964
8967
  const val = cleanedAuthor[key];
8965
8968
  if (typeof val === "object" && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) delete cleanedAuthor[key];
8966
8969
  }
8967
- if (import_commonjs.isEmpty(cleanedAuthor)) cleanedAuthor = void 0;
8970
+ if (e$1(cleanedAuthor)) cleanedAuthor = void 0;
8968
8971
  }
8969
8972
  const filledTimestamp = typeof finalOptions.timestamp !== "number" ? timestamp() : finalOptions.timestamp;
8970
8973
  const filledSigner = await this.createSigner(finalOptions.signer);
@@ -9028,7 +9031,7 @@ var PKC$1 = class extends PKCTypedEmitter {
9028
9031
  if (derivedCommunityAddress) commentInstance.setCommunityAddress(derivedCommunityAddress);
9029
9032
  if ("depth" in options) {
9030
9033
  if ("cid" in options) commentInstance.setCid(parseCidStringSchemaWithPKCErrorIfItFails(options.cid));
9031
- const commentIpfs = import_commonjs.omit(options, ["cid"]);
9034
+ const commentIpfs = n$1(options, ["cid"]);
9032
9035
  if (!("signature" in options)) Object.assign(commentInstance, options);
9033
9036
  else commentInstance._initIpfsProps(parseCommentIpfsSchemaWithPKCErrorIfItFails(commentIpfs));
9034
9037
  if (commentInstance.author?.nameResolved !== void 0) delete commentInstance.author.nameResolved;
@@ -9074,7 +9077,7 @@ var PKC$1 = class extends PKCTypedEmitter {
9074
9077
  }
9075
9078
  if (!community.raw.communityIpfs) {
9076
9079
  if (options.signature) {
9077
- const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(import_commonjs.pick(options, [...options.signature.signedPropertyNames, "signature"]));
9080
+ const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(t$4(options, [...options.signature.signedPropertyNames, "signature"]));
9078
9081
  if (resParseCommunityIpfs.success) {
9079
9082
  const cleanedRecord = removeUndefinedValuesRecursively(resParseCommunityIpfs.data);
9080
9083
  await community.initCommunityIpfsPropsNoMerge(cleanedRecord);
@@ -9111,7 +9114,7 @@ var PKC$1 = class extends PKCTypedEmitter {
9111
9114
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
9112
9115
  log.trace("Received community options to create a local community instance:", options);
9113
9116
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
9114
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-BoIoFZHk.js");
9117
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-DdDpaZqk.js");
9115
9118
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
9116
9119
  const community = new LocalCommunity(this);
9117
9120
  if (isLocalCommunity) {