@pkcprotocol/pkc-js 0.0.85 → 0.0.87

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 (53) hide show
  1. package/dist/browser/community/remote-community.d.ts +5 -0
  2. package/dist/browser/community/remote-community.js +98 -16
  3. package/dist/browser/community/remote-community.js.map +1 -1
  4. package/dist/browser/community/schema.js +5 -1
  5. package/dist/browser/community/schema.js.map +1 -1
  6. package/dist/browser/generated-version.d.ts +1 -1
  7. package/dist/browser/generated-version.js +1 -1
  8. package/dist/browser/pkc/tracked-instance-registry-util.d.ts +3 -4
  9. package/dist/browser/pkc/tracked-instance-registry-util.js +43 -14
  10. package/dist/browser/pkc/tracked-instance-registry-util.js.map +1 -1
  11. package/dist/browser/runtime/node/community/local-community/db-state.js +5 -6
  12. package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
  13. package/dist/browser/runtime/node/community/local-community/editing.js +4 -4
  14. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  15. package/dist/browser/runtime/node/community/local-community/lifecycle.js +6 -6
  16. package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
  17. package/dist/browser/runtime/node/community/local-community/registry.d.ts +14 -1
  18. package/dist/browser/runtime/node/community/local-community/registry.js +37 -0
  19. package/dist/browser/runtime/node/community/local-community/registry.js.map +1 -1
  20. package/dist/browser/runtime/node/util.js +2 -5
  21. package/dist/browser/runtime/node/util.js.map +1 -1
  22. package/dist/bundled/bundle-manifest.json +25 -25
  23. package/dist/bundled/chunks/{helia-for-pkc-C5Oe_ZSx.js → helia-for-pkc-CjrfyXsA.js} +2 -2
  24. package/dist/bundled/chunks/{local-community-BqxmCg5p.js → local-community-Ba5iR3bD.js} +37 -26
  25. package/dist/bundled/chunks/{local-community-D4SjlAKS.js → local-community-DbfQyZow.js} +1 -1
  26. package/dist/bundled/chunks/{node-C2DKW30L.js → node-gCrky-14.js} +5 -5
  27. package/dist/bundled/chunks/{rpc-local-community-o0teUvw_.js → rpc-local-community-BYd-0Aw4.js} +46 -25
  28. package/dist/bundled/chunks/{schema-qhSDu1BU.js → schema-0b9XHoqX.js} +27 -16
  29. package/dist/bundled/chunks/{util-BVGNNIgn.js → util-CvgcZ9iH.js} +1 -1
  30. package/dist/bundled/index.js +1 -1
  31. package/dist/bundled/rpc/src/index.js +4 -4
  32. package/dist/node/community/remote-community.d.ts +5 -0
  33. package/dist/node/community/remote-community.js +98 -16
  34. package/dist/node/community/remote-community.js.map +1 -1
  35. package/dist/node/community/schema.js +5 -1
  36. package/dist/node/community/schema.js.map +1 -1
  37. package/dist/node/generated-version.d.ts +1 -1
  38. package/dist/node/generated-version.js +1 -1
  39. package/dist/node/pkc/tracked-instance-registry-util.d.ts +3 -4
  40. package/dist/node/pkc/tracked-instance-registry-util.js +43 -14
  41. package/dist/node/pkc/tracked-instance-registry-util.js.map +1 -1
  42. package/dist/node/runtime/node/community/local-community/db-state.js +5 -6
  43. package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
  44. package/dist/node/runtime/node/community/local-community/editing.js +4 -4
  45. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  46. package/dist/node/runtime/node/community/local-community/lifecycle.js +6 -6
  47. package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
  48. package/dist/node/runtime/node/community/local-community/registry.d.ts +14 -1
  49. package/dist/node/runtime/node/community/local-community/registry.js +37 -0
  50. package/dist/node/runtime/node/community/local-community/registry.js.map +1 -1
  51. package/dist/node/runtime/node/util.js +2 -5
  52. package/dist/node/runtime/node/util.js.map +1 -1
  53. package/package.json +5 -5
@@ -14,7 +14,7 @@
14
14
  "node:module"
15
15
  ],
16
16
  "dynamicImports": [
17
- "chunks/node-C2DKW30L.js"
17
+ "chunks/node-gCrky-14.js"
18
18
  ],
19
19
  "inputs": [
20
20
  "dist/node/runtime/node/compile-cache.js",
@@ -24,7 +24,7 @@
24
24
  "index.js": {
25
25
  "isEntry": true,
26
26
  "imports": [
27
- "chunks/node-C2DKW30L.js"
27
+ "chunks/node-gCrky-14.js"
28
28
  ],
29
29
  "dynamicImports": [],
30
30
  "inputs": []
@@ -32,10 +32,10 @@
32
32
  "rpc/src/index.js": {
33
33
  "isEntry": true,
34
34
  "imports": [
35
- "chunks/rpc-local-community-o0teUvw_.js",
36
- "chunks/node-C2DKW30L.js",
37
- "chunks/schema-qhSDu1BU.js",
38
- "chunks/local-community-BqxmCg5p.js",
35
+ "chunks/rpc-local-community-BYd-0Aw4.js",
36
+ "chunks/node-gCrky-14.js",
37
+ "chunks/schema-0b9XHoqX.js",
38
+ "chunks/local-community-Ba5iR3bD.js",
39
39
  "node:url",
40
40
  "path",
41
41
  "assert",
@@ -65,12 +65,12 @@
65
65
  "\u0000rolldown/runtime.js"
66
66
  ]
67
67
  },
68
- "chunks/helia-for-pkc-C5Oe_ZSx.js": {
68
+ "chunks/helia-for-pkc-CjrfyXsA.js": {
69
69
  "isEntry": false,
70
70
  "imports": [
71
71
  "chunks/chunk-2rV9d50f.js",
72
- "chunks/schema-qhSDu1BU.js",
73
- "chunks/util-BVGNNIgn.js",
72
+ "chunks/schema-0b9XHoqX.js",
73
+ "chunks/util-CvgcZ9iH.js",
74
74
  "chunks/src-DKntVmyX.js",
75
75
  "chunks/src-Cpx2Sts8.js",
76
76
  "node:url",
@@ -186,12 +186,12 @@
186
186
  "dist/node/helia/helia-for-pkc.js"
187
187
  ]
188
188
  },
189
- "chunks/local-community-BqxmCg5p.js": {
189
+ "chunks/local-community-Ba5iR3bD.js": {
190
190
  "isEntry": false,
191
191
  "imports": [
192
192
  "chunks/chunk-2rV9d50f.js",
193
- "chunks/rpc-local-community-o0teUvw_.js",
194
- "chunks/schema-qhSDu1BU.js",
193
+ "chunks/rpc-local-community-BYd-0Aw4.js",
194
+ "chunks/schema-0b9XHoqX.js",
195
195
  "node:crypto",
196
196
  "node:url",
197
197
  "node:path",
@@ -248,21 +248,21 @@
248
248
  "dist/node/runtime/node/community/local-community.js"
249
249
  ]
250
250
  },
251
- "chunks/local-community-D4SjlAKS.js": {
251
+ "chunks/local-community-DbfQyZow.js": {
252
252
  "isEntry": false,
253
253
  "imports": [
254
- "chunks/local-community-BqxmCg5p.js"
254
+ "chunks/local-community-Ba5iR3bD.js"
255
255
  ],
256
256
  "dynamicImports": [],
257
257
  "inputs": []
258
258
  },
259
- "chunks/node-C2DKW30L.js": {
259
+ "chunks/node-gCrky-14.js": {
260
260
  "isEntry": false,
261
261
  "imports": [
262
262
  "chunks/chunk-2rV9d50f.js",
263
- "chunks/rpc-local-community-o0teUvw_.js",
264
- "chunks/schema-qhSDu1BU.js",
265
- "chunks/util-BVGNNIgn.js",
263
+ "chunks/rpc-local-community-BYd-0Aw4.js",
264
+ "chunks/schema-0b9XHoqX.js",
265
+ "chunks/util-CvgcZ9iH.js",
266
266
  "path",
267
267
  "assert",
268
268
  "fs",
@@ -273,8 +273,8 @@
273
273
  "rpc-websockets"
274
274
  ],
275
275
  "dynamicImports": [
276
- "chunks/helia-for-pkc-C5Oe_ZSx.js",
277
- "chunks/local-community-BqxmCg5p.js"
276
+ "chunks/helia-for-pkc-CjrfyXsA.js",
277
+ "chunks/local-community-Ba5iR3bD.js"
278
278
  ],
279
279
  "inputs": [
280
280
  "node_modules/zod/v4/locales/en.js",
@@ -316,11 +316,11 @@
316
316
  "dist/node/index.js"
317
317
  ]
318
318
  },
319
- "chunks/rpc-local-community-o0teUvw_.js": {
319
+ "chunks/rpc-local-community-BYd-0Aw4.js": {
320
320
  "isEntry": false,
321
321
  "imports": [
322
322
  "chunks/chunk-2rV9d50f.js",
323
- "chunks/schema-qhSDu1BU.js",
323
+ "chunks/schema-0b9XHoqX.js",
324
324
  "chunks/src-CYIMjhjK.js",
325
325
  "node:crypto",
326
326
  "node:url",
@@ -874,7 +874,7 @@
874
874
  "dist/node/community/rpc-local-community.js"
875
875
  ]
876
876
  },
877
- "chunks/schema-qhSDu1BU.js": {
877
+ "chunks/schema-0b9XHoqX.js": {
878
878
  "isEntry": false,
879
879
  "imports": [
880
880
  "chunks/chunk-2rV9d50f.js",
@@ -1327,10 +1327,10 @@
1327
1327
  "node_modules/kubo-rpc-client/dist/src/index.js"
1328
1328
  ]
1329
1329
  },
1330
- "chunks/util-BVGNNIgn.js": {
1330
+ "chunks/util-CvgcZ9iH.js": {
1331
1331
  "isEntry": false,
1332
1332
  "imports": [
1333
- "chunks/schema-qhSDu1BU.js",
1333
+ "chunks/schema-0b9XHoqX.js",
1334
1334
  "ipns/selector",
1335
1335
  "uint8arrays/equals"
1336
1336
  ],
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, Sr as logger_default, br as PKCError } from "./schema-qhSDu1BU.js";
3
- import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-BVGNNIgn.js";
2
+ import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, Sr as logger_default, br as PKCError } from "./schema-0b9XHoqX.js";
3
+ import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-CvgcZ9iH.js";
4
4
  import { t as map } from "./src-Cpx2Sts8.js";
5
5
  import { t as parallelBatch } from "./src-DKntVmyX.js";
6
6
  import { fileURLToPath } from "node:url";
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as pubsubTopicToDhtKey, $n as n$4, Bn as CommentEditReservedFields, C as contentContainsMarkdownAudio, Ct as findStartedCommunity, F as getIpnsRecordInLocalKuboNode, Fr as ZodError, Ft as untrackStartedCommunity, G as isLinkOfAudio, Hn as CommentEditsTableRowSchema, Ht as CommunityEditPublicationPubsubReservedFields, J as isLinkOfVideo, Jt as CommentModerationReservedFields, K as isLinkOfImage, Kn as AuthorReservedFields, L as hideClassPrivateProps, Lt as untrackUpdatingCommunity, M as genToArray, Mn as CommentsTableRowSchema, Mt as trackStartedCommunity, N as getEquivalentCommunityAddresses, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Pt as trackUpdatingCommunity, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditPubsubMessagePublicationSchema, Rt as require_sha256, S as calculateStringSizeSameAsIpfsAddCidV0, Sn as CommentPubsubMessageReservedFields, Sr as logger_default, St as findCommunityInRegistry, T as contentContainsMarkdownVideos, Tt as findUpdatingCommunity, W as isLinkOfAnimatedImage, Xt as CommentModerationsTableRowSchema, Y as isLinkValid, _t as statMfsPathSafely, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, at as removeMfsFilesSafely, b as areEquivalentCommunityAddresses, br as PKCError, cr as t$4, d as DecryptedChallengeRequestSchema, dr as t$5, dt as retryKuboBlockPutPinAndProvidePubsubTopic, er as t$8, fr as t$3, gn as VotePubsubReservedFields, gt as sleepUntilTimeoutOrAbort, hn as VotePubsubMessagePublicationSchema, ir as e, it as removeBlocksFromKuboNode, jn as CommentUpdateTableRowSchema, jt as syncCommunityRegistryEntry, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, mr as require_retry, nr as t$7, on as CommunitySignedPropertyNames, pt as retryKuboIpfsAddAndProvide, q as isLinkOfMedia, qt as CommentModerationPubsubMessagePublicationSchema, r as ChallengeMessageSchema, rr as t$6, s as ChallengeVerificationMessageSchema, sr as r$1, st as removeNullUndefinedValues, t as ChallengeAnswerMessageSchema, tr as n$3, u as DecryptedChallengeRequestPublicationSchema, vn as VoteTablesRowSchema, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, xt as writeKuboFilesWithTimeout, y as version_default, yt as timestamp, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-qhSDu1BU.js";
3
- import { $t as getPublicKeyFromPrivateKey, A as deriveDbPosts, At as verifyCommentIpfs, Bt as getAuthorNameFromWire, C as BackupAbortError, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Dt as verifyChallengeRequest, E as calculateInlineRepliesBudget, En as parseJsonWithPKCErrorIfFails, F as importSignerIntoKuboNode, Ft as verifyCommunityEdit, G as REPLY_REPLIES_SORT_TYPES, Gt as getCommunityPublicKeyFromWire, It as verifyVote, Jt as encode, K as TIMEFRAMES_TO_SECONDS, Lt as buildRuntimeAuthor, M as getDefaultCommunityDbConfig, Mt as verifyCommentPubsubMessage, Nt as verifyCommentUpdate, O as deleteOldCommunityInWindows, P as getThumbnailPropsOfLink, Pt as verifyCommunity, Qt as getPKCAddressFromPublicKeySync, R as moveCommunityDbToDeletedDirectory, Rt as cleanWireAuthor, S as encryptEd25519AesGcmPublicKeyBuffer, St as signCommunity, T as calculateExpectedSignatureSize, Tt as verifyChallengeAnswer, U as POSTS_SORT_TYPES, W as POST_REPLIES_SORT_TYPES, Wt as getCommunityNameFromWire, Xt as getIpfsKeyFromPrivateKey, Z as iterateOverPageCidsToFindAllCids, Zt as getPKCAddressFromPublicKey, _t as signComment, a as loadChallengeFileFromCommunityChallengeSettings, ar as t$11, b as decryptEd25519AesGcmPublicKeyBuffer, bt as signCommentUpdate, c as LRUCache, d as KeyvBetterSqlite3, dn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, dr as STORAGE_KEYS, en as createSchemaRowParser, er as crosspostChainDepthUpTo, fr as require_lodash_merge, ft as cleanUpBeforePublishing, g as SignerWithPublicKeyAddress, gt as signChallengeVerification, i as getCommunityChallengeFromCommunityChallengeSettings, ir as r$2, j as deriveDbReplies, jt as verifyCommentModeration, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommentEdit, lr as t$10, lt as pLimit, mt as signChallengeMessage, nr as t$9, o as pkcJsChallenges, or as n$6, pn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, qt as decode, r as getChallengeVerification, rr as t$12, s as TrackedInstanceRegistry, sr as n$5, t as RpcLocalCommunity, tr as effectiveMaxCrosspostDepth, u as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, ur as stringify, vt as signCommentEdit, w as backupCommunityDb, xt as signCommentUpdateForChallengeVerification, z as resolveDbPostsCidRefs } from "./rpc-local-community-o0teUvw_.js";
2
+ import { $ as pubsubTopicToDhtKey, $n as n$4, Bn as CommentEditReservedFields, C as contentContainsMarkdownAudio, Ct as findStartedCommunity, F as getIpnsRecordInLocalKuboNode, Fr as ZodError, Ft as untrackStartedCommunity, G as isLinkOfAudio, Hn as CommentEditsTableRowSchema, Ht as CommunityEditPublicationPubsubReservedFields, J as isLinkOfVideo, Jt as CommentModerationReservedFields, K as isLinkOfImage, Kn as AuthorReservedFields, L as hideClassPrivateProps, Lt as untrackUpdatingCommunity, M as genToArray, Mn as CommentsTableRowSchema, Mt as trackStartedCommunity, N as getEquivalentCommunityAddresses, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Pt as trackUpdatingCommunity, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditPubsubMessagePublicationSchema, Rt as require_sha256, S as calculateStringSizeSameAsIpfsAddCidV0, Sn as CommentPubsubMessageReservedFields, Sr as logger_default, St as findCommunityInRegistry, T as contentContainsMarkdownVideos, Tt as findUpdatingCommunity, W as isLinkOfAnimatedImage, Xt as CommentModerationsTableRowSchema, Y as isLinkValid, _t as statMfsPathSafely, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, at as removeMfsFilesSafely, b as areEquivalentCommunityAddresses, br as PKCError, cr as t$4, d as DecryptedChallengeRequestSchema, dr as t$5, dt as retryKuboBlockPutPinAndProvidePubsubTopic, er as t$8, fr as t$3, gn as VotePubsubReservedFields, gt as sleepUntilTimeoutOrAbort, hn as VotePubsubMessagePublicationSchema, ir as e, it as removeBlocksFromKuboNode, jn as CommentUpdateTableRowSchema, jt as syncCommunityRegistryEntry, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, mr as require_retry, nr as t$7, on as CommunitySignedPropertyNames, pt as retryKuboIpfsAddAndProvide, q as isLinkOfMedia, qt as CommentModerationPubsubMessagePublicationSchema, r as ChallengeMessageSchema, rr as t$6, s as ChallengeVerificationMessageSchema, sr as r$1, st as removeNullUndefinedValues, t as ChallengeAnswerMessageSchema, tr as n$3, u as DecryptedChallengeRequestPublicationSchema, vn as VoteTablesRowSchema, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, xt as writeKuboFilesWithTimeout, y as version_default, yt as timestamp, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-0b9XHoqX.js";
3
+ import { $t as getPublicKeyFromPrivateKey, A as deriveDbPosts, At as verifyCommentIpfs, Bt as getAuthorNameFromWire, C as BackupAbortError, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Dt as verifyChallengeRequest, E as calculateInlineRepliesBudget, En as parseJsonWithPKCErrorIfFails, F as importSignerIntoKuboNode, Ft as verifyCommunityEdit, G as REPLY_REPLIES_SORT_TYPES, Gt as getCommunityPublicKeyFromWire, It as verifyVote, Jt as encode, K as TIMEFRAMES_TO_SECONDS, Lt as buildRuntimeAuthor, M as getDefaultCommunityDbConfig, Mt as verifyCommentPubsubMessage, Nt as verifyCommentUpdate, O as deleteOldCommunityInWindows, P as getThumbnailPropsOfLink, Pt as verifyCommunity, Qt as getPKCAddressFromPublicKeySync, R as moveCommunityDbToDeletedDirectory, Rt as cleanWireAuthor, S as encryptEd25519AesGcmPublicKeyBuffer, St as signCommunity, T as calculateExpectedSignatureSize, Tt as verifyChallengeAnswer, U as POSTS_SORT_TYPES, W as POST_REPLIES_SORT_TYPES, Wt as getCommunityNameFromWire, Xt as getIpfsKeyFromPrivateKey, Z as iterateOverPageCidsToFindAllCids, Zt as getPKCAddressFromPublicKey, _t as signComment, a as loadChallengeFileFromCommunityChallengeSettings, ar as t$11, b as decryptEd25519AesGcmPublicKeyBuffer, bt as signCommentUpdate, c as LRUCache, d as KeyvBetterSqlite3, dn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, dr as STORAGE_KEYS, en as createSchemaRowParser, er as crosspostChainDepthUpTo, fr as require_lodash_merge, ft as cleanUpBeforePublishing, g as SignerWithPublicKeyAddress, gt as signChallengeVerification, i as getCommunityChallengeFromCommunityChallengeSettings, ir as r$2, j as deriveDbReplies, jt as verifyCommentModeration, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommentEdit, lr as t$10, lt as pLimit, mt as signChallengeMessage, nr as t$9, o as pkcJsChallenges, or as n$6, pn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, qt as decode, r as getChallengeVerification, rr as t$12, s as TrackedInstanceRegistry, sr as n$5, t as RpcLocalCommunity, tr as effectiveMaxCrosspostDepth, u as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, ur as stringify, vt as signCommentEdit, w as backupCommunityDb, xt as signCommentUpdateForChallengeVerification, z as resolveDbPostsCidRefs } from "./rpc-local-community-BYd-0Aw4.js";
4
4
  import { randomFillSync, randomUUID } from "node:crypto";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import Path from "node:path";
@@ -1812,6 +1812,32 @@ async function throwIfChallengeSettingsAreInvalid({ challengeSettings, pkc, comm
1812
1812
  //#endregion
1813
1813
  //#region dist/node/runtime/node/community/local-community/registry.js
1814
1814
  const processStartedCommunities = new TrackedInstanceRegistry();
1815
+ function normalizeRegistryDataPath(dataPath) {
1816
+ if (dataPath === void 0) return void 0;
1817
+ const resolved = path.resolve(dataPath);
1818
+ let existing = resolved;
1819
+ let tail = "";
1820
+ while (true) try {
1821
+ return path.join(fs.realpathSync.native(existing), tail);
1822
+ } catch {
1823
+ const parent = path.dirname(existing);
1824
+ if (parent === existing) return resolved;
1825
+ tail = path.join(path.basename(existing), tail);
1826
+ existing = parent;
1827
+ }
1828
+ }
1829
+ function getLookup(community) {
1830
+ return {
1831
+ publicKey: community.publicKey,
1832
+ name: community.name
1833
+ };
1834
+ }
1835
+ function findProcessStartedCommunity(community) {
1836
+ return findCommunityInRegistry(processStartedCommunities, getLookup(community), normalizeRegistryDataPath(community._pkc.dataPath));
1837
+ }
1838
+ function syncProcessStartedCommunity(community) {
1839
+ syncCommunityRegistryEntry(processStartedCommunities, community, normalizeRegistryDataPath(community._pkc.dataPath));
1840
+ }
1815
1841
  //#endregion
1816
1842
  //#region node_modules/graceful-fs/polyfills.js
1817
1843
  var require_polyfills = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -6081,10 +6107,7 @@ async function updateInstancePropsWithStartedCommunityOrDb(community) {
6081
6107
  const startedCommunity = findStartedCommunity(community._pkc, {
6082
6108
  publicKey: community.publicKey,
6083
6109
  name: community.name
6084
- }) || findCommunityInRegistry(processStartedCommunities, {
6085
- publicKey: community.publicKey,
6086
- name: community.name
6087
- });
6110
+ }) || findProcessStartedCommunity(community);
6088
6111
  if (startedCommunity) {
6089
6112
  log("Loading local community", community.address, "from started community instance");
6090
6113
  if (startedCommunity.updatedAt) await community.initInternalCommunityAfterFirstUpdateNoMerge(startedCommunity.toJSONInternalAfterFirstUpdate());
@@ -6236,7 +6259,7 @@ async function initInternalCommunityAfterFirstUpdateNoMerge(community, newProps)
6236
6259
  if (Array.isArray(newProps._cidsToUnPin)) newProps._cidsToUnPin.forEach((cid) => community._cidsToUnPin.add(cid));
6237
6260
  if (Array.isArray(newProps._mfsPathsToRemove)) newProps._mfsPathsToRemove.forEach((path) => community._mfsPathsToRemove.add(path));
6238
6261
  community._updateIpnsPubsubPropsIfNeeded(newProps);
6239
- if (processStartedCommunities.has(community)) syncCommunityRegistryEntry(processStartedCommunities, community);
6262
+ if (processStartedCommunities.has(community)) syncProcessStartedCommunity(community);
6240
6263
  if (community.updateCid) community.raw.localCommunity = community.toJSONInternalRpcAfterFirstUpdate();
6241
6264
  }
6242
6265
  async function initInternalCommunityBeforeFirstUpdateNoMerge(community, newProps) {
@@ -6258,7 +6281,7 @@ async function initInternalCommunityBeforeFirstUpdateNoMerge(community, newProps
6258
6281
  await initSignerProps(community, newProps.signer);
6259
6282
  community._internalStateUpdateId = newProps._internalStateUpdateId;
6260
6283
  community._updateIpnsPubsubPropsIfNeeded(newProps);
6261
- if (processStartedCommunities.has(community)) syncCommunityRegistryEntry(processStartedCommunities, community);
6284
+ if (processStartedCommunities.has(community)) syncProcessStartedCommunity(community);
6262
6285
  community.raw.localCommunity = community.toJSONInternalRpcBeforeFirstUpdate();
6263
6286
  }
6264
6287
  async function initDbHandlerIfNeeded(community) {
@@ -6745,10 +6768,7 @@ async function start(community) {
6745
6768
  if (community.started || findStartedCommunity(community._pkc, {
6746
6769
  publicKey: community.publicKey,
6747
6770
  name: community.name
6748
- }) || findCommunityInRegistry(processStartedCommunities, {
6749
- publicKey: community.publicKey,
6750
- name: community.name
6751
- })) throw new PKCError("ERR_COMMUNITY_ALREADY_STARTED", { address: community.address });
6771
+ }) || findProcessStartedCommunity(community)) throw new PKCError("ERR_COMMUNITY_ALREADY_STARTED", { address: community.address });
6752
6772
  try {
6753
6773
  await initBeforeStarting(community);
6754
6774
  if (community.anchor && !getPersistedAnchorRecordBytes(community)) throw new PKCError("ERR_DELEGATED_COMMUNITY_HAS_NO_ANCHOR_RECORD", {
@@ -6760,7 +6780,7 @@ async function start(community) {
6760
6780
  await community._updateStartedValue();
6761
6781
  await community._dbHandler.lockCommunityStart();
6762
6782
  trackStartedCommunity(community._pkc, community);
6763
- syncCommunityRegistryEntry(processStartedCommunities, community);
6783
+ syncProcessStartedCommunity(community);
6764
6784
  await community._updateStartedValue();
6765
6785
  await community._dbHandler.initDbIfNeeded();
6766
6786
  await community._dbHandler.createOrMigrateTablesIfNeeded();
@@ -6864,10 +6884,7 @@ async function updateOnce(community) {
6864
6884
  const startedCommunity = findStartedCommunity(community._pkc, {
6865
6885
  publicKey: community.publicKey,
6866
6886
  name: community.name
6867
- }) || findCommunityInRegistry(processStartedCommunities, {
6868
- publicKey: community.publicKey,
6869
- name: community.name
6870
- });
6887
+ }) || findProcessStartedCommunity(community);
6871
6888
  if (community._mirroredStartedOrUpdatingCommunity) return;
6872
6889
  else if (startedCommunity) {
6873
6890
  await initMirroringStartedOrUpdatingCommunity(community, startedCommunity);
@@ -6994,10 +7011,7 @@ async function deleteCommunity(community) {
6994
7011
  const startedCommunity = findStartedCommunity(community._pkc, {
6995
7012
  publicKey: community.publicKey,
6996
7013
  name: community.name
6997
- }) || findCommunityInRegistry(processStartedCommunities, {
6998
- publicKey: community.publicKey,
6999
- name: community.name
7000
- });
7014
+ }) || findProcessStartedCommunity(community);
7001
7015
  if (startedCommunity && startedCommunity !== community) {
7002
7016
  await startedCommunity.delete();
7003
7017
  await community.stop();
@@ -7149,7 +7163,7 @@ async function editPropsOnStartedCommunity(community, parsedEditOptions) {
7149
7163
  community.emit("update", community);
7150
7164
  if (community.address !== oldAddress) {
7151
7165
  trackStartedCommunity(community._pkc, community);
7152
- syncCommunityRegistryEntry(processStartedCommunities, community);
7166
+ syncProcessStartedCommunity(community);
7153
7167
  }
7154
7168
  return community;
7155
7169
  }
@@ -7179,10 +7193,7 @@ async function edit(community, newCommunityOptions) {
7179
7193
  const startedCommunity = findStartedCommunity(community._pkc, {
7180
7194
  publicKey: community.publicKey,
7181
7195
  name: community.name
7182
- }) || findCommunityInRegistry(processStartedCommunities, {
7183
- publicKey: community.publicKey,
7184
- name: community.name
7185
- });
7196
+ }) || findProcessStartedCommunity(community);
7186
7197
  if (startedCommunity && community.state !== "started") {
7187
7198
  const editRes = await startedCommunity.edit(newCommunityOptions);
7188
7199
  community.setAddress(editRes.address);
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-BqxmCg5p.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-Ba5iR3bD.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 { $n as n$2, B as isIpfsCid, Bt as pTimeout, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dt as listUpdatingComments, E as createAbortError, En as CommentUpdateForChallengeVerificationSchema, Et as listStartedCommunities, H as isIpns, Ir as joinValues, It as untrackUpdatingComment, L as hideClassPrivateProps, Lr as parsedType, Nt as trackUpdatingComment, Ot as listUpdatingCommunities, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rr as stringifyPrimitive, Rt as require_sha256, Sr as logger_default, Tr as setErrorMap, Tt as findUpdatingCommunity, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, b as areEquivalentCommunityAddresses, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ct as removeUndefinedValuesRecursively, dn as PubsubTopicSchema, en as CommunityAnchorSchema, ft as retryKuboIpfsAdd, gt as sleepUntilTimeoutOrAbort, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, ir as e, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kt as refreshTrackedCommentAliases, lt as replaceXWithY, mr as require_retry, mt as shortifyAddress, nt as rejectWhenAbortSignalFires, r as ChallengeMessageSchema, rr as t$1, rt as rejectWhenCommunityStopsOrAborts, s as ChallengeVerificationMessageSchema, sr as r, t as ChallengeAnswerMessageSchema, tr as n$1, ut as resolveWhenPredicateIsTrue, vt as throwIfAbortSignalAborted, wt as findUpdatingComment, xn as CommentIpfsSchema, xr as messages, y as version_default, yt as timestamp, z as isAbortError, zt as TimeoutError } from "./schema-qhSDu1BU.js";
3
- import { $ as RepliesPages, $n as RpcUnsubscribeParamSchema, An as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, At as verifyCommentIpfs, B as setNativeFunctions$1, Bn as RpcEditCommunityParamSchema, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Ct as signCommunityEdit, D as createKuboRpcClient, Dn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, En as parseJsonWithPKCErrorIfFails, Et as verifyChallengeMessage, Fn as RpcCancelExportParamSchema, Ft as verifyCommunityEdit, Gn as RpcFetchCidParamSchema, Gt as getCommunityPublicKeyFromWire, H as CommentClientsManager, Hn as RpcExportCommunityModLogsResultSchema, Ht as buildRuntimeCommunityFields, I as listCommunitiesSync, In as RpcCidParamSchema, It as verifyVote, Jn as RpcPublishChallengeAnswersParamSchema, Kn as RpcFetchCidResultSchema, Kt as normalizeCommunityInputFromCommunity, L as monitorCommunitiesDirectory, Ln as RpcCommentRepliesPageParamSchema, Lt as buildRuntimeAuthor, Mn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Mt as verifyCommentPubsubMessage, N as getDefaultDataPath, Nn as RpcAnchorPublishPreparationResultSchema, Nt as verifyCommentUpdate, On as parseRpcCommentEventWithPKCErrorIfItFails, Ot as verifyChallengeVerification, Pn as RpcAuthorNameParamSchema, Q as parseRawPages, Qn as RpcSuccessResultSchema, Qt as getPKCAddressFromPublicKeySync, Rn as RpcCommunityIdentifierParamSchema, Rt as cleanWireAuthor, Sn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, Tn as parseDecryptedChallengeWithPKCErrorIfItFails, Un as RpcExportCommunityParamSchema, Ut as getCommunityAddressFromRecord, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcExportCommunityModLogsParamSchema, Vt as normalizeCreatePublicationAuthor, Wn as RpcExportCommunityResultSchema, Wt as getCommunityNameFromWire, X as findCommentInPageInstanceRecursively, Xn as RpcResolveAuthorNameResultSchema, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as RpcPublishedAnchorRecordResultSchema, Yt as getBufferedPKCAddressFromPublicKey, Zn as RpcSubscriptionIdResultSchema, _ as createSigner, _n as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, _t as signComment, an as parseCommentIpfsSchemaWithPKCErrorIfItFails, ar as t$3, at as PublicationClientsManager, bn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, c as LRUCache, cn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, cr as t$2, d as KeyvBetterSqlite3, dt as require_lib$1, et as applyNameResolvedCacheToCrosspost, f as decodeRpcChallengeAnswerPubsubMsg, fn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ft as cleanUpBeforePublishing, gn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeVerificationPubsubMsg, hn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ht as signChallengeRequest, in as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as stripNameResolvedFromCrosspost, jt as verifyCommentModeration, kn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, kt as verifyCommentEdit, l as RemoteCommunity, ln as parseCommunityAddressWithPKCErrorIfItFails, lr as t$5, m as decodeRpcChallengeRequestPubsubMsg, mn as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, mr as require_undici, n as RpcRemoteCommunity, nr as t$4, nt as collectCrosspostAuthorsToResolve, o as pkcJsChallenges, or as n$3, ot as PKCClientsManager, p as decodeRpcChallengePubsubMsg, pr as nativeFunctions$2, pt as signChallengeAnswer, qn as RpcPublishAnchorRecordParamSchema, qt as decode, s as TrackedInstanceRegistry, sn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as InflightFetchManager, t as RpcLocalCommunity, tn as parseCidStringSchemaWithPKCErrorIfItFails, tt as cloneCrosspostForRuntime, ut as PKCTypedEmitter, v as createAnchorIpnsRecord$1, vt as signCommentEdit, wn as parseDecryptedChallengeVerification, wt as signVote, x as encryptEd25519AesGcm, xn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as decryptEd25519AesGcm, yt as signCommentModeration, zn as RpcCommunityPageParamSchema, zt as getAuthorNameFromRuntime } from "./rpc-local-community-o0teUvw_.js";
4
- import { o as getHeliaDebugContext } from "./util-BVGNNIgn.js";
2
+ import { $n as n$2, B as isIpfsCid, Bt as pTimeout, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dt as listUpdatingComments, E as createAbortError, En as CommentUpdateForChallengeVerificationSchema, Et as listStartedCommunities, H as isIpns, Ir as joinValues, It as untrackUpdatingComment, L as hideClassPrivateProps, Lr as parsedType, Nt as trackUpdatingComment, Ot as listUpdatingCommunities, Q as isStringDomain, R as ipnsNameToIpnsOverPubsubTopic, Rr as stringifyPrimitive, Rt as require_sha256, Sr as logger_default, Tr as setErrorMap, Tt as findUpdatingCommunity, a as ChallengeRequestMessageSchema, an as CommunityIpfsSchema, ar as e$1, b as areEquivalentCommunityAddresses, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, ct as removeUndefinedValuesRecursively, dn as PubsubTopicSchema, en as CommunityAnchorSchema, ft as retryKuboIpfsAdd, gt as sleepUntilTimeoutOrAbort, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, ir as e, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kt as refreshTrackedCommentAliases, lt as replaceXWithY, mr as require_retry, mt as shortifyAddress, nt as rejectWhenAbortSignalFires, r as ChallengeMessageSchema, rr as t$1, rt as rejectWhenCommunityStopsOrAborts, s as ChallengeVerificationMessageSchema, sr as r, t as ChallengeAnswerMessageSchema, tr as n$1, ut as resolveWhenPredicateIsTrue, vt as throwIfAbortSignalAborted, wt as findUpdatingComment, xn as CommentIpfsSchema, xr as messages, y as version_default, yt as timestamp, z as isAbortError, zt as TimeoutError } from "./schema-0b9XHoqX.js";
3
+ import { $ as RepliesPages, $n as RpcUnsubscribeParamSchema, An as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, At as verifyCommentIpfs, B as setNativeFunctions$1, Bn as RpcEditCommunityParamSchema, Cn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Ct as signCommunityEdit, D as createKuboRpcClient, Dn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, En as parseJsonWithPKCErrorIfFails, Et as verifyChallengeMessage, Fn as RpcCancelExportParamSchema, Ft as verifyCommunityEdit, Gn as RpcFetchCidParamSchema, Gt as getCommunityPublicKeyFromWire, H as CommentClientsManager, Hn as RpcExportCommunityModLogsResultSchema, Ht as buildRuntimeCommunityFields, I as listCommunitiesSync, In as RpcCidParamSchema, It as verifyVote, Jn as RpcPublishChallengeAnswersParamSchema, Kn as RpcFetchCidResultSchema, Kt as normalizeCommunityInputFromCommunity, L as monitorCommunitiesDirectory, Ln as RpcCommentRepliesPageParamSchema, Lt as buildRuntimeAuthor, Mn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Mt as verifyCommentPubsubMessage, N as getDefaultDataPath, Nn as RpcAnchorPublishPreparationResultSchema, Nt as verifyCommentUpdate, On as parseRpcCommentEventWithPKCErrorIfItFails, Ot as verifyChallengeVerification, Pn as RpcAuthorNameParamSchema, Q as parseRawPages, Qn as RpcSuccessResultSchema, Qt as getPKCAddressFromPublicKeySync, Rn as RpcCommunityIdentifierParamSchema, Rt as cleanWireAuthor, Sn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, Tn as parseDecryptedChallengeWithPKCErrorIfItFails, Un as RpcExportCommunityParamSchema, Ut as getCommunityAddressFromRecord, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcExportCommunityModLogsParamSchema, Vt as normalizeCreatePublicationAuthor, Wn as RpcExportCommunityResultSchema, Wt as getCommunityNameFromWire, X as findCommentInPageInstanceRecursively, Xn as RpcResolveAuthorNameResultSchema, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as RpcPublishedAnchorRecordResultSchema, Yt as getBufferedPKCAddressFromPublicKey, Zn as RpcSubscriptionIdResultSchema, _ as createSigner, _n as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, _t as signComment, an as parseCommentIpfsSchemaWithPKCErrorIfItFails, ar as t$3, at as PublicationClientsManager, bn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, c as LRUCache, cn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, cr as t$2, d as KeyvBetterSqlite3, dt as require_lib$1, et as applyNameResolvedCacheToCrosspost, f as decodeRpcChallengeAnswerPubsubMsg, fn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ft as cleanUpBeforePublishing, gn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeVerificationPubsubMsg, hn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ht as signChallengeRequest, in as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, it as stripNameResolvedFromCrosspost, jt as verifyCommentModeration, kn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, kt as verifyCommentEdit, l as RemoteCommunity, ln as parseCommunityAddressWithPKCErrorIfItFails, lr as t$5, m as decodeRpcChallengeRequestPubsubMsg, mn as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, mr as require_undici, n as RpcRemoteCommunity, nr as t$4, nt as collectCrosspostAuthorsToResolve, o as pkcJsChallenges, or as n$3, ot as PKCClientsManager, p as decodeRpcChallengePubsubMsg, pr as nativeFunctions$2, pt as signChallengeAnswer, qn as RpcPublishAnchorRecordParamSchema, qt as decode, s as TrackedInstanceRegistry, sn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as InflightFetchManager, t as RpcLocalCommunity, tn as parseCidStringSchemaWithPKCErrorIfItFails, tt as cloneCrosspostForRuntime, ut as PKCTypedEmitter, v as createAnchorIpnsRecord$1, vt as signCommentEdit, wn as parseDecryptedChallengeVerification, wt as signVote, x as encryptEd25519AesGcm, xn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as decryptEd25519AesGcm, yt as signCommentModeration, zn as RpcCommunityPageParamSchema, zt as getAuthorNameFromRuntime } from "./rpc-local-community-BYd-0Aw4.js";
4
+ import { o as getHeliaDebugContext } from "./util-CvgcZ9iH.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -6948,7 +6948,7 @@ var PKC$1 = class extends PKCTypedEmitter {
6948
6948
  this.clients.libp2pJsClients = {};
6949
6949
  if (!this.libp2pJsClientsOptions) return;
6950
6950
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
6951
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-C5Oe_ZSx.js");
6951
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-CjrfyXsA.js");
6952
6952
  for (const clientOptions of this.libp2pJsClientsOptions) {
6953
6953
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
6954
6954
  ...clientOptions,
@@ -7227,7 +7227,7 @@ var PKC$1 = class extends PKCTypedEmitter {
7227
7227
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
7228
7228
  log.trace("Received community options to create a local community instance:", options);
7229
7229
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
7230
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-D4SjlAKS.js");
7230
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-DbfQyZow.js");
7231
7231
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
7232
7232
  const community = new LocalCommunity(this);
7233
7233
  if (isLocalCommunity) {
@@ -1,11 +1,11 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as pubsubTopicToDhtKey, $n as n$10, $t as ChallengeFileSchema, A as extractNetworkErrorDetails, An as CommentUpdateSignedPropertyNames, Ar as literal, At as refreshTrackedCommunityAliases, B as isIpfsCid, Bt as pTimeout, Cn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Cr as require_supports_color, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateForChallengeVerificationSignedPropertyNames, Dr as array, E as createAbortError, Er as _enum, Et as listStartedCommunities, Fn as ModQueuePageIpfsSchema, Ft as untrackStartedCommunity, Gn as AuthorCommentIpfsReservedFields, Gt as CreateCommunityEditPublicationOptionsWithRefinementSchema, H as isIpns, I as getPostUpdateTimestampRange, In as PageIpfsSchema, It as untrackUpdatingComment, Jn as CidPathSchema, Kt as CommentModerationChallengeRequestToEncryptSchema, L as hideClassPrivateProps, Ln as CommentEditChallengeRequestToEncryptSchema, Lt as untrackUpdatingCommunity, Mr as object, Mt as trackStartedCommunity, Nn as CreateCommentOptionsWithRefinementSchema, Nr as record, O as derivePublicationFromChallengeRequest, On as CommentUpdateReservedFields, Or as boolean, Ot as listUpdatingCommunities, Pn as GetPageParamSchema, Pr as string, Pt as trackUpdatingCommunity, Q as isStringDomain, Qn as CreateSignerSchema, Qt as ChallengeFileFactorySchema, R as ipnsNameToIpnsOverPubsubTopic, Rt as require_sha256$1, Sr as logger_default, Tn as CommentUpdateChallengeReservedFieldNames, Tt as findUpdatingCommunity, U as isIpnsPath, Un as CreateCommentEditOptionsWithRefinementSchema, Ut as CommunityEditPublicationSignedPropertyNames, V as isIpfsPath, Vn as CommentEditSignedPropertyNames, Vt as CommunityEditPublicationChallengeRequestToEncryptSchema, Wn as AuthorAddressSchema, Wt as CommunityEditPubsubMessagePublicationSchema, X as isRequestPubsubPublicationOfPost, Xn as CommunityAddressSchema, Xt as CommentModerationsTableRowSchema, Yn as CidStringSchema, Yt as CommentModerationSignedPropertyNames, Z as isRequestPubsubPublicationOfReply, Zn as CommunityAuthorChallengeReservedFieldNames, Zt as CreateCommentModerationOptionsWithRefinementSchema, _ as PKCUserOptionBaseSchema, _n as VoteSignedPropertyNames, _r as FailedToFetchCommunityFromGatewaysError, an as CommunityIpfsSchema, ar as e$5, b as areEquivalentCommunityAddresses, bn as CommentIpfsReservedFields, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, c as ChallengeVerificationMessageSignedPropertyNames, cn as CreateRemoteCommunityFunctionArgumentSchema, cr as t$12, dr as t$10, f as DecryptedChallengeSchema, fn as RpcRemoteCommunityUpdateEventResultSchema, fr as t$9, g as PKCParsedOptionsSchema, gr as FailedToFetchCommentUpdateFromGatewaysError, gt as sleepUntilTimeoutOrAbort, h as NameResolverSerializedSchema, hn as VotePubsubMessagePublicationSchema, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, i as ChallengeMessageSignedPropertyNames, in as CommunityIpfsReservedFields, ir as e$6, j as fetchAndValidateIpnsRecordFromGateway, jr as number, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kr as custom, l as DecryptedChallengeAnswerSchema, ln as CreateRpcCommunityFunctionArgumentSchema, lr as n$8, m as NameResolveCacheOptionsSchema, mn as VoteChallengeRequestToEncryptSchema, mr as require_retry$1, mt as shortifyAddress, n as ChallengeAnswerMessageSignedPropertyNames, nn as CommunityEditOptionsSchema, o as ChallengeRequestMessageSignedPropertyNames, on as CommunitySignedPropertyNames, or as t$11, ot as removeNullUndefinedEmptyObjectsValuesRecursively, p as DecryptedChallengeVerificationSchema, pn as CreateVoteUserOptionsWithRefinementSchema, pr as e$4, qn as ChallengeAnswersSchema, qt as CommentModerationPubsubMessagePublicationSchema, rn as CommunityExportRecordsSchema, rr as t$13, sn as CreateNewLocalCommunityUserOptionsSchema, sr as r$8, tn as CommunityChallengeSettingSchema, tr as n$9, tt as raceAgainstAbort, un as ExportCommunityModLogsOptionsSchema, ur as r$7, ut as resolveWhenPredicateIsTrue, v as PKCUserOptionsSchema, vr as FailedToFetchGenericIpfsFromGatewaysError, vt as throwIfAbortSignalAborted, wn as CommentSignedPropertyNames, wr as require_ms$1, wt as findUpdatingComment, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, yn as CommentChallengeRequestToEncryptSchema, yr as FailedToFetchPageIpfsFromGatewaysError, yt as timestamp, z as isAbortError, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-qhSDu1BU.js";
2
+ import { $ as pubsubTopicToDhtKey, $n as n$10, $t as ChallengeFileSchema, A as extractNetworkErrorDetails, An as CommentUpdateSignedPropertyNames, Ar as literal, At as refreshTrackedCommunityAliases, B as isIpfsCid, Bt as pTimeout, Cn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Cr as require_supports_color, Ct as findStartedCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateForChallengeVerificationSignedPropertyNames, Dr as array, E as createAbortError, Er as _enum, Et as listStartedCommunities, Fn as ModQueuePageIpfsSchema, Ft as untrackStartedCommunity, Gn as AuthorCommentIpfsReservedFields, Gt as CreateCommunityEditPublicationOptionsWithRefinementSchema, H as isIpns, I as getPostUpdateTimestampRange, In as PageIpfsSchema, It as untrackUpdatingComment, Jn as CidPathSchema, Kt as CommentModerationChallengeRequestToEncryptSchema, L as hideClassPrivateProps, Ln as CommentEditChallengeRequestToEncryptSchema, Lt as untrackUpdatingCommunity, Mr as object, Mt as trackStartedCommunity, Nn as CreateCommentOptionsWithRefinementSchema, Nr as record, O as derivePublicationFromChallengeRequest, On as CommentUpdateReservedFields, Or as boolean, Ot as listUpdatingCommunities, Pn as GetPageParamSchema, Pr as string, Pt as trackUpdatingCommunity, Q as isStringDomain, Qn as CreateSignerSchema, Qt as ChallengeFileFactorySchema, R as ipnsNameToIpnsOverPubsubTopic, Rt as require_sha256$1, Sr as logger_default, Tn as CommentUpdateChallengeReservedFieldNames, Tt as findUpdatingCommunity, U as isIpnsPath, Un as CreateCommentEditOptionsWithRefinementSchema, Ut as CommunityEditPublicationSignedPropertyNames, V as isIpfsPath, Vn as CommentEditSignedPropertyNames, Vt as CommunityEditPublicationChallengeRequestToEncryptSchema, Wn as AuthorAddressSchema, Wt as CommunityEditPubsubMessagePublicationSchema, X as isRequestPubsubPublicationOfPost, Xn as CommunityAddressSchema, Xt as CommentModerationsTableRowSchema, Yn as CidStringSchema, Yt as CommentModerationSignedPropertyNames, Z as isRequestPubsubPublicationOfReply, Zn as CommunityAuthorChallengeReservedFieldNames, Zt as CreateCommentModerationOptionsWithRefinementSchema, _ as PKCUserOptionBaseSchema, _n as VoteSignedPropertyNames, _r as FailedToFetchCommunityFromGatewaysError, an as CommunityIpfsSchema, ar as e$5, b as areEquivalentCommunityAddresses, bn as CommentIpfsReservedFields, br as PKCError, bt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, c as ChallengeVerificationMessageSignedPropertyNames, cn as CreateRemoteCommunityFunctionArgumentSchema, cr as t$12, dr as t$10, f as DecryptedChallengeSchema, fn as RpcRemoteCommunityUpdateEventResultSchema, fr as t$9, g as PKCParsedOptionsSchema, gr as FailedToFetchCommentUpdateFromGatewaysError, gt as sleepUntilTimeoutOrAbort, h as NameResolverSerializedSchema, hn as VotePubsubMessagePublicationSchema, hr as FailedToFetchCommentIpfsFromGatewaysError, ht as shortifyCid, i as ChallengeMessageSignedPropertyNames, in as CommunityIpfsReservedFields, ir as e$6, j as fetchAndValidateIpnsRecordFromGateway, jr as number, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateSchema, kr as custom, l as DecryptedChallengeAnswerSchema, ln as CreateRpcCommunityFunctionArgumentSchema, lr as n$8, m as NameResolveCacheOptionsSchema, mn as VoteChallengeRequestToEncryptSchema, mr as require_retry$1, mt as shortifyAddress, n as ChallengeAnswerMessageSignedPropertyNames, nn as CommunityEditOptionsSchema, o as ChallengeRequestMessageSignedPropertyNames, on as CommunitySignedPropertyNames, or as t$11, ot as removeNullUndefinedEmptyObjectsValuesRecursively, p as DecryptedChallengeVerificationSchema, pn as CreateVoteUserOptionsWithRefinementSchema, pr as e$4, qn as ChallengeAnswersSchema, qt as CommentModerationPubsubMessagePublicationSchema, rn as CommunityExportRecordsSchema, rr as t$13, sn as CreateNewLocalCommunityUserOptionsSchema, sr as r$8, tn as CommunityChallengeSettingSchema, tr as n$9, tt as raceAgainstAbort, un as ExportCommunityModLogsOptionsSchema, ur as r$7, ut as resolveWhenPredicateIsTrue, v as PKCUserOptionsSchema, vr as FailedToFetchGenericIpfsFromGatewaysError, vt as throwIfAbortSignalAborted, wn as CommentSignedPropertyNames, wr as require_ms$1, wt as findUpdatingComment, x as calculateIpfsCidV0, xn as CommentIpfsSchema, xr as messages, yn as CommentChallengeRequestToEncryptSchema, yr as FailedToFetchPageIpfsFromGatewaysError, yt as timestamp, z as isAbortError, zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema } from "./schema-0b9XHoqX.js";
3
3
  import { t as all } from "./src-CYIMjhjK.js";
4
4
  import { createHash } from "node:crypto";
5
5
  import { pathToFileURL } from "node:url";
6
6
  import dns from "node:dns";
7
7
  import os from "os";
8
- import { closeSync, createReadStream, existsSync, openSync, promises, readSync, readdirSync, rm, watch } from "node:fs";
8
+ import { closeSync, createReadStream, existsSync, openSync, promises, readSync, readdirSync, watch } from "node:fs";
9
9
  import path from "path";
10
10
  import assert from "assert";
11
11
  import { Agent } from "https";
@@ -102212,9 +102212,7 @@ async function moveCommunityDbToDeletedDirectory(communityAddress, pkc) {
102212
102212
  await sourceDb.backup(newPath);
102213
102213
  sourceDb.close();
102214
102214
  if (os.type() === "Windows_NT") await deleteOldCommunityInWindows(oldPath, pkc);
102215
- else rm(oldPath, (err) => {
102216
- if (err) throw err;
102217
- });
102215
+ else await promises.rm(oldPath, { force: true });
102218
102216
  } catch (error) {
102219
102217
  error.details = {
102220
102218
  ...error.details,
@@ -125714,6 +125712,7 @@ var RemoteCommunity = class extends import_lib$1.TypedEmitter {
125714
125712
  this.raw = {};
125715
125713
  this._updatingCommunityInstanceWithListeners = void 0;
125716
125714
  this._numOfListenersForUpdatingInstance = 0;
125715
+ this._pendingWarmStartKeyMigration = void 0;
125717
125716
  this._pkc = pkc;
125718
125717
  this._setState("stopped");
125719
125718
  this._updatingState = "stopped";
@@ -126069,14 +126068,24 @@ var RemoteCommunity = class extends import_lib$1.TypedEmitter {
126069
126068
  return true;
126070
126069
  }
126071
126070
  _setCommunityIpfsPropsFromUpdatingCommunitiesIfPossible() {
126072
- const log = logger_default("pkc-js:comment:_setCommunityIpfsPropsFromUpdatingCommunitiesIfPossible");
126071
+ const log = logger_default("pkc-js:remote-community:_setCommunityIpfsPropsFromUpdatingCommunitiesIfPossible");
126073
126072
  const updatingCommunity = findUpdatingCommunity(this._pkc, {
126074
126073
  publicKey: this.publicKey,
126075
126074
  name: this.name
126076
126075
  });
126077
126076
  if (updatingCommunity?.raw?.communityIpfs && (this.updatedAt || 0) < updatingCommunity.raw.communityIpfs.updatedAt) {
126077
+ if (this.publicKey && updatingCommunity.publicKey && this.publicKey !== updatingCommunity.publicKey) {
126078
+ this._pendingWarmStartKeyMigration = {
126079
+ previousPublicKey: this.publicKey,
126080
+ newPublicKey: updatingCommunity.publicKey
126081
+ };
126082
+ log.trace(`New Remote Community instance`, this.address, `skipped warm start from pkc._updatingCommunities[${this.address}]: tracked instance is keyed to`, updatingCommunity.publicKey, `while the caller requested`, this.publicKey, `- deferring key-migration announcement to update()`);
126083
+ return;
126084
+ }
126085
+ const nameResolvedBeforeAdoption = this.nameResolved;
126078
126086
  this.initCommunityIpfsPropsNoMerge(updatingCommunity.raw.communityIpfs);
126079
126087
  this.updateCid = updatingCommunity.updateCid;
126088
+ this._adoptMirroredNameResolved(updatingCommunity, nameResolvedBeforeAdoption);
126080
126089
  log.trace(`New Remote Community instance`, this.address, `will use CommunityIpfs from pkc._updatingCommunities[${this.address}] with updatedAt`, this.updatedAt, "that's", timestamp() - this.updatedAt, "seconds old");
126081
126090
  this.emit("update", this);
126082
126091
  }
@@ -126086,14 +126095,8 @@ var RemoteCommunity = class extends import_lib$1.TypedEmitter {
126086
126095
  if (typeof source.nameResolved === "boolean") this.nameResolved = source.nameResolved;
126087
126096
  } else this.nameResolved = nameResolvedBeforeMirror;
126088
126097
  }
126089
- async _initCommunityInstanceWithListeners() {
126090
- const trackedUpdatingCommunity = findUpdatingCommunity(this._pkc, {
126091
- publicKey: this.publicKey,
126092
- name: this.name
126093
- });
126094
- if (!trackedUpdatingCommunity) throw Error("should be defined at this stage");
126098
+ _initCommunityInstanceWithListeners(communityInstance) {
126095
126099
  const log = logger_default("pkc-js:remote-community:update");
126096
- const communityInstance = trackedUpdatingCommunity;
126097
126100
  return {
126098
126101
  community: communityInstance,
126099
126102
  update: () => {
@@ -126121,28 +126124,25 @@ var RemoteCommunity = class extends import_lib$1.TypedEmitter {
126121
126124
  }
126122
126125
  async fetchLatestCommunityOrSubscribeToEvent() {
126123
126126
  const log = logger_default("pkc-js:remote-community:update:updateOnce");
126124
- if (!findUpdatingCommunity(this._pkc, {
126127
+ let communityInstance = findUpdatingCommunity(this._pkc, {
126125
126128
  publicKey: this.publicKey,
126126
126129
  name: this.name
126127
- })) {
126130
+ });
126131
+ if (!communityInstance) {
126128
126132
  const createOpts = this.publicKey && isStringDomain(this.address) ? {
126129
126133
  name: this.address,
126130
126134
  publicKey: this.publicKey
126131
126135
  } : { address: this.address };
126132
126136
  const updatingCommunity = await this._pkc.createCommunity(createOpts);
126133
- trackUpdatingCommunity(this._pkc, updatingCommunity);
126137
+ communityInstance = trackUpdatingCommunity(this._pkc, updatingCommunity);
126134
126138
  log("Creating a new entry for this._pkc._updatingCommunities", this.address);
126135
126139
  }
126136
- const communityInstance = findUpdatingCommunity(this._pkc, {
126137
- publicKey: this.publicKey,
126138
- name: this.name
126139
- });
126140
- if (!communityInstance) throw Error("should be defined at this stage");
126141
126140
  if (communityInstance === this) {
126142
126141
  this._clientsManager.startUpdatingLoop().catch((err) => log.error("Failed to start update loop of community", err));
126143
- return;
126142
+ return false;
126144
126143
  }
126145
- this._updatingCommunityInstanceWithListeners = await this._initCommunityInstanceWithListeners();
126144
+ if (!this._pkc._updatingCommunities.has(communityInstance)) throw Error(`Updating community instance (${communityInstance.address}) was untracked before listeners could be attached`);
126145
+ this._updatingCommunityInstanceWithListeners = this._initCommunityInstanceWithListeners(communityInstance);
126146
126146
  this._updatingCommunityInstanceWithListeners.community.on("update", this._updatingCommunityInstanceWithListeners.update);
126147
126147
  this._updatingCommunityInstanceWithListeners.community.on("updatingstatechange", this._updatingCommunityInstanceWithListeners.updatingstatechange);
126148
126148
  this._updatingCommunityInstanceWithListeners.community.on("error", this._updatingCommunityInstanceWithListeners.error);
@@ -126154,13 +126154,34 @@ var RemoteCommunity = class extends import_lib$1.TypedEmitter {
126154
126154
  this._updatingCommunityInstanceWithListeners.community._setState("updating");
126155
126155
  this._updatingCommunityInstanceWithListeners.community._clientsManager.startUpdatingLoop().catch((err) => log.error("Failed to start update loop of community", err));
126156
126156
  }
126157
+ if (communityInstance.raw.communityIpfs && (this.updatedAt ?? 0) < communityInstance.raw.communityIpfs.updatedAt && this._updatingCommunityInstanceWithListeners) {
126158
+ this._updatingCommunityInstanceWithListeners.update(communityInstance);
126159
+ return true;
126160
+ }
126161
+ return false;
126162
+ }
126163
+ _announcePendingWarmStartKeyMigrationIfAny() {
126164
+ if (!this._pendingWarmStartKeyMigration) return;
126165
+ const { previousPublicKey, newPublicKey } = this._pendingWarmStartKeyMigration;
126166
+ this._pendingWarmStartKeyMigration = void 0;
126167
+ const error = new PKCError("ERR_COMMUNITY_NAME_RESOLVES_TO_DIFFERENT_PUBLIC_KEY", {
126168
+ communityName: this.name,
126169
+ previousPublicKey,
126170
+ newPublicKey
126171
+ });
126172
+ this._clearDataForKeyMigration(newPublicKey);
126173
+ if (this.name) this.nameResolved = true;
126174
+ this.emit("update", this);
126175
+ this.emit("error", error);
126157
126176
  }
126158
126177
  async update() {
126159
126178
  if (this.state !== "stopped") return;
126160
126179
  logger_default("pkc-js:remote-community:update");
126161
126180
  this._setState("updating");
126162
- await this.fetchLatestCommunityOrSubscribeToEvent();
126163
- if (this.raw.communityIpfs) this.emit("update", this);
126181
+ this._announcePendingWarmStartKeyMigrationIfAny();
126182
+ const hadRecordBeforeFetch = Boolean(this.raw.communityIpfs);
126183
+ const replayEmittedUpdate = await this.fetchLatestCommunityOrSubscribeToEvent();
126184
+ if (this.raw.communityIpfs && hadRecordBeforeFetch && !replayEmittedUpdate) this.emit("update", this);
126164
126185
  }
126165
126186
  async _cleanUpUpdatingCommunityInstanceWithListeners() {
126166
126187
  if (!this._updatingCommunityInstanceWithListeners) throw Error("should be defined at this stage");
@@ -6865,7 +6865,8 @@ const CommunityIpfsReservedFields = r$2([
6865
6865
  "updatingState",
6866
6866
  "started",
6867
6867
  "exports",
6868
- "abortSignal"
6868
+ "abortSignal",
6869
+ "_pendingWarmStartKeyMigration"
6869
6870
  ], t$3(CommunityIpfsSchema.shape));
6870
6871
  //#endregion
6871
6872
  //#region dist/node/publications/comment-moderation/schema.js
@@ -15244,51 +15245,61 @@ function getEquivalentCommunityAliases(address) {
15244
15245
  function dedupeAliases(aliases) {
15245
15246
  return [...new Set(aliases.filter((alias) => typeof alias === "string" && alias.length > 0))];
15246
15247
  }
15247
- function getTrackedAliasHistory(target) {
15248
+ function getTrackedAliasHistory(target, registry) {
15248
15249
  const holder = target;
15249
15250
  if (!holder[trackedAliasHistorySymbol]) Object.defineProperty(holder, trackedAliasHistorySymbol, {
15250
- value: /* @__PURE__ */ new Set(),
15251
+ value: /* @__PURE__ */ new WeakMap(),
15251
15252
  enumerable: false,
15252
15253
  configurable: false,
15253
15254
  writable: false
15254
15255
  });
15255
- return holder[trackedAliasHistorySymbol];
15256
+ const histories = holder[trackedAliasHistorySymbol];
15257
+ let history = histories.get(registry);
15258
+ if (!history) {
15259
+ history = /* @__PURE__ */ new Set();
15260
+ histories.set(registry, history);
15261
+ }
15262
+ return history;
15256
15263
  }
15257
- function persistAliases(target, aliases) {
15258
- const aliasHistory = getTrackedAliasHistory(target);
15264
+ function persistAliases(target, registry, aliases) {
15265
+ const aliasHistory = getTrackedAliasHistory(target, registry);
15259
15266
  aliases.forEach((alias) => aliasHistory.add(alias));
15260
15267
  return [...aliasHistory];
15261
15268
  }
15262
- function getCommunityRegistryAliases(community) {
15269
+ const REGISTRY_SCOPE_SEPARATOR = "\0";
15270
+ function scopeAliasesToDataPath(aliases, dataPath) {
15271
+ if (dataPath === void 0) return aliases;
15272
+ return aliases.map((alias) => `${dataPath}${REGISTRY_SCOPE_SEPARATOR}${alias}`);
15273
+ }
15274
+ function getCommunityRegistryAliases(community, dataPath) {
15263
15275
  const aliases = dedupeAliases([
15264
- community.address,
15265
15276
  community.name,
15266
15277
  community.publicKey,
15267
15278
  community.signer?.address
15268
15279
  ]);
15269
15280
  if (aliases.length === 0) throw new PKCError("ERR_COMMUNITY_REGISTRY_LOOKUP_HAS_NO_ALIASES", { community });
15270
- return dedupeAliases(aliases.flatMap((alias) => {
15281
+ return scopeAliasesToDataPath(dedupeAliases(aliases.flatMap((alias) => {
15271
15282
  if (isEthAliasDomain$1(alias)) return getEquivalentCommunityAliases(alias);
15272
15283
  return [alias];
15273
- }));
15284
+ })), dataPath);
15274
15285
  }
15275
15286
  function getCommentRegistryAliases(comment) {
15276
15287
  return dedupeAliases([comment.cid]);
15277
15288
  }
15278
- function syncCommunityRegistryEntry(registry, community) {
15289
+ function syncCommunityRegistryEntry(registry, community, dataPath) {
15279
15290
  return registry.track({
15280
15291
  value: community,
15281
- aliases: persistAliases(community, getCommunityRegistryAliases(community))
15292
+ aliases: scopeAliasesToDataPath(persistAliases(community, registry, getCommunityRegistryAliases(community)), dataPath)
15282
15293
  });
15283
15294
  }
15284
15295
  function syncCommentRegistryEntry(registry, comment) {
15285
15296
  return registry.track({
15286
15297
  value: comment,
15287
- aliases: persistAliases(comment, getCommentRegistryAliases(comment))
15298
+ aliases: persistAliases(comment, registry, getCommentRegistryAliases(comment))
15288
15299
  });
15289
15300
  }
15290
- function findCommunityInRegistry(registry, lookup) {
15291
- return registry.findByAliases(getCommunityRegistryAliases(lookup));
15301
+ function findCommunityInRegistry(registry, lookup, dataPath) {
15302
+ return registry.findByAliases(getCommunityRegistryAliases(lookup, dataPath));
15292
15303
  }
15293
15304
  function findCommentInRegistry(registry, lookup) {
15294
15305
  return registry.findByAliases(getCommentRegistryAliases(lookup));
@@ -16194,7 +16205,7 @@ function extractNetworkErrorDetails(err, depth = 0) {
16194
16205
  }
16195
16206
  //#endregion
16196
16207
  //#region dist/node/generated-version.js
16197
- const version = "0.0.85";
16208
+ const version = "0.0.87";
16198
16209
  //#endregion
16199
16210
  //#region dist/node/version.js
16200
16211
  const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
@@ -1,4 +1,4 @@
1
- import { br as PKCError, et as pubsubTopicToDhtKeyCid } from "./schema-qhSDu1BU.js";
1
+ import { br as PKCError, et as pubsubTopicToDhtKeyCid } from "./schema-0b9XHoqX.js";
2
2
  import { ipnsSelector } from "ipns/selector";
3
3
  import { equals } from "uint8arrays/equals";
4
4
  //#region dist/node/helia/util.js
@@ -1,2 +1,2 @@
1
- import { a as getShortCid, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as setNativeFunctions, t as PKC } from "./chunks/node-C2DKW30L.js";
1
+ import { a as getShortCid, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as setNativeFunctions, t as PKC } from "./chunks/node-gCrky-14.js";
2
2
  export { challenges, createAnchorIpnsRecord, PKC as default, getShortAddress, getShortCid, nativeFunctions, setNativeFunctions };