@pkcprotocol/pkc-js 0.0.133 → 0.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/publications/comment/schema.d.ts +4 -0
- package/dist/browser/publications/comment/schema.js +2 -1
- package/dist/browser/publications/comment/schema.js.map +1 -1
- package/dist/browser/runtime/node/community/db-handler.js +44 -91
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.js +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/browser/runtime/node/community/page-generator.d.ts +2 -0
- package/dist/browser/runtime/node/community/page-generator.js +3 -2
- package/dist/browser/runtime/node/community/page-generator.js.map +1 -1
- package/dist/browser/runtime/node/util.d.ts +1 -0
- package/dist/browser/runtime/node/util.js +3 -2
- package/dist/browser/runtime/node/util.js.map +1 -1
- package/dist/browser/signer/signatures.js +6 -1
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +46 -46
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-B6cVl9Fj.js → helia-for-pkc-CcFjdSPv.js} +2 -2
- package/dist/bundled/chunks/{local-community-CEsw9IC3.js → local-community-BDHE3v_Y.js} +1 -1
- package/dist/bundled/chunks/{local-community-JxRohlLp.js → local-community-GYjtDIwZ.js} +54 -98
- package/dist/bundled/chunks/{node-DsWFSaNV.js → node-Cqt8DEE-.js} +5 -5
- package/dist/bundled/chunks/{page-sort-scoring-iqMGLuRC.js → page-sort-scoring-BXVdZf57.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-jndojGZl.js → rpc-local-community-CDsOv_s2.js} +9 -6
- package/dist/bundled/chunks/{util-CYgZRMVL.js → util-B-VRroTI.js} +1 -1
- package/dist/bundled/chunks/{util-Bna9pur0.js → util-B5FM8shT.js} +3 -2
- package/dist/bundled/chunks/{validate-package-factories-FeyM9Tw1.js → validate-package-factories-a2ZVHdRd.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/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/publications/comment/schema.d.ts +4 -0
- package/dist/node/publications/comment/schema.js +2 -1
- package/dist/node/publications/comment/schema.js.map +1 -1
- package/dist/node/runtime/node/community/db-handler.js +44 -91
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.js +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/node/runtime/node/community/page-generator.d.ts +2 -0
- package/dist/node/runtime/node/community/page-generator.js +3 -2
- package/dist/node/runtime/node/community/page-generator.js.map +1 -1
- package/dist/node/runtime/node/util.d.ts +1 -0
- package/dist/node/runtime/node/util.js +3 -2
- package/dist/node/runtime/node/util.js.map +1 -1
- package/dist/node/signer/signatures.js +6 -1
- package/dist/node/signer/signatures.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-a2ZVHdRd.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-Cqt8DEE-.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-Cqt8DEE-.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-a2ZVHdRd.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-CDsOv_s2.js",
|
|
48
|
+
"chunks/node-Cqt8DEE-.js",
|
|
49
|
+
"chunks/util-B5FM8shT.js",
|
|
50
|
+
"chunks/local-community-GYjtDIwZ.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-CcFjdSPv.js": {
|
|
81
81
|
"isEntry": false,
|
|
82
82
|
"imports": [
|
|
83
83
|
"chunks/chunk-2rV9d50f.js",
|
|
84
|
-
"chunks/util-
|
|
85
|
-
"chunks/util-
|
|
84
|
+
"chunks/util-B5FM8shT.js",
|
|
85
|
+
"chunks/util-B-VRroTI.js",
|
|
86
86
|
"chunks/src-DKntVmyX.js",
|
|
87
87
|
"chunks/src-Cpx2Sts8.js",
|
|
88
88
|
"node:url",
|
|
@@ -201,21 +201,21 @@
|
|
|
201
201
|
"dist/node/helia/helia-for-pkc.js"
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
|
-
"chunks/local-community-
|
|
204
|
+
"chunks/local-community-BDHE3v_Y.js": {
|
|
205
205
|
"isEntry": false,
|
|
206
206
|
"imports": [
|
|
207
|
-
"chunks/local-community-
|
|
207
|
+
"chunks/local-community-GYjtDIwZ.js"
|
|
208
208
|
],
|
|
209
209
|
"dynamicImports": [],
|
|
210
210
|
"inputs": []
|
|
211
211
|
},
|
|
212
|
-
"chunks/local-community-
|
|
212
|
+
"chunks/local-community-GYjtDIwZ.js": {
|
|
213
213
|
"isEntry": false,
|
|
214
214
|
"imports": [
|
|
215
215
|
"chunks/chunk-2rV9d50f.js",
|
|
216
|
-
"chunks/rpc-local-community-
|
|
217
|
-
"chunks/util-
|
|
218
|
-
"chunks/page-sort-scoring-
|
|
216
|
+
"chunks/rpc-local-community-CDsOv_s2.js",
|
|
217
|
+
"chunks/util-B5FM8shT.js",
|
|
218
|
+
"chunks/page-sort-scoring-BXVdZf57.js",
|
|
219
219
|
"node:url",
|
|
220
220
|
"node:path",
|
|
221
221
|
"os",
|
|
@@ -262,13 +262,13 @@
|
|
|
262
262
|
"dist/node/runtime/node/community/local-community.js"
|
|
263
263
|
]
|
|
264
264
|
},
|
|
265
|
-
"chunks/node-
|
|
265
|
+
"chunks/node-Cqt8DEE-.js": {
|
|
266
266
|
"isEntry": false,
|
|
267
267
|
"imports": [
|
|
268
268
|
"chunks/chunk-2rV9d50f.js",
|
|
269
|
-
"chunks/rpc-local-community-
|
|
270
|
-
"chunks/util-
|
|
271
|
-
"chunks/util-
|
|
269
|
+
"chunks/rpc-local-community-CDsOv_s2.js",
|
|
270
|
+
"chunks/util-B5FM8shT.js",
|
|
271
|
+
"chunks/util-B-VRroTI.js",
|
|
272
272
|
"path",
|
|
273
273
|
"assert",
|
|
274
274
|
"fs",
|
|
@@ -279,8 +279,8 @@
|
|
|
279
279
|
"rpc-websockets"
|
|
280
280
|
],
|
|
281
281
|
"dynamicImports": [
|
|
282
|
-
"chunks/helia-for-pkc-
|
|
283
|
-
"chunks/local-community-
|
|
282
|
+
"chunks/helia-for-pkc-CcFjdSPv.js",
|
|
283
|
+
"chunks/local-community-GYjtDIwZ.js"
|
|
284
284
|
],
|
|
285
285
|
"inputs": [
|
|
286
286
|
"dist/node/zod-error-map.js",
|
|
@@ -440,22 +440,22 @@
|
|
|
440
440
|
"dist/node/index.js"
|
|
441
441
|
]
|
|
442
442
|
},
|
|
443
|
-
"chunks/page-sort-scoring-
|
|
443
|
+
"chunks/page-sort-scoring-BXVdZf57.js": {
|
|
444
444
|
"isEntry": false,
|
|
445
445
|
"imports": [
|
|
446
|
-
"chunks/util-
|
|
446
|
+
"chunks/util-B5FM8shT.js"
|
|
447
447
|
],
|
|
448
448
|
"dynamicImports": [],
|
|
449
449
|
"inputs": [
|
|
450
450
|
"dist/node/pages/page-sort-scoring.js"
|
|
451
451
|
]
|
|
452
452
|
},
|
|
453
|
-
"chunks/rpc-local-community-
|
|
453
|
+
"chunks/rpc-local-community-CDsOv_s2.js": {
|
|
454
454
|
"isEntry": false,
|
|
455
455
|
"imports": [
|
|
456
456
|
"chunks/chunk-2rV9d50f.js",
|
|
457
|
-
"chunks/util-
|
|
458
|
-
"chunks/page-sort-scoring-
|
|
457
|
+
"chunks/util-B5FM8shT.js",
|
|
458
|
+
"chunks/page-sort-scoring-BXVdZf57.js",
|
|
459
459
|
"chunks/src-CYIMjhjK.js",
|
|
460
460
|
"node:crypto",
|
|
461
461
|
"node:url",
|
|
@@ -1531,7 +1531,21 @@
|
|
|
1531
1531
|
"node_modules/@ipld/dag-pb/src/index.js"
|
|
1532
1532
|
]
|
|
1533
1533
|
},
|
|
1534
|
-
"chunks/util-
|
|
1534
|
+
"chunks/util-B-VRroTI.js": {
|
|
1535
|
+
"isEntry": false,
|
|
1536
|
+
"imports": [
|
|
1537
|
+
"chunks/util-B5FM8shT.js",
|
|
1538
|
+
"ipns/selector",
|
|
1539
|
+
"ipns/validator",
|
|
1540
|
+
"ipns",
|
|
1541
|
+
"uint8arrays/equals"
|
|
1542
|
+
],
|
|
1543
|
+
"dynamicImports": [],
|
|
1544
|
+
"inputs": [
|
|
1545
|
+
"dist/node/helia/util.js"
|
|
1546
|
+
]
|
|
1547
|
+
},
|
|
1548
|
+
"chunks/util-B5FM8shT.js": {
|
|
1535
1549
|
"isEntry": false,
|
|
1536
1550
|
"imports": [
|
|
1537
1551
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1626,25 +1640,11 @@
|
|
|
1626
1640
|
"dist/node/util.js"
|
|
1627
1641
|
]
|
|
1628
1642
|
},
|
|
1629
|
-
"chunks/
|
|
1630
|
-
"isEntry": false,
|
|
1631
|
-
"imports": [
|
|
1632
|
-
"chunks/util-Bna9pur0.js",
|
|
1633
|
-
"ipns/selector",
|
|
1634
|
-
"ipns/validator",
|
|
1635
|
-
"ipns",
|
|
1636
|
-
"uint8arrays/equals"
|
|
1637
|
-
],
|
|
1638
|
-
"dynamicImports": [],
|
|
1639
|
-
"inputs": [
|
|
1640
|
-
"dist/node/helia/util.js"
|
|
1641
|
-
]
|
|
1642
|
-
},
|
|
1643
|
-
"chunks/validate-package-factories-FeyM9Tw1.js": {
|
|
1643
|
+
"chunks/validate-package-factories-a2ZVHdRd.js": {
|
|
1644
1644
|
"isEntry": false,
|
|
1645
1645
|
"imports": [
|
|
1646
|
-
"chunks/util-
|
|
1647
|
-
"chunks/page-sort-scoring-
|
|
1646
|
+
"chunks/util-B5FM8shT.js",
|
|
1647
|
+
"chunks/page-sort-scoring-BXVdZf57.js"
|
|
1648
1648
|
],
|
|
1649
1649
|
"dynamicImports": [],
|
|
1650
1650
|
"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-a2ZVHdRd.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 { C as hideClassPrivateProps, Lr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic, zr as logger_default } 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 { C as hideClassPrivateProps, Lr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic, zr as logger_default } from "./util-B5FM8shT.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-B-VRroTI.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-GYjtDIwZ.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAddAndProvide, $n as CommentEditsTableRowSchema, At as ChallengeAnswerMessageSchema, Bt as DecryptedChallengeRequestSchema, C as hideClassPrivateProps, Ct as trackUpdatingCommunity, Dt as require_sha256, En as VotePubsubReservedFields, Et as untrackUpdatingCommunity, F as isLinkOfVideo, G as removeMfsFilesSafely, Hn as CommentsTableRowSchema, I as isLinkValid, It as ChallengeVerificationMessageSchema, Jt as version_default, Lr as PKCError, M as isLinkOfAudio, Mn as CommentPubsubMessageReservedFields, Mt as ChallengeMessageSchema, N as isLinkOfImage, On as VoteTablesRowSchema, Or as t$4, P as isLinkOfMedia, Pt as ChallengeRequestMessageSchema, Rr as messages, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$3, Vn as CommentUpdateTableRowSchema, W as removeBlocksFromKuboNode, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xt as CommunityEditPublicationPubsubReservedFields, Yn as CommentEditPubsubMessagePublicationSchema, Z as retryKuboBlockPutPinAndProvidePubsubTopic, Zn as CommentEditReservedFields, _ as genToArray, _r as t$7, at as timestamp, b as getIpnsRecordInLocalKuboNode, br as t$6, bt as syncCommunityRegistryEntry, c as contentContainsMarkdownImages, ct as withSortedKeysDeep, dt as findStartedCommunity, f as derivePublicationFromChallengeRequest, g as findMalformedUnicodeString, gr as n$3, hr as isStringDomain, i as calculateStringSizeSameAsIpfsAddCidV0, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, j as isLinkOfAnimatedImage, jn as CommentIpfsSchema, jr as require_retry, kr as t$2, kt as pTimeout, l as contentContainsMarkdownVideos, lt as writeKuboFilesWithTimeout, mn as CommunitySignedPropertyNames, nn as CommentModerationReservedFields, nt as sleepUntilTimeoutOrAbort, o as calculateUnixFsDagSizeCidV0, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, q as removeNullUndefinedValues, r as calculateIpfsCidV0, rt as statMfsPathSafely, s as contentContainsMarkdownAudio, st as withSortedKeys, ti as ZodError, tn as CommentModerationPubsubMessagePublicationSchema, ut as findCommunityInRegistry, v as getEquivalentCommunityAddresses, vr as n$2, wr as r$1, wt as untrackStartedCommunity, xr as e$1, xt as trackStartedCommunity, y as getErrorCodeFromMessage, yr as t$5, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default, zt as DecryptedChallengeRequestPublicationSchema } 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 { $ as retryKuboIpfsAddAndProvide, $n as CommentEditsTableRowSchema, At as ChallengeAnswerMessageSchema, Bt as DecryptedChallengeRequestSchema, C as hideClassPrivateProps, Ct as trackUpdatingCommunity, Dt as require_sha256, En as VotePubsubReservedFields, Et as untrackUpdatingCommunity, F as isLinkOfVideo, G as removeMfsFilesSafely, Hn as CommentsTableRowSchema, I as isLinkValid, It as ChallengeVerificationMessageSchema, Jt as version_default, Lr as PKCError, M as isLinkOfAudio, Mn as CommentPubsubMessageReservedFields, Mt as ChallengeMessageSchema, N as isLinkOfImage, On as VoteTablesRowSchema, Or as t$4, P as isLinkOfMedia, Pt as ChallengeRequestMessageSchema, Rr as messages, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$3, Vn as CommentUpdateTableRowSchema, W as removeBlocksFromKuboNode, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xt as CommunityEditPublicationPubsubReservedFields, Yn as CommentEditPubsubMessagePublicationSchema, Z as retryKuboBlockPutPinAndProvidePubsubTopic, Zn as CommentEditReservedFields, _ as genToArray, _r as t$7, at as timestamp, b as getIpnsRecordInLocalKuboNode, br as t$6, bt as syncCommunityRegistryEntry, c as contentContainsMarkdownImages, ct as withSortedKeysDeep, dt as findStartedCommunity, f as derivePublicationFromChallengeRequest, g as findMalformedUnicodeString, gr as n$3, hr as isStringDomain, i as calculateStringSizeSameAsIpfsAddCidV0, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, j as isLinkOfAnimatedImage, jn as CommentIpfsSchema, jr as require_retry, kr as t$2, kt as pTimeout, l as contentContainsMarkdownVideos, lt as writeKuboFilesWithTimeout, mn as CommunitySignedPropertyNames, nn as CommentModerationReservedFields, nt as sleepUntilTimeoutOrAbort, o as calculateUnixFsDagSizeCidV0, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, q as removeNullUndefinedValues, r as calculateIpfsCidV0, rt as statMfsPathSafely, s as contentContainsMarkdownAudio, st as withSortedKeys, ti as ZodError, tn as CommentModerationPubsubMessagePublicationSchema, ut as findCommunityInRegistry, v as getEquivalentCommunityAddresses, vr as n$2, wr as r$1, wt as untrackStartedCommunity, xr as e$1, xt as trackStartedCommunity, y as getErrorCodeFromMessage, yr as t$5, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default, zt as DecryptedChallengeRequestPublicationSchema } from "./util-B5FM8shT.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-CDsOv_s2.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-BXVdZf57.js";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import os from "os";
|
|
@@ -772,6 +772,7 @@ var PageGenerator = class {
|
|
|
772
772
|
});
|
|
773
773
|
return;
|
|
774
774
|
}
|
|
775
|
+
const flatSortNames = sorts.filter((sort) => sort.flat).map((sort) => sort.sortName);
|
|
775
776
|
const everyPreloadedIsSingleChunk = preloaded.length > 0 && preloaded.every(({ chunks }) => chunks.length === 1);
|
|
776
777
|
const skippingOtherSortsIsSound = nonPreloaded.length === 0 || preloaded.every(({ holdsWholeSet }) => holdsWholeSet);
|
|
777
778
|
if (everyPreloadedIsSingleChunk && skippingOtherSortsIsSound) {
|
|
@@ -779,7 +780,8 @@ var PageGenerator = class {
|
|
|
779
780
|
for (const { sort, chunks } of preloaded) singlePreloadedPage[sort.sortName] = { comments: source.resolve(chunks[0]) };
|
|
780
781
|
return {
|
|
781
782
|
singlePreloadedPage,
|
|
782
|
-
failedSorts
|
|
783
|
+
failedSorts,
|
|
784
|
+
flatSortNames
|
|
783
785
|
};
|
|
784
786
|
}
|
|
785
787
|
const budget = new PageBytesBudget(serializedEntryCacheBudgetBytes());
|
|
@@ -802,7 +804,8 @@ var PageGenerator = class {
|
|
|
802
804
|
if (!generatedPages) return void 0;
|
|
803
805
|
return {
|
|
804
806
|
...generatedPages,
|
|
805
|
-
failedSorts
|
|
807
|
+
failedSorts,
|
|
808
|
+
flatSortNames
|
|
806
809
|
};
|
|
807
810
|
}
|
|
808
811
|
_generationResToPages(res) {
|
|
@@ -2307,66 +2310,56 @@ var DbHandler = class {
|
|
|
2307
2310
|
`;
|
|
2308
2311
|
return this._prepareCached(queryStr).raw(true).all(...params).map(mapper.map);
|
|
2309
2312
|
}
|
|
2310
|
-
_assembleReplyTrees(
|
|
2313
|
+
_assembleReplyTrees(entries) {
|
|
2311
2314
|
const parsedByCid = /* @__PURE__ */ new Map();
|
|
2312
|
-
const
|
|
2313
|
-
for (const { entry, parent } of items) {
|
|
2315
|
+
for (const entry of entries) {
|
|
2314
2316
|
const cid = entry.commentUpdate.cid;
|
|
2315
|
-
if (parsedByCid.has(cid))
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
if (resolvedReplies) return withSortedKeys({
|
|
2324
|
-
...rest,
|
|
2325
|
-
replies: resolvedReplies
|
|
2326
|
-
});
|
|
2327
|
-
if (dbReplies) {
|
|
2328
|
-
const pageCids = {};
|
|
2329
|
-
for (const sortName of Object.keys(dbReplies).sort()) {
|
|
2330
|
-
const sortEntry = dbReplies[sortName];
|
|
2317
|
+
if (!parsedByCid.has(cid)) parsedByCid.set(cid, entry);
|
|
2318
|
+
}
|
|
2319
|
+
const wireRepliesOf = (dbReplies) => {
|
|
2320
|
+
const pages = {};
|
|
2321
|
+
const pageCids = {};
|
|
2322
|
+
for (const sortName of Object.keys(dbReplies).sort()) {
|
|
2323
|
+
const sortEntry = dbReplies[sortName];
|
|
2324
|
+
if (!sortEntry?.commentCids) {
|
|
2331
2325
|
if (sortEntry?.allPageCids?.[0]) pageCids[sortName] = sortEntry.allPageCids[0];
|
|
2326
|
+
continue;
|
|
2332
2327
|
}
|
|
2333
|
-
if (Object.keys(pageCids).length > 0) return withSortedKeys({
|
|
2334
|
-
...rest,
|
|
2335
|
-
replies: {
|
|
2336
|
-
pageCids,
|
|
2337
|
-
pages: {}
|
|
2338
|
-
}
|
|
2339
|
-
});
|
|
2340
|
-
}
|
|
2341
|
-
return rest;
|
|
2342
|
-
};
|
|
2343
|
-
const attachReplies = (cid) => {
|
|
2344
|
-
const children = childrenByParent.get(cid);
|
|
2345
|
-
if (!children?.size) return void 0;
|
|
2346
|
-
const parentDbReplies = parsedByCid.get(cid)?.commentUpdate.replies;
|
|
2347
|
-
const pages = {};
|
|
2348
|
-
for (const sortName of Object.keys(parentDbReplies ?? {}).sort()) {
|
|
2349
|
-
const sortEntry = parentDbReplies[sortName];
|
|
2350
|
-
if (!sortEntry?.commentCids) continue;
|
|
2351
2328
|
const comments = [];
|
|
2352
2329
|
for (const childCid of sortEntry.commentCids) {
|
|
2353
|
-
const child =
|
|
2330
|
+
const child = parsedByCid.get(childCid);
|
|
2354
2331
|
if (child) comments.push({
|
|
2355
2332
|
comment: child.comment,
|
|
2356
|
-
commentUpdate:
|
|
2333
|
+
commentUpdate: sortEntry.flat ? withoutReplies(child.commentUpdate) : withWireReplies(child.commentUpdate)
|
|
2357
2334
|
});
|
|
2358
2335
|
}
|
|
2359
|
-
|
|
2336
|
+
const nextCid = sortEntry.allPageCids?.[0] ?? sortEntry.nextCid;
|
|
2337
|
+
pages[sortName] = {
|
|
2338
|
+
comments,
|
|
2339
|
+
...nextCid ? { nextCid } : {}
|
|
2340
|
+
};
|
|
2360
2341
|
}
|
|
2361
|
-
|
|
2362
|
-
|
|
2342
|
+
const hasPageCids = Object.keys(pageCids).length > 0;
|
|
2343
|
+
if (!hasPageCids && Object.keys(pages).length === 0) return void 0;
|
|
2344
|
+
return {
|
|
2345
|
+
...hasPageCids ? { pageCids } : {},
|
|
2346
|
+
pages
|
|
2347
|
+
};
|
|
2363
2348
|
};
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2349
|
+
const withoutReplies = (commentUpdate) => {
|
|
2350
|
+
const { replies: _dbReplies, ...rest } = commentUpdate;
|
|
2351
|
+
return rest;
|
|
2352
|
+
};
|
|
2353
|
+
const withWireReplies = (commentUpdate) => {
|
|
2354
|
+
const dbReplies = commentUpdate.replies;
|
|
2355
|
+
const replies = dbReplies && wireRepliesOf(dbReplies);
|
|
2356
|
+
const rest = withoutReplies(commentUpdate);
|
|
2357
|
+
return replies ? withSortedKeys({
|
|
2358
|
+
...rest,
|
|
2359
|
+
replies
|
|
2360
|
+
}) : rest;
|
|
2369
2361
|
};
|
|
2362
|
+
return { withWireReplies };
|
|
2370
2363
|
}
|
|
2371
2364
|
queryPageCommentsWithResolvedReplies(options) {
|
|
2372
2365
|
return this.resolveRepliesCidRefsForEntries(this.queryPageComments(options));
|
|
@@ -2397,10 +2390,7 @@ var DbHandler = class {
|
|
|
2397
2390
|
resolveRepliesCidRefsForEntries(entries) {
|
|
2398
2391
|
const withReplies = entries.filter((entry) => this._entryHasDbReplies(entry));
|
|
2399
2392
|
if (withReplies.length === 0) return entries;
|
|
2400
|
-
const trees = withReplies.every((entry) => entry.comment.depth === 0) ? this._assembleReplyTrees(this.queryRepliesUnderPosts(withReplies.map((entry) => entry.commentUpdate.cid))
|
|
2401
|
-
entry,
|
|
2402
|
-
parent: entry.comment.parentCid
|
|
2403
|
-
}))) : this._assembleReplyTreesFromCidRefs(withReplies);
|
|
2393
|
+
const trees = withReplies.every((entry) => entry.comment.depth === 0) ? this._assembleReplyTrees(this.queryRepliesUnderPosts(withReplies.map((entry) => entry.commentUpdate.cid))) : this._assembleReplyTreesFromCidRefs(withReplies);
|
|
2404
2394
|
return this._rebuildEntriesFromTrees(entries, trees);
|
|
2405
2395
|
}
|
|
2406
2396
|
_assembleReplyTreesFromCidRefs(entries) {
|
|
@@ -2427,52 +2417,17 @@ var DbHandler = class {
|
|
|
2427
2417
|
`, (row) => level.push(mapper.map(row)), true);
|
|
2428
2418
|
for (const entry of level) {
|
|
2429
2419
|
seen.add(entry.commentUpdate.cid);
|
|
2430
|
-
items.push(
|
|
2431
|
-
entry,
|
|
2432
|
-
parent: entry.comment.parentCid
|
|
2433
|
-
});
|
|
2420
|
+
items.push(entry);
|
|
2434
2421
|
}
|
|
2435
2422
|
frontier = listedChildren(level);
|
|
2436
2423
|
}
|
|
2437
2424
|
return this._assembleReplyTrees(items);
|
|
2438
2425
|
}
|
|
2439
|
-
_rebuildEntriesFromTrees(entries, {
|
|
2440
|
-
return entries.map((entry) => {
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
const resolvedPageCids = {};
|
|
2445
|
-
for (const sortName of Object.keys(replies).sort()) {
|
|
2446
|
-
const sortEntry = replies[sortName];
|
|
2447
|
-
if (sortEntry?.commentCids) {
|
|
2448
|
-
const resolvedComments = [];
|
|
2449
|
-
for (const cid of sortEntry.commentCids) {
|
|
2450
|
-
const child = parsedByCid.get(cid);
|
|
2451
|
-
if (child) resolvedComments.push({
|
|
2452
|
-
comment: child.comment,
|
|
2453
|
-
commentUpdate: buildWireCommentUpdate(child.commentUpdate, attachReplies(cid))
|
|
2454
|
-
});
|
|
2455
|
-
}
|
|
2456
|
-
const nextCidForSort = sortEntry.allPageCids?.[0] ?? sortEntry.nextCid;
|
|
2457
|
-
resolvedPages[sortName] = {
|
|
2458
|
-
comments: resolvedComments,
|
|
2459
|
-
...nextCidForSort ? { nextCid: nextCidForSort } : {}
|
|
2460
|
-
};
|
|
2461
|
-
}
|
|
2462
|
-
if (sortEntry?.allPageCids?.[0]) resolvedPageCids[sortName] = sortEntry.allPageCids[0];
|
|
2463
|
-
}
|
|
2464
|
-
const { replies: _dbReplies, ...entryCommentUpdateRest } = entry.commentUpdate;
|
|
2465
|
-
return {
|
|
2466
|
-
...entry,
|
|
2467
|
-
commentUpdate: withSortedKeys({
|
|
2468
|
-
...entryCommentUpdateRest,
|
|
2469
|
-
replies: {
|
|
2470
|
-
...Object.keys(resolvedPageCids).length > 0 ? { pageCids: resolvedPageCids } : {},
|
|
2471
|
-
pages: resolvedPages
|
|
2472
|
-
}
|
|
2473
|
-
})
|
|
2474
|
-
};
|
|
2475
|
-
});
|
|
2426
|
+
_rebuildEntriesFromTrees(entries, { withWireReplies }) {
|
|
2427
|
+
return entries.map((entry) => this._entryHasDbReplies(entry) ? {
|
|
2428
|
+
...entry,
|
|
2429
|
+
commentUpdate: withWireReplies(entry.commentUpdate)
|
|
2430
|
+
} : entry);
|
|
2476
2431
|
}
|
|
2477
2432
|
queryCommentAndCommentUpdateByCids(cids, opts) {
|
|
2478
2433
|
if (cids.length === 0) return [];
|
|
@@ -4144,7 +4099,8 @@ async function calculateNewCommentUpdate(opts) {
|
|
|
4144
4099
|
...newCommentUpdate,
|
|
4145
4100
|
replies: deriveDbReplies({
|
|
4146
4101
|
replies: newCommentUpdate.replies,
|
|
4147
|
-
allPageCids
|
|
4102
|
+
allPageCids,
|
|
4103
|
+
flatSortNames: generatedRepliesPages?.flatSortNames
|
|
4148
4104
|
}),
|
|
4149
4105
|
postUpdatesBucket: newPostUpdateBucket,
|
|
4150
4106
|
publishedToPostUpdatesMFS: false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAddAndProvide, At as ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Et as untrackUpdatingCommunity, H as rejectWhenAbortSignalFires, Hr as setErrorMap, In as CommentUpdateForChallengeVerificationSchema, It as ChallengeVerificationMessageSchema, J as removeUndefinedValuesRecursively, Jt as version_default, Lr as PKCError, Mr as FailedToFetchCommentIpfsFromGatewaysError, Mt as ChallengeMessageSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Ot as TimeoutError, Pt as ChallengeRequestMessageSchema, Q as retryKuboIpfsAdd, Rr as messages, Sr as e$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenCommunityStopsOrAborts, X as resolveWhenPredicateIsTrue, Y as replaceXWithY, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as timestamp, br as t$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as shortifyAddress, ft as findUpdatingComment, gr as n$2, gt as listUpdatingComments, hr as isStringDomain, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$1, k as isIpns, kt as pTimeout, ni as en_default, nt as sleepUntilTimeoutOrAbort, ot as waitForUpdateInCommunityInstanceWithErrorAndTimeout, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, r as calculateIpfsCidV0, tt as shortifyCid, u as createAbortError, vr as n$1, vt as refreshTrackedCommentAliases, wr as r, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, xr as e, zn as CommentUpdateSchema, zr as logger_default } 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 retryKuboIpfsAddAndProvide, At as ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Et as untrackUpdatingCommunity, H as rejectWhenAbortSignalFires, Hr as setErrorMap, In as CommentUpdateForChallengeVerificationSchema, It as ChallengeVerificationMessageSchema, J as removeUndefinedValuesRecursively, Jt as version_default, Lr as PKCError, Mr as FailedToFetchCommentIpfsFromGatewaysError, Mt as ChallengeMessageSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Ot as TimeoutError, Pt as ChallengeRequestMessageSchema, Q as retryKuboIpfsAdd, Rr as messages, Sr as e$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenCommunityStopsOrAborts, X as resolveWhenPredicateIsTrue, Y as replaceXWithY, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as timestamp, br as t$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as shortifyAddress, ft as findUpdatingComment, gr as n$2, gt as listUpdatingComments, hr as isStringDomain, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$1, k as isIpns, kt as pTimeout, ni as en_default, nt as sleepUntilTimeoutOrAbort, ot as waitForUpdateInCommunityInstanceWithErrorAndTimeout, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, r as calculateIpfsCidV0, tt as shortifyCid, u as createAbortError, vr as n$1, vt as refreshTrackedCommentAliases, wr as r, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, xr as e, zn as CommentUpdateSchema, zr as logger_default } from "./util-B5FM8shT.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-CDsOv_s2.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-B-VRroTI.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -35823,7 +35823,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
35823
35823
|
this.clients.libp2pJsClients = {};
|
|
35824
35824
|
if (!this.libp2pJsClientsOptions) return;
|
|
35825
35825
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
35826
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
35826
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-CcFjdSPv.js");
|
|
35827
35827
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
35828
35828
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
35829
35829
|
...clientOptions,
|
|
@@ -36188,7 +36188,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36188
36188
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36189
36189
|
log.trace("Received community options to create a local community instance:", options);
|
|
36190
36190
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36191
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36191
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-BDHE3v_Y.js");
|
|
36192
36192
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
36193
36193
|
const community = new LocalCommunity(this);
|
|
36194
36194
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bn as PageSortFileSchema, hr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-
|
|
1
|
+
import { bn as PageSortFileSchema, hr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-B5FM8shT.js";
|
|
2
2
|
//#region dist/node/pages/page-sort-scoring.js
|
|
3
3
|
function validatePageSortFile(rawFile) {
|
|
4
4
|
const validated = PageSortFileSchema.parse(rawFile);
|
package/dist/bundled/chunks/{rpc-local-community-jndojGZl.js → rpc-local-community-CDsOv_s2.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $r as string, $t as CreateCommunityEditPublicationOptionsWithRefinementSchema, A as isIpnsPath, An as CommentIpfsReservedFields, Ar as e$4, Bn as CommentUpdateSignedPropertyNames, Br as require_supports_color, C as hideClassPrivateProps, Cn as CreateVoteUserOptionsWithRefinementSchema, Cr as t$11, Ct as trackUpdatingCommunity, D as isIpfsCid, Dn as VoteSignedPropertyNames, Dr as r$7, Dt as require_sha256$1, E as isAbortError, Er as n$8, Et as untrackUpdatingCommunity, Fn as CommentUpdateChallengeReservedFieldNames, Fr as FailedToFetchGenericIpfsFromGatewaysError, Ft as ChallengeRequestMessageSignedPropertyNames, Gn as ModQueuePageIpfsSchema, Gr as boolean, Gt as PKCParsedOptionsSchema, Ht as DecryptedChallengeVerificationSchema, Ir as FailedToFetchPageIpfsFromGatewaysError, Jn as CommentEditChallengeRequestToEncryptSchema, Jr as looseObject, K as removeNullUndefinedEmptyObjectsValuesRecursively, Kn as PageIpfsSchema, Kr as custom, Kt as PKCUserOptionBaseSchema, L as isRequestPubsubPublicationOfPost, Ln as CommentUpdateForChallengeVerificationSignedPropertyNames, Lr as PKCError, Lt as ChallengeVerificationMessageSignedPropertyNames, Mr as FailedToFetchCommentIpfsFromGatewaysError, Nn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Nt as ChallengeMessageSignedPropertyNames, O as isIpfsPath, Or as t$10, Pn as CommentSignedPropertyNames, Pr as FailedToFetchCommunityFromGatewaysError, Qn as CommentEditSignedPropertyNames, Qr as record, Qt as CommunityEditPubsubMessagePublicationSchema, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateReservedFields, Rr as messages, Rt as DecryptedChallengeAnswerSchema, S as hasTransientNetworkErrorCode, Sn as RpcRemoteCommunityUpdateEventResultSchema, Sr as e$5, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$12, Un as CreateCommentOptionsWithRefinementSchema, Ur as _enum, Ut as NameResolveCacheOptionsSchema, V as raceAgainstAbort, Vr as require_ms$1, Vt as DecryptedChallengeSchema, Wn as GetPageParamSchema, Wr as array, Wt as NameResolverSerializedSchema, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xr as object, Yr as number, Yt as CommunityEditPublicationChallengeRequestToEncryptSchema, Zr as preprocess, Zt as CommunityEditPublicationSignedPropertyNames, _n as CreateRpcCommunityFunctionArgumentSchema, an as CreateCommentModerationOptionsWithRefinementSchema, ar as ChallengeAnswersSchema, at as timestamp, bn as PageSortFileSchema, br as t$13, cr as CommunityAddressSchema, d as deepMergeRuntimeFields, dn as CommunityExportRecordsSchema, dr as JsonSignatureSchema, dt as findStartedCommunity, ei as union, en as CommentModerationChallengeRequestToEncryptSchema, er as CreateCommentEditOptionsWithRefinementSchema, et as shortifyAddress, f as derivePublicationFromChallengeRequest, fn as CommunityIpfsReservedFields, fr as PKCTimestampSchema, gn as CreateRemoteCommunityFunctionArgumentSchema, gr as n$9, h as fetchAndValidateIpnsRecordFromGateway, hn as CreateNewLocalCommunityUserOptionsSchema, hr as isStringDomain, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$2, jt as ChallengeAnswerMessageSignedPropertyNames, k as isIpns, kn as CommentChallengeRequestToEncryptSchema, kr as t$9, kt as pTimeout, ln as CommunityChallengeSettingSchema, lr as CommunityAuthorChallengeReservedFieldNames, m as extractNetworkErrorDetails, mn as CommunitySignedPropertyNames, mr as areEquivalentNames, mt as forgetTrackedUpdatingCommunityName, nr as AuthorCommentIpfsReservedFields, nt as sleepUntilTimeoutOrAbort, on as ChallengeFileFactorySchema, or as CidPathSchema, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pr as ProtocolVersionSchema, pt as findUpdatingCommunity, qn as isReservedObjectKey, qr as literal, qt as PKCUserOptionsSchema, r as calculateIpfsCidV0, rn as CommentModerationSignedPropertyNames, rr as AuthorPubsubSchema, sn as ChallengeFileSchema, sr as CidStringSchema, t as areEquivalentCommunityAddresses, tn as CommentModerationPubsubMessagePublicationSchema, tr as AuthorAddressSchema, tt as shortifyCid, u as createAbortError, un as CommunityEditOptionsSchema, ur as CreateSignerSchema, vn as ExportCommunityModLogsOptionsSchema, vr as n$10, w as interruptibleSleep, wn as VoteChallengeRequestToEncryptSchema, wr as r$8, wt as untrackStartedCommunity, xr as e$6, xt as trackStartedCommunity, yn as PageSortFileFactorySchema, yt as refreshTrackedCommunityAliases, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default } from "./util-
|
|
2
|
+
import { $r as string, $t as CreateCommunityEditPublicationOptionsWithRefinementSchema, A as isIpnsPath, An as CommentIpfsReservedFields, Ar as e$4, Bn as CommentUpdateSignedPropertyNames, Br as require_supports_color, C as hideClassPrivateProps, Cn as CreateVoteUserOptionsWithRefinementSchema, Cr as t$11, Ct as trackUpdatingCommunity, D as isIpfsCid, Dn as VoteSignedPropertyNames, Dr as r$7, Dt as require_sha256$1, E as isAbortError, Er as n$8, Et as untrackUpdatingCommunity, Fn as CommentUpdateChallengeReservedFieldNames, Fr as FailedToFetchGenericIpfsFromGatewaysError, Ft as ChallengeRequestMessageSignedPropertyNames, Gn as ModQueuePageIpfsSchema, Gr as boolean, Gt as PKCParsedOptionsSchema, Ht as DecryptedChallengeVerificationSchema, Ir as FailedToFetchPageIpfsFromGatewaysError, Jn as CommentEditChallengeRequestToEncryptSchema, Jr as looseObject, K as removeNullUndefinedEmptyObjectsValuesRecursively, Kn as PageIpfsSchema, Kr as custom, Kt as PKCUserOptionBaseSchema, L as isRequestPubsubPublicationOfPost, Ln as CommentUpdateForChallengeVerificationSignedPropertyNames, Lr as PKCError, Lt as ChallengeVerificationMessageSignedPropertyNames, Mr as FailedToFetchCommentIpfsFromGatewaysError, Nn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Nt as ChallengeMessageSignedPropertyNames, O as isIpfsPath, Or as t$10, Pn as CommentSignedPropertyNames, Pr as FailedToFetchCommunityFromGatewaysError, Qn as CommentEditSignedPropertyNames, Qr as record, Qt as CommunityEditPubsubMessagePublicationSchema, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateReservedFields, Rr as messages, Rt as DecryptedChallengeAnswerSchema, S as hasTransientNetworkErrorCode, Sn as RpcRemoteCommunityUpdateEventResultSchema, Sr as e$5, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$12, Un as CreateCommentOptionsWithRefinementSchema, Ur as _enum, Ut as NameResolveCacheOptionsSchema, V as raceAgainstAbort, Vr as require_ms$1, Vt as DecryptedChallengeSchema, Wn as GetPageParamSchema, Wr as array, Wt as NameResolverSerializedSchema, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xr as object, Yr as number, Yt as CommunityEditPublicationChallengeRequestToEncryptSchema, Zr as preprocess, Zt as CommunityEditPublicationSignedPropertyNames, _n as CreateRpcCommunityFunctionArgumentSchema, an as CreateCommentModerationOptionsWithRefinementSchema, ar as ChallengeAnswersSchema, at as timestamp, bn as PageSortFileSchema, br as t$13, cr as CommunityAddressSchema, d as deepMergeRuntimeFields, dn as CommunityExportRecordsSchema, dr as JsonSignatureSchema, dt as findStartedCommunity, ei as union, en as CommentModerationChallengeRequestToEncryptSchema, er as CreateCommentEditOptionsWithRefinementSchema, et as shortifyAddress, f as derivePublicationFromChallengeRequest, fn as CommunityIpfsReservedFields, fr as PKCTimestampSchema, gn as CreateRemoteCommunityFunctionArgumentSchema, gr as n$9, h as fetchAndValidateIpnsRecordFromGateway, hn as CreateNewLocalCommunityUserOptionsSchema, hr as isStringDomain, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$2, jt as ChallengeAnswerMessageSignedPropertyNames, k as isIpns, kn as CommentChallengeRequestToEncryptSchema, kr as t$9, kt as pTimeout, ln as CommunityChallengeSettingSchema, lr as CommunityAuthorChallengeReservedFieldNames, m as extractNetworkErrorDetails, mn as CommunitySignedPropertyNames, mr as areEquivalentNames, mt as forgetTrackedUpdatingCommunityName, nr as AuthorCommentIpfsReservedFields, nt as sleepUntilTimeoutOrAbort, on as ChallengeFileFactorySchema, or as CidPathSchema, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pr as ProtocolVersionSchema, pt as findUpdatingCommunity, qn as isReservedObjectKey, qr as literal, qt as PKCUserOptionsSchema, r as calculateIpfsCidV0, rn as CommentModerationSignedPropertyNames, rr as AuthorPubsubSchema, sn as ChallengeFileSchema, sr as CidStringSchema, t as areEquivalentCommunityAddresses, tn as CommentModerationPubsubMessagePublicationSchema, tr as AuthorAddressSchema, tt as shortifyCid, u as createAbortError, un as CommunityEditOptionsSchema, ur as CreateSignerSchema, vn as ExportCommunityModLogsOptionsSchema, vr as n$10, w as interruptibleSleep, wn as VoteChallengeRequestToEncryptSchema, wr as r$8, wt as untrackStartedCommunity, xr as e$6, xt as trackStartedCommunity, yn as PageSortFileFactorySchema, yt as refreshTrackedCommunityAliases, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default } from "./util-B5FM8shT.js";
|
|
3
3
|
import { t as all } from "./src-CYIMjhjK.js";
|
|
4
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
4
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-BXVdZf57.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import dns from "node:dns";
|
|
@@ -118207,12 +118207,13 @@ function calculateInlineRepliesBudget({ comment, commentUpdateWithoutReplies, ma
|
|
|
118207
118207
|
return Math.max(0, Math.min(inlineBudgetFromComment, inlineBudgetFromPage));
|
|
118208
118208
|
}
|
|
118209
118209
|
function deriveDbReplies(opts) {
|
|
118210
|
-
const { replies, allPageCids } = opts;
|
|
118210
|
+
const { replies, allPageCids, flatSortNames } = opts;
|
|
118211
118211
|
if (!replies) return void 0;
|
|
118212
118212
|
const result = {};
|
|
118213
118213
|
if (replies.pages) for (const [sortName, page] of Object.entries(replies.pages)) result[sortName] = {
|
|
118214
118214
|
commentCids: page.comments.map((c) => c.commentUpdate.cid),
|
|
118215
|
-
...allPageCids?.[sortName]?.length ? { allPageCids: allPageCids[sortName] } : {}
|
|
118215
|
+
...allPageCids?.[sortName]?.length ? { allPageCids: allPageCids[sortName] } : {},
|
|
118216
|
+
...flatSortNames?.includes(sortName) ? { flat: true } : {}
|
|
118216
118217
|
};
|
|
118217
118218
|
if (allPageCids) {
|
|
118218
118219
|
for (const [sortName, cids] of Object.entries(allPageCids)) if (!result[sortName] && cids.length > 0) result[sortName] = { allPageCids: cids };
|
|
@@ -124255,6 +124256,8 @@ async function verifyCommentUpdate({ update, resolveAuthorNames, clientsManager,
|
|
|
124255
124256
|
const pageCid = update.replies.pageCids?.[replySortName];
|
|
124256
124257
|
const page = update.replies.pages[replySortName];
|
|
124257
124258
|
if (!page) throw Error("Failed to find page to verify within comment update");
|
|
124259
|
+
const parentComment = page.comments.every((pageComment) => pageComment.comment.depth === comment.depth + 1) || comment.depth !== 0 ? comment : { postCid: comment.cid };
|
|
124260
|
+
const isFlatRepliesPage = comment.depth === 0 && page.comments.some(({ comment: entry, commentUpdate }) => entry.depth !== 1 || commentUpdate.signature.signedPropertyNames.includes("replies") && !commentUpdate.replies);
|
|
124258
124261
|
const validity = await verifyPage({
|
|
124259
124262
|
pageCid,
|
|
124260
124263
|
page,
|
|
@@ -124262,9 +124265,9 @@ async function verifyCommentUpdate({ update, resolveAuthorNames, clientsManager,
|
|
|
124262
124265
|
resolveAuthorNames,
|
|
124263
124266
|
clientsManager,
|
|
124264
124267
|
community,
|
|
124265
|
-
parentComment
|
|
124268
|
+
parentComment,
|
|
124266
124269
|
validatePages,
|
|
124267
|
-
validateUpdateSignature,
|
|
124270
|
+
validateUpdateSignature: validateUpdateSignature && !isFlatRepliesPage,
|
|
124268
124271
|
abortSignal
|
|
124269
124272
|
});
|
|
124270
124273
|
if (!validity.valid) return validity;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as pubsubTopicToDhtKeyCid, Lr as PKCError } from "./util-
|
|
1
|
+
import { B as pubsubTopicToDhtKeyCid, Lr as PKCError } from "./util-B5FM8shT.js";
|
|
2
2
|
import { ipnsSelector } from "ipns/selector";
|
|
3
3
|
import { ipnsValidator } from "ipns/validator";
|
|
4
4
|
import { unmarshalIPNSRecord } from "ipns";
|
|
@@ -8284,7 +8284,8 @@ const CommentsTableRowSchema = CommentIpfsSchema.extend({
|
|
|
8284
8284
|
}).strict();
|
|
8285
8285
|
const DbRepliesSortEntrySchema = object({
|
|
8286
8286
|
commentCids: array(CidStringSchema).optional(),
|
|
8287
|
-
allPageCids: array(CidStringSchema).optional()
|
|
8287
|
+
allPageCids: array(CidStringSchema).optional(),
|
|
8288
|
+
flat: literal(true).optional()
|
|
8288
8289
|
});
|
|
8289
8290
|
const DbRepliesSchema = record(string().min(1), DbRepliesSortEntrySchema);
|
|
8290
8291
|
record(string().min(1), DbRepliesSortEntrySchema);
|
|
@@ -16549,7 +16550,7 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
|
|
|
16549
16550
|
], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
|
|
16550
16551
|
//#endregion
|
|
16551
16552
|
//#region dist/node/generated-version.js
|
|
16552
|
-
const version = "0.0.
|
|
16553
|
+
const version = "0.0.134";
|
|
16553
16554
|
//#endregion
|
|
16554
16555
|
//#region dist/node/version.js
|
|
16555
16556
|
const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Lr as PKCError, on as ChallengeFileFactorySchema, sn as ChallengeFileSchema, yn as PageSortFileFactorySchema } from "./util-
|
|
2
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
1
|
+
import { Lr as PKCError, on as ChallengeFileFactorySchema, sn as ChallengeFileSchema, yn as PageSortFileFactorySchema } from "./util-B5FM8shT.js";
|
|
2
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-BXVdZf57.js";
|
|
3
3
|
//#region dist/node/validate-package-factories.js
|
|
4
4
|
function validateChallengeFileFactory(factory, { name }) {
|
|
5
5
|
try {
|
package/dist/bundled/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getShortCid, c as setNativeFunctions, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as pageSorts, t as PKC } from "./chunks/node-
|
|
1
|
+
import { a as getShortCid, c as setNativeFunctions, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as pageSorts, t as PKC } from "./chunks/node-Cqt8DEE-.js";
|
|
2
2
|
export { challenges, createAnchorIpnsRecord, PKC as default, getShortAddress, getShortCid, nativeFunctions, pageSorts, setNativeFunctions };
|