@pkcprotocol/pkc-js 0.0.143 → 0.0.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/clients/base-client-manager.d.ts +7 -1
- package/dist/browser/clients/base-client-manager.js +106 -28
- package/dist/browser/clients/base-client-manager.js.map +1 -1
- package/dist/browser/community/community-client-manager.js +40 -24
- package/dist/browser/community/community-client-manager.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/pkc/pkc.d.ts +2 -1
- package/dist/browser/pkc/pkc.js +12 -2
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/publications/comment/comment-client-manager.js +5 -2
- package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/browser/publications/comment/comment.js +4 -1
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/util/inflight-fetch-manager.d.ts +7 -2
- package/dist/browser/util/inflight-fetch-manager.js +49 -7
- package/dist/browser/util/inflight-fetch-manager.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +40 -40
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-DpsMZzv8.js → helia-for-pkc--Xw7hTTu.js} +2 -2
- package/dist/bundled/chunks/{local-community-DEaDtekb.js → local-community-CH8vMgTr.js} +1 -1
- package/dist/bundled/chunks/{local-community-BglT8AUy.js → local-community-DCVtQSci.js} +3 -3
- package/dist/bundled/chunks/{node-Tkx_TCqE.js → node-Coyk7lC6.js} +13 -10
- package/dist/bundled/chunks/{page-sort-scoring-DY7SvqJA.js → page-sort-scoring-DaW6urZ2.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-Br_xomgn.js → rpc-local-community-KgRrTYjv.js} +139 -52
- package/dist/bundled/chunks/{util-C5RiQF_G.js → util-BYT-7zVn.js} +1 -1
- package/dist/bundled/chunks/{util-DIkZirPy.js → util-DN7FMpHT.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-DnW2JiL5.js → validate-package-factories-CPVyODKw.js} +2 -2
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/page-sorts.js +1 -1
- package/dist/bundled/rpc/src/index.js +4 -4
- package/dist/node/clients/base-client-manager.d.ts +7 -1
- package/dist/node/clients/base-client-manager.js +106 -28
- package/dist/node/clients/base-client-manager.js.map +1 -1
- package/dist/node/community/community-client-manager.js +40 -24
- package/dist/node/community/community-client-manager.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/pkc/pkc.d.ts +2 -1
- package/dist/node/pkc/pkc.js +12 -2
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/publications/comment/comment-client-manager.js +5 -2
- package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/node/publications/comment/comment.js +4 -1
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/util/inflight-fetch-manager.d.ts +7 -2
- package/dist/node/util/inflight-fetch-manager.js +49 -7
- package/dist/node/util/inflight-fetch-manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"challenges.js": {
|
|
4
4
|
"isEntry": true,
|
|
5
5
|
"imports": [
|
|
6
|
-
"chunks/validate-package-factories-
|
|
6
|
+
"chunks/validate-package-factories-CPVyODKw.js"
|
|
7
7
|
],
|
|
8
8
|
"dynamicImports": [],
|
|
9
9
|
"inputs": [
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node:module"
|
|
17
17
|
],
|
|
18
18
|
"dynamicImports": [
|
|
19
|
-
"chunks/node-
|
|
19
|
+
"chunks/node-Coyk7lC6.js"
|
|
20
20
|
],
|
|
21
21
|
"inputs": [
|
|
22
22
|
"dist/node/runtime/node/compile-cache.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"index.js": {
|
|
27
27
|
"isEntry": true,
|
|
28
28
|
"imports": [
|
|
29
|
-
"chunks/node-
|
|
29
|
+
"chunks/node-Coyk7lC6.js"
|
|
30
30
|
],
|
|
31
31
|
"dynamicImports": [],
|
|
32
32
|
"inputs": []
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"page-sorts.js": {
|
|
35
35
|
"isEntry": true,
|
|
36
36
|
"imports": [
|
|
37
|
-
"chunks/validate-package-factories-
|
|
37
|
+
"chunks/validate-package-factories-CPVyODKw.js"
|
|
38
38
|
],
|
|
39
39
|
"dynamicImports": [],
|
|
40
40
|
"inputs": [
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"rpc/src/index.js": {
|
|
45
45
|
"isEntry": true,
|
|
46
46
|
"imports": [
|
|
47
|
-
"chunks/rpc-local-community-
|
|
48
|
-
"chunks/node-
|
|
49
|
-
"chunks/util-
|
|
50
|
-
"chunks/local-community-
|
|
47
|
+
"chunks/rpc-local-community-KgRrTYjv.js",
|
|
48
|
+
"chunks/node-Coyk7lC6.js",
|
|
49
|
+
"chunks/util-BYT-7zVn.js",
|
|
50
|
+
"chunks/local-community-DCVtQSci.js",
|
|
51
51
|
"node:url",
|
|
52
52
|
"path",
|
|
53
53
|
"assert",
|
|
@@ -77,12 +77,12 @@
|
|
|
77
77
|
"\u0000rolldown/runtime.js"
|
|
78
78
|
]
|
|
79
79
|
},
|
|
80
|
-
"chunks/helia-for-pkc
|
|
80
|
+
"chunks/helia-for-pkc--Xw7hTTu.js": {
|
|
81
81
|
"isEntry": false,
|
|
82
82
|
"imports": [
|
|
83
83
|
"chunks/chunk-2rV9d50f.js",
|
|
84
|
-
"chunks/util-
|
|
85
|
-
"chunks/util-
|
|
84
|
+
"chunks/util-BYT-7zVn.js",
|
|
85
|
+
"chunks/util-DN7FMpHT.js",
|
|
86
86
|
"chunks/src-DKntVmyX.js",
|
|
87
87
|
"chunks/src-Cpx2Sts8.js",
|
|
88
88
|
"node:url",
|
|
@@ -204,13 +204,21 @@
|
|
|
204
204
|
"dist/node/helia/helia-for-pkc.js"
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
|
-
"chunks/local-community-
|
|
207
|
+
"chunks/local-community-CH8vMgTr.js": {
|
|
208
|
+
"isEntry": false,
|
|
209
|
+
"imports": [
|
|
210
|
+
"chunks/local-community-DCVtQSci.js"
|
|
211
|
+
],
|
|
212
|
+
"dynamicImports": [],
|
|
213
|
+
"inputs": []
|
|
214
|
+
},
|
|
215
|
+
"chunks/local-community-DCVtQSci.js": {
|
|
208
216
|
"isEntry": false,
|
|
209
217
|
"imports": [
|
|
210
218
|
"chunks/chunk-2rV9d50f.js",
|
|
211
|
-
"chunks/rpc-local-community-
|
|
212
|
-
"chunks/util-
|
|
213
|
-
"chunks/page-sort-scoring-
|
|
219
|
+
"chunks/rpc-local-community-KgRrTYjv.js",
|
|
220
|
+
"chunks/util-BYT-7zVn.js",
|
|
221
|
+
"chunks/page-sort-scoring-DaW6urZ2.js",
|
|
214
222
|
"node:url",
|
|
215
223
|
"node:path",
|
|
216
224
|
"os",
|
|
@@ -262,21 +270,13 @@
|
|
|
262
270
|
"dist/node/runtime/node/community/local-community.js"
|
|
263
271
|
]
|
|
264
272
|
},
|
|
265
|
-
"chunks/
|
|
266
|
-
"isEntry": false,
|
|
267
|
-
"imports": [
|
|
268
|
-
"chunks/local-community-BglT8AUy.js"
|
|
269
|
-
],
|
|
270
|
-
"dynamicImports": [],
|
|
271
|
-
"inputs": []
|
|
272
|
-
},
|
|
273
|
-
"chunks/node-Tkx_TCqE.js": {
|
|
273
|
+
"chunks/node-Coyk7lC6.js": {
|
|
274
274
|
"isEntry": false,
|
|
275
275
|
"imports": [
|
|
276
276
|
"chunks/chunk-2rV9d50f.js",
|
|
277
|
-
"chunks/rpc-local-community-
|
|
278
|
-
"chunks/util-
|
|
279
|
-
"chunks/util-
|
|
277
|
+
"chunks/rpc-local-community-KgRrTYjv.js",
|
|
278
|
+
"chunks/util-BYT-7zVn.js",
|
|
279
|
+
"chunks/util-DN7FMpHT.js",
|
|
280
280
|
"path",
|
|
281
281
|
"assert",
|
|
282
282
|
"fs",
|
|
@@ -287,8 +287,8 @@
|
|
|
287
287
|
"rpc-websockets"
|
|
288
288
|
],
|
|
289
289
|
"dynamicImports": [
|
|
290
|
-
"chunks/helia-for-pkc
|
|
291
|
-
"chunks/local-community-
|
|
290
|
+
"chunks/helia-for-pkc--Xw7hTTu.js",
|
|
291
|
+
"chunks/local-community-DCVtQSci.js"
|
|
292
292
|
],
|
|
293
293
|
"inputs": [
|
|
294
294
|
"dist/node/zod-error-map.js",
|
|
@@ -448,22 +448,22 @@
|
|
|
448
448
|
"dist/node/index.js"
|
|
449
449
|
]
|
|
450
450
|
},
|
|
451
|
-
"chunks/page-sort-scoring-
|
|
451
|
+
"chunks/page-sort-scoring-DaW6urZ2.js": {
|
|
452
452
|
"isEntry": false,
|
|
453
453
|
"imports": [
|
|
454
|
-
"chunks/util-
|
|
454
|
+
"chunks/util-BYT-7zVn.js"
|
|
455
455
|
],
|
|
456
456
|
"dynamicImports": [],
|
|
457
457
|
"inputs": [
|
|
458
458
|
"dist/node/pages/page-sort-scoring.js"
|
|
459
459
|
]
|
|
460
460
|
},
|
|
461
|
-
"chunks/rpc-local-community-
|
|
461
|
+
"chunks/rpc-local-community-KgRrTYjv.js": {
|
|
462
462
|
"isEntry": false,
|
|
463
463
|
"imports": [
|
|
464
464
|
"chunks/chunk-2rV9d50f.js",
|
|
465
|
-
"chunks/util-
|
|
466
|
-
"chunks/page-sort-scoring-
|
|
465
|
+
"chunks/util-BYT-7zVn.js",
|
|
466
|
+
"chunks/page-sort-scoring-DaW6urZ2.js",
|
|
467
467
|
"chunks/src-CYIMjhjK.js",
|
|
468
468
|
"node:crypto",
|
|
469
469
|
"node:url",
|
|
@@ -1576,7 +1576,7 @@
|
|
|
1576
1576
|
"node_modules/kubo-rpc-client/dist/src/index.js"
|
|
1577
1577
|
]
|
|
1578
1578
|
},
|
|
1579
|
-
"chunks/util-
|
|
1579
|
+
"chunks/util-BYT-7zVn.js": {
|
|
1580
1580
|
"isEntry": false,
|
|
1581
1581
|
"imports": [
|
|
1582
1582
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1671,10 +1671,10 @@
|
|
|
1671
1671
|
"dist/node/util.js"
|
|
1672
1672
|
]
|
|
1673
1673
|
},
|
|
1674
|
-
"chunks/util-
|
|
1674
|
+
"chunks/util-DN7FMpHT.js": {
|
|
1675
1675
|
"isEntry": false,
|
|
1676
1676
|
"imports": [
|
|
1677
|
-
"chunks/util-
|
|
1677
|
+
"chunks/util-BYT-7zVn.js",
|
|
1678
1678
|
"ipns/selector",
|
|
1679
1679
|
"ipns/validator",
|
|
1680
1680
|
"ipns",
|
|
@@ -1686,11 +1686,11 @@
|
|
|
1686
1686
|
"dist/node/helia/util.js"
|
|
1687
1687
|
]
|
|
1688
1688
|
},
|
|
1689
|
-
"chunks/validate-package-factories-
|
|
1689
|
+
"chunks/validate-package-factories-CPVyODKw.js": {
|
|
1690
1690
|
"isEntry": false,
|
|
1691
1691
|
"imports": [
|
|
1692
|
-
"chunks/util-
|
|
1693
|
-
"chunks/page-sort-scoring-
|
|
1692
|
+
"chunks/util-BYT-7zVn.js",
|
|
1693
|
+
"chunks/page-sort-scoring-DaW6urZ2.js"
|
|
1694
1694
|
],
|
|
1695
1695
|
"dynamicImports": [],
|
|
1696
1696
|
"inputs": [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-
|
|
1
|
+
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-CPVyODKw.js";
|
|
2
2
|
export { validateChallengeFileFactory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-
|
|
3
|
-
import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-
|
|
2
|
+
import { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-BYT-7zVn.js";
|
|
3
|
+
import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-DN7FMpHT.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,2 +1,2 @@
|
|
|
1
|
-
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-
|
|
1
|
+
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-DCVtQSci.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { Ar as t$2, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, Bt as DecryptedChallengeRequestPublicationSchema, C as hideClassPrivateProps, Cr as e, Dn as VotePubsubReservedFields, Dt as untrackUpdatingCommunity, En as VotePubsubMessagePublicationSchema, Er as t$3, F as isLinkOfVideo, Ft as ChallengeRequestMessageSchema, G as removeBlocksFromKuboNode, Hn as CommentUpdateTableRowSchema, I as isLinkValid, J as removeNullUndefinedValues, K as removeMfsFilesSafely, Lt as ChallengeVerificationMessageSchema, M as isLinkOfAudio, Mn as CommentIpfsSchema, Mr as require_retry, N as isLinkOfImage, Nn as CommentPubsubMessageReservedFields, Nt as ChallengeMessageSchema, Ot as require_sha256, P as isLinkOfMedia, Q as retryKuboBlockPutPinAndProvidePubsubTopic, Qn as CommentEditReservedFields, Rr as PKCError, Sr as e$1, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tr as r$1, Tt as untrackStartedCommunity, Un as CommentsTableRowSchema, Vt as DecryptedChallengeRequestSchema, Xn as CommentEditPubsubMessagePublicationSchema, Yt as version_default, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zt as CommunityEditPublicationPubsubReservedFields, _ as genToArray, _r as n$3, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, b as getIpnsRecordInLocalKuboNode, br as t$5, c as contentContainsMarkdownImages, ct as withSortedKeys, dt as findCommunityInRegistry, er as CommentEditsTableRowSchema, et as retryKuboIpfsAddAndProvide, f as derivePublicationFromChallengeRequest, ft as findStartedCommunity, g as findMalformedUnicodeString, gr as isStringDomain, hn as CommunitySignedPropertyNames, i as calculateStringSizeSameAsIpfsAddCidV0, it as statMfsPathSafely, j as isLinkOfAnimatedImage, jt as ChallengeAnswerMessageSchema, kn as VoteTablesRowSchema, kr as t$4, l as contentContainsMarkdownVideos, lt as withSortedKeysDeep, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, ni as ZodError, nn as CommentModerationPubsubMessagePublicationSchema, o as calculateUnixFsDagSizeCidV0, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, r as calculateIpfsCidV0, rn as CommentModerationReservedFields, rt as sleepUntilTimeoutOrAbort, s as contentContainsMarkdownAudio, ut as writeKuboFilesWithTimeout, v as getEquivalentCommunityAddresses, vr as t$7, wt as trackUpdatingCommunity, xr as t$6, xt as syncCommunityRegistryEntry, y as getErrorCodeFromMessage, yr as n$2, zr as messages } from "./util-
|
|
3
|
-
import { $ as createSchemaRowParser, An as verifyChallengeAnswer, Bn as verifyCommunityEdit, Br as t$8, Cr as getThumbnailPropsOfLink, Dr as moveCommunityDbToDeletedDirectory, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Fr as isCommunityStartLocked, Gr as stringify, Hn as verifyVote, Hr as n$4, In as verifyCommentModeration, Ir as require_src, Kn as getAuthorNameFromWire, Ln as verifyCommentPubsubMessage, Lr as t$10, Mn as verifyChallengeRequest, Mr as findCommunitiesEntry, N as MAX_PAGE_SIZE_BYTES, Or as refreshCommunitiesList, Pn as verifyCommentEdit, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Rn as verifyCommentUpdate, Rr as t$11, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Tn as signCommentUpdateForChallengeVerification, Un as buildRuntimeAuthor, Vr as n$5, W as pLimit, Wn as cleanWireAuthor, Wr as t$9, X as coerceSchemaRowBoolean, Xr as STORAGE_KEYS, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, Zr as require_lodash_merge, _ as createAuthorIdentityMatcher, _r as deriveCommentIpfsFromCommentTableRow, a as generatePagesReportingFailedSorts, ar as encode, b as KeyvBetterSqlite3, bn as signChallengeVerification, c as resolvePageSortsOrThrow, cn as SignerWithPublicKeyAddress, cr as getPKCAddressFromPublicKey, d as getChallengeVerification, dr as BackupAbortError, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, f as getCommunityChallengeFromCommunityChallengeSettings, fn as decryptEd25519AesGcmPublicKeyBuffer, fr as backupCommunityDb, g as authorNameResolveFailureReason, gn as cleanUpBeforePublishing, gr as deleteOldCommunityInWindows, h as authorIdentityMatcherForRequest, hn as _validateSignatureOfPKCRecord, i as derivePublicPageSorts, ir as decode, j as iterateOverPageCidsToFindAllCids, kr as resolveDbPostsCidRefs, lr as getPKCAddressFromPublicKeySync, m as pkcJsChallenges, mn as encryptEd25519AesGcmPublicKeyBuffer, mr as calculateInlineRepliesBudget, nr as getCommunityPublicKeyFromWire, o as loadPageSortsForStartedCommunity, p as loadChallengeFileFromCommunityChallengeSettings, pr as calculateExpectedSignatureSize, pt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, r as computePageSortsFingerprint, s as lookupPageSortFactories, sr as getIpfsKeyFromPrivateKey, t as RpcLocalCommunity, tr as getCommunityNameFromWire, u as deriveCommunityChallengesOrThrow, ur as getPublicKeyFromPrivateKey, v as TrackedInstanceRegistry, vn as signChallengeMessage, vr as deriveDbPosts, w as TIMEFRAMES_TO_SECONDS, wn as signCommentUpdate, wr as importSignerIntoKuboNode, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as getDefaultCommunityDbConfig, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as r$2 } from "./rpc-local-community-
|
|
4
|
-
import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-
|
|
2
|
+
import { Ar as t$2, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, Bt as DecryptedChallengeRequestPublicationSchema, C as hideClassPrivateProps, Cr as e, Dn as VotePubsubReservedFields, Dt as untrackUpdatingCommunity, En as VotePubsubMessagePublicationSchema, Er as t$3, F as isLinkOfVideo, Ft as ChallengeRequestMessageSchema, G as removeBlocksFromKuboNode, Hn as CommentUpdateTableRowSchema, I as isLinkValid, J as removeNullUndefinedValues, K as removeMfsFilesSafely, Lt as ChallengeVerificationMessageSchema, M as isLinkOfAudio, Mn as CommentIpfsSchema, Mr as require_retry, N as isLinkOfImage, Nn as CommentPubsubMessageReservedFields, Nt as ChallengeMessageSchema, Ot as require_sha256, P as isLinkOfMedia, Q as retryKuboBlockPutPinAndProvidePubsubTopic, Qn as CommentEditReservedFields, Rr as PKCError, Sr as e$1, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tr as r$1, Tt as untrackStartedCommunity, Un as CommentsTableRowSchema, Vt as DecryptedChallengeRequestSchema, Xn as CommentEditPubsubMessagePublicationSchema, Yt as version_default, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zt as CommunityEditPublicationPubsubReservedFields, _ as genToArray, _r as n$3, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, b as getIpnsRecordInLocalKuboNode, br as t$5, c as contentContainsMarkdownImages, ct as withSortedKeys, dt as findCommunityInRegistry, er as CommentEditsTableRowSchema, et as retryKuboIpfsAddAndProvide, f as derivePublicationFromChallengeRequest, ft as findStartedCommunity, g as findMalformedUnicodeString, gr as isStringDomain, hn as CommunitySignedPropertyNames, i as calculateStringSizeSameAsIpfsAddCidV0, it as statMfsPathSafely, j as isLinkOfAnimatedImage, jt as ChallengeAnswerMessageSchema, kn as VoteTablesRowSchema, kr as t$4, l as contentContainsMarkdownVideos, lt as withSortedKeysDeep, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, ni as ZodError, nn as CommentModerationPubsubMessagePublicationSchema, o as calculateUnixFsDagSizeCidV0, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, r as calculateIpfsCidV0, rn as CommentModerationReservedFields, rt as sleepUntilTimeoutOrAbort, s as contentContainsMarkdownAudio, ut as writeKuboFilesWithTimeout, v as getEquivalentCommunityAddresses, vr as t$7, wt as trackUpdatingCommunity, xr as t$6, xt as syncCommunityRegistryEntry, y as getErrorCodeFromMessage, yr as n$2, zr as messages } from "./util-BYT-7zVn.js";
|
|
3
|
+
import { $ as createSchemaRowParser, An as verifyChallengeAnswer, Bn as verifyCommunityEdit, Br as t$8, Cr as getThumbnailPropsOfLink, Dr as moveCommunityDbToDeletedDirectory, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Fr as isCommunityStartLocked, Gr as stringify, Hn as verifyVote, Hr as n$4, In as verifyCommentModeration, Ir as require_src, Kn as getAuthorNameFromWire, Ln as verifyCommentPubsubMessage, Lr as t$10, Mn as verifyChallengeRequest, Mr as findCommunitiesEntry, N as MAX_PAGE_SIZE_BYTES, Or as refreshCommunitiesList, Pn as verifyCommentEdit, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Rn as verifyCommentUpdate, Rr as t$11, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Tn as signCommentUpdateForChallengeVerification, Un as buildRuntimeAuthor, Vr as n$5, W as pLimit, Wn as cleanWireAuthor, Wr as t$9, X as coerceSchemaRowBoolean, Xr as STORAGE_KEYS, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, Zr as require_lodash_merge, _ as createAuthorIdentityMatcher, _r as deriveCommentIpfsFromCommentTableRow, a as generatePagesReportingFailedSorts, ar as encode, b as KeyvBetterSqlite3, bn as signChallengeVerification, c as resolvePageSortsOrThrow, cn as SignerWithPublicKeyAddress, cr as getPKCAddressFromPublicKey, d as getChallengeVerification, dr as BackupAbortError, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, f as getCommunityChallengeFromCommunityChallengeSettings, fn as decryptEd25519AesGcmPublicKeyBuffer, fr as backupCommunityDb, g as authorNameResolveFailureReason, gn as cleanUpBeforePublishing, gr as deleteOldCommunityInWindows, h as authorIdentityMatcherForRequest, hn as _validateSignatureOfPKCRecord, i as derivePublicPageSorts, ir as decode, j as iterateOverPageCidsToFindAllCids, kr as resolveDbPostsCidRefs, lr as getPKCAddressFromPublicKeySync, m as pkcJsChallenges, mn as encryptEd25519AesGcmPublicKeyBuffer, mr as calculateInlineRepliesBudget, nr as getCommunityPublicKeyFromWire, o as loadPageSortsForStartedCommunity, p as loadChallengeFileFromCommunityChallengeSettings, pr as calculateExpectedSignatureSize, pt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, r as computePageSortsFingerprint, s as lookupPageSortFactories, sr as getIpfsKeyFromPrivateKey, t as RpcLocalCommunity, tr as getCommunityNameFromWire, u as deriveCommunityChallengesOrThrow, ur as getPublicKeyFromPrivateKey, v as TrackedInstanceRegistry, vn as signChallengeMessage, vr as deriveDbPosts, w as TIMEFRAMES_TO_SECONDS, wn as signCommentUpdate, wr as importSignerIntoKuboNode, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as getDefaultCommunityDbConfig, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as r$2 } from "./rpc-local-community-KgRrTYjv.js";
|
|
4
|
+
import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-DaW6urZ2.js";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import Path from "node:path";
|
|
7
7
|
import os from "os";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-
|
|
3
|
-
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, Ar as setNativeFunctions$1, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Br as t$3, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dt as parseJsonWithPKCErrorIfFails, Er as monitorCommunitiesDirectory, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as NAME_RESOLVED_TRUE_TTL_MS, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lr as t$5, Lt as RpcCidParamSchema, M as parseRawPages, Mr as findCommunitiesEntry, Nn as verifyChallengeVerification, Nr as toCommunitiesEntry, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pt as RpcAnchorPublishPreparationResultSchema, Qr as nativeFunctions$2, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, Sr as getDefaultDataPath, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tr as listCommunitiesSync, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as t$2, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vr as n$3, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wr as t$4, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Yt as RpcFetchCommunityListParamSchema, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qr as NAME_RESOLVED_FALSE_TTL_MS, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-BYT-7zVn.js";
|
|
3
|
+
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, Ar as setNativeFunctions$1, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Br as t$3, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dt as parseJsonWithPKCErrorIfFails, Er as monitorCommunitiesDirectory, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as NAME_RESOLVED_TRUE_TTL_MS, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lr as t$5, Lt as RpcCidParamSchema, M as parseRawPages, Mr as findCommunitiesEntry, Nn as verifyChallengeVerification, Nr as toCommunitiesEntry, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pt as RpcAnchorPublishPreparationResultSchema, Qr as nativeFunctions$2, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, Sr as getDefaultDataPath, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tr as listCommunitiesSync, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as t$2, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vr as n$3, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wr as t$4, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Yt as RpcFetchCommunityListParamSchema, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qr as NAME_RESOLVED_FALSE_TTL_MS, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-KgRrTYjv.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-DN7FMpHT.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -29096,7 +29096,7 @@ var CommentClientsManager = class extends PublicationClientsManager {
|
|
|
29096
29096
|
fetchCommentLogger.trace("Serving comment CID from cache", cid);
|
|
29097
29097
|
return t$4(cachedComment);
|
|
29098
29098
|
}
|
|
29099
|
-
const
|
|
29099
|
+
const fetchAndVerify = async () => {
|
|
29100
29100
|
fetchCommentLogger.trace("Fetching comment CID", cid);
|
|
29101
29101
|
let commentRawString;
|
|
29102
29102
|
if (Object.keys(this._pkc.clients.kuboRpcClients).length > 0 || Object.keys(this._pkc.clients.libp2pJsClients).length > 0) commentRawString = await this._fetchRawCommentCidIpfsP2P(cid);
|
|
@@ -29104,7 +29104,8 @@ var CommentClientsManager = class extends PublicationClientsManager {
|
|
|
29104
29104
|
const commentIpfs = parseCommentIpfsSchemaWithPKCErrorIfItFails(parseJsonWithPKCErrorIfFails(commentRawString));
|
|
29105
29105
|
await this._throwIfCommentIpfsIsInvalid(commentIpfs, cid);
|
|
29106
29106
|
return commentIpfs;
|
|
29107
|
-
}
|
|
29107
|
+
};
|
|
29108
|
+
const verifiedComment = await this._pkc._inflightFetchManager.withResource(InflightResourceTypes.COMMENT_IPFS, cid, fetchAndVerify, this._comment._getStopAbortSignal());
|
|
29108
29109
|
this._pkc._memCaches.commentIpfs.set(cid, verifiedComment);
|
|
29109
29110
|
return verifiedComment;
|
|
29110
29111
|
}
|
|
@@ -29598,12 +29599,12 @@ var Comment = class extends Publication {
|
|
|
29598
29599
|
}
|
|
29599
29600
|
const crosspostAuthors = this.crosspost ? collectCrosspostAuthorsToResolve({ crosspost: this.crosspost }) : [];
|
|
29600
29601
|
if (ownAuthor.length === 0 && replyAuthors.length === 0 && crosspostAuthors.length === 0) return;
|
|
29601
|
-
const previousNameResolved = this.author.nameResolved;
|
|
29602
29602
|
const onResolved = () => {
|
|
29603
29603
|
const crosspostChanged = this.crosspost ? applyNameResolvedCacheToCrosspost({
|
|
29604
29604
|
crosspost: this.crosspost,
|
|
29605
29605
|
cache: this._pkc._memCaches.nameResolvedCache
|
|
29606
29606
|
}) : false;
|
|
29607
|
+
const previousNameResolved = this.author.nameResolved;
|
|
29607
29608
|
this._setAuthorNameResolvedFromCache();
|
|
29608
29609
|
if (this.replies?.pages) {
|
|
29609
29610
|
for (const page of Object.values(this.replies.pages)) if (page) this.replies._applyNameResolvedCacheToPage(page);
|
|
@@ -35817,7 +35818,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
35817
35818
|
this._nameResolvedFalseTtlMs = NAME_RESOLVED_FALSE_TTL_MS;
|
|
35818
35819
|
this._nameResolvedTrueTtlMs = NAME_RESOLVED_TRUE_TTL_MS;
|
|
35819
35820
|
this._nameResolveFailedRetryFloorMs = NAME_RESOLVE_FAILED_RETRY_FLOOR_MS;
|
|
35820
|
-
this._authorNameResolvesInFlight = /* @__PURE__ */ new
|
|
35821
|
+
this._authorNameResolvesInFlight = /* @__PURE__ */ new Map();
|
|
35821
35822
|
this._timeouts = {
|
|
35822
35823
|
"community-ipns": 300 * 1e3,
|
|
35823
35824
|
"community-ipfs": 60 * 1e3,
|
|
@@ -35881,7 +35882,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
35881
35882
|
this._initRpcClientsIfNeeded();
|
|
35882
35883
|
this._initIpfsGatewaysIfNeeded();
|
|
35883
35884
|
this._initMemCaches();
|
|
35884
|
-
this._inflightFetchManager = new InflightFetchManager();
|
|
35885
|
+
this._inflightFetchManager = new InflightFetchManager({ isDestroyed: () => this.destroyed });
|
|
35885
35886
|
if (!this.noData) {
|
|
35886
35887
|
if (!this.pkcRpcClientsOptions) this.dataPath = this.parsedPKCOptions.dataPath = "dataPath" in this.parsedPKCOptions ? this.parsedPKCOptions.dataPath : getDefaultDataPath();
|
|
35887
35888
|
else if (typeof this.parsedPKCOptions.dataPath === "string") this.dataPath = this.parsedPKCOptions.dataPath;
|
|
@@ -35945,7 +35946,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
35945
35946
|
this.clients.libp2pJsClients = {};
|
|
35946
35947
|
if (!this.libp2pJsClientsOptions) return;
|
|
35947
35948
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
35948
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc
|
|
35949
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc--Xw7hTTu.js");
|
|
35949
35950
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
35950
35951
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
35951
35952
|
...clientOptions,
|
|
@@ -36047,6 +36048,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36047
36048
|
});
|
|
36048
36049
|
abortPromise.catch(() => {});
|
|
36049
36050
|
abortSignal?.addEventListener("abort", abortListener);
|
|
36051
|
+
comment._createStopAbortController();
|
|
36050
36052
|
const commentTimeout = this._timeouts["comment-ipfs"];
|
|
36051
36053
|
try {
|
|
36052
36054
|
await pTimeout(Promise.race([comment._attemptInfintelyToLoadCommentIpfs(), abortPromise]), {
|
|
@@ -36054,6 +36056,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36054
36056
|
message: lastUpdateError || new TimeoutError(`pkc.getComment({cid: ${parsedGetCommentArgs}}) timed out after ${commentTimeout}ms`)
|
|
36055
36057
|
});
|
|
36056
36058
|
if (!comment.signature) throw Error("Failed to load CommentIpfs");
|
|
36059
|
+
comment._clearStopAbortController();
|
|
36057
36060
|
return comment;
|
|
36058
36061
|
} catch (e) {
|
|
36059
36062
|
if (abortError) throw abortError;
|
|
@@ -36310,7 +36313,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36310
36313
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36311
36314
|
log.trace("Received community options to create a local community instance:", options);
|
|
36312
36315
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36313
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36316
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-CH8vMgTr.js");
|
|
36314
36317
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
36315
36318
|
const community = new LocalCommunity(this);
|
|
36316
36319
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-
|
|
1
|
+
import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-BYT-7zVn.js";
|
|
2
2
|
//#region dist/node/pages/page-sort-scoring.js
|
|
3
3
|
function validatePageSortFile(rawFile) {
|
|
4
4
|
const validated = PageSortFileSchema.parse(rawFile);
|