@pkcprotocol/pkc-js 0.0.115 → 0.0.116
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/runtime/node/community/db-handler.js +1 -1
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/cleanup.d.ts +4 -2
- package/dist/browser/runtime/node/community/local-community/cleanup.js +11 -6
- package/dist/browser/runtime/node/community/local-community/cleanup.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js +8 -1
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-store.js +28 -4
- package/dist/browser/runtime/node/community/local-community/publication-store.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +52 -52
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-BB8P6KYw.js → helia-for-pkc-BvltkMx7.js} +2 -2
- package/dist/bundled/chunks/{local-community-wAvG_J_u.js → local-community-Cm4X7RjW.js} +1 -1
- package/dist/bundled/chunks/{local-community-XrLSKipf.js → local-community-nSmHRx5s.js} +33 -14
- package/dist/bundled/chunks/{node-D5riLTOu.js → node-CaeXEQ5O.js} +5 -5
- package/dist/bundled/chunks/{page-sort-scoring-3svUUHW_.js → page-sort-scoring-Bj73WnwW.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-D5ZdqFYc.js → rpc-local-community-DfJ3wj-p.js} +2 -2
- package/dist/bundled/chunks/{util-Cnpgfqwn.js → util-DkyQHyK7.js} +1 -1
- package/dist/bundled/chunks/{util-CabVOL7E.js → util-vJMTa4rC.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-CxIg67oP.js → validate-package-factories-tZC8XxoO.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/runtime/node/community/db-handler.js +1 -1
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/cleanup.d.ts +4 -2
- package/dist/node/runtime/node/community/local-community/cleanup.js +11 -6
- package/dist/node/runtime/node/community/local-community/cleanup.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js +8 -1
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-store.js +28 -4
- package/dist/node/runtime/node/community/local-community/publication-store.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-
|
|
3
|
-
import { $n as calculateExpectedSignatureSize, $t as SignerWithPublicKeyAddress, A as iterateOverPageCidsToFindAllCids, An as verifyCommunityEdit, Ar as require_lodash_merge, C as TIMEFRAMES_TO_SECONDS, Cr as t$9, Dn as verifyCommentPubsubMessage, En as verifyCommentModeration, Fn as getAuthorNameFromWire, Gn as encode, H as pLimit, Hn as getCommunityPublicKeyFromWire, J as coerceSchemaRowBoolean, Jn as getPKCAddressFromPublicKey, Ln as crosspostChainDepthUpTo, Mn as buildRuntimeAuthor, Nn as cleanWireAuthor, On as verifyCommentUpdate, Qn as backupCommunityDb, Rn as effectiveMaxCrosspostDepth, Sn as verifyChallengeRequest, Tn as verifyCommentIpfs, Vn as getCommunityNameFromWire, Wn as decode, X as collectSchemaRowCoercions, Xn as getPublicKeyFromPrivateKey, Y as coerceSchemaRowJson, Yn as getPKCAddressFromPublicKeySync, Z as createSchemaRowParser, Zn as BackupAbortError, _ as TrackedInstanceRegistry, _n as signCommunity, _r as t$11, a as generatePagesReportingFailedSorts, an as encryptEd25519AesGcmPublicKeyBuffer, ar as deriveDbReplies, b as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, bn as verifyChallengeAnswer, br as n$5, c as resolvePageSortsOrThrow, cr as getThumbnailPropsOfLink, d as getCommunityChallengeFromCommunityChallengeSettings, dn as signChallengeVerification, dt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, er as calculateInlineRepliesBudget, f as loadChallengeFileFromCommunityChallengeSettings, fn as signComment, fr as moveCommunityDbToDeletedDirectory, g as createAuthorIdentityMatcher, gn as signCommentUpdateForChallengeVerification, gr as t$10, h as authorNameResolveFailureReason, hn as signCommentUpdate, i as derivePublicPageSorts, ir as deriveDbPosts, jn as verifyVote, kn as verifyCommunity, kr as STORAGE_KEYS, ln as signChallengeMessage, lr as importSignerIntoKuboNode, lt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, m as authorIdentityMatcherForRequest, nr as deleteOldCommunityInWindows, o as loadPageSortsForStartedCommunity, on as _validateSignatureOfPKCRecord, or as getDefaultCommunityDbConfig, p as pkcJsChallenges, pn as signCommentEdit, pr as resolveDbPostsCidRefs, qn as getIpfsKeyFromPrivateKey, r as computePageSortsFingerprint, rn as decryptEd25519AesGcmPublicKeyBuffer, rr as deriveCommentIpfsFromCommentTableRow, s as lookupPageSortFactories, sn as cleanUpBeforePublishing, t as RpcLocalCommunity, u as getChallengeVerification, v as LRUCache, vr as r$2, wn as verifyCommentEdit, wr as stringify, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xr as n$4, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yr as t$8 } 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 { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-vJMTa4rC.js";
|
|
3
|
+
import { $n as calculateExpectedSignatureSize, $t as SignerWithPublicKeyAddress, A as iterateOverPageCidsToFindAllCids, An as verifyCommunityEdit, Ar as require_lodash_merge, C as TIMEFRAMES_TO_SECONDS, Cr as t$9, Dn as verifyCommentPubsubMessage, En as verifyCommentModeration, Fn as getAuthorNameFromWire, Gn as encode, H as pLimit, Hn as getCommunityPublicKeyFromWire, J as coerceSchemaRowBoolean, Jn as getPKCAddressFromPublicKey, Ln as crosspostChainDepthUpTo, Mn as buildRuntimeAuthor, Nn as cleanWireAuthor, On as verifyCommentUpdate, Qn as backupCommunityDb, Rn as effectiveMaxCrosspostDepth, Sn as verifyChallengeRequest, Tn as verifyCommentIpfs, Vn as getCommunityNameFromWire, Wn as decode, X as collectSchemaRowCoercions, Xn as getPublicKeyFromPrivateKey, Y as coerceSchemaRowJson, Yn as getPKCAddressFromPublicKeySync, Z as createSchemaRowParser, Zn as BackupAbortError, _ as TrackedInstanceRegistry, _n as signCommunity, _r as t$11, a as generatePagesReportingFailedSorts, an as encryptEd25519AesGcmPublicKeyBuffer, ar as deriveDbReplies, b as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, bn as verifyChallengeAnswer, br as n$5, c as resolvePageSortsOrThrow, cr as getThumbnailPropsOfLink, d as getCommunityChallengeFromCommunityChallengeSettings, dn as signChallengeVerification, dt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, er as calculateInlineRepliesBudget, f as loadChallengeFileFromCommunityChallengeSettings, fn as signComment, fr as moveCommunityDbToDeletedDirectory, g as createAuthorIdentityMatcher, gn as signCommentUpdateForChallengeVerification, gr as t$10, h as authorNameResolveFailureReason, hn as signCommentUpdate, i as derivePublicPageSorts, ir as deriveDbPosts, jn as verifyVote, kn as verifyCommunity, kr as STORAGE_KEYS, ln as signChallengeMessage, lr as importSignerIntoKuboNode, lt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, m as authorIdentityMatcherForRequest, nr as deleteOldCommunityInWindows, o as loadPageSortsForStartedCommunity, on as _validateSignatureOfPKCRecord, or as getDefaultCommunityDbConfig, p as pkcJsChallenges, pn as signCommentEdit, pr as resolveDbPostsCidRefs, qn as getIpfsKeyFromPrivateKey, r as computePageSortsFingerprint, rn as decryptEd25519AesGcmPublicKeyBuffer, rr as deriveCommentIpfsFromCommentTableRow, s as lookupPageSortFactories, sn as cleanUpBeforePublishing, t as RpcLocalCommunity, u as getChallengeVerification, v as LRUCache, vr as r$2, wn as verifyCommentEdit, wr as stringify, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xr as n$4, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yr as t$8 } from "./rpc-local-community-DfJ3wj-p.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-Bj73WnwW.js";
|
|
5
5
|
import { randomFillSync, randomUUID } from "node:crypto";
|
|
6
6
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
7
|
import path from "node:path";
|
|
@@ -3361,7 +3361,7 @@ var DbHandler = class {
|
|
|
3361
3361
|
`).all();
|
|
3362
3362
|
for (const { cid } of duplicateCids) {
|
|
3363
3363
|
const purgedRows = this.purgeComment(cid);
|
|
3364
|
-
for (const row of purgedRows)
|
|
3364
|
+
for (const row of purgedRows) addAllCidsUnderPurgedCommentToBeRemoved(this._community, row);
|
|
3365
3365
|
}
|
|
3366
3366
|
log(`Purged ${duplicateCids.length} duplicate comment row(s) based on signature.signature with higher rowid values.`);
|
|
3367
3367
|
continue;
|
|
@@ -5752,7 +5752,7 @@ async function unpinStaleCids(community, options = {}) {
|
|
|
5752
5752
|
log.trace(`unpinned ${sizeBefore - community._cidsToUnPin.size} stale cids from ipfs node for community (${community.address})`);
|
|
5753
5753
|
}
|
|
5754
5754
|
}
|
|
5755
|
-
async function rmUnneededMfsPaths(community) {
|
|
5755
|
+
async function rmUnneededMfsPaths(community, opts) {
|
|
5756
5756
|
const log = logger_default("pkc-js:local-community:sync:_rmUnneededMfsPaths");
|
|
5757
5757
|
if (community._mfsPathsToRemove.size > 0) {
|
|
5758
5758
|
const toDeleteMfsPaths = Array.from(community._mfsPathsToRemove.values());
|
|
@@ -5761,14 +5761,17 @@ async function rmUnneededMfsPaths(community) {
|
|
|
5761
5761
|
await removeMfsFilesSafely({
|
|
5762
5762
|
kuboRpcClient: kuboRpc,
|
|
5763
5763
|
paths: toDeleteMfsPaths,
|
|
5764
|
-
log
|
|
5764
|
+
log,
|
|
5765
|
+
inputNumOfRetries: opts?.numOfRetries
|
|
5765
5766
|
});
|
|
5766
5767
|
toDeleteMfsPaths.forEach((path) => community._mfsPathsToRemove.delete(path));
|
|
5767
5768
|
return toDeleteMfsPaths;
|
|
5768
5769
|
} catch (e) {
|
|
5769
5770
|
const error = e;
|
|
5770
|
-
if (error.message.includes("file does not exist"))
|
|
5771
|
-
|
|
5771
|
+
if (error.message.includes("file does not exist")) {
|
|
5772
|
+
toDeleteMfsPaths.forEach((path) => community._mfsPathsToRemove.delete(path));
|
|
5773
|
+
return toDeleteMfsPaths;
|
|
5774
|
+
} else {
|
|
5772
5775
|
log.error("Failed to remove paths from MFS", toDeleteMfsPaths, e);
|
|
5773
5776
|
throw error;
|
|
5774
5777
|
}
|
|
@@ -5870,7 +5873,7 @@ async function _runRepoGcIfDue({ community, kuboUrl, force, log }) {
|
|
|
5870
5873
|
after: repoSizeAfter
|
|
5871
5874
|
}));
|
|
5872
5875
|
}
|
|
5873
|
-
|
|
5876
|
+
function addAllCidsUnderPurgedCommentToBeRemoved(community, purgedCommentAndCommentUpdate) {
|
|
5874
5877
|
communitiesWithPendingPurgeFlush.set(community, Date.now());
|
|
5875
5878
|
community._cidsToUnPin.add(purgedCommentAndCommentUpdate.commentTableRow.cid);
|
|
5876
5879
|
community._blocksToRm.push(purgedCommentAndCommentUpdate.commentTableRow.cid);
|
|
@@ -5892,7 +5895,7 @@ async function purgeDisapprovedCommentsOlderThan(community) {
|
|
|
5892
5895
|
const purgedComments = community._dbHandler.purgeDisapprovedCommentsOlderThan(community.settings.purgeDisapprovedCommentsOlderThan);
|
|
5893
5896
|
if (!purgedComments || purgedComments.length === 0) return;
|
|
5894
5897
|
log("Purged disapproved comments", purgedComments, "because retention time has passed and it's time to purge them from DB and pages");
|
|
5895
|
-
for (const purgedComment of purgedComments) for (const purgedCommentAndCommentUpdate of purgedComment.purgedTableRows)
|
|
5898
|
+
for (const purgedComment of purgedComments) for (const purgedCommentAndCommentUpdate of purgedComment.purgedTableRows) addAllCidsUnderPurgedCommentToBeRemoved(community, purgedCommentAndCommentUpdate);
|
|
5896
5899
|
if (community._mfsPathsToRemove.size > 0) await rmUnneededMfsPaths(community);
|
|
5897
5900
|
if (community.updateCid) {
|
|
5898
5901
|
community._blocksToRm.push(community.updateCid);
|
|
@@ -7038,14 +7041,29 @@ async function storeCommentModeration(community, commentModRaw, challengeRequest
|
|
|
7038
7041
|
if (modTableRow.commentModeration.purged) {
|
|
7039
7042
|
log("commentModeration.purged=true, and therefore will delete the post/comment and all its reply tree from the db as well as unpin the cids from ipfs", "comment cid is", modTableRow.commentCid);
|
|
7040
7043
|
if (!community._dbHandler.queryComment(modTableRow.commentCid)) throw Error("Comment to purge not found");
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7044
|
+
community._dbHandler.createTransaction();
|
|
7045
|
+
let purgedTableRows;
|
|
7046
|
+
try {
|
|
7047
|
+
purgedTableRows = community._dbHandler.purgeComment(modTableRow.commentCid);
|
|
7048
|
+
community._dbHandler.insertCommentModerations([modTableRow]);
|
|
7049
|
+
community._dbHandler.commitTransaction();
|
|
7050
|
+
} catch (e) {
|
|
7051
|
+
community._dbHandler.rollbackTransaction();
|
|
7052
|
+
throw e;
|
|
7053
|
+
}
|
|
7054
|
+
for (const purgedTableRow of purgedTableRows) addAllCidsUnderPurgedCommentToBeRemoved(community, purgedTableRow);
|
|
7045
7055
|
if (community.updateCid) {
|
|
7046
7056
|
community._blocksToRm.push(community.updateCid);
|
|
7047
7057
|
community._cidsToUnPin.add(community.updateCid);
|
|
7048
7058
|
}
|
|
7059
|
+
community._communityUpdateTrigger = true;
|
|
7060
|
+
log("Purged comment", modTableRow.commentCid, "and its comment and comment update children", "out of DB and IPFS");
|
|
7061
|
+
try {
|
|
7062
|
+
await rmUnneededMfsPaths(community, { numOfRetries: 0 });
|
|
7063
|
+
} catch (e) {
|
|
7064
|
+
log.error("Failed to remove MFS paths of purged comment", modTableRow.commentCid, "the sync loop will retry", e);
|
|
7065
|
+
}
|
|
7066
|
+
return;
|
|
7049
7067
|
} else if ("approved" in modTableRow.commentModeration) if (modTableRow.commentModeration.approved) {
|
|
7050
7068
|
log("commentModeration.approved=true, and therefore move comment from pending approval and add it to IPFS", "comment cid is", modTableRow.commentCid);
|
|
7051
7069
|
await community._addCommentRowToIPFS(commentToBeEdited, logger_default("pkc-js:local-community:storeCommentModeration:_addCommentRowToIPFS"));
|
|
@@ -7610,6 +7628,7 @@ async function syncIpnsWithDb(community) {
|
|
|
7610
7628
|
await purgeDisapprovedCommentsOlderThan(community);
|
|
7611
7629
|
await syncWithRegistries(community);
|
|
7612
7630
|
const cidsUpdatedInThisCycle = await updateCommentsAndWritePostUpdates(community);
|
|
7631
|
+
if (community._mfsPathsToRemove.size > 0) await rmUnneededMfsPaths(community);
|
|
7613
7632
|
requireCommunityUpdateIfModQueueChanged(community);
|
|
7614
7633
|
await updateCommunityIpnsIfNeeded(community, cidsUpdatedInThisCycle);
|
|
7615
7634
|
await cleanUpIpfsRepoIfDue(community);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-
|
|
3
|
-
import { An as verifyCommunityEdit, At as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, B as InflightResourceTypes, Bn as getCommunityAddressFromRecord, Bt as RpcExportCommunityModLogsResultSchema, Cn as verifyChallengeVerification, Cr as t$4, Ct as parseDecryptedChallengeWithPKCErrorIfItFails, D as findCommentInPageInstance, Dn as verifyCommentPubsubMessage, Dr as NAME_RESOLVED_TRUE_TTL_MS, Dt as parseRpcCommentUpdateEventWithPKCErrorIfItFails, E as extractCommunityRuntimeFieldsFromParsedPages, En as verifyCommentModeration, Er as NAME_RESOLVED_FALSE_TTL_MS, Et as parseRpcCommentEventWithPKCErrorIfItFails, Ft as RpcCommentRepliesPageParamSchema, G as decodeRpcChallengePubsubMsg, Gt as RpcPublishAnchorRecordParamSchema, Hn as getCommunityPublicKeyFromWire, Ht as RpcExportCommunityResultSchema, I as stripNameResolvedFromCrosspost, In as normalizeCreatePublicationAuthor, It as RpcCommunityIdentifierParamSchema, Jt as RpcResolveAuthorNameResultSchema, K as decodeRpcChallengeRequestPubsubMsg, Kn as getBufferedPKCAddressFromPublicKey, Kt as RpcPublishChallengeAnswersParamSchema, L as PKCClientsManager, Lt as RpcCommunityPageParamSchema, M as applyNameResolvedCacheToCrosspost, Mn as buildRuntimeAuthor, Mr as require_undici, Mt as RpcAuthorNameParamSchema, N as cloneCrosspostForRuntime, Nn as cleanWireAuthor, Nt as RpcCancelExportParamSchema, O as findCommentInPageInstanceRecursively, On as verifyCommentUpdate, Or as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Ot as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, P as collectCrosspostAuthorsToResolve, Pn as getAuthorNameFromRuntime, Pt as RpcCidParamSchema, Q as parseCidStringSchemaWithPKCErrorIfItFails, Qt as require_lib$1, R as GenericStateClient, Rt as RpcEditCommunityParamSchema, S as RepliesPages, Sr as t$2, St as parseDecryptedChallengeVerification, Tn as verifyCommentIpfs, Tr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Tt as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, U as PKCTypedEmitter, Un as normalizeCommunityInputFromCommunity, Ut as RpcFetchCidParamSchema, Vn as getCommunityNameFromWire, Vt as RpcExportCommunityParamSchema, W as decodeRpcChallengeAnswerPubsubMsg, Wn as decode, Wt as RpcFetchCidResultSchema, Xt as RpcSuccessResultSchema, Yn as getPKCAddressFromPublicKeySync, Yt as RpcSubscriptionIdResultSchema, Zt as RpcUnsubscribeParamSchema, _ as TrackedInstanceRegistry, at as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, br as n$3, bt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, cn as signChallengeAnswer, dr as monitorCommunitiesDirectory, en as createSigner, fn as signComment, ft as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, gr as t$5, hr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, ht as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, in as encryptEd25519AesGcm, it as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, j as parseRawPages, jn as verifyVote, jr as nativeFunctions$2, jt as RpcAnchorPublishPreparationResultSchema, k as findCommentInParsedPages, l as pkcJsPageSorts, mn as signCommentModeration, mr as setNativeFunctions$1, mt as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as decryptEd25519AesGcm, nt as parseCommentIpfsSchemaWithPKCErrorIfItFails, ot as parseCommentUpdateSchemaWithPKCErrorIfItFails, p as pkcJsChallenges, pn as signCommentEdit, pt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeVerificationPubsubMsg, qt as RpcPublishedAnchorRecordResultSchema, sn as cleanUpBeforePublishing, sr as getDefaultDataPath, st as parseCommunityAddressWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createAnchorIpnsRecord$1, tr as createKuboRpcClient, tt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, un as signChallengeRequest, ur as listCommunitiesSync, ut as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, v as LRUCache, vn as signCommunityEdit, vt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, wn as verifyCommentEdit, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xn as verifyChallengeMessage, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, y as RemoteCommunity, yn as signVote, yr as t$3, yt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as InflightFetchManager, zn as buildRuntimeCommunityFields, zt as RpcExportCommunityModLogsParamSchema } from "./rpc-local-community-
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-vJMTa4rC.js";
|
|
3
|
+
import { An as verifyCommunityEdit, At as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, B as InflightResourceTypes, Bn as getCommunityAddressFromRecord, Bt as RpcExportCommunityModLogsResultSchema, Cn as verifyChallengeVerification, Cr as t$4, Ct as parseDecryptedChallengeWithPKCErrorIfItFails, D as findCommentInPageInstance, Dn as verifyCommentPubsubMessage, Dr as NAME_RESOLVED_TRUE_TTL_MS, Dt as parseRpcCommentUpdateEventWithPKCErrorIfItFails, E as extractCommunityRuntimeFieldsFromParsedPages, En as verifyCommentModeration, Er as NAME_RESOLVED_FALSE_TTL_MS, Et as parseRpcCommentEventWithPKCErrorIfItFails, Ft as RpcCommentRepliesPageParamSchema, G as decodeRpcChallengePubsubMsg, Gt as RpcPublishAnchorRecordParamSchema, Hn as getCommunityPublicKeyFromWire, Ht as RpcExportCommunityResultSchema, I as stripNameResolvedFromCrosspost, In as normalizeCreatePublicationAuthor, It as RpcCommunityIdentifierParamSchema, Jt as RpcResolveAuthorNameResultSchema, K as decodeRpcChallengeRequestPubsubMsg, Kn as getBufferedPKCAddressFromPublicKey, Kt as RpcPublishChallengeAnswersParamSchema, L as PKCClientsManager, Lt as RpcCommunityPageParamSchema, M as applyNameResolvedCacheToCrosspost, Mn as buildRuntimeAuthor, Mr as require_undici, Mt as RpcAuthorNameParamSchema, N as cloneCrosspostForRuntime, Nn as cleanWireAuthor, Nt as RpcCancelExportParamSchema, O as findCommentInPageInstanceRecursively, On as verifyCommentUpdate, Or as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Ot as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, P as collectCrosspostAuthorsToResolve, Pn as getAuthorNameFromRuntime, Pt as RpcCidParamSchema, Q as parseCidStringSchemaWithPKCErrorIfItFails, Qt as require_lib$1, R as GenericStateClient, Rt as RpcEditCommunityParamSchema, S as RepliesPages, Sr as t$2, St as parseDecryptedChallengeVerification, Tn as verifyCommentIpfs, Tr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Tt as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, U as PKCTypedEmitter, Un as normalizeCommunityInputFromCommunity, Ut as RpcFetchCidParamSchema, Vn as getCommunityNameFromWire, Vt as RpcExportCommunityParamSchema, W as decodeRpcChallengeAnswerPubsubMsg, Wn as decode, Wt as RpcFetchCidResultSchema, Xt as RpcSuccessResultSchema, Yn as getPKCAddressFromPublicKeySync, Yt as RpcSubscriptionIdResultSchema, Zt as RpcUnsubscribeParamSchema, _ as TrackedInstanceRegistry, at as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, br as n$3, bt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, cn as signChallengeAnswer, dr as monitorCommunitiesDirectory, en as createSigner, fn as signComment, ft as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, gr as t$5, hr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, ht as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, in as encryptEd25519AesGcm, it as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, j as parseRawPages, jn as verifyVote, jr as nativeFunctions$2, jt as RpcAnchorPublishPreparationResultSchema, k as findCommentInParsedPages, l as pkcJsPageSorts, mn as signCommentModeration, mr as setNativeFunctions$1, mt as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as decryptEd25519AesGcm, nt as parseCommentIpfsSchemaWithPKCErrorIfItFails, ot as parseCommentUpdateSchemaWithPKCErrorIfItFails, p as pkcJsChallenges, pn as signCommentEdit, pt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeVerificationPubsubMsg, qt as RpcPublishedAnchorRecordResultSchema, sn as cleanUpBeforePublishing, sr as getDefaultDataPath, st as parseCommunityAddressWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createAnchorIpnsRecord$1, tr as createKuboRpcClient, tt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, un as signChallengeRequest, ur as listCommunitiesSync, ut as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, v as LRUCache, vn as signCommunityEdit, vt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, wn as verifyCommentEdit, wt as parseJsonWithPKCErrorIfFails, x as KeyvBetterSqlite3, xn as verifyChallengeMessage, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, y as RemoteCommunity, yn as signVote, yr as t$3, yt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as InflightFetchManager, zn as buildRuntimeCommunityFields, zt as RpcExportCommunityModLogsParamSchema } from "./rpc-local-community-DfJ3wj-p.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-DkyQHyK7.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -8254,7 +8254,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8254
8254
|
this.clients.libp2pJsClients = {};
|
|
8255
8255
|
if (!this.libp2pJsClientsOptions) return;
|
|
8256
8256
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
8257
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
8257
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-BvltkMx7.js");
|
|
8258
8258
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
8259
8259
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
8260
8260
|
...clientOptions,
|
|
@@ -8533,7 +8533,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8533
8533
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
8534
8534
|
log.trace("Received community options to create a local community instance:", options);
|
|
8535
8535
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
8536
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
8536
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-Cm4X7RjW.js");
|
|
8537
8537
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
8538
8538
|
const community = new LocalCommunity(this);
|
|
8539
8539
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema } from "./util-
|
|
1
|
+
import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema } from "./util-vJMTa4rC.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-D5ZdqFYc.js → rpc-local-community-DfJ3wj-p.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 { $ as shortifyAddress, $n as CreateCommentEditOptionsWithRefinementSchema, $t as CommentModerationPubsubMessagePublicationSchema, An as CommentIpfsSchema, Ar as PKCError, B as raceAgainstAbort, Br as literal, Bt as DecryptedChallengeVerificationSchema, C as interruptibleSleep, Cn as VoteChallengeRequestToEncryptSchema, Cr as e$4, D as isIpfsPath, Dr as FailedToFetchCommunityFromGatewaysError, Dt as pTimeout, E as isIpfsCid, En as VoteSignedPropertyNames, Er as FailedToFetchCommentUpdateFromGatewaysError, Ft as ChallengeVerificationMessageSignedPropertyNames, G as removeNullUndefinedEmptyObjectsValuesRecursively, Gn as PageIpfsSchema, Gt as PKCUserOptionsSchema, Hn as CreateCommentOptionsWithRefinementSchema, Hr as object, Ht as NameResolverSerializedSchema, I as isRequestPubsubPublicationOfPost, In as CommentUpdateForChallengeVerificationSignedPropertyNames, Ir as _enum, It as DecryptedChallengeAnswerSchema, Kn as isReservedObjectKey, L as isRequestPubsubPublicationOfReply, Ln as CommentUpdateReservedFields, Lr as array, Mn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Mr as logger_default, Nn as CommentSignedPropertyNames, Nr as require_supports_color, Nt as ChallengeRequestMessageSignedPropertyNames, O as isIpns, On as CommentChallengeRequestToEncryptSchema, Or as FailedToFetchGenericIpfsFromGatewaysError, Pn as CommentUpdateChallengeReservedFieldNames, Pr as require_ms$1, Qt as CommentModerationChallengeRequestToEncryptSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rr as boolean, S as hideClassPrivateProps, Sn as CreateVoteUserOptionsWithRefinementSchema, Sr as t$9, St as untrackStartedCommunity, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256$1, Un as GetPageParamSchema, Ur as record, Ut as PKCParsedOptionsSchema, Vr as number, Vt as NameResolveCacheOptionsSchema, Wn as ModQueuePageIpfsSchema, Wr as string, Wt as PKCUserOptionBaseSchema, Xt as CommunityEditPubsubMessagePublicationSchema, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Yt as CommunityEditPublicationSignedPropertyNames, Zn as CommentEditSignedPropertyNames, Zt as CreateCommunityEditPublicationOptionsWithRefinementSchema, _n as PageSortFileFactorySchema, _r as r$8, _t as refreshTrackedCommunityAliases, an as ChallengeFileSchema, ar as CidStringSchema, bn as RpcRemoteCommunityUpdateEventResultSchema, br as r$7, cn as CommunityEditOptionsSchema, cr as CreateSignerSchema, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$10, er as AuthorAddressSchema, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, ft as findUpdatingCommunity, gn as ExportCommunityModLogsOptionsSchema, gr as t$11, hn as CreateRpcCommunityFunctionArgumentSchema, hr as e$5, in as ChallengeFileFactorySchema, ir as CidPathSchema, it as timestamp, jr as messages, jt as ChallengeMessageSignedPropertyNames, k as isIpnsPath, kn as CommentIpfsReservedFields, kr as FailedToFetchPageIpfsFromGatewaysError, kt as ChallengeAnswerMessageSignedPropertyNames, l as createAbortError, ln as CommunityExportRecordsSchema, lr as n$9, m as fetchAndValidateIpnsRecordFromGateway, mn as CreateRemoteCommunityFunctionArgumentSchema, mr as e$6, nn as CommentModerationsTableRowSchema, or as CommunityAddressSchema, p as extractNetworkErrorDetails, pn as CreateNewLocalCommunityUserOptionsSchema, pr as t$13, qn as CommentEditChallengeRequestToEncryptSchema, qt as CommunityEditPublicationChallengeRequestToEncryptSchema, r as calculateIpfsCidV0, rn as CreateCommentModerationOptionsWithRefinementSchema, rr as ChallengeAnswersSchema, rt as throwIfAbortSignalAborted, sn as CommunityChallengeSettingSchema, sr as CommunityAuthorChallengeReservedFieldNames, t as areEquivalentCommunityAddresses, tn as CommentModerationSignedPropertyNames, tr as AuthorCommentIpfsReservedFields, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, un as CommunityIpfsReservedFields, ut as findStartedCommunity, vn as PageSortFileSchema, vr as t$12, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry$1, wt as untrackUpdatingCommunity, x as hasTransientNetworkErrorCode, xn as isStringDomain, xr as t$10, xt as trackUpdatingCommunity, yr as n$8, yt as trackStartedCommunity, zn as CommentUpdateSignedPropertyNames, zr as custom, zt as DecryptedChallengeSchema } from "./util-
|
|
2
|
+
import { $ as shortifyAddress, $n as CreateCommentEditOptionsWithRefinementSchema, $t as CommentModerationPubsubMessagePublicationSchema, An as CommentIpfsSchema, Ar as PKCError, B as raceAgainstAbort, Br as literal, Bt as DecryptedChallengeVerificationSchema, C as interruptibleSleep, Cn as VoteChallengeRequestToEncryptSchema, Cr as e$4, D as isIpfsPath, Dr as FailedToFetchCommunityFromGatewaysError, Dt as pTimeout, E as isIpfsCid, En as VoteSignedPropertyNames, Er as FailedToFetchCommentUpdateFromGatewaysError, Ft as ChallengeVerificationMessageSignedPropertyNames, G as removeNullUndefinedEmptyObjectsValuesRecursively, Gn as PageIpfsSchema, Gt as PKCUserOptionsSchema, Hn as CreateCommentOptionsWithRefinementSchema, Hr as object, Ht as NameResolverSerializedSchema, I as isRequestPubsubPublicationOfPost, In as CommentUpdateForChallengeVerificationSignedPropertyNames, Ir as _enum, It as DecryptedChallengeAnswerSchema, Kn as isReservedObjectKey, L as isRequestPubsubPublicationOfReply, Ln as CommentUpdateReservedFields, Lr as array, Mn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Mr as logger_default, Nn as CommentSignedPropertyNames, Nr as require_supports_color, Nt as ChallengeRequestMessageSignedPropertyNames, O as isIpns, On as CommentChallengeRequestToEncryptSchema, Or as FailedToFetchGenericIpfsFromGatewaysError, Pn as CommentUpdateChallengeReservedFieldNames, Pr as require_ms$1, Qt as CommentModerationChallengeRequestToEncryptSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rr as boolean, S as hideClassPrivateProps, Sn as CreateVoteUserOptionsWithRefinementSchema, Sr as t$9, St as untrackStartedCommunity, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256$1, Un as GetPageParamSchema, Ur as record, Ut as PKCParsedOptionsSchema, Vr as number, Vt as NameResolveCacheOptionsSchema, Wn as ModQueuePageIpfsSchema, Wr as string, Wt as PKCUserOptionBaseSchema, Xt as CommunityEditPubsubMessagePublicationSchema, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Yt as CommunityEditPublicationSignedPropertyNames, Zn as CommentEditSignedPropertyNames, Zt as CreateCommunityEditPublicationOptionsWithRefinementSchema, _n as PageSortFileFactorySchema, _r as r$8, _t as refreshTrackedCommunityAliases, an as ChallengeFileSchema, ar as CidStringSchema, bn as RpcRemoteCommunityUpdateEventResultSchema, br as r$7, cn as CommunityEditOptionsSchema, cr as CreateSignerSchema, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$10, er as AuthorAddressSchema, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, ft as findUpdatingCommunity, gn as ExportCommunityModLogsOptionsSchema, gr as t$11, hn as CreateRpcCommunityFunctionArgumentSchema, hr as e$5, in as ChallengeFileFactorySchema, ir as CidPathSchema, it as timestamp, jr as messages, jt as ChallengeMessageSignedPropertyNames, k as isIpnsPath, kn as CommentIpfsReservedFields, kr as FailedToFetchPageIpfsFromGatewaysError, kt as ChallengeAnswerMessageSignedPropertyNames, l as createAbortError, ln as CommunityExportRecordsSchema, lr as n$9, m as fetchAndValidateIpnsRecordFromGateway, mn as CreateRemoteCommunityFunctionArgumentSchema, mr as e$6, nn as CommentModerationsTableRowSchema, or as CommunityAddressSchema, p as extractNetworkErrorDetails, pn as CreateNewLocalCommunityUserOptionsSchema, pr as t$13, qn as CommentEditChallengeRequestToEncryptSchema, qt as CommunityEditPublicationChallengeRequestToEncryptSchema, r as calculateIpfsCidV0, rn as CreateCommentModerationOptionsWithRefinementSchema, rr as ChallengeAnswersSchema, rt as throwIfAbortSignalAborted, sn as CommunityChallengeSettingSchema, sr as CommunityAuthorChallengeReservedFieldNames, t as areEquivalentCommunityAddresses, tn as CommentModerationSignedPropertyNames, tr as AuthorCommentIpfsReservedFields, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, un as CommunityIpfsReservedFields, ut as findStartedCommunity, vn as PageSortFileSchema, vr as t$12, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry$1, wt as untrackUpdatingCommunity, x as hasTransientNetworkErrorCode, xn as isStringDomain, xr as t$10, xt as trackUpdatingCommunity, yr as n$8, yt as trackStartedCommunity, zn as CommentUpdateSignedPropertyNames, zr as custom, zt as DecryptedChallengeSchema } from "./util-vJMTa4rC.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-Bj73WnwW.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import dns from "node:dns";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ar as PKCError, z as pubsubTopicToDhtKeyCid } from "./util-
|
|
1
|
+
import { Ar as PKCError, z as pubsubTopicToDhtKeyCid } from "./util-vJMTa4rC.js";
|
|
2
2
|
import { ipnsSelector } from "ipns/selector";
|
|
3
3
|
import { ipnsValidator } from "ipns/validator";
|
|
4
4
|
import { unmarshalIPNSRecord } from "ipns";
|
|
@@ -14797,7 +14797,7 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
|
|
|
14797
14797
|
], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
|
|
14798
14798
|
//#endregion
|
|
14799
14799
|
//#region dist/node/generated-version.js
|
|
14800
|
-
const version = "0.0.
|
|
14800
|
+
const version = "0.0.116";
|
|
14801
14801
|
//#endregion
|
|
14802
14802
|
//#region dist/node/version.js
|
|
14803
14803
|
const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Ar as PKCError, _n as PageSortFileFactorySchema, an as ChallengeFileSchema, in as ChallengeFileFactorySchema } from "./util-
|
|
2
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
1
|
+
import { Ar as PKCError, _n as PageSortFileFactorySchema, an as ChallengeFileSchema, in as ChallengeFileFactorySchema } from "./util-vJMTa4rC.js";
|
|
2
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-Bj73WnwW.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-CaeXEQ5O.js";
|
|
2
2
|
export { challenges, createAnchorIpnsRecord, PKC as default, getShortAddress, getShortCid, nativeFunctions, pageSorts, setNativeFunctions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as validatePageSortFileFactory } from "./chunks/validate-package-factories-
|
|
1
|
+
import { n as validatePageSortFileFactory } from "./chunks/validate-package-factories-tZC8XxoO.js";
|
|
2
2
|
export { validatePageSortFileFactory };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Ar as PKCError, Dt as pTimeout, J as replaceXWithY, Mr as logger_default, S as hideClassPrivateProps, dr as n, pr as t, ut as findStartedCommunity } from "../../chunks/util-
|
|
2
|
-
import { _ as parseRpcExportCommunityParam, b as parseRpcUnsubscribeParam, d as parseRpcCidParam, f as parseRpcCommentRepliesPageParam, g as parseRpcExportCommunityModLogsParam, h as parseRpcEditCommunityParam, l as parseRpcAuthorNameParam, m as parseRpcCommunityPageParam, p as parseRpcCommunityIdentifierParam, t as PKC, u as parseRpcCancelExportParam, v as parseRpcPublishAnchorRecordParam, y as parseRpcPublishChallengeAnswersParam } from "../../chunks/node-
|
|
3
|
-
import { $ as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, F as extractCrosspostRuntimeFields, H as pLimit, Ot as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Qt as require_lib, T as buildPagesRuntimeFields, V as pRetry, _r as t$1, _t as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, ct as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, et as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, gt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails, kt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, lt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, rt as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, w as buildPageRuntimeFields, wr as stringify, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-
|
|
4
|
-
import { t as LocalCommunity } from "../../chunks/local-community-
|
|
1
|
+
import { Ar as PKCError, Dt as pTimeout, J as replaceXWithY, Mr as logger_default, S as hideClassPrivateProps, dr as n, pr as t, ut as findStartedCommunity } from "../../chunks/util-vJMTa4rC.js";
|
|
2
|
+
import { _ as parseRpcExportCommunityParam, b as parseRpcUnsubscribeParam, d as parseRpcCidParam, f as parseRpcCommentRepliesPageParam, g as parseRpcExportCommunityModLogsParam, h as parseRpcEditCommunityParam, l as parseRpcAuthorNameParam, m as parseRpcCommunityPageParam, p as parseRpcCommunityIdentifierParam, t as PKC, u as parseRpcCancelExportParam, v as parseRpcPublishAnchorRecordParam, y as parseRpcPublishChallengeAnswersParam } from "../../chunks/node-CaeXEQ5O.js";
|
|
3
|
+
import { $ as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, F as extractCrosspostRuntimeFields, H as pLimit, Ot as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Qt as require_lib, T as buildPagesRuntimeFields, V as pRetry, _r as t$1, _t as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, ct as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, et as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, gt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails, kt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, lt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, rt as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, w as buildPageRuntimeFields, wr as stringify, xt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-DfJ3wj-p.js";
|
|
4
|
+
import { t as LocalCommunity } from "../../chunks/local-community-nSmHRx5s.js";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import assert from "assert";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "0.0.
|
|
1
|
+
export declare const version = "0.0.116";
|
|
@@ -826,7 +826,7 @@ export class DbHandler {
|
|
|
826
826
|
for (const { cid } of duplicateCids) {
|
|
827
827
|
const purgedRows = this.purgeComment(cid);
|
|
828
828
|
for (const row of purgedRows)
|
|
829
|
-
|
|
829
|
+
addAllCidsUnderPurgedCommentToBeRemoved(this._community, row);
|
|
830
830
|
}
|
|
831
831
|
log(`Purged ${duplicateCids.length} duplicate comment row(s) based on signature.signature with higher rowid values.`);
|
|
832
832
|
continue;
|