@pkcprotocol/pkc-js 0.0.132 → 0.0.133
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/errors.d.ts +2 -0
- package/dist/browser/errors.js +2 -0
- package/dist/browser/errors.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/runtime/node/community/local-community/editing.js +60 -7
- package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/browser/signer/signatures.js +18 -6
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +46 -46
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-Be5IsnZy.js → helia-for-pkc-B6cVl9Fj.js} +2 -2
- package/dist/bundled/chunks/{local-community-BU2-PWv4.js → local-community-CEsw9IC3.js} +1 -1
- package/dist/bundled/chunks/{local-community-BjDsNdnK.js → local-community-JxRohlLp.js} +75 -24
- package/dist/bundled/chunks/{node-Cpazwn3v.js → node-DsWFSaNV.js} +5 -5
- package/dist/bundled/chunks/{page-sort-scoring-BqPwUozm.js → page-sort-scoring-iqMGLuRC.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-C5xdrdFG.js → rpc-local-community-jndojGZl.js} +48 -37
- package/dist/bundled/chunks/{util-DaZGW5bK.js → util-Bna9pur0.js} +3 -1
- package/dist/bundled/chunks/{util-BLpE5ch7.js → util-CYgZRMVL.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-DBOjkq17.js → validate-package-factories-FeyM9Tw1.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/errors.d.ts +2 -0
- package/dist/node/errors.js +2 -0
- package/dist/node/errors.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/runtime/node/community/local-community/editing.js +60 -7
- package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/node/signer/signatures.js +18 -6
- package/dist/node/signer/signatures.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"challenges.js": {
|
|
4
4
|
"isEntry": true,
|
|
5
5
|
"imports": [
|
|
6
|
-
"chunks/validate-package-factories-
|
|
6
|
+
"chunks/validate-package-factories-FeyM9Tw1.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-DsWFSaNV.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-DsWFSaNV.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-FeyM9Tw1.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-jndojGZl.js",
|
|
48
|
+
"chunks/node-DsWFSaNV.js",
|
|
49
|
+
"chunks/util-Bna9pur0.js",
|
|
50
|
+
"chunks/local-community-JxRohlLp.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-B6cVl9Fj.js": {
|
|
81
81
|
"isEntry": false,
|
|
82
82
|
"imports": [
|
|
83
83
|
"chunks/chunk-2rV9d50f.js",
|
|
84
|
-
"chunks/util-
|
|
85
|
-
"chunks/util-
|
|
84
|
+
"chunks/util-Bna9pur0.js",
|
|
85
|
+
"chunks/util-CYgZRMVL.js",
|
|
86
86
|
"chunks/src-DKntVmyX.js",
|
|
87
87
|
"chunks/src-Cpx2Sts8.js",
|
|
88
88
|
"node:url",
|
|
@@ -201,21 +201,21 @@
|
|
|
201
201
|
"dist/node/helia/helia-for-pkc.js"
|
|
202
202
|
]
|
|
203
203
|
},
|
|
204
|
-
"chunks/local-community-
|
|
204
|
+
"chunks/local-community-CEsw9IC3.js": {
|
|
205
205
|
"isEntry": false,
|
|
206
206
|
"imports": [
|
|
207
|
-
"chunks/local-community-
|
|
207
|
+
"chunks/local-community-JxRohlLp.js"
|
|
208
208
|
],
|
|
209
209
|
"dynamicImports": [],
|
|
210
210
|
"inputs": []
|
|
211
211
|
},
|
|
212
|
-
"chunks/local-community-
|
|
212
|
+
"chunks/local-community-JxRohlLp.js": {
|
|
213
213
|
"isEntry": false,
|
|
214
214
|
"imports": [
|
|
215
215
|
"chunks/chunk-2rV9d50f.js",
|
|
216
|
-
"chunks/rpc-local-community-
|
|
217
|
-
"chunks/util-
|
|
218
|
-
"chunks/page-sort-scoring-
|
|
216
|
+
"chunks/rpc-local-community-jndojGZl.js",
|
|
217
|
+
"chunks/util-Bna9pur0.js",
|
|
218
|
+
"chunks/page-sort-scoring-iqMGLuRC.js",
|
|
219
219
|
"node:url",
|
|
220
220
|
"node:path",
|
|
221
221
|
"os",
|
|
@@ -262,13 +262,13 @@
|
|
|
262
262
|
"dist/node/runtime/node/community/local-community.js"
|
|
263
263
|
]
|
|
264
264
|
},
|
|
265
|
-
"chunks/node-
|
|
265
|
+
"chunks/node-DsWFSaNV.js": {
|
|
266
266
|
"isEntry": false,
|
|
267
267
|
"imports": [
|
|
268
268
|
"chunks/chunk-2rV9d50f.js",
|
|
269
|
-
"chunks/rpc-local-community-
|
|
270
|
-
"chunks/util-
|
|
271
|
-
"chunks/util-
|
|
269
|
+
"chunks/rpc-local-community-jndojGZl.js",
|
|
270
|
+
"chunks/util-Bna9pur0.js",
|
|
271
|
+
"chunks/util-CYgZRMVL.js",
|
|
272
272
|
"path",
|
|
273
273
|
"assert",
|
|
274
274
|
"fs",
|
|
@@ -279,8 +279,8 @@
|
|
|
279
279
|
"rpc-websockets"
|
|
280
280
|
],
|
|
281
281
|
"dynamicImports": [
|
|
282
|
-
"chunks/helia-for-pkc-
|
|
283
|
-
"chunks/local-community-
|
|
282
|
+
"chunks/helia-for-pkc-B6cVl9Fj.js",
|
|
283
|
+
"chunks/local-community-JxRohlLp.js"
|
|
284
284
|
],
|
|
285
285
|
"inputs": [
|
|
286
286
|
"dist/node/zod-error-map.js",
|
|
@@ -440,22 +440,22 @@
|
|
|
440
440
|
"dist/node/index.js"
|
|
441
441
|
]
|
|
442
442
|
},
|
|
443
|
-
"chunks/page-sort-scoring-
|
|
443
|
+
"chunks/page-sort-scoring-iqMGLuRC.js": {
|
|
444
444
|
"isEntry": false,
|
|
445
445
|
"imports": [
|
|
446
|
-
"chunks/util-
|
|
446
|
+
"chunks/util-Bna9pur0.js"
|
|
447
447
|
],
|
|
448
448
|
"dynamicImports": [],
|
|
449
449
|
"inputs": [
|
|
450
450
|
"dist/node/pages/page-sort-scoring.js"
|
|
451
451
|
]
|
|
452
452
|
},
|
|
453
|
-
"chunks/rpc-local-community-
|
|
453
|
+
"chunks/rpc-local-community-jndojGZl.js": {
|
|
454
454
|
"isEntry": false,
|
|
455
455
|
"imports": [
|
|
456
456
|
"chunks/chunk-2rV9d50f.js",
|
|
457
|
-
"chunks/util-
|
|
458
|
-
"chunks/page-sort-scoring-
|
|
457
|
+
"chunks/util-Bna9pur0.js",
|
|
458
|
+
"chunks/page-sort-scoring-iqMGLuRC.js",
|
|
459
459
|
"chunks/src-CYIMjhjK.js",
|
|
460
460
|
"node:crypto",
|
|
461
461
|
"node:url",
|
|
@@ -1531,21 +1531,7 @@
|
|
|
1531
1531
|
"node_modules/@ipld/dag-pb/src/index.js"
|
|
1532
1532
|
]
|
|
1533
1533
|
},
|
|
1534
|
-
"chunks/util-
|
|
1535
|
-
"isEntry": false,
|
|
1536
|
-
"imports": [
|
|
1537
|
-
"chunks/util-DaZGW5bK.js",
|
|
1538
|
-
"ipns/selector",
|
|
1539
|
-
"ipns/validator",
|
|
1540
|
-
"ipns",
|
|
1541
|
-
"uint8arrays/equals"
|
|
1542
|
-
],
|
|
1543
|
-
"dynamicImports": [],
|
|
1544
|
-
"inputs": [
|
|
1545
|
-
"dist/node/helia/util.js"
|
|
1546
|
-
]
|
|
1547
|
-
},
|
|
1548
|
-
"chunks/util-DaZGW5bK.js": {
|
|
1534
|
+
"chunks/util-Bna9pur0.js": {
|
|
1549
1535
|
"isEntry": false,
|
|
1550
1536
|
"imports": [
|
|
1551
1537
|
"chunks/chunk-2rV9d50f.js",
|
|
@@ -1640,11 +1626,25 @@
|
|
|
1640
1626
|
"dist/node/util.js"
|
|
1641
1627
|
]
|
|
1642
1628
|
},
|
|
1643
|
-
"chunks/
|
|
1629
|
+
"chunks/util-CYgZRMVL.js": {
|
|
1630
|
+
"isEntry": false,
|
|
1631
|
+
"imports": [
|
|
1632
|
+
"chunks/util-Bna9pur0.js",
|
|
1633
|
+
"ipns/selector",
|
|
1634
|
+
"ipns/validator",
|
|
1635
|
+
"ipns",
|
|
1636
|
+
"uint8arrays/equals"
|
|
1637
|
+
],
|
|
1638
|
+
"dynamicImports": [],
|
|
1639
|
+
"inputs": [
|
|
1640
|
+
"dist/node/helia/util.js"
|
|
1641
|
+
]
|
|
1642
|
+
},
|
|
1643
|
+
"chunks/validate-package-factories-FeyM9Tw1.js": {
|
|
1644
1644
|
"isEntry": false,
|
|
1645
1645
|
"imports": [
|
|
1646
|
-
"chunks/util-
|
|
1647
|
-
"chunks/page-sort-scoring-
|
|
1646
|
+
"chunks/util-Bna9pur0.js",
|
|
1647
|
+
"chunks/page-sort-scoring-iqMGLuRC.js"
|
|
1648
1648
|
],
|
|
1649
1649
|
"dynamicImports": [],
|
|
1650
1650
|
"inputs": [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-
|
|
1
|
+
import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-FeyM9Tw1.js";
|
|
2
2
|
export { validateChallengeFileFactory };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { C as hideClassPrivateProps, Lr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic, zr as logger_default } from "./util-
|
|
3
|
-
import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-
|
|
2
|
+
import { C as hideClassPrivateProps, Lr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic, zr as logger_default } from "./util-Bna9pur0.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-CYgZRMVL.js";
|
|
4
4
|
import { t as map } from "./src-Cpx2Sts8.js";
|
|
5
5
|
import { t as parallelBatch } from "./src-DKntVmyX.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-
|
|
1
|
+
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-JxRohlLp.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { i as __toESM } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAddAndProvide, $n as CommentEditsTableRowSchema, At as ChallengeAnswerMessageSchema, Bt as DecryptedChallengeRequestSchema, C as hideClassPrivateProps, Ct as trackUpdatingCommunity, Dt as require_sha256, En as VotePubsubReservedFields, Et as untrackUpdatingCommunity, F as isLinkOfVideo, G as removeMfsFilesSafely, Hn as CommentsTableRowSchema, I as isLinkValid, It as ChallengeVerificationMessageSchema, Jt as version_default, Lr as PKCError, M as isLinkOfAudio, Mn as CommentPubsubMessageReservedFields, Mt as ChallengeMessageSchema, N as isLinkOfImage, On as VoteTablesRowSchema, Or as t$4, P as isLinkOfMedia, Pt as ChallengeRequestMessageSchema, Rr as messages, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$3, Vn as CommentUpdateTableRowSchema, W as removeBlocksFromKuboNode, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xt as CommunityEditPublicationPubsubReservedFields, Yn as CommentEditPubsubMessagePublicationSchema, Z as retryKuboBlockPutPinAndProvidePubsubTopic, Zn as CommentEditReservedFields, _ as genToArray, _r as t$7, at as timestamp, b as getIpnsRecordInLocalKuboNode, br as t$6, bt as syncCommunityRegistryEntry, c as contentContainsMarkdownImages, ct as withSortedKeysDeep, dt as findStartedCommunity, f as derivePublicationFromChallengeRequest, g as findMalformedUnicodeString, gr as n$3, hr as isStringDomain, i as calculateStringSizeSameAsIpfsAddCidV0, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, j as isLinkOfAnimatedImage, jn as CommentIpfsSchema, jr as require_retry, kr as t$2, kt as pTimeout, l as contentContainsMarkdownVideos, lt as writeKuboFilesWithTimeout, mn as CommunitySignedPropertyNames, nn as CommentModerationReservedFields, nt as sleepUntilTimeoutOrAbort, o as calculateUnixFsDagSizeCidV0, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, q as removeNullUndefinedValues, r as calculateIpfsCidV0, rt as statMfsPathSafely, s as contentContainsMarkdownAudio, st as withSortedKeys, ti as ZodError, tn as CommentModerationPubsubMessagePublicationSchema, ut as findCommunityInRegistry, v as getEquivalentCommunityAddresses, vr as n$2, wr as r$1, wt as untrackStartedCommunity, xr as e$1, xt as trackStartedCommunity, y as getErrorCodeFromMessage, yr as t$5, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default, zt as DecryptedChallengeRequestPublicationSchema } from "./util-
|
|
3
|
-
import { $ as createSchemaRowParser, An as verifyChallengeAnswer, Bn as verifyCommunityEdit, Br as t$8, Cr as getThumbnailPropsOfLink, Dr as moveCommunityDbToDeletedDirectory, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Fr as isCommunityStartLocked, Gr as stringify, Hn as verifyVote, Hr as n$4, In as verifyCommentModeration, Ir as require_src, Kn as getAuthorNameFromWire, Ln as verifyCommentPubsubMessage, Lr as t$10, Mn as verifyChallengeRequest, Mr as findCommunitiesEntry, N as MAX_PAGE_SIZE_BYTES, Or as refreshCommunitiesList, Pn as verifyCommentEdit, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Rn as verifyCommentUpdate, Rr as t$11, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Tn as signCommentUpdateForChallengeVerification, Un as buildRuntimeAuthor, Vr as n$5, W as pLimit, Wn as cleanWireAuthor, Wr as t$9, X as coerceSchemaRowBoolean, Xr as STORAGE_KEYS, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, Zr as require_lodash_merge, _ as createAuthorIdentityMatcher, _r as deriveCommentIpfsFromCommentTableRow, a as generatePagesReportingFailedSorts, ar as encode, b as KeyvBetterSqlite3, bn as signChallengeVerification, c as resolvePageSortsOrThrow, cn as SignerWithPublicKeyAddress, cr as getPKCAddressFromPublicKey, d as getChallengeVerification, dr as BackupAbortError, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, f as getCommunityChallengeFromCommunityChallengeSettings, fn as decryptEd25519AesGcmPublicKeyBuffer, fr as backupCommunityDb, g as authorNameResolveFailureReason, gn as cleanUpBeforePublishing, gr as deleteOldCommunityInWindows, h as authorIdentityMatcherForRequest, hn as _validateSignatureOfPKCRecord, i as derivePublicPageSorts, ir as decode, j as iterateOverPageCidsToFindAllCids, kr as resolveDbPostsCidRefs, lr as getPKCAddressFromPublicKeySync, m as pkcJsChallenges, mn as encryptEd25519AesGcmPublicKeyBuffer, mr as calculateInlineRepliesBudget, nr as getCommunityPublicKeyFromWire, o as loadPageSortsForStartedCommunity, p as loadChallengeFileFromCommunityChallengeSettings, pr as calculateExpectedSignatureSize, pt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, r as computePageSortsFingerprint, s as lookupPageSortFactories, sr as getIpfsKeyFromPrivateKey, t as RpcLocalCommunity, tr as getCommunityNameFromWire, u as deriveCommunityChallengesOrThrow, ur as getPublicKeyFromPrivateKey, v as TrackedInstanceRegistry, vn as signChallengeMessage, vr as deriveDbPosts, w as TIMEFRAMES_TO_SECONDS, wn as signCommentUpdate, wr as importSignerIntoKuboNode, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as getDefaultCommunityDbConfig, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as r$2 } from "./rpc-local-community-
|
|
4
|
-
import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-
|
|
2
|
+
import { $ as retryKuboIpfsAddAndProvide, $n as CommentEditsTableRowSchema, At as ChallengeAnswerMessageSchema, Bt as DecryptedChallengeRequestSchema, C as hideClassPrivateProps, Ct as trackUpdatingCommunity, Dt as require_sha256, En as VotePubsubReservedFields, Et as untrackUpdatingCommunity, F as isLinkOfVideo, G as removeMfsFilesSafely, Hn as CommentsTableRowSchema, I as isLinkValid, It as ChallengeVerificationMessageSchema, Jt as version_default, Lr as PKCError, M as isLinkOfAudio, Mn as CommentPubsubMessageReservedFields, Mt as ChallengeMessageSchema, N as isLinkOfImage, On as VoteTablesRowSchema, Or as t$4, P as isLinkOfMedia, Pt as ChallengeRequestMessageSchema, Rr as messages, Sr as e, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$3, Vn as CommentUpdateTableRowSchema, W as removeBlocksFromKuboNode, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xt as CommunityEditPublicationPubsubReservedFields, Yn as CommentEditPubsubMessagePublicationSchema, Z as retryKuboBlockPutPinAndProvidePubsubTopic, Zn as CommentEditReservedFields, _ as genToArray, _r as t$7, at as timestamp, b as getIpnsRecordInLocalKuboNode, br as t$6, bt as syncCommunityRegistryEntry, c as contentContainsMarkdownImages, ct as withSortedKeysDeep, dt as findStartedCommunity, f as derivePublicationFromChallengeRequest, g as findMalformedUnicodeString, gr as n$3, hr as isStringDomain, i as calculateStringSizeSameAsIpfsAddCidV0, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, j as isLinkOfAnimatedImage, jn as CommentIpfsSchema, jr as require_retry, kr as t$2, kt as pTimeout, l as contentContainsMarkdownVideos, lt as writeKuboFilesWithTimeout, mn as CommunitySignedPropertyNames, nn as CommentModerationReservedFields, nt as sleepUntilTimeoutOrAbort, o as calculateUnixFsDagSizeCidV0, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, q as removeNullUndefinedValues, r as calculateIpfsCidV0, rt as statMfsPathSafely, s as contentContainsMarkdownAudio, st as withSortedKeys, ti as ZodError, tn as CommentModerationPubsubMessagePublicationSchema, ut as findCommunityInRegistry, v as getEquivalentCommunityAddresses, vr as n$2, wr as r$1, wt as untrackStartedCommunity, xr as e$1, xt as trackStartedCommunity, y as getErrorCodeFromMessage, yr as t$5, z as pubsubTopicToDhtKey, zn as CommentUpdateSchema, zr as logger_default, zt as DecryptedChallengeRequestPublicationSchema } from "./util-Bna9pur0.js";
|
|
3
|
+
import { $ as createSchemaRowParser, An as verifyChallengeAnswer, Bn as verifyCommunityEdit, Br as t$8, Cr as getThumbnailPropsOfLink, Dr as moveCommunityDbToDeletedDirectory, Dt as parseJsonWithPKCErrorIfFails, En as signCommunity, Fn as verifyCommentIpfs, Fr as isCommunityStartLocked, Gr as stringify, Hn as verifyVote, Hr as n$4, In as verifyCommentModeration, Ir as require_src, Kn as getAuthorNameFromWire, Ln as verifyCommentPubsubMessage, Lr as t$10, Mn as verifyChallengeRequest, Mr as findCommunitiesEntry, N as MAX_PAGE_SIZE_BYTES, Or as refreshCommunitiesList, Pn as verifyCommentEdit, Q as collectSchemaRowCoercions, Qn as effectiveMaxCrosspostDepth, Rn as verifyCommentUpdate, Rr as t$11, S as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, Sn as signCommentEdit, Tn as signCommentUpdateForChallengeVerification, Un as buildRuntimeAuthor, Vr as n$5, W as pLimit, Wn as cleanWireAuthor, Wr as t$9, X as coerceSchemaRowBoolean, Xr as STORAGE_KEYS, Z as coerceSchemaRowJson, Zn as crosspostChainDepthUpTo, Zr as require_lodash_merge, _ as createAuthorIdentityMatcher, _r as deriveCommentIpfsFromCommentTableRow, a as generatePagesReportingFailedSorts, ar as encode, b as KeyvBetterSqlite3, bn as signChallengeVerification, c as resolvePageSortsOrThrow, cn as SignerWithPublicKeyAddress, cr as getPKCAddressFromPublicKey, d as getChallengeVerification, dr as BackupAbortError, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, f as getCommunityChallengeFromCommunityChallengeSettings, fn as decryptEd25519AesGcmPublicKeyBuffer, fr as backupCommunityDb, g as authorNameResolveFailureReason, gn as cleanUpBeforePublishing, gr as deleteOldCommunityInWindows, h as authorIdentityMatcherForRequest, hn as _validateSignatureOfPKCRecord, i as derivePublicPageSorts, ir as decode, j as iterateOverPageCidsToFindAllCids, kr as resolveDbPostsCidRefs, lr as getPKCAddressFromPublicKeySync, m as pkcJsChallenges, mn as encryptEd25519AesGcmPublicKeyBuffer, mr as calculateInlineRepliesBudget, nr as getCommunityPublicKeyFromWire, o as loadPageSortsForStartedCommunity, p as loadChallengeFileFromCommunityChallengeSettings, pr as calculateExpectedSignatureSize, pt as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, r as computePageSortsFingerprint, s as lookupPageSortFactories, sr as getIpfsKeyFromPrivateKey, t as RpcLocalCommunity, tr as getCommunityNameFromWire, u as deriveCommunityChallengesOrThrow, ur as getPublicKeyFromPrivateKey, v as TrackedInstanceRegistry, vn as signChallengeMessage, vr as deriveDbPosts, w as TIMEFRAMES_TO_SECONDS, wn as signCommentUpdate, wr as importSignerIntoKuboNode, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, xn as signComment, xr as getDefaultCommunityDbConfig, y as LRUCache, yr as deriveDbReplies, zn as verifyCommunity, zr as r$2 } from "./rpc-local-community-jndojGZl.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-iqMGLuRC.js";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import os from "os";
|
|
8
|
-
import { existsSync, promises } from "node:fs";
|
|
8
|
+
import fs, { existsSync, promises } from "node:fs";
|
|
9
9
|
import path$1 from "path";
|
|
10
10
|
import assert from "assert";
|
|
11
11
|
import { Buffer as Buffer$1 } from "buffer";
|
|
12
|
-
import fs from "fs";
|
|
12
|
+
import fs$1 from "fs";
|
|
13
13
|
import Database from "better-sqlite3";
|
|
14
14
|
import { CID } from "multiformats/cid";
|
|
15
15
|
import { peerIdFromString } from "@libp2p/peer-id";
|
|
@@ -319,7 +319,7 @@ function normalizeRegistryDataPath(dataPath) {
|
|
|
319
319
|
let existing = resolved;
|
|
320
320
|
let tail = "";
|
|
321
321
|
while (true) try {
|
|
322
|
-
return path$1.join(fs.realpathSync.native(existing), tail);
|
|
322
|
+
return path$1.join(fs$1.realpathSync.native(existing), tail);
|
|
323
323
|
} catch {
|
|
324
324
|
const parent = path$1.dirname(existing);
|
|
325
325
|
if (parent === existing) return resolved;
|
|
@@ -1700,13 +1700,13 @@ var DbHandler = class {
|
|
|
1700
1700
|
const needToMigrate = currentDbVersion < version_default.DB_VERSION;
|
|
1701
1701
|
const dbPath = this._dbConfig.filename;
|
|
1702
1702
|
let backupDbPath;
|
|
1703
|
-
const dbExistsAlready = fs.existsSync(dbPath);
|
|
1703
|
+
const dbExistsAlready = fs$1.existsSync(dbPath);
|
|
1704
1704
|
if (needToMigrate) {
|
|
1705
1705
|
if (dbExistsAlready && currentDbVersion > 0) {
|
|
1706
1706
|
this.destoryConnection();
|
|
1707
1707
|
backupDbPath = path$1.join(path$1.dirname(dbPath), ".backup_before_migration", `${path$1.basename(dbPath)}.${currentDbVersion}.${timestamp()}`);
|
|
1708
1708
|
log(`Copying db ${path$1.basename(dbPath)} to ${backupDbPath} before migration`);
|
|
1709
|
-
if (!fs.existsSync(path$1.dirname(backupDbPath))) await fs.promises.mkdir(path$1.dirname(backupDbPath), { recursive: true });
|
|
1709
|
+
if (!fs$1.existsSync(path$1.dirname(backupDbPath))) await fs$1.promises.mkdir(path$1.dirname(backupDbPath), { recursive: true });
|
|
1710
1710
|
const sourceDb = new Database(dbPath, { fileMustExist: true });
|
|
1711
1711
|
await sourceDb.backup(backupDbPath);
|
|
1712
1712
|
sourceDb.close();
|
|
@@ -1789,7 +1789,7 @@ var DbHandler = class {
|
|
|
1789
1789
|
this._columnNamesByTable = {};
|
|
1790
1790
|
this._preparedStatements.clear();
|
|
1791
1791
|
if (needToMigrate) log(`Created/migrated the tables to the latest (${newDbVersion}) version and saved to path`, this._dbConfig.filename);
|
|
1792
|
-
if (backupDbPath) await fs.promises.rm(backupDbPath);
|
|
1792
|
+
if (backupDbPath) await fs$1.promises.rm(backupDbPath);
|
|
1793
1793
|
}
|
|
1794
1794
|
_tableExists(tableName) {
|
|
1795
1795
|
return !!this._db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name = ?").get(tableName);
|
|
@@ -3807,16 +3807,16 @@ var DbHandler = class {
|
|
|
3807
3807
|
const dataPath = this._community._pkc.dataPath;
|
|
3808
3808
|
const oldPathString = path$1.join(dataPath, "communities", oldDbName);
|
|
3809
3809
|
const newPathString = path$1.join(dataPath, "communities", newDbName);
|
|
3810
|
-
await fs.promises.mkdir(path$1.dirname(oldPathString), { recursive: true });
|
|
3811
|
-
await fs.promises.mkdir(path$1.dirname(newPathString), { recursive: true });
|
|
3810
|
+
await fs$1.promises.mkdir(path$1.dirname(oldPathString), { recursive: true });
|
|
3811
|
+
await fs$1.promises.mkdir(path$1.dirname(newPathString), { recursive: true });
|
|
3812
3812
|
try {
|
|
3813
|
-
if (!fs.existsSync(oldPathString)) log(`Old DB file ${oldPathString} does not exist. Cannot backup/rename.`);
|
|
3813
|
+
if (!fs$1.existsSync(oldPathString)) log(`Old DB file ${oldPathString} does not exist. Cannot backup/rename.`);
|
|
3814
3814
|
else {
|
|
3815
3815
|
const sourceDb = new Database(oldPathString, { fileMustExist: true });
|
|
3816
3816
|
await sourceDb.backup(newPathString);
|
|
3817
3817
|
sourceDb.close();
|
|
3818
3818
|
if (os.type() === "Windows_NT") await deleteOldCommunityInWindows(oldPathString, this._community._pkc);
|
|
3819
|
-
else await fs.promises.rm(oldPathString, { force: true });
|
|
3819
|
+
else await fs$1.promises.rm(oldPathString, { force: true });
|
|
3820
3820
|
}
|
|
3821
3821
|
} catch (error) {
|
|
3822
3822
|
log.error(`Failed to backup/rename database from ${oldPathString} to ${newPathString}: `, error);
|
|
@@ -3854,7 +3854,7 @@ var DbHandler = class {
|
|
|
3854
3854
|
log.trace(`Attempting to unlock the start of community (${communityAddress})`);
|
|
3855
3855
|
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
3856
3856
|
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
3857
|
-
if (!fs.existsSync(lockfilePath) || !fs.existsSync(communityDbPath)) return;
|
|
3857
|
+
if (!fs$1.existsSync(lockfilePath) || !fs$1.existsSync(communityDbPath)) return;
|
|
3858
3858
|
try {
|
|
3859
3859
|
await import_src.default.unlock(communityDbPath, { lockfilePath });
|
|
3860
3860
|
log(`Unlocked start of community (${communityAddress})`);
|
|
@@ -3891,7 +3891,7 @@ var DbHandler = class {
|
|
|
3891
3891
|
const log = logger_default("pkc-js:local-community:db-handler:lock:unlockCommunityState");
|
|
3892
3892
|
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
|
|
3893
3893
|
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
3894
|
-
if (!fs.existsSync(lockfilePath)) return;
|
|
3894
|
+
if (!fs$1.existsSync(lockfilePath)) return;
|
|
3895
3895
|
try {
|
|
3896
3896
|
await import_src.default.unlock(communityDbPath, { lockfilePath });
|
|
3897
3897
|
} catch (e) {
|
|
@@ -3901,7 +3901,7 @@ var DbHandler = class {
|
|
|
3901
3901
|
}
|
|
3902
3902
|
communityDbExists() {
|
|
3903
3903
|
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
3904
|
-
return fs.existsSync(communityDbPath);
|
|
3904
|
+
return fs$1.existsSync(communityDbPath);
|
|
3905
3905
|
}
|
|
3906
3906
|
markCommentsAsPublishedToPostUpdates(commentCids) {
|
|
3907
3907
|
if (commentCids.length === 0) return;
|
|
@@ -6902,22 +6902,73 @@ function deriveNameAndAddressEdit(community, editOptions) {
|
|
|
6902
6902
|
function listRenamedCommunityNow(community) {
|
|
6903
6903
|
refreshCommunitiesList(community._pkc);
|
|
6904
6904
|
}
|
|
6905
|
+
async function restoreCommunityAfterFailedRename({ community, oldAddress, newAddress, postUpdatesFolderMoved, log }) {
|
|
6906
|
+
try {
|
|
6907
|
+
if (postUpdatesFolderMoved) await movePostUpdatesFolderToNewAddress(community, newAddress, oldAddress);
|
|
6908
|
+
await community.start();
|
|
6909
|
+
} catch (restoreError) {
|
|
6910
|
+
log.error(`Failed to restore community (${oldAddress}) after its rename to ${newAddress} failed`, restoreError);
|
|
6911
|
+
community.emit("error", restoreError);
|
|
6912
|
+
}
|
|
6913
|
+
}
|
|
6914
|
+
async function removePartialDbCopy({ community, oldAddress, newAddress, log }) {
|
|
6915
|
+
const communitiesPath = path.join(community._pkc.dataPath, "communities");
|
|
6916
|
+
if (!fs.existsSync(path.join(communitiesPath, oldAddress))) return;
|
|
6917
|
+
try {
|
|
6918
|
+
await fs.promises.rm(path.join(communitiesPath, newAddress), { force: true });
|
|
6919
|
+
} catch (e) {
|
|
6920
|
+
log.error(`Failed to remove the partial DB copy of community (${oldAddress}) at ${newAddress}`, e);
|
|
6921
|
+
}
|
|
6922
|
+
}
|
|
6905
6923
|
async function editPropsOnStartedCommunity(community, parsedEditOptions, pagesEdit) {
|
|
6906
6924
|
const log = logger_default("pkc-js:local-community:start:editPropsOnStartedCommunity");
|
|
6907
6925
|
const oldAddress = t$9(community.address);
|
|
6926
|
+
const uniqueEditId = (0, import_sha256.sha256)(stringify(parsedEditOptions));
|
|
6908
6927
|
if (typeof parsedEditOptions.address === "string" && community.address !== parsedEditOptions.address) {
|
|
6909
|
-
|
|
6910
|
-
|
|
6928
|
+
const newAddress = parsedEditOptions.address;
|
|
6929
|
+
await validateNewAddressBeforeEditing(community, newAddress, log);
|
|
6930
|
+
log(`Attempting to edit community.address from ${oldAddress} to ${newAddress}. We will stop community first`);
|
|
6911
6931
|
await community.stop();
|
|
6912
|
-
|
|
6932
|
+
try {
|
|
6933
|
+
await movePostUpdatesFolderToNewAddress(community, oldAddress, newAddress);
|
|
6934
|
+
} catch (e) {
|
|
6935
|
+
await restoreCommunityAfterFailedRename({
|
|
6936
|
+
community,
|
|
6937
|
+
oldAddress,
|
|
6938
|
+
newAddress,
|
|
6939
|
+
postUpdatesFolderMoved: false,
|
|
6940
|
+
log
|
|
6941
|
+
});
|
|
6942
|
+
throw e;
|
|
6943
|
+
}
|
|
6944
|
+
try {
|
|
6945
|
+
await community._dbHandler.changeDbFilename(oldAddress, newAddress);
|
|
6946
|
+
} catch (e) {
|
|
6947
|
+
await removePartialDbCopy({
|
|
6948
|
+
community,
|
|
6949
|
+
oldAddress,
|
|
6950
|
+
newAddress,
|
|
6951
|
+
log
|
|
6952
|
+
});
|
|
6953
|
+
await restoreCommunityAfterFailedRename({
|
|
6954
|
+
community,
|
|
6955
|
+
oldAddress,
|
|
6956
|
+
newAddress,
|
|
6957
|
+
postUpdatesFolderMoved: true,
|
|
6958
|
+
log
|
|
6959
|
+
});
|
|
6960
|
+
throw e;
|
|
6961
|
+
}
|
|
6913
6962
|
listRenamedCommunityNow(community);
|
|
6914
|
-
community.setAddress(
|
|
6963
|
+
community.setAddress(newAddress);
|
|
6915
6964
|
await community._dbHandler.initDbIfNeeded();
|
|
6965
|
+
await updateDbInternalState(community, { ...parsedEditOptions });
|
|
6966
|
+
community._pendingEditProps.push({
|
|
6967
|
+
...parsedEditOptions,
|
|
6968
|
+
editId: uniqueEditId
|
|
6969
|
+
});
|
|
6916
6970
|
await community.start();
|
|
6917
|
-
|
|
6918
|
-
}
|
|
6919
|
-
const uniqueEditId = (0, import_sha256.sha256)(stringify(parsedEditOptions));
|
|
6920
|
-
community._pendingEditProps.push({
|
|
6971
|
+
} else community._pendingEditProps.push({
|
|
6921
6972
|
...parsedEditOptions,
|
|
6922
6973
|
editId: uniqueEditId
|
|
6923
6974
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAddAndProvide, At as ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Et as untrackUpdatingCommunity, H as rejectWhenAbortSignalFires, Hr as setErrorMap, In as CommentUpdateForChallengeVerificationSchema, It as ChallengeVerificationMessageSchema, J as removeUndefinedValuesRecursively, Jt as version_default, Lr as PKCError, Mr as FailedToFetchCommentIpfsFromGatewaysError, Mt as ChallengeMessageSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Ot as TimeoutError, Pt as ChallengeRequestMessageSchema, Q as retryKuboIpfsAdd, Rr as messages, Sr as e$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenCommunityStopsOrAborts, X as resolveWhenPredicateIsTrue, Y as replaceXWithY, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as timestamp, br as t$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as shortifyAddress, ft as findUpdatingComment, gr as n$2, gt as listUpdatingComments, hr as isStringDomain, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$1, k as isIpns, kt as pTimeout, ni as en_default, nt as sleepUntilTimeoutOrAbort, ot as waitForUpdateInCommunityInstanceWithErrorAndTimeout, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, r as calculateIpfsCidV0, tt as shortifyCid, u as createAbortError, vr as n$1, vt as refreshTrackedCommentAliases, wr as r, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, xr as e, zn as CommentUpdateSchema, zr as logger_default } from "./util-
|
|
3
|
-
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, Ar as setNativeFunctions$1, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Br as t$3, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dt as parseJsonWithPKCErrorIfFails, Er as monitorCommunitiesDirectory, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as NAME_RESOLVED_TRUE_TTL_MS, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lr as t$5, Lt as RpcCidParamSchema, M as parseRawPages, Mr as findCommunitiesEntry, Nn as verifyChallengeVerification, Nr as toCommunitiesEntry, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pt as RpcAnchorPublishPreparationResultSchema, Qr as nativeFunctions$2, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, Sr as getDefaultDataPath, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tr as listCommunitiesSync, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as t$2, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vr as n$3, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wr as t$4, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Yt as RpcFetchCommunityListParamSchema, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qr as NAME_RESOLVED_FALSE_TTL_MS, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as retryKuboIpfsAddAndProvide, At as ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Et as untrackUpdatingCommunity, H as rejectWhenAbortSignalFires, Hr as setErrorMap, In as CommentUpdateForChallengeVerificationSchema, It as ChallengeVerificationMessageSchema, J as removeUndefinedValuesRecursively, Jt as version_default, Lr as PKCError, Mr as FailedToFetchCommentIpfsFromGatewaysError, Mt as ChallengeMessageSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Ot as TimeoutError, Pt as ChallengeRequestMessageSchema, Q as retryKuboIpfsAdd, Rr as messages, Sr as e$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenCommunityStopsOrAborts, X as resolveWhenPredicateIsTrue, Y as replaceXWithY, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as timestamp, br as t$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as shortifyAddress, ft as findUpdatingComment, gr as n$2, gt as listUpdatingComments, hr as isStringDomain, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, it as throwIfAbortSignalAborted, jn as CommentIpfsSchema, jr as require_retry$1, k as isIpns, kt as pTimeout, ni as en_default, nt as sleepUntilTimeoutOrAbort, ot as waitForUpdateInCommunityInstanceWithErrorAndTimeout, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, r as calculateIpfsCidV0, tt as shortifyCid, u as createAbortError, vr as n$1, vt as refreshTrackedCommentAliases, wr as r, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, xr as e, zn as CommentUpdateSchema, zr as logger_default } from "./util-Bna9pur0.js";
|
|
3
|
+
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, Ar as setNativeFunctions$1, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Br as t$3, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dt as parseJsonWithPKCErrorIfFails, Er as monitorCommunitiesDirectory, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as NAME_RESOLVED_TRUE_TTL_MS, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lr as t$5, Lt as RpcCidParamSchema, M as parseRawPages, Mr as findCommunitiesEntry, Nn as verifyChallengeVerification, Nr as toCommunitiesEntry, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pt as RpcAnchorPublishPreparationResultSchema, Qr as nativeFunctions$2, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, Sr as getDefaultDataPath, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tr as listCommunitiesSync, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as t$2, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vr as n$3, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wr as t$4, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Yt as RpcFetchCommunityListParamSchema, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qr as NAME_RESOLVED_FALSE_TTL_MS, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-jndojGZl.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-CYgZRMVL.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -35823,7 +35823,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
35823
35823
|
this.clients.libp2pJsClients = {};
|
|
35824
35824
|
if (!this.libp2pJsClientsOptions) return;
|
|
35825
35825
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
35826
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
35826
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-B6cVl9Fj.js");
|
|
35827
35827
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
35828
35828
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
35829
35829
|
...clientOptions,
|
|
@@ -36188,7 +36188,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36188
36188
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36189
36189
|
log.trace("Received community options to create a local community instance:", options);
|
|
36190
36190
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36191
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36191
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-CEsw9IC3.js");
|
|
36192
36192
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
36193
36193
|
const community = new LocalCommunity(this);
|
|
36194
36194
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bn as PageSortFileSchema, hr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-
|
|
1
|
+
import { bn as PageSortFileSchema, hr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-Bna9pur0.js";
|
|
2
2
|
//#region dist/node/pages/page-sort-scoring.js
|
|
3
3
|
function validatePageSortFile(rawFile) {
|
|
4
4
|
const validated = PageSortFileSchema.parse(rawFile);
|