@pkcprotocol/pkc-js 0.0.148 → 0.0.149
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/local-community/ipns-publishing.d.ts +7 -1
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js +49 -36
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/lifecycle.js +0 -1
- package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community.d.ts +0 -2
- package/dist/browser/runtime/node/community/local-community.js +1 -5
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +40 -40
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-BUVgQgXa.js → helia-for-pkc-8iett8xl.js} +2 -2
- package/dist/bundled/chunks/{local-community-dVaQtJNM.js → local-community-BlBIYSsF.js} +39 -30
- package/dist/bundled/chunks/{local-community-GWqz4s3g.js → local-community-ChZZa9bm.js} +1 -1
- package/dist/bundled/chunks/{node-fEBX1Nar.js → node-BH_HrtON.js} +5 -5
- package/dist/bundled/chunks/{page-sort-scoring-DbI7k_K5.js → page-sort-scoring-NpdjWYfa.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-ouDezuGZ.js → rpc-local-community-Byj5ZmMa.js} +2 -2
- package/dist/bundled/chunks/{util-B81IOt07.js → util-CUZ1U2Go.js} +1 -1
- package/dist/bundled/chunks/{util-DofMBAFz.js → util-DmmLFRbV.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-Bi1OLIPw.js → validate-package-factories-CkU4qFQx.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/local-community/ipns-publishing.d.ts +7 -1
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js +49 -36
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/lifecycle.js +0 -1
- package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/node/runtime/node/community/local-community.d.ts +0 -2
- package/dist/node/runtime/node/community/local-community.js +1 -5
- package/dist/node/runtime/node/community/local-community.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-CkU4qFQx.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-BH_HrtON.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-BH_HrtON.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-CkU4qFQx.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-Byj5ZmMa.js",
|
|
48
|
+
"chunks/node-BH_HrtON.js",
|
|
49
|
+
"chunks/util-CUZ1U2Go.js",
|
|
50
|
+
"chunks/local-community-BlBIYSsF.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-8iett8xl.js": {
|
|
81
81
|
"isEntry": false,
|
|
82
82
|
"imports": [
|
|
83
83
|
"chunks/chunk-2rV9d50f.js",
|
|
84
|
-
"chunks/util-
|
|
85
|
-
"chunks/util-
|
|
84
|
+
"chunks/util-CUZ1U2Go.js",
|
|
85
|
+
"chunks/util-DmmLFRbV.js",
|
|
86
86
|
"chunks/src-DKntVmyX.js",
|
|
87
87
|
"chunks/src-Cpx2Sts8.js",
|
|
88
88
|
"node:url",
|
|
@@ -204,21 +204,13 @@
|
|
|
204
204
|
"dist/node/helia/helia-for-pkc.js"
|
|
205
205
|
]
|
|
206
206
|
},
|
|
207
|
-
"chunks/local-community-
|
|
208
|
-
"isEntry": false,
|
|
209
|
-
"imports": [
|
|
210
|
-
"chunks/local-community-dVaQtJNM.js"
|
|
211
|
-
],
|
|
212
|
-
"dynamicImports": [],
|
|
213
|
-
"inputs": []
|
|
214
|
-
},
|
|
215
|
-
"chunks/local-community-dVaQtJNM.js": {
|
|
207
|
+
"chunks/local-community-BlBIYSsF.js": {
|
|
216
208
|
"isEntry": false,
|
|
217
209
|
"imports": [
|
|
218
210
|
"chunks/chunk-2rV9d50f.js",
|
|
219
|
-
"chunks/rpc-local-community-
|
|
220
|
-
"chunks/util-
|
|
221
|
-
"chunks/page-sort-scoring-
|
|
211
|
+
"chunks/rpc-local-community-Byj5ZmMa.js",
|
|
212
|
+
"chunks/util-CUZ1U2Go.js",
|
|
213
|
+
"chunks/page-sort-scoring-NpdjWYfa.js",
|
|
222
214
|
"node:url",
|
|
223
215
|
"node:path",
|
|
224
216
|
"os",
|
|
@@ -270,13 +262,21 @@
|
|
|
270
262
|
"dist/node/runtime/node/community/local-community.js"
|
|
271
263
|
]
|
|
272
264
|
},
|
|
273
|
-
"chunks/
|
|
265
|
+
"chunks/local-community-ChZZa9bm.js": {
|
|
266
|
+
"isEntry": false,
|
|
267
|
+
"imports": [
|
|
268
|
+
"chunks/local-community-BlBIYSsF.js"
|
|
269
|
+
],
|
|
270
|
+
"dynamicImports": [],
|
|
271
|
+
"inputs": []
|
|
272
|
+
},
|
|
273
|
+
"chunks/node-BH_HrtON.js": {
|
|
274
274
|
"isEntry": false,
|
|
275
275
|
"imports": [
|
|
276
276
|
"chunks/chunk-2rV9d50f.js",
|
|
277
|
-
"chunks/rpc-local-community-
|
|
278
|
-
"chunks/util-
|
|
279
|
-
"chunks/util-
|
|
277
|
+
"chunks/rpc-local-community-Byj5ZmMa.js",
|
|
278
|
+
"chunks/util-CUZ1U2Go.js",
|
|
279
|
+
"chunks/util-DmmLFRbV.js",
|
|
280
280
|
"path",
|
|
281
281
|
"assert",
|
|
282
282
|
"fs",
|
|
@@ -287,8 +287,8 @@
|
|
|
287
287
|
"rpc-websockets"
|
|
288
288
|
],
|
|
289
289
|
"dynamicImports": [
|
|
290
|
-
"chunks/helia-for-pkc-
|
|
291
|
-
"chunks/local-community-
|
|
290
|
+
"chunks/helia-for-pkc-8iett8xl.js",
|
|
291
|
+
"chunks/local-community-BlBIYSsF.js"
|
|
292
292
|
],
|
|
293
293
|
"inputs": [
|
|
294
294
|
"dist/node/zod-error-map.js",
|
|
@@ -448,22 +448,22 @@
|
|
|
448
448
|
"dist/node/index.js"
|
|
449
449
|
]
|
|
450
450
|
},
|
|
451
|
-
"chunks/page-sort-scoring-
|
|
451
|
+
"chunks/page-sort-scoring-NpdjWYfa.js": {
|
|
452
452
|
"isEntry": false,
|
|
453
453
|
"imports": [
|
|
454
|
-
"chunks/util-
|
|
454
|
+
"chunks/util-CUZ1U2Go.js"
|
|
455
455
|
],
|
|
456
456
|
"dynamicImports": [],
|
|
457
457
|
"inputs": [
|
|
458
458
|
"dist/node/pages/page-sort-scoring.js"
|
|
459
459
|
]
|
|
460
460
|
},
|
|
461
|
-
"chunks/rpc-local-community-
|
|
461
|
+
"chunks/rpc-local-community-Byj5ZmMa.js": {
|
|
462
462
|
"isEntry": false,
|
|
463
463
|
"imports": [
|
|
464
464
|
"chunks/chunk-2rV9d50f.js",
|
|
465
|
-
"chunks/util-
|
|
466
|
-
"chunks/page-sort-scoring-
|
|
465
|
+
"chunks/util-CUZ1U2Go.js",
|
|
466
|
+
"chunks/page-sort-scoring-NpdjWYfa.js",
|
|
467
467
|
"chunks/src-CYIMjhjK.js",
|
|
468
468
|
"node:crypto",
|
|
469
469
|
"node:url",
|
|
@@ -1576,7 +1576,7 @@
|
|
|
1576
1576
|
"node_modules/kubo-rpc-client/dist/src/index.js"
|
|
1577
1577
|
]
|
|
1578
1578
|
},
|
|
1579
|
-
"chunks/util-
|
|
1579
|
+
"chunks/util-CUZ1U2Go.js": {
|
|
1580
1580
|
"isEntry": false,
|
|
1581
1581
|
"imports": [
|
|
1582
1582
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1671,10 +1671,10 @@
|
|
|
1671
1671
|
"dist/node/util.js"
|
|
1672
1672
|
]
|
|
1673
1673
|
},
|
|
1674
|
-
"chunks/util-
|
|
1674
|
+
"chunks/util-DmmLFRbV.js": {
|
|
1675
1675
|
"isEntry": false,
|
|
1676
1676
|
"imports": [
|
|
1677
|
-
"chunks/util-
|
|
1677
|
+
"chunks/util-CUZ1U2Go.js",
|
|
1678
1678
|
"ipns/selector",
|
|
1679
1679
|
"ipns/validator",
|
|
1680
1680
|
"ipns",
|
|
@@ -1686,11 +1686,11 @@
|
|
|
1686
1686
|
"dist/node/helia/util.js"
|
|
1687
1687
|
]
|
|
1688
1688
|
},
|
|
1689
|
-
"chunks/validate-package-factories-
|
|
1689
|
+
"chunks/validate-package-factories-CkU4qFQx.js": {
|
|
1690
1690
|
"isEntry": false,
|
|
1691
1691
|
"imports": [
|
|
1692
|
-
"chunks/util-
|
|
1693
|
-
"chunks/page-sort-scoring-
|
|
1692
|
+
"chunks/util-CUZ1U2Go.js",
|
|
1693
|
+
"chunks/page-sort-scoring-NpdjWYfa.js"
|
|
1694
1694
|
],
|
|
1695
1695
|
"dynamicImports": [],
|
|
1696
1696
|
"inputs": [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-
|
|
1
|
+
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-CkU4qFQx.js";
|
|
2
2
|
export { validateChallengeFileFactory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-
|
|
3
|
-
import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-
|
|
2
|
+
import { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-CUZ1U2Go.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-DmmLFRbV.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,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { Ar as t$2, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, Bt as DecryptedChallengeRequestPublicationSchema, C as hideClassPrivateProps, Cr as e, Dn as VotePubsubReservedFields, Dt as untrackUpdatingCommunity, En as VotePubsubMessagePublicationSchema, Er as t$3, F as isLinkOfVideo, Ft as ChallengeRequestMessageSchema, G as removeBlocksFromKuboNode, Hn as CommentUpdateTableRowSchema, I as isLinkValid, J as removeNullUndefinedValues, K as removeMfsFilesSafely, Lt as ChallengeVerificationMessageSchema, M as isLinkOfAudio, Mn as CommentIpfsSchema, Mr as require_retry, N as isLinkOfImage, Nn as CommentPubsubMessageReservedFields, Nt as ChallengeMessageSchema, Ot as require_sha256, P as isLinkOfMedia, Q as retryKuboBlockPutPinAndProvidePubsubTopic, Qn as CommentEditReservedFields, Rr as PKCError, Sr as e$1, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tr as r$1, Tt as untrackStartedCommunity, Un as CommentsTableRowSchema, Vt as DecryptedChallengeRequestSchema, Xn as CommentEditPubsubMessagePublicationSchema, Yt as version_default, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zt as CommunityEditPublicationPubsubReservedFields, _ as genToArray, _r as n$3, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, b as getIpnsRecordInLocalKuboNode, br as t$5, c as contentContainsMarkdownImages, ct as withSortedKeys, dt as findCommunityInRegistry, er as CommentEditsTableRowSchema, et as retryKuboIpfsAddAndProvide, f as derivePublicationFromChallengeRequest, ft as findStartedCommunity, g as findMalformedUnicodeString, gr as isStringDomain, hn as CommunitySignedPropertyNames, i as calculateStringSizeSameAsIpfsAddCidV0, it as statMfsPathSafely, j as isLinkOfAnimatedImage, jt as ChallengeAnswerMessageSchema, kn as VoteTablesRowSchema, kr as t$4, l as contentContainsMarkdownVideos, lt as withSortedKeysDeep, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, ni as ZodError, nn as CommentModerationPubsubMessagePublicationSchema, o as calculateUnixFsDagSizeCidV0, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, r as calculateIpfsCidV0, rn as CommentModerationReservedFields, rt as sleepUntilTimeoutOrAbort, s as contentContainsMarkdownAudio, ut as writeKuboFilesWithTimeout, v as getEquivalentCommunityAddresses, vr as t$7, wt as trackUpdatingCommunity, xr as t$6, xt as syncCommunityRegistryEntry, y as getErrorCodeFromMessage, yr as n$2, zr as messages } from "./util-
|
|
3
|
-
import { $ as createSchemaRowParser, $r as require_lodash_merge, An as verifyChallengeAnswer, Ar as removeFileRetryingWhileBusy, Bn as verifyCommunityEdit, Br as t$11, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Hn as verifyVote, Hr as t$8, In as verifyCommentModeration, Kn as getAuthorNameFromWire, Kr as t$9, Ln as verifyCommentPubsubMessage, Lr as isCommunityStartLocked, Mn as verifyChallengeRequest, N as MAX_PAGE_SIZE_BYTES, Or as moveCommunityDbToDeletedDirectory, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Qr as STORAGE_KEYS, Rn as verifyCommentUpdate, Rr as require_src, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Sr as getDefaultCommunityDbConfig, Tn as signCommentUpdateForChallengeVerification, Tr as importSignerIntoKuboNode, Un as buildRuntimeAuthor, Ur as n$5, Vr as r$2, W as pLimit, Wn as cleanWireAuthor, Wr as n$4, X as coerceSchemaRowBoolean, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, _ 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, jr as resolveDbPostsCidRefs, kr as refreshCommunitiesList, 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, qr as stringify, 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 getThumbnailPropsOfLink, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as forgetCommunityThatFailedToBeDeleted, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as t$10 } from "./rpc-local-community-
|
|
4
|
-
import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-
|
|
2
|
+
import { Ar as t$2, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, Bt as DecryptedChallengeRequestPublicationSchema, C as hideClassPrivateProps, Cr as e, Dn as VotePubsubReservedFields, Dt as untrackUpdatingCommunity, En as VotePubsubMessagePublicationSchema, Er as t$3, F as isLinkOfVideo, Ft as ChallengeRequestMessageSchema, G as removeBlocksFromKuboNode, Hn as CommentUpdateTableRowSchema, I as isLinkValid, J as removeNullUndefinedValues, K as removeMfsFilesSafely, Lt as ChallengeVerificationMessageSchema, M as isLinkOfAudio, Mn as CommentIpfsSchema, Mr as require_retry, N as isLinkOfImage, Nn as CommentPubsubMessageReservedFields, Nt as ChallengeMessageSchema, Ot as require_sha256, P as isLinkOfMedia, Q as retryKuboBlockPutPinAndProvidePubsubTopic, Qn as CommentEditReservedFields, Rr as PKCError, Sr as e$1, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tr as r$1, Tt as untrackStartedCommunity, Un as CommentsTableRowSchema, Vt as DecryptedChallengeRequestSchema, Xn as CommentEditPubsubMessagePublicationSchema, Yt as version_default, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zt as CommunityEditPublicationPubsubReservedFields, _ as genToArray, _r as n$3, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, b as getIpnsRecordInLocalKuboNode, br as t$5, c as contentContainsMarkdownImages, ct as withSortedKeys, dt as findCommunityInRegistry, er as CommentEditsTableRowSchema, et as retryKuboIpfsAddAndProvide, f as derivePublicationFromChallengeRequest, ft as findStartedCommunity, g as findMalformedUnicodeString, gr as isStringDomain, hn as CommunitySignedPropertyNames, i as calculateStringSizeSameAsIpfsAddCidV0, it as statMfsPathSafely, j as isLinkOfAnimatedImage, jt as ChallengeAnswerMessageSchema, kn as VoteTablesRowSchema, kr as t$4, l as contentContainsMarkdownVideos, lt as withSortedKeysDeep, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, ni as ZodError, nn as CommentModerationPubsubMessagePublicationSchema, o as calculateUnixFsDagSizeCidV0, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, r as calculateIpfsCidV0, rn as CommentModerationReservedFields, rt as sleepUntilTimeoutOrAbort, s as contentContainsMarkdownAudio, ut as writeKuboFilesWithTimeout, v as getEquivalentCommunityAddresses, vr as t$7, wt as trackUpdatingCommunity, xr as t$6, xt as syncCommunityRegistryEntry, y as getErrorCodeFromMessage, yr as n$2, zr as messages } from "./util-CUZ1U2Go.js";
|
|
3
|
+
import { $ as createSchemaRowParser, $r as require_lodash_merge, An as verifyChallengeAnswer, Ar as removeFileRetryingWhileBusy, Bn as verifyCommunityEdit, Br as t$11, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Hn as verifyVote, Hr as t$8, In as verifyCommentModeration, Kn as getAuthorNameFromWire, Kr as t$9, Ln as verifyCommentPubsubMessage, Lr as isCommunityStartLocked, Mn as verifyChallengeRequest, N as MAX_PAGE_SIZE_BYTES, Or as moveCommunityDbToDeletedDirectory, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Qr as STORAGE_KEYS, Rn as verifyCommentUpdate, Rr as require_src, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Sr as getDefaultCommunityDbConfig, Tn as signCommentUpdateForChallengeVerification, Tr as importSignerIntoKuboNode, Un as buildRuntimeAuthor, Ur as n$5, Vr as r$2, W as pLimit, Wn as cleanWireAuthor, Wr as n$4, X as coerceSchemaRowBoolean, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, _ 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, jr as resolveDbPostsCidRefs, kr as refreshCommunitiesList, 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, qr as stringify, 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 getThumbnailPropsOfLink, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as forgetCommunityThatFailedToBeDeleted, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as t$10 } from "./rpc-local-community-Byj5ZmMa.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-NpdjWYfa.js";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import Path from "node:path";
|
|
7
7
|
import os from "os";
|
|
@@ -6353,18 +6353,6 @@ function requireCommunityUpdateIfModQueueChanged(community) {
|
|
|
6353
6353
|
const combinedHashOfAllQueuedComments = community._dbHandler.queryCombinedHashOfPendingComments();
|
|
6354
6354
|
if (community._combinedHashOfPendingCommentsCids !== combinedHashOfAllQueuedComments) community._communityUpdateTrigger = true;
|
|
6355
6355
|
}
|
|
6356
|
-
async function resolveIpnsAndLogIfPotentialProblematicSequence(community) {
|
|
6357
|
-
const log = logger_default("pkc-js:local-community:_resolveIpnsAndLogIfPotentialProblematicSequence");
|
|
6358
|
-
if (!community.signer.ipnsKeyName) throw Error("IPNS key name is not defined");
|
|
6359
|
-
if (!community.updateCid) return;
|
|
6360
|
-
try {
|
|
6361
|
-
const { cid: ipnsCid } = await community._clientsManager.resolveIpnsToCidP2P(community.signer.ipnsKeyName, { timeoutMs: 12e4 });
|
|
6362
|
-
log.trace("Resolved community", community.address, "IPNS key", community.signer.ipnsKeyName, "to", ipnsCid);
|
|
6363
|
-
if (ipnsCid && community.updateCid && ipnsCid !== community.updateCid) log.error("community", community.address, "IPNS key", community.signer.ipnsKeyName, "points to", ipnsCid, "but we expected it to point to", community.updateCid, "This could result an IPNS record with invalid sequence number");
|
|
6364
|
-
} catch (e) {
|
|
6365
|
-
log.trace("Failed to resolve community before publishing", community.address, "IPNS key", community.signer.ipnsKeyName, e);
|
|
6366
|
-
}
|
|
6367
|
-
}
|
|
6368
6356
|
async function addOldPageCidsToCidsToUnpin(community, curPages, newPages, addToBlockRm) {
|
|
6369
6357
|
if (!curPages && !newPages) return;
|
|
6370
6358
|
else if (curPages && !newPages) (await iterateOverPageCidsToFindAllCids({
|
|
@@ -6470,6 +6458,37 @@ async function validateAndSignCommunityRecord(community, build) {
|
|
|
6470
6458
|
await community._validateCommunitySizeSchemaAndSignatureBeforePublishing(newCommunityRecord);
|
|
6471
6459
|
return newCommunityRecord;
|
|
6472
6460
|
}
|
|
6461
|
+
function readStoredIpnsSequence(community) {
|
|
6462
|
+
const storedRecord = community._dbHandler.keyvGet(STORAGE_KEYS[STORAGE_KEYS.LAST_IPNS_RECORD]);
|
|
6463
|
+
if (!storedRecord) return void 0;
|
|
6464
|
+
const decodedRecord = decode(new Uint8Array(Object.values(storedRecord)), { allowBigInt: true });
|
|
6465
|
+
if (typeof decodedRecord.sequence !== "bigint" && typeof decodedRecord.sequence !== "number") return void 0;
|
|
6466
|
+
return BigInt(decodedRecord.sequence);
|
|
6467
|
+
}
|
|
6468
|
+
const KUBO_SEQUENCE_NOT_GREATER_ERROR_MESSAGE = "sequence number must be greater than the current record sequence";
|
|
6469
|
+
async function publishIpnsRecordContinuingStoredSequence({ community, kuboRpcClient, path, ttl }) {
|
|
6470
|
+
const log = logger_default("pkc-js:local-community:publishIpnsRecordContinuingStoredSequence");
|
|
6471
|
+
if (!community.signer.ipnsKeyName) throw Error("IPNS key name is not defined");
|
|
6472
|
+
const publishOptions = {
|
|
6473
|
+
key: community.signer.ipnsKeyName,
|
|
6474
|
+
allowOffline: true,
|
|
6475
|
+
resolve: true,
|
|
6476
|
+
ttl
|
|
6477
|
+
};
|
|
6478
|
+
const storedSequence = readStoredIpnsSequence(community);
|
|
6479
|
+
if (storedSequence === void 0) return kuboRpcClient._client.name.publish(path, publishOptions);
|
|
6480
|
+
const publishOptionsWithSequence = {
|
|
6481
|
+
...publishOptions,
|
|
6482
|
+
sequence: (storedSequence + 1n).toString()
|
|
6483
|
+
};
|
|
6484
|
+
try {
|
|
6485
|
+
return await kuboRpcClient._client.name.publish(path, publishOptionsWithSequence);
|
|
6486
|
+
} catch (e) {
|
|
6487
|
+
if (!(e instanceof Error) || !e.message.includes(KUBO_SEQUENCE_NOT_GREATER_ERROR_MESSAGE)) throw e;
|
|
6488
|
+
log("Kubo holds an IPNS record for community", community.address, "at or past the stored sequence", storedSequence, "so it is left to continue its own sequence");
|
|
6489
|
+
return kuboRpcClient._client.name.publish(path, publishOptions);
|
|
6490
|
+
}
|
|
6491
|
+
}
|
|
6473
6492
|
async function publishCommunityRecordToIpns(community, build, newCommunityRecord, cycleStartedAtMs) {
|
|
6474
6493
|
const { log, newIpns, newModQueue, editIdsToIncludeInNextUpdate } = build;
|
|
6475
6494
|
const kuboRpcClient = community._clientsManager.getDefaultKuboRpcClient();
|
|
@@ -6489,15 +6508,11 @@ async function publishCommunityRecordToIpns(community, build, newCommunityRecord
|
|
|
6489
6508
|
address: community.address
|
|
6490
6509
|
});
|
|
6491
6510
|
if (!community.signer.ipnsKeyName) throw Error("IPNS key name is not defined");
|
|
6492
|
-
if (community._firstUpdateAfterStart) await community._resolveIpnsAndLogIfPotentialProblematicSequence();
|
|
6493
6511
|
const ttl = `${community._pkc.publishInterval * 1}ms`;
|
|
6494
|
-
const
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
key: community.signer.ipnsKeyName,
|
|
6499
|
-
allowOffline: true,
|
|
6500
|
-
resolve: true,
|
|
6512
|
+
const publishRes = await publishIpnsRecordContinuingStoredSequence({
|
|
6513
|
+
community,
|
|
6514
|
+
kuboRpcClient,
|
|
6515
|
+
path: file.path,
|
|
6501
6516
|
ttl
|
|
6502
6517
|
});
|
|
6503
6518
|
log(`Published a new IPNS record for community(${community.address}) on IPNS (${publishRes.name}) that points to file (${publishRes.value}) with updatedAt (${newCommunityRecord.updatedAt}) and TTL (${ttl})`);
|
|
@@ -6528,12 +6543,11 @@ async function publishCommunityRecordToIpns(community, build, newCommunityRecord
|
|
|
6528
6543
|
const remainingEditProps = Object.assign({}, ...community._pendingEditProps.map((editProps) => t$10(editProps, t$6(CommunityIpfsSchema.shape))));
|
|
6529
6544
|
Object.assign(community, remainingEditProps);
|
|
6530
6545
|
}
|
|
6531
|
-
community._firstUpdateAfterStart = false;
|
|
6532
6546
|
try {
|
|
6533
6547
|
const ipnsRecord = await getIpnsRecordInLocalKuboNode(kuboRpcClient, community.signer.address);
|
|
6534
6548
|
await community._dbHandler.keyvSet(STORAGE_KEYS[STORAGE_KEYS.LAST_IPNS_RECORD], encode(ipnsRecord));
|
|
6535
6549
|
} catch (e) {
|
|
6536
|
-
log.
|
|
6550
|
+
log.error("Failed to store the published IPNS record in the community DB, its stored sequence is now behind", e);
|
|
6537
6551
|
}
|
|
6538
6552
|
community._combinedHashOfPendingCommentsCids = newModQueue?.combinedHashOfCids || (0, import_sha256.sha256)("");
|
|
6539
6553
|
log.trace("Updated combined hash of pending comments to", community._combinedHashOfPendingCommentsCids);
|
|
@@ -6791,7 +6805,6 @@ async function start(community) {
|
|
|
6791
6805
|
async function startCommunity({ community, releaseMark }) {
|
|
6792
6806
|
const log = logger_default("pkc-js:local-community:start");
|
|
6793
6807
|
community._stopHasBeenCalled = false;
|
|
6794
|
-
community._firstUpdateAfterStart = true;
|
|
6795
6808
|
community._lastProvidedBrowserDialableSelfAddrs = void 0;
|
|
6796
6809
|
community._lastAddressReprovideCheckAt = void 0;
|
|
6797
6810
|
if (!community._clientsManager.getDefaultKuboRpcClientOrHelia()) throw Error("You need to define an IPFS client in your pkc instance to be able to start a local community");
|
|
@@ -7754,7 +7767,6 @@ var LocalCommunity = class extends RpcLocalCommunity {
|
|
|
7754
7767
|
this._startOrUpdateInFlight = void 0;
|
|
7755
7768
|
this._stopInFlight = void 0;
|
|
7756
7769
|
this._editStoresInFlight = /* @__PURE__ */ new Set();
|
|
7757
|
-
this._firstUpdateAfterStart = true;
|
|
7758
7770
|
this._internalStateUpdateId = "";
|
|
7759
7771
|
this._lastPubsubTopicRoutingProvideAt = void 0;
|
|
7760
7772
|
this._subscribedChallengePubsubTopic = void 0;
|
|
@@ -8051,9 +8063,6 @@ var LocalCommunity = class extends RpcLocalCommunity {
|
|
|
8051
8063
|
_calculateLatestUpdateTrigger() {
|
|
8052
8064
|
return calculateLatestUpdateTrigger(this);
|
|
8053
8065
|
}
|
|
8054
|
-
async _resolveIpnsAndLogIfPotentialProblematicSequence() {
|
|
8055
|
-
return resolveIpnsAndLogIfPotentialProblematicSequence(this);
|
|
8056
|
-
}
|
|
8057
8066
|
async _updateDbInternalState(props) {
|
|
8058
8067
|
return updateDbInternalState(this, props);
|
|
8059
8068
|
}
|
|
@@ -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-BlBIYSsF.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lr as FailedToFetchPageIpfsFromGatewaysError, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-
|
|
3
|
-
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Cr as getDefaultDataPath, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dr as monitorCommunitiesDirectory, Dt as parseJsonWithPKCErrorIfFails, Er as listCommunitiesSync, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Fr as toCommunitiesEntry, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gr as t$2, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Hr as t$3, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as t$4, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lt as RpcCidParamSchema, M as parseRawPages, Mr as setNativeFunctions$1, Nn as verifyChallengeVerification, Nr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Pt as RpcAnchorPublishPreparationResultSchema, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as n$3, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xr as NAME_RESOLVED_TRUE_TTL_MS, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVED_FALSE_TTL_MS, Yt as RpcFetchCommunityListParamSchema, Zr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, ei as nativeFunctions$2, 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, 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, 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, zr as t$5, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as retryKuboIpfsAdd, At as pTimeout, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cr as e$1, Ct as trackUpdatingComment, D as isIpfsCid, Dt as untrackUpdatingCommunity, E as isAbortError, Et as untrackUpdatingComment, Ft as ChallengeRequestMessageSchema, Ln as CommentUpdateForChallengeVerificationSchema, Lr as FailedToFetchPageIpfsFromGatewaysError, Lt as ChallengeVerificationMessageSchema, Mn as CommentIpfsSchema, Mr as require_retry$1, Nr as FailedToFetchCommentIpfsFromGatewaysError, Nt as ChallengeMessageSchema, Ot as require_sha256, Pr as FailedToFetchCommentUpdateFromGatewaysError, Rr as PKCError, Sn as PubsubTopicSchema, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tr as r, U as rejectWhenAbortSignalFires, Ur as setErrorMap, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Yt as version_default, Z as resolveWhenPredicateIsTrue, _r as n$2, _t as listUpdatingComments, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, d as deepMergeRuntimeFields, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, gr as isStringDomain, gt as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jt as ChallengeAnswerMessageSchema, k as isIpns, kt as TimeoutError, ln as CommunityAnchorSchema, mn as CommunityIpfsSchema, mt as findUpdatingCommunity, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pt as findUpdatingComment, r as calculateIpfsCidV0, ri as en_default, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vt as listUpdatingCommunities, x as getPostUpdateTimestampRange, xr as t$1, yr as n$1, yt as refreshTrackedCommentAliases, z as linkAbortSignals, zr as messages } from "./util-CUZ1U2Go.js";
|
|
3
|
+
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Cr as getDefaultDataPath, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dr as monitorCommunitiesDirectory, Dt as parseJsonWithPKCErrorIfFails, Er as listCommunitiesSync, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Fr as toCommunitiesEntry, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gr as t$2, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Hr as t$3, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as t$4, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lt as RpcCidParamSchema, M as parseRawPages, Mr as setNativeFunctions$1, Nn as verifyChallengeVerification, Nr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Pt as RpcAnchorPublishPreparationResultSchema, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as n$3, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xr as NAME_RESOLVED_TRUE_TTL_MS, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVED_FALSE_TTL_MS, Yt as RpcFetchCommunityListParamSchema, Zr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, ei as nativeFunctions$2, 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, 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, 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, zr as t$5, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-Byj5ZmMa.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-DmmLFRbV.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -36102,7 +36102,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36102
36102
|
this.clients.libp2pJsClients = {};
|
|
36103
36103
|
if (!this.libp2pJsClientsOptions) return;
|
|
36104
36104
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
36105
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
36105
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-8iett8xl.js");
|
|
36106
36106
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
36107
36107
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
36108
36108
|
...clientOptions,
|
|
@@ -36469,7 +36469,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36469
36469
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36470
36470
|
log.trace("Received community options to create a local community instance:", options);
|
|
36471
36471
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36472
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36472
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-ChZZa9bm.js");
|
|
36473
36473
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
36474
36474
|
const community = new LocalCommunity(this);
|
|
36475
36475
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-
|
|
1
|
+
import { gr as isStringDomain, v as getEquivalentCommunityAddresses, xn as PageSortFileSchema } from "./util-CUZ1U2Go.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-ouDezuGZ.js → rpc-local-community-Byj5ZmMa.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 { $n as CommentEditSignedPropertyNames, $r as record, $t as CommunityEditPubsubMessagePublicationSchema, A as isIpnsPath, An as CommentChallengeRequestToEncryptSchema, Ar as t$9, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cn as RpcRemoteCommunityUpdateEventResultSchema, Cr as e$5, D as isIpfsCid, Dr as n$8, Dt as untrackUpdatingCommunity, E as isAbortError, En as VotePubsubMessagePublicationSchema, Er as t$12, Fn as CommentSignedPropertyNames, Fr as FailedToFetchCommunityFromGatewaysError, Gn as GetPageParamSchema, Gr as array, Gt as NameResolverSerializedSchema, H as raceAgainstAbort, Hr as require_ms$1, Ht as DecryptedChallengeSchema, In as CommentUpdateChallengeReservedFieldNames, Ir as FailedToFetchGenericIpfsFromGatewaysError, It as ChallengeRequestMessageSignedPropertyNames, Jn as isReservedObjectKey, Jr as literal, Jt as PKCUserOptionsSchema, Kn as ModQueuePageIpfsSchema, Kr as boolean, Kt as PKCParsedOptionsSchema, L as isRequestPubsubPublicationOfPost, Lr as FailedToFetchPageIpfsFromGatewaysError, Mn as CommentIpfsSchema, Mr as require_retry$2, Mt as ChallengeAnswerMessageSignedPropertyNames, Nr as FailedToFetchCommentIpfsFromGatewaysError, O as isIpfsPath, On as VoteSignedPropertyNames, Or as r$7, Ot as require_sha256$1, Pn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Pr as FailedToFetchCommentUpdateFromGatewaysError, Pt as ChallengeMessageSignedPropertyNames, Qr as preprocess, Qt as CommunityEditPublicationSignedPropertyNames, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateForChallengeVerificationSignedPropertyNames, Rr as PKCError, Rt as ChallengeVerificationMessageSignedPropertyNames, S as hasTransientNetworkErrorCode, Sr as e$6, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tn as VoteChallengeRequestToEncryptSchema, Tr as r$8, Tt as untrackStartedCommunity, Ut as DecryptedChallengeVerificationSchema, Vn as CommentUpdateSignedPropertyNames, Vr as require_supports_color, Wn as CreateCommentOptionsWithRefinementSchema, Wr as _enum, Wt as NameResolveCacheOptionsSchema, Xr as number, Xt as CommunityEditPublicationChallengeRequestToEncryptSchema, Yn as CommentEditChallengeRequestToEncryptSchema, Yr as looseObject, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zr as object, _n as CreateRemoteCommunityFunctionArgumentSchema, _r as n$9, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, at as throwIfAbortSignalAborted, bn as PageSortFileFactorySchema, bt as refreshTrackedCommunityAliases, cn as ChallengeFileSchema, cr as CidStringSchema, d as deepMergeRuntimeFields, dn as CommunityEditOptionsSchema, dr as CreateSignerSchema, ei as string, en as CreateCommunityEditPublicationOptionsWithRefinementSchema, f as derivePublicationFromChallengeRequest, fn as CommunityExportRecordsSchema, fr as JsonSignatureSchema, ft as findStartedCommunity, gn as CreateNewLocalCommunityUserOptionsSchema, gr as isStringDomain, h as fetchAndValidateIpnsRecordFromGateway, hn as CommunitySignedPropertyNames, hr as areEquivalentNames, ht as forgetTrackedUpdatingCommunityName, in as CommentModerationSignedPropertyNames, ir as AuthorPubsubSchema, jn as CommentIpfsReservedFields, jr as e$4, k as isIpns, kr as t$10, lr as CommunityAddressSchema, m as extractNetworkErrorDetails, mn as CommunityIpfsSchema, mr as ProtocolVersionSchema, mt as findUpdatingCommunity, nn as CommentModerationPubsubMessagePublicationSchema, nr as AuthorAddressSchema, nt as shortifyCid, on as CreateCommentModerationOptionsWithRefinementSchema, or as ChallengeAnswersSchema, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsReservedFields, pr as PKCTimestampSchema, q as removeNullUndefinedEmptyObjectsValuesRecursively, qn as PageIpfsSchema, qr as custom, qt as PKCUserOptionBaseSchema, r as calculateIpfsCidV0, rr as AuthorCommentIpfsReservedFields, rt as sleepUntilTimeoutOrAbort, sn as ChallengeFileFactorySchema, sr as CidPathSchema, t as areEquivalentCommunityAddresses, ti as union, tn as CommentModerationChallengeRequestToEncryptSchema, tr as CreateCommentEditOptionsWithRefinementSchema, tt as shortifyAddress, u as createAbortError, un as CommunityChallengeSettingSchema, ur as CommunityAuthorChallengeReservedFieldNames, vn as CreateRpcCommunityFunctionArgumentSchema, w as interruptibleSleep, wn as CreateVoteUserOptionsWithRefinementSchema, wr as t$11, wt as trackUpdatingCommunity, xn as PageSortFileSchema, xr as t$13, yn as ExportCommunityModLogsOptionsSchema, yr as n$10, z as linkAbortSignals, zn as CommentUpdateReservedFields, zr as messages, zt as DecryptedChallengeAnswerSchema } from "./util-
|
|
2
|
+
import { $n as CommentEditSignedPropertyNames, $r as record, $t as CommunityEditPubsubMessagePublicationSchema, A as isIpnsPath, An as CommentChallengeRequestToEncryptSchema, Ar as t$9, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cn as RpcRemoteCommunityUpdateEventResultSchema, Cr as e$5, D as isIpfsCid, Dr as n$8, Dt as untrackUpdatingCommunity, E as isAbortError, En as VotePubsubMessagePublicationSchema, Er as t$12, Fn as CommentSignedPropertyNames, Fr as FailedToFetchCommunityFromGatewaysError, Gn as GetPageParamSchema, Gr as array, Gt as NameResolverSerializedSchema, H as raceAgainstAbort, Hr as require_ms$1, Ht as DecryptedChallengeSchema, In as CommentUpdateChallengeReservedFieldNames, Ir as FailedToFetchGenericIpfsFromGatewaysError, It as ChallengeRequestMessageSignedPropertyNames, Jn as isReservedObjectKey, Jr as literal, Jt as PKCUserOptionsSchema, Kn as ModQueuePageIpfsSchema, Kr as boolean, Kt as PKCParsedOptionsSchema, L as isRequestPubsubPublicationOfPost, Lr as FailedToFetchPageIpfsFromGatewaysError, Mn as CommentIpfsSchema, Mr as require_retry$2, Mt as ChallengeAnswerMessageSignedPropertyNames, Nr as FailedToFetchCommentIpfsFromGatewaysError, O as isIpfsPath, On as VoteSignedPropertyNames, Or as r$7, Ot as require_sha256$1, Pn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Pr as FailedToFetchCommentUpdateFromGatewaysError, Pt as ChallengeMessageSignedPropertyNames, Qr as preprocess, Qt as CommunityEditPublicationSignedPropertyNames, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateForChallengeVerificationSignedPropertyNames, Rr as PKCError, Rt as ChallengeVerificationMessageSignedPropertyNames, S as hasTransientNetworkErrorCode, Sr as e$6, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tn as VoteChallengeRequestToEncryptSchema, Tr as r$8, Tt as untrackStartedCommunity, Ut as DecryptedChallengeVerificationSchema, Vn as CommentUpdateSignedPropertyNames, Vr as require_supports_color, Wn as CreateCommentOptionsWithRefinementSchema, Wr as _enum, Wt as NameResolveCacheOptionsSchema, Xr as number, Xt as CommunityEditPublicationChallengeRequestToEncryptSchema, Yn as CommentEditChallengeRequestToEncryptSchema, Yr as looseObject, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zr as object, _n as CreateRemoteCommunityFunctionArgumentSchema, _r as n$9, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, at as throwIfAbortSignalAborted, bn as PageSortFileFactorySchema, bt as refreshTrackedCommunityAliases, cn as ChallengeFileSchema, cr as CidStringSchema, d as deepMergeRuntimeFields, dn as CommunityEditOptionsSchema, dr as CreateSignerSchema, ei as string, en as CreateCommunityEditPublicationOptionsWithRefinementSchema, f as derivePublicationFromChallengeRequest, fn as CommunityExportRecordsSchema, fr as JsonSignatureSchema, ft as findStartedCommunity, gn as CreateNewLocalCommunityUserOptionsSchema, gr as isStringDomain, h as fetchAndValidateIpnsRecordFromGateway, hn as CommunitySignedPropertyNames, hr as areEquivalentNames, ht as forgetTrackedUpdatingCommunityName, in as CommentModerationSignedPropertyNames, ir as AuthorPubsubSchema, jn as CommentIpfsReservedFields, jr as e$4, k as isIpns, kr as t$10, lr as CommunityAddressSchema, m as extractNetworkErrorDetails, mn as CommunityIpfsSchema, mr as ProtocolVersionSchema, mt as findUpdatingCommunity, nn as CommentModerationPubsubMessagePublicationSchema, nr as AuthorAddressSchema, nt as shortifyCid, on as CreateCommentModerationOptionsWithRefinementSchema, or as ChallengeAnswersSchema, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsReservedFields, pr as PKCTimestampSchema, q as removeNullUndefinedEmptyObjectsValuesRecursively, qn as PageIpfsSchema, qr as custom, qt as PKCUserOptionBaseSchema, r as calculateIpfsCidV0, rr as AuthorCommentIpfsReservedFields, rt as sleepUntilTimeoutOrAbort, sn as ChallengeFileFactorySchema, sr as CidPathSchema, t as areEquivalentCommunityAddresses, ti as union, tn as CommentModerationChallengeRequestToEncryptSchema, tr as CreateCommentEditOptionsWithRefinementSchema, tt as shortifyAddress, u as createAbortError, un as CommunityChallengeSettingSchema, ur as CommunityAuthorChallengeReservedFieldNames, vn as CreateRpcCommunityFunctionArgumentSchema, w as interruptibleSleep, wn as CreateVoteUserOptionsWithRefinementSchema, wr as t$11, wt as trackUpdatingCommunity, xn as PageSortFileSchema, xr as t$13, yn as ExportCommunityModLogsOptionsSchema, yr as n$10, z as linkAbortSignals, zn as CommentUpdateReservedFields, zr as messages, zt as DecryptedChallengeAnswerSchema } from "./util-CUZ1U2Go.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-NpdjWYfa.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import dns from "node:dns";
|
|
@@ -16556,7 +16556,7 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
|
|
|
16556
16556
|
], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
|
|
16557
16557
|
//#endregion
|
|
16558
16558
|
//#region dist/node/generated-version.js
|
|
16559
|
-
const version = "0.0.
|
|
16559
|
+
const version = "0.0.149";
|
|
16560
16560
|
//#endregion
|
|
16561
16561
|
//#region dist/node/version.js
|
|
16562
16562
|
const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Rr as PKCError, V as pubsubTopicToDhtKeyCid } from "./util-
|
|
1
|
+
import { Rr as PKCError, V as pubsubTopicToDhtKeyCid } from "./util-CUZ1U2Go.js";
|
|
2
2
|
import { ipnsSelector } from "ipns/selector";
|
|
3
3
|
import { ipnsValidator } from "ipns/validator";
|
|
4
4
|
import { unmarshalIPNSRecord } from "ipns";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Rr as PKCError, bn as PageSortFileFactorySchema, cn as ChallengeFileSchema, sn as ChallengeFileFactorySchema } from "./util-
|
|
2
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
1
|
+
import { Rr as PKCError, bn as PageSortFileFactorySchema, cn as ChallengeFileSchema, sn as ChallengeFileFactorySchema } from "./util-CUZ1U2Go.js";
|
|
2
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-NpdjWYfa.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-BH_HrtON.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-CkU4qFQx.js";
|
|
2
2
|
export { validatePageSortFileFactory };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { At as pTimeout, Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, X as replaceXWithY, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, i as calculateStringSizeSameAsIpfsAddCidV0, xr as t, yr as n } from "../../chunks/util-
|
|
2
|
-
import { S as parseRpcUnsubscribeParam, _ as parseRpcExportCommunityParam, b as parseRpcPublishChallengeAnswersParam, 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 parseRpcFetchCommunityListParam, x as parseRpcPublishCommunityListParam, y as parseRpcPublishAnchorRecordParam } from "../../chunks/node-
|
|
3
|
-
import { Br as t$1, Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Er as listCommunitiesSync, Ir as toCommunitiesWireEntry, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pRetry, Vn as verifyCommunityList, W as pLimit, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, at as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, br as findLocalCommunityAddress, bt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, mt as parseCommunityListSchemaWithPKCErrorIfItFails, nt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, qr as stringify, sn as require_lib, tt as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-
|
|
4
|
-
import { t as LocalCommunity } from "../../chunks/local-community-
|
|
1
|
+
import { At as pTimeout, Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, X as replaceXWithY, et as retryKuboIpfsAddAndProvide, ft as findStartedCommunity, i as calculateStringSizeSameAsIpfsAddCidV0, xr as t, yr as n } from "../../chunks/util-CUZ1U2Go.js";
|
|
2
|
+
import { S as parseRpcUnsubscribeParam, _ as parseRpcExportCommunityParam, b as parseRpcPublishChallengeAnswersParam, 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 parseRpcFetchCommunityListParam, x as parseRpcPublishCommunityListParam, y as parseRpcPublishAnchorRecordParam } from "../../chunks/node-BH_HrtON.js";
|
|
3
|
+
import { Br as t$1, Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Er as listCommunitiesSync, Ir as toCommunitiesWireEntry, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pRetry, Vn as verifyCommunityList, W as pLimit, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, at as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, br as findLocalCommunityAddress, bt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, mt as parseCommunityListSchemaWithPKCErrorIfItFails, nt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, qr as stringify, sn as require_lib, tt as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-Byj5ZmMa.js";
|
|
4
|
+
import { t as LocalCommunity } from "../../chunks/local-community-BlBIYSsF.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.149";
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
import type { CommunityIpfsType } from "../../../../community/types.js";
|
|
2
2
|
import type { CommentUpdateType } from "../../../../publications/comment/types.js";
|
|
3
3
|
import type { LocalCommunity } from "../local-community.js";
|
|
4
|
+
import type { KuboRpcClient } from "../../../../types.js";
|
|
4
5
|
export declare function calculateNewPostUpdates(community: LocalCommunity): Promise<CommunityIpfsType["postUpdates"]>;
|
|
5
6
|
export declare function calculateLatestUpdateTrigger(community: LocalCommunity): void;
|
|
6
7
|
export declare function requireCommunityUpdateIfModQueueChanged(community: LocalCommunity): void;
|
|
7
|
-
export declare function resolveIpnsAndLogIfPotentialProblematicSequence(community: LocalCommunity): Promise<void>;
|
|
8
8
|
export declare function addOldPageCidsToCidsToUnpin(community: LocalCommunity, curPages: CommentUpdateType["replies"] | CommunityIpfsType["posts"] | CommunityIpfsType["modQueue"], newPages: CommentUpdateType["replies"] | CommunityIpfsType["posts"] | CommunityIpfsType["modQueue"], addToBlockRm?: boolean): Promise<void>;
|
|
9
9
|
export declare function shouldResolveDomainForVerification(community: LocalCommunity): boolean;
|
|
10
|
+
export declare function publishIpnsRecordContinuingStoredSequence({ community, kuboRpcClient, path, ttl }: {
|
|
11
|
+
community: LocalCommunity;
|
|
12
|
+
kuboRpcClient: KuboRpcClient;
|
|
13
|
+
path: string;
|
|
14
|
+
ttl: string;
|
|
15
|
+
}): Promise<import("kubo-rpc-client").NamePublishResult>;
|
|
10
16
|
export declare function updateCommentsAndWritePostUpdates(community: LocalCommunity): Promise<string[]>;
|
|
11
17
|
export declare function updateCommunityIpnsIfNeeded(community: LocalCommunity, cidsUpdatedInThisCycle: string[]): Promise<void>;
|
|
12
18
|
export declare function syncIpnsWithDb(community: LocalCommunity): Promise<void>;
|