@pkcprotocol/pkc-js 0.0.74 → 0.0.75

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.
Files changed (57) hide show
  1. package/README.md +24 -1
  2. package/dist/browser/generated-version.d.ts +1 -1
  3. package/dist/browser/generated-version.js +1 -1
  4. package/dist/browser/helia/helia-for-pkc.d.ts +1 -1
  5. package/dist/browser/helia/helia-for-pkc.js +41 -5
  6. package/dist/browser/helia/helia-for-pkc.js.map +1 -1
  7. package/dist/browser/helia/lru-blockstore.d.ts +92 -0
  8. package/dist/browser/helia/lru-blockstore.js +224 -0
  9. package/dist/browser/helia/lru-blockstore.js.map +1 -0
  10. package/dist/browser/pkc/pkc.js +4 -1
  11. package/dist/browser/pkc/pkc.js.map +1 -1
  12. package/dist/browser/rpc/src/schema.d.ts +16 -0
  13. package/dist/browser/runtime/browser/blockstore.d.ts +25 -0
  14. package/dist/browser/runtime/browser/blockstore.js +40 -0
  15. package/dist/browser/runtime/browser/blockstore.js.map +1 -0
  16. package/dist/browser/runtime/node/blockstore.d.ts +32 -0
  17. package/dist/browser/runtime/node/blockstore.js +42 -0
  18. package/dist/browser/runtime/node/blockstore.js.map +1 -0
  19. package/dist/browser/schema.d.ts +20 -0
  20. package/dist/browser/schema.js +11 -1
  21. package/dist/browser/schema.js.map +1 -1
  22. package/dist/bundled/bundle-manifest.json +201 -94
  23. package/dist/bundled/chunks/helia-for-pkc-BPj1zAUb.js +6915 -0
  24. package/dist/bundled/chunks/{local-community-CIVs_iuS.js → local-community-ChTkd8lH.js} +1 -1
  25. package/dist/bundled/chunks/{local-community-Br1ipu1Z.js → local-community-D4efR9XJ.js} +2 -2
  26. package/dist/bundled/chunks/{node-Cn7VaPDJ.js → node-BK6GBM0d.js} +7 -6
  27. package/dist/bundled/chunks/{rpc-local-community-DtdeJBOq.js → rpc-local-community-O94vseOA.js} +8 -8
  28. package/dist/bundled/chunks/{schema-B1Ot-kux.js → schema-wNdSno5O.js} +7 -3
  29. package/dist/bundled/chunks/{src-o_MYSn-E.js → src-B2CwDTfy.js} +2 -142
  30. package/dist/bundled/chunks/{src-4u0f92eE.js → src-BKg5Lhod.js} +2 -127
  31. package/dist/bundled/chunks/src-Cpx2Sts8.js +127 -0
  32. package/dist/bundled/chunks/src-DKntVmyX.js +142 -0
  33. package/dist/bundled/chunks/{util-B6v5HAdy.js → util-iNnH2bP5.js} +1 -1
  34. package/dist/bundled/index.js +1 -1
  35. package/dist/bundled/rpc/src/index.js +4 -4
  36. package/dist/node/generated-version.d.ts +1 -1
  37. package/dist/node/generated-version.js +1 -1
  38. package/dist/node/helia/helia-for-pkc.d.ts +1 -1
  39. package/dist/node/helia/helia-for-pkc.js +41 -5
  40. package/dist/node/helia/helia-for-pkc.js.map +1 -1
  41. package/dist/node/helia/lru-blockstore.d.ts +92 -0
  42. package/dist/node/helia/lru-blockstore.js +224 -0
  43. package/dist/node/helia/lru-blockstore.js.map +1 -0
  44. package/dist/node/pkc/pkc.js +4 -1
  45. package/dist/node/pkc/pkc.js.map +1 -1
  46. package/dist/node/rpc/src/schema.d.ts +16 -0
  47. package/dist/node/runtime/browser/blockstore.d.ts +25 -0
  48. package/dist/node/runtime/browser/blockstore.js +40 -0
  49. package/dist/node/runtime/browser/blockstore.js.map +1 -0
  50. package/dist/node/runtime/node/blockstore.d.ts +32 -0
  51. package/dist/node/runtime/node/blockstore.js +42 -0
  52. package/dist/node/runtime/node/blockstore.js.map +1 -0
  53. package/dist/node/schema.d.ts +20 -0
  54. package/dist/node/schema.js +11 -1
  55. package/dist/node/schema.js.map +1 -1
  56. package/package.json +8 -5
  57. package/dist/bundled/chunks/helia-for-pkc-B-75U9z9.js +0 -495
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-Br1ipu1Z.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-D4efR9XJ.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
@@ -1,6 +1,6 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as pubsubTopicToDhtKey, $n as t$7, At as trackStartedCommunity, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, En as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Fn as CommentEditPubsubMessagePublicationSchema, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditReservedFields, M as genToArray, Mr as ZodError, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, On as CommentUpdateTableRowSchema, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as n$3, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, Un as AuthorReservedFields, W as isLinkOfAnimatedImage, Xn as n$4, Y as isLinkValid, Zn as t$8, _r as PKCError, _t as timestamp, a as ChallengeRequestMessageSchema, ar as t$4, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bt as findCommunityInRegistry, cr as t$5, d as DecryptedChallengeRequestSchema, dr as require_retry, dt as retryKuboIpfsAddAndProvide, er as t$6, fn as VotePubsubMessagePublicationSchema, hn as VoteTablesRowSchema, ht as statMfsPathSafely, ir as r$1, k as doesDomainAddressHaveCapitalLetter, kn as CommentsTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$3, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, nr as e$1, nt as removeBlocksFromKuboNode, pn as VotePubsubReservedFields, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunitySignedPropertyNames, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as e, u as DecryptedChallengeRequestPublicationSchema, vn as CommentIpfsSchema, vr as messages, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentPubsubMessageReservedFields, yr as logger_default, yt as writeKuboFilesWithTimeout, zn as CommentEditsTableRowSchema } from "./schema-B1Ot-kux.js";
3
- import { $n as t$10, A as deriveDbPosts, At as verifyCommunityEdit, Bt as getCommunityPublicKeyFromWire, C as BackupAbortError, Dt as verifyCommentPubsubMessage, E as calculateInlineRepliesBudget, Et as verifyCommentModeration, F as importSignerIntoKuboNode, Ft as getAuthorNameFromWire, G as REPLY_REPLIES_SORT_TYPES, Gt as getIpfsKeyFromPrivateKey, Ht as decode, Jn as r$2, Jt as getPublicKeyFromPrivateKey, K as TIMEFRAMES_TO_SECONDS, Kn as t$9, Kt as getPKCAddressFromPublicKey, M as getDefaultCommunityDbConfig, Mt as buildRuntimeAuthor, Nt as cleanWireAuthor, O as deleteOldCommunityInWindows, Ot as verifyCommentUpdate, P as getThumbnailPropsOfLink, R as moveCommunityDbToDeletedDirectory, S as encryptEd25519AesGcmPublicKeyBuffer, St as verifyChallengeRequest, T as calculateExpectedSignatureSize, Tt as verifyCommentIpfs, U as POSTS_SORT_TYPES, Ut as encode, W as POST_REPLIES_SORT_TYPES, Xn as n$6, Yn as t$11, Yt as createSchemaRowParser, Z as iterateOverPageCidsToFindAllCids, Zn as n$5, _ as SignerWithPublicKeyAddress, _t as signCommunity, a as pkcJsChallenges, b as decryptEd25519AesGcmPublicKeyBuffer, bt as verifyChallengeAnswer, cn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, d as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, dt as signChallengeVerification, er as stringify, f as KeyvBetterSqlite3, ft as signComment, gt as signCommentUpdateForChallengeVerification, ht as signCommentUpdate, i as getCommunityChallengeFromCommunityChallengeSettings, it as pLimit, j as deriveDbReplies, jt as verifyVote, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommunity, l as normalizeSelfAddrsForProvider, lt as signChallengeMessage, nr as require_lodash_merge, o as TrackedInstanceRegistry, on as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, pt as signCommentEdit, qn as t$12, qt as getPKCAddressFromPublicKeySync, r as getChallengeVerification, s as LRUCache, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tr as STORAGE_KEYS, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, w as backupCommunityDb, wt as verifyCommentEdit, xn as parseJsonWithPKCErrorIfFails, z as resolveDbPostsCidRefs, zt as getCommunityNameFromWire } from "./rpc-local-community-DtdeJBOq.js";
2
+ import { $ as pubsubTopicToDhtKey, $n as t$7, At as trackStartedCommunity, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, En as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Fn as CommentEditPubsubMessagePublicationSchema, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditReservedFields, M as genToArray, Mr as ZodError, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, On as CommentUpdateTableRowSchema, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as n$3, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, Un as AuthorReservedFields, W as isLinkOfAnimatedImage, Xn as n$4, Y as isLinkValid, Zn as t$8, _r as PKCError, _t as timestamp, a as ChallengeRequestMessageSchema, ar as t$4, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bt as findCommunityInRegistry, cr as t$5, d as DecryptedChallengeRequestSchema, dr as require_retry, dt as retryKuboIpfsAddAndProvide, er as t$6, fn as VotePubsubMessagePublicationSchema, hn as VoteTablesRowSchema, ht as statMfsPathSafely, ir as r$1, k as doesDomainAddressHaveCapitalLetter, kn as CommentsTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$3, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, nr as e$1, nt as removeBlocksFromKuboNode, pn as VotePubsubReservedFields, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunitySignedPropertyNames, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as e, u as DecryptedChallengeRequestPublicationSchema, vn as CommentIpfsSchema, vr as messages, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentPubsubMessageReservedFields, yr as logger_default, yt as writeKuboFilesWithTimeout, zn as CommentEditsTableRowSchema } from "./schema-wNdSno5O.js";
3
+ import { $n as t$10, A as deriveDbPosts, At as verifyCommunityEdit, Bt as getCommunityPublicKeyFromWire, C as BackupAbortError, Dt as verifyCommentPubsubMessage, E as calculateInlineRepliesBudget, Et as verifyCommentModeration, F as importSignerIntoKuboNode, Ft as getAuthorNameFromWire, G as REPLY_REPLIES_SORT_TYPES, Gt as getIpfsKeyFromPrivateKey, Ht as decode, Jn as r$2, Jt as getPublicKeyFromPrivateKey, K as TIMEFRAMES_TO_SECONDS, Kn as t$9, Kt as getPKCAddressFromPublicKey, M as getDefaultCommunityDbConfig, Mt as buildRuntimeAuthor, Nt as cleanWireAuthor, O as deleteOldCommunityInWindows, Ot as verifyCommentUpdate, P as getThumbnailPropsOfLink, R as moveCommunityDbToDeletedDirectory, S as encryptEd25519AesGcmPublicKeyBuffer, St as verifyChallengeRequest, T as calculateExpectedSignatureSize, Tt as verifyCommentIpfs, U as POSTS_SORT_TYPES, Ut as encode, W as POST_REPLIES_SORT_TYPES, Xn as n$6, Yn as t$11, Yt as createSchemaRowParser, Z as iterateOverPageCidsToFindAllCids, Zn as n$5, _ as SignerWithPublicKeyAddress, _t as signCommunity, a as pkcJsChallenges, b as decryptEd25519AesGcmPublicKeyBuffer, bt as verifyChallengeAnswer, cn as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, d as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, dt as signChallengeVerification, er as stringify, f as KeyvBetterSqlite3, ft as signComment, gt as signCommentUpdateForChallengeVerification, ht as signCommentUpdate, i as getCommunityChallengeFromCommunityChallengeSettings, it as pLimit, j as deriveDbReplies, jt as verifyVote, k as deriveCommentIpfsFromCommentTableRow, kt as verifyCommunity, l as normalizeSelfAddrsForProvider, lt as signChallengeMessage, nr as require_lodash_merge, o as TrackedInstanceRegistry, on as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, pt as signCommentEdit, qn as t$12, qt as getPKCAddressFromPublicKeySync, r as getChallengeVerification, s as LRUCache, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tr as STORAGE_KEYS, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, w as backupCommunityDb, wt as verifyCommentEdit, xn as parseJsonWithPKCErrorIfFails, z as resolveDbPostsCidRefs, zt as getCommunityNameFromWire } from "./rpc-local-community-O94vseOA.js";
4
4
  import { randomFillSync, randomUUID } from "node:crypto";
5
5
  import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import path from "node:path";
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { B as isIpfsCid, Cn as CommentUpdateForChallengeVerificationSchema, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dt as refreshTrackedCommentAliases, E as createAbortError, En as CommentUpdateSchema, Et as listUpdatingCommunities, Fr as stringifyPrimitive, H as isIpns, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Nr as joinValues, Pr as parsedType, Pt as untrackUpdatingComment, Q as isStringDomain, Qn as n$1, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, Sr as setErrorMap, St as findUpdatingComment, Tt as listUpdatingComments, Xn as n$2, _r as PKCError, _t as timestamp, a as ChallengeRequestMessageSchema, b as areEquivalentCommunityAddresses, br as require_supports_color, cn as PubsubTopicSchema, ct as resolveWhenPredicateIsTrue, dr as require_retry, er as t$1, fr as FailedToFetchCommentIpfsFromGatewaysError, ft as shortifyAddress, ir as r, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, nr as e$1, ot as removeUndefinedValuesRecursively, pt as shortifyCid, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, tr as e, ut as retryKuboIpfsAdd, vn as CommentIpfsSchema, vr as messages, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wt as listStartedCommunities, xt as findStartedCommunity, y as version_default, yr as logger_default, z as isAbortError } from "./schema-B1Ot-kux.js";
3
- import { $ as RepliesPages, $n as t$5, $t as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCidParamSchema, At as verifyCommunityEdit, B as setNativeFunctions$1, Bn as RpcFetchCidResultSchema, Bt as getCommunityPublicKeyFromWire, Cn as parseRpcCommentEventWithPKCErrorIfItFails, Ct as verifyChallengeVerification, D as createKuboRpcClient, Dn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Dt as verifyCommentPubsubMessage, Et as verifyCommentModeration, Fn as RpcExportCommunityModLogsParamSchema, Gn as RpcUnsubscribeParamSchema, H as CommentClientsManager, Hn as RpcResolveAuthorNameResultSchema, Ht as decode, I as listCommunitiesSync, In as RpcExportCommunityModLogsResultSchema, It as normalizeCreatePublicationAuthor, Kn as t$4, L as monitorCommunitiesDirectory, Ln as RpcExportCommunityParamSchema, Lt as buildRuntimeCommunityFields, Mn as RpcCommunityIdentifierParamSchema, Mt as buildRuntimeAuthor, N as getDefaultDataPath, Nn as RpcCommunityPageParamSchema, Nt as cleanWireAuthor, On as RpcAuthorNameParamSchema, Ot as verifyCommentUpdate, Pn as RpcEditCommunityParamSchema, Pt as getAuthorNameFromRuntime, Q as parseRawPages, Qn as t$2, Rn as RpcExportCommunityResultSchema, Rt as getCommunityAddressFromRecord, Sn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Tn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Tt as verifyCommentIpfs, Un as RpcSubscriptionIdResultSchema, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcPublishChallengeAnswersParamSchema, Vt as normalizeCommunityInputFromCommunity, Wn as RpcSuccessResultSchema, Wt as getBufferedPKCAddressFromPublicKey, X as findCommentInPageInstanceRecursively, Xn as n$3, Xt as parseCidStringSchemaWithPKCErrorIfItFails, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as t$3, _n as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, at as PKCTypedEmitter, bn as parseDecryptedChallengeWithPKCErrorIfItFails, c as AddressesRewriterProxyServer, ct as signChallengeAnswer, dn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, en as parseCommentIpfsSchemaWithPKCErrorIfItFails, et as PublicationClientsManager, f as KeyvBetterSqlite3, fn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, ft as signComment, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, hn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, in as parseCommunityAddressWithPKCErrorIfItFails, ir as require_undici, jn as RpcCommentRepliesPageParamSchema, jt as verifyVote, kn as RpcCancelExportParamSchema, ln as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, m as decodeRpcChallengePubsubMsg, mt as signCommentModeration, n as RpcRemoteCommunity, nn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, nt as InflightFetchManager, o as TrackedInstanceRegistry, ot as require_lib$1, p as decodeRpcChallengeAnswerPubsubMsg, pt as signCommentEdit, qt as getPKCAddressFromPublicKeySync, rn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, rr as nativeFunctions$2, s as LRUCache, sn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tt as PKCClientsManager, u as RemoteCommunity, un as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ut as signChallengeRequest, v as createSigner, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, vt as signCommunityEdit, wn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, wt as verifyCommentEdit, x as encryptEd25519AesGcm, xn as parseJsonWithPKCErrorIfFails, xt as verifyChallengeMessage, y as decryptEd25519AesGcm, yn as parseDecryptedChallengeVerification, yt as signVote, zn as RpcFetchCidParamSchema, zt as getCommunityNameFromWire } from "./rpc-local-community-DtdeJBOq.js";
4
- import { o as getHeliaDebugContext } from "./util-B6v5HAdy.js";
2
+ import { B as isIpfsCid, Cn as CommentUpdateForChallengeVerificationSchema, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dt as refreshTrackedCommentAliases, E as createAbortError, En as CommentUpdateSchema, Et as listUpdatingCommunities, Fr as stringifyPrimitive, H as isIpns, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Nr as joinValues, Pr as parsedType, Pt as untrackUpdatingComment, Q as isStringDomain, Qn as n$1, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, Sr as setErrorMap, St as findUpdatingComment, Tt as listUpdatingComments, Xn as n$2, _r as PKCError, _t as timestamp, a as ChallengeRequestMessageSchema, b as areEquivalentCommunityAddresses, br as require_supports_color, cn as PubsubTopicSchema, ct as resolveWhenPredicateIsTrue, dr as require_retry, er as t$1, fr as FailedToFetchCommentIpfsFromGatewaysError, ft as shortifyAddress, ir as r, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, mt as sleepUntilTimeoutOrAbort, nn as CommunityIpfsSchema, nr as e$1, ot as removeUndefinedValuesRecursively, pt as shortifyCid, r as ChallengeMessageSchema, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, tr as e, ut as retryKuboIpfsAdd, vn as CommentIpfsSchema, vr as messages, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wt as listStartedCommunities, xt as findStartedCommunity, y as version_default, yr as logger_default, z as isAbortError } from "./schema-wNdSno5O.js";
3
+ import { $ as RepliesPages, $n as t$5, $t as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, An as RpcCidParamSchema, At as verifyCommunityEdit, B as setNativeFunctions$1, Bn as RpcFetchCidResultSchema, Bt as getCommunityPublicKeyFromWire, Cn as parseRpcCommentEventWithPKCErrorIfItFails, Ct as verifyChallengeVerification, D as createKuboRpcClient, Dn as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Dt as verifyCommentPubsubMessage, Et as verifyCommentModeration, Fn as RpcExportCommunityModLogsParamSchema, Gn as RpcUnsubscribeParamSchema, H as CommentClientsManager, Hn as RpcResolveAuthorNameResultSchema, Ht as decode, I as listCommunitiesSync, In as RpcExportCommunityModLogsResultSchema, It as normalizeCreatePublicationAuthor, Kn as t$4, L as monitorCommunitiesDirectory, Ln as RpcExportCommunityParamSchema, Lt as buildRuntimeCommunityFields, Mn as RpcCommunityIdentifierParamSchema, Mt as buildRuntimeAuthor, N as getDefaultDataPath, Nn as RpcCommunityPageParamSchema, Nt as cleanWireAuthor, On as RpcAuthorNameParamSchema, Ot as verifyCommentUpdate, Pn as RpcEditCommunityParamSchema, Pt as getAuthorNameFromRuntime, Q as parseRawPages, Qn as t$2, Rn as RpcExportCommunityResultSchema, Rt as getCommunityAddressFromRecord, Sn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Tn as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Tt as verifyCommentIpfs, Un as RpcSubscriptionIdResultSchema, V as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Vn as RpcPublishChallengeAnswersParamSchema, Vt as normalizeCommunityInputFromCommunity, Wn as RpcSuccessResultSchema, Wt as getBufferedPKCAddressFromPublicKey, X as findCommentInPageInstanceRecursively, Xn as n$3, Xt as parseCidStringSchemaWithPKCErrorIfItFails, Y as extractCommunityRuntimeFieldsFromParsedPages, Yn as t$3, _n as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, at as PKCTypedEmitter, bn as parseDecryptedChallengeWithPKCErrorIfItFails, c as AddressesRewriterProxyServer, ct as signChallengeAnswer, dn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, en as parseCommentIpfsSchemaWithPKCErrorIfItFails, et as PublicationClientsManager, f as KeyvBetterSqlite3, fn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, ft as signComment, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, hn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, in as parseCommunityAddressWithPKCErrorIfItFails, ir as require_undici, jn as RpcCommentRepliesPageParamSchema, jt as verifyVote, kn as RpcCancelExportParamSchema, ln as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, m as decodeRpcChallengePubsubMsg, mt as signCommentModeration, n as RpcRemoteCommunity, nn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, nt as InflightFetchManager, o as TrackedInstanceRegistry, ot as require_lib$1, p as decodeRpcChallengeAnswerPubsubMsg, pt as signCommentEdit, qt as getPKCAddressFromPublicKeySync, rn as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, rr as nativeFunctions$2, s as LRUCache, sn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, st as cleanUpBeforePublishing, t as RpcLocalCommunity, tt as PKCClientsManager, u as RemoteCommunity, un as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, ut as signChallengeRequest, v as createSigner, vn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, vt as signCommunityEdit, wn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, wt as verifyCommentEdit, x as encryptEd25519AesGcm, xn as parseJsonWithPKCErrorIfFails, xt as verifyChallengeMessage, y as decryptEd25519AesGcm, yn as parseDecryptedChallengeVerification, yt as signVote, zn as RpcFetchCidParamSchema, zt as getCommunityNameFromWire } from "./rpc-local-community-O94vseOA.js";
4
+ import { o as getHeliaDebugContext } from "./util-iNnH2bP5.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -8901,11 +8901,12 @@ var PKC$1 = class extends PKCTypedEmitter {
8901
8901
  this.clients.libp2pJsClients = {};
8902
8902
  if (!this.libp2pJsClientsOptions) return;
8903
8903
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
8904
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-B-75U9z9.js");
8904
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-BPj1zAUb.js");
8905
8905
  for (const clientOptions of this.libp2pJsClientsOptions) {
8906
8906
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
8907
8907
  ...clientOptions,
8908
- httpRoutersOptions: this.httpRoutersOptions
8908
+ httpRoutersOptions: this.httpRoutersOptions,
8909
+ dataPath: this.dataPath
8909
8910
  });
8910
8911
  this.clients.libp2pJsClients[clientOptions.key] = heliaNode;
8911
8912
  }
@@ -9149,7 +9150,7 @@ var PKC$1 = class extends PKCTypedEmitter {
9149
9150
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
9150
9151
  log.trace("Received community options to create a local community instance:", options);
9151
9152
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
9152
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-CIVs_iuS.js");
9153
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-ChTkd8lH.js");
9153
9154
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
9154
9155
  const community = new LocalCommunity(this);
9155
9156
  if (isLocalCommunity) {
@@ -1,5 +1,5 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as pubsubTopicToDhtKey, $t as CommunityEditOptionsSchema, A as extractNetworkErrorDetails, An as CreateCommentOptionsWithRefinementSchema, Ar as record, At as trackStartedCommunity, B as isIpfsCid, Bn as CreateCommentEditOptionsWithRefinementSchema, Cr as _enum, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateSignedPropertyNames, Dr as literal, E as createAbortError, En as CommentUpdateSchema, Er as custom, Et as listUpdatingCommunities, Ft as untrackUpdatingCommunity, Gn as CidPathSchema, Gt as CommentModerationPubsubMessagePublicationSchema, H as isIpns, Hn as AuthorCommentIpfsReservedFields, Ht as CommunityEditPubsubMessagePublicationSchema, I as getPostUpdateTimestampRange, In as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, It as require_sha256$1, Jn as CommunityAuthorChallengeReservedFieldNames, Jt as CommentModerationsTableRowSchema, Kn as CidStringSchema, L as hideClassPrivateProps, Mn as ModQueuePageIpfsSchema, Mt as trackUpdatingCommunity, Nn as PageIpfsSchema, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, Or as number, Ot as refreshTrackedCommunityAliases, Pn as CommentEditChallengeRequestToEncryptSchema, Q as isStringDomain, Qn as n$9, Qt as CommunityChallengeSettingSchema, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditSignedPropertyNames, Rt as pTimeout, Sn as CommentUpdateChallengeReservedFieldNames, St as findUpdatingComment, Tn as CommentUpdateReservedFields, Tr as boolean, U as isIpnsPath, Ut as CreateCommunityEditPublicationOptionsWithRefinementSchema, V as isIpfsPath, Vn as AuthorAddressSchema, Vt as CommunityEditPublicationSignedPropertyNames, Wn as ChallengeAnswersSchema, Wt as CommentModerationChallengeRequestToEncryptSchema, X as isRequestPubsubPublicationOfPost, Xn as n$10, Xt as ChallengeFileFactorySchema, Yn as CreateSignerSchema, Yt as CreateCommentModerationOptionsWithRefinementSchema, Z as isRequestPubsubPublicationOfReply, Zt as ChallengeFileSchema, _ as PKCUserOptionBaseSchema, _n as CommentIpfsReservedFields, _r as PKCError, _t as timestamp, an as CreateRemoteCommunityFunctionArgumentSchema, ar as t$12, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, br as require_supports_color, c as ChallengeVerificationMessageSignedPropertyNames, cr as t$10, ct as resolveWhenPredicateIsTrue, dn as VoteChallengeRequestToEncryptSchema, dr as require_retry$1, en as CommunityExportRecordsSchema, er as t$13, f as DecryptedChallengeSchema, fn as VotePubsubMessagePublicationSchema, fr as FailedToFetchCommentIpfsFromGatewaysError, ft as shortifyAddress, g as PKCParsedOptionsSchema, gn as CommentChallengeRequestToEncryptSchema, gr as FailedToFetchPageIpfsFromGatewaysError, gt as throwIfAbortSignalAborted, h as NameResolverSerializedSchema, hr as FailedToFetchGenericIpfsFromGatewaysError, i as ChallengeMessageSignedPropertyNames, in as CreateNewLocalCommunityUserOptionsSchema, ir as r$8, it as removeNullUndefinedEmptyObjectsValuesRecursively, j as fetchAndValidateIpnsRecordFromGateway, jn as GetPageParamSchema, jr as string, k as doesDomainAddressHaveCapitalLetter, kr as object, l as DecryptedChallengeAnswerSchema, ln as RpcRemoteCommunityUpdateEventResultSchema, lr as t$9, m as NameResolveCacheOptionsSchema, mn as VoteSignedPropertyNames, mr as FailedToFetchCommunityFromGatewaysError, mt as sleepUntilTimeoutOrAbort, n as ChallengeAnswerMessageSignedPropertyNames, nn as CommunityIpfsSchema, nr as e$5, o as ChallengeRequestMessageSignedPropertyNames, on as CreateRpcCommunityFunctionArgumentSchema, or as n$8, p as DecryptedChallengeVerificationSchema, pr as FailedToFetchCommentUpdateFromGatewaysError, pt as shortifyCid, qn as CommunityAddressSchema, qt as CommentModerationSignedPropertyNames, rn as CommunitySignedPropertyNames, rr as t$11, sn as ExportCommunityModLogsOptionsSchema, sr as r$7, tn as CommunityIpfsReservedFields, tr as e$6, tt as raceAgainstAbort, un as CreateVoteUserOptionsWithRefinementSchema, ur as e$4, v as PKCUserOptionsSchema, vn as CommentIpfsSchema, vr as messages, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wn as CommentUpdateForChallengeVerificationSignedPropertyNames, wr as array, wt as listStartedCommunities, x as calculateIpfsCidV0, xn as CommentSignedPropertyNames, xr as require_ms$1, xt as findStartedCommunity, yr as logger_default, z as isAbortError, zt as CommunityEditPublicationChallengeRequestToEncryptSchema } from "./schema-B1Ot-kux.js";
2
+ import { $ as pubsubTopicToDhtKey, $t as CommunityEditOptionsSchema, A as extractNetworkErrorDetails, An as CreateCommentOptionsWithRefinementSchema, Ar as record, At as trackStartedCommunity, B as isIpfsCid, Bn as CreateCommentEditOptionsWithRefinementSchema, Cr as _enum, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateSignedPropertyNames, Dr as literal, E as createAbortError, En as CommentUpdateSchema, Er as custom, Et as listUpdatingCommunities, Ft as untrackUpdatingCommunity, Gn as CidPathSchema, Gt as CommentModerationPubsubMessagePublicationSchema, H as isIpns, Hn as AuthorCommentIpfsReservedFields, Ht as CommunityEditPubsubMessagePublicationSchema, I as getPostUpdateTimestampRange, In as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, It as require_sha256$1, Jn as CommunityAuthorChallengeReservedFieldNames, Jt as CommentModerationsTableRowSchema, Kn as CidStringSchema, L as hideClassPrivateProps, Mn as ModQueuePageIpfsSchema, Mt as trackUpdatingCommunity, Nn as PageIpfsSchema, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, Or as number, Ot as refreshTrackedCommunityAliases, Pn as CommentEditChallengeRequestToEncryptSchema, Q as isStringDomain, Qn as n$9, Qt as CommunityChallengeSettingSchema, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditSignedPropertyNames, Rt as pTimeout, Sn as CommentUpdateChallengeReservedFieldNames, St as findUpdatingComment, Tn as CommentUpdateReservedFields, Tr as boolean, U as isIpnsPath, Ut as CreateCommunityEditPublicationOptionsWithRefinementSchema, V as isIpfsPath, Vn as AuthorAddressSchema, Vt as CommunityEditPublicationSignedPropertyNames, Wn as ChallengeAnswersSchema, Wt as CommentModerationChallengeRequestToEncryptSchema, X as isRequestPubsubPublicationOfPost, Xn as n$10, Xt as ChallengeFileFactorySchema, Yn as CreateSignerSchema, Yt as CreateCommentModerationOptionsWithRefinementSchema, Z as isRequestPubsubPublicationOfReply, Zt as ChallengeFileSchema, _ as PKCUserOptionBaseSchema, _n as CommentIpfsReservedFields, _r as PKCError, _t as timestamp, an as CreateRemoteCommunityFunctionArgumentSchema, ar as t$12, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, br as require_supports_color, c as ChallengeVerificationMessageSignedPropertyNames, cr as t$10, ct as resolveWhenPredicateIsTrue, dn as VoteChallengeRequestToEncryptSchema, dr as require_retry$1, en as CommunityExportRecordsSchema, er as t$13, f as DecryptedChallengeSchema, fn as VotePubsubMessagePublicationSchema, fr as FailedToFetchCommentIpfsFromGatewaysError, ft as shortifyAddress, g as PKCParsedOptionsSchema, gn as CommentChallengeRequestToEncryptSchema, gr as FailedToFetchPageIpfsFromGatewaysError, gt as throwIfAbortSignalAborted, h as NameResolverSerializedSchema, hr as FailedToFetchGenericIpfsFromGatewaysError, i as ChallengeMessageSignedPropertyNames, in as CreateNewLocalCommunityUserOptionsSchema, ir as r$8, it as removeNullUndefinedEmptyObjectsValuesRecursively, j as fetchAndValidateIpnsRecordFromGateway, jn as GetPageParamSchema, jr as string, k as doesDomainAddressHaveCapitalLetter, kr as object, l as DecryptedChallengeAnswerSchema, ln as RpcRemoteCommunityUpdateEventResultSchema, lr as t$9, m as NameResolveCacheOptionsSchema, mn as VoteSignedPropertyNames, mr as FailedToFetchCommunityFromGatewaysError, mt as sleepUntilTimeoutOrAbort, n as ChallengeAnswerMessageSignedPropertyNames, nn as CommunityIpfsSchema, nr as e$5, o as ChallengeRequestMessageSignedPropertyNames, on as CreateRpcCommunityFunctionArgumentSchema, or as n$8, p as DecryptedChallengeVerificationSchema, pr as FailedToFetchCommentUpdateFromGatewaysError, pt as shortifyCid, qn as CommunityAddressSchema, qt as CommentModerationSignedPropertyNames, rn as CommunitySignedPropertyNames, rr as t$11, sn as ExportCommunityModLogsOptionsSchema, sr as r$7, tn as CommunityIpfsReservedFields, tr as e$6, tt as raceAgainstAbort, un as CreateVoteUserOptionsWithRefinementSchema, ur as e$4, v as PKCUserOptionsSchema, vn as CommentIpfsSchema, vr as messages, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wn as CommentUpdateForChallengeVerificationSignedPropertyNames, wr as array, wt as listStartedCommunities, x as calculateIpfsCidV0, xn as CommentSignedPropertyNames, xr as require_ms$1, xt as findStartedCommunity, yr as logger_default, z as isAbortError, zt as CommunityEditPublicationChallengeRequestToEncryptSchema } from "./schema-wNdSno5O.js";
3
3
  import { t as all } from "./src-CYIMjhjK.js";
4
4
  import http from "node:http";
5
5
  import { createHash } from "node:crypto";
@@ -11928,8 +11928,8 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) =>
11928
11928
  //#endregion
11929
11929
  //#region node_modules/undici/lib/mock/snapshot-recorder.js
11930
11930
  var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11931
- const { writeFile, readFile: readFile$1, mkdir } = __require("node:fs/promises");
11932
- const { dirname, resolve } = __require("node:path");
11931
+ const { writeFile: writeFile$1, readFile: readFile$1, mkdir } = __require("node:fs/promises");
11932
+ const { dirname: dirname$1, resolve } = __require("node:path");
11933
11933
  const { setTimeout: setTimeout$1, clearTimeout: clearTimeout$1 } = __require("node:timers");
11934
11934
  const { InvalidArgumentError, UndiciError } = require_errors();
11935
11935
  const { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -12215,12 +12215,12 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module)
12215
12215
  const path = filePath || this.#snapshotPath;
12216
12216
  if (!path) throw new InvalidArgumentError("Snapshot path is required");
12217
12217
  const resolvedPath = resolve(path);
12218
- await mkdir(dirname(resolvedPath), { recursive: true });
12218
+ await mkdir(dirname$1(resolvedPath), { recursive: true });
12219
12219
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
12220
12220
  hash,
12221
12221
  snapshot
12222
12222
  }));
12223
- await writeFile(resolvedPath, JSON.stringify(data, null, 2), { flush: true });
12223
+ await writeFile$1(resolvedPath, JSON.stringify(data, null, 2), { flush: true });
12224
12224
  }
12225
12225
  /**
12226
12226
  * Clears all recorded snapshots
@@ -78248,7 +78248,7 @@ var require_querystring = /* @__PURE__ */ __commonJSMin(((exports) => {
78248
78248
  //#endregion
78249
78249
  //#region node_modules/needle/lib/multipart.js
78250
78250
  var require_multipart = /* @__PURE__ */ __commonJSMin(((exports) => {
78251
- var readFile = __require("fs").readFile, basename = __require("path").basename;
78251
+ var readFile = __require("fs").readFile, basename$1 = __require("path").basename;
78252
78252
  exports.build = function(data, boundary, callback) {
78253
78253
  if (typeof data != "object" || typeof data.pipe == "function") return callback(/* @__PURE__ */ new Error("Multipart builder expects data as key/val object."));
78254
78254
  var body = "", object = flatten(data), count = Object.keys(object).length;
@@ -78287,7 +78287,7 @@ var require_multipart = /* @__PURE__ */ __commonJSMin(((exports) => {
78287
78287
  callback(null, return_part + "\r\n");
78288
78288
  }
78289
78289
  if ((part.file || part.buffer) && part.content_type) {
78290
- var filename = part.filename ? part.filename : part.file ? basename(part.file) : name;
78290
+ var filename = part.filename ? part.filename : part.file ? basename$1(part.file) : name;
78291
78291
  if (part.buffer) return append(part.buffer, filename);
78292
78292
  readFile(part.file, function(err, data) {
78293
78293
  if (err) return callback(err);
@@ -101950,7 +101950,7 @@ async function moveCommunityDbToDeletedDirectory(communityAddress, pkc) {
101950
101950
  }
101951
101951
  async function createKuboRpcClient(kuboRpcClientOptions) {
101952
101952
  logger_default("pkc-js:pkc:createKuboRpcClient").trace("Creating a new kubo client on node with options", kuboRpcClientOptions);
101953
- const { create: CreateKuboRpcClient } = await import("./src-4u0f92eE.js");
101953
+ const { create: CreateKuboRpcClient } = await import("./src-BKg5Lhod.js");
101954
101954
  const Agent$2 = typeof kuboRpcClientOptions.url === "string" && kuboRpcClientOptions.url.startsWith("https") || kuboRpcClientOptions?.protocol === "https" || kuboRpcClientOptions.url instanceof URL && kuboRpcClientOptions?.url?.protocol === "https:" || kuboRpcClientOptions.url?.toString()?.includes("https") ? Agent : Agent$1;
101955
101955
  const onehourMs = 1e3 * 60 * 60;
101956
101956
  return CreateKuboRpcClient({
@@ -15997,7 +15997,7 @@ async function fetchAndValidateIpnsRecordFromGateway(gatewayUrl, ipnsName, opts)
15997
15997
  const textEncoder = new TextEncoder();
15998
15998
  async function calculateStringSizeSameAsIpfsAddCidV0(content) {
15999
15999
  const { MemoryBlockstore } = await import("blockstore-core");
16000
- const { importFile } = await import("./src-o_MYSn-E.js");
16000
+ const { importFile } = await import("./src-B2CwDTfy.js");
16001
16001
  const blockstore = new MemoryBlockstore();
16002
16002
  const entry = await importFile({
16003
16003
  path: "content.json",
@@ -16035,7 +16035,7 @@ function extractNetworkErrorDetails(err, depth = 0) {
16035
16035
  }
16036
16036
  //#endregion
16037
16037
  //#region dist/node/generated-version.js
16038
- const version = "0.0.74";
16038
+ const version = "0.0.75";
16039
16039
  //#endregion
16040
16040
  //#region dist/node/version.js
16041
16041
  const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
@@ -16076,7 +16076,11 @@ const PKCUserOptionBaseSchema = object({
16076
16076
  libp2pJsClientsOptions: object({
16077
16077
  key: string().min(1),
16078
16078
  libp2pOptions: custom().default({}),
16079
- heliaOptions: custom().default({})
16079
+ heliaOptions: custom().default({}),
16080
+ blockstoreOptions: object({
16081
+ maxBytes: number().positive().optional(),
16082
+ lowWaterRatio: number().gt(0).lte(1).optional()
16083
+ }).optional()
16080
16084
  }).array().max(1, "Only one libp2pJsClientOptions is allowed at the moment").optional(),
16081
16085
  validatePages: boolean(),
16082
16086
  userAgent: UserAgentSchema,
@@ -1,156 +1,16 @@
1
1
  import { i as __toESM, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
+ import { n as batch, t as parallelBatch } from "./src-DKntVmyX.js";
2
3
  import { i as first, n as src_exports, r as prepare, t as encode } from "./src-BOzgM7Fp.js";
3
4
  import { CID } from "multiformats/cid";
4
5
  import { fromString } from "uint8arrays/from-string";
5
6
  import { concat } from "uint8arrays/concat";
6
7
  import { equals } from "uint8arrays/equals";
8
+ import * as raw from "multiformats/codecs/raw";
7
9
  import { alloc, allocUnsafe } from "uint8arrays/alloc";
8
10
  import { withArrayBuffer } from "uint8arrays/with-array-buffer";
9
- import * as raw from "multiformats/codecs/raw";
10
11
  import { sha256 } from "multiformats/hashes/sha2";
11
12
  import { murmur3128 } from "@multiformats/murmur3";
12
13
  import { BlackHoleBlockstore } from "blockstore-core/black-hole";
13
- //#region node_modules/it-batch/dist/src/index.js
14
- /**
15
- * @packageDocumentation
16
- *
17
- * The final batch may be smaller than the max.
18
- *
19
- * @example
20
- *
21
- * ```javascript
22
- * import batch from 'it-batch'
23
- * import all from 'it-all'
24
- *
25
- * // This can also be an iterator, generator, etc
26
- * const values = [0, 1, 2, 3, 4]
27
- * const batchSize = 2
28
- *
29
- * const result = all(batch(values, batchSize))
30
- *
31
- * console.info(result) // [0, 1], [2, 3], [4]
32
- * ```
33
- *
34
- * Async sources must be awaited:
35
- *
36
- * ```javascript
37
- * import batch from 'it-batch'
38
- * import all from 'it-all'
39
- *
40
- * const values = async function * () {
41
- * yield * [0, 1, 2, 3, 4]
42
- * }
43
- *
44
- * const batchSize = 2
45
- * const result = await all(batch(values(), batchSize))
46
- *
47
- * console.info(result) // [0, 1], [2, 3], [4]
48
- * ```
49
- */
50
- function isAsyncIterable$1(thing) {
51
- return thing[Symbol.asyncIterator] != null;
52
- }
53
- function batch(source, size = 1) {
54
- size = Number(size);
55
- if (isAsyncIterable$1(source)) return async function* () {
56
- let things = [];
57
- if (size < 1) size = 1;
58
- if (size !== Math.round(size)) throw new Error("Batch size must be an integer");
59
- for await (const thing of source) {
60
- things.push(thing);
61
- while (things.length >= size) {
62
- yield things.slice(0, size);
63
- things = things.slice(size);
64
- }
65
- }
66
- while (things.length > 0) {
67
- yield things.slice(0, size);
68
- things = things.slice(size);
69
- }
70
- }();
71
- return function* () {
72
- let things = [];
73
- if (size < 1) size = 1;
74
- if (size !== Math.round(size)) throw new Error("Batch size must be an integer");
75
- for (const thing of source) {
76
- things.push(thing);
77
- while (things.length >= size) {
78
- yield things.slice(0, size);
79
- things = things.slice(size);
80
- }
81
- }
82
- while (things.length > 0) {
83
- yield things.slice(0, size);
84
- things = things.slice(size);
85
- }
86
- }();
87
- }
88
- //#endregion
89
- //#region node_modules/it-parallel-batch/dist/src/index.js
90
- /**
91
- * @packageDocumentation
92
- *
93
- * Takes an async iterator that emits promise-returning functions, invokes them in parallel and emits the results in the same order as the input.
94
- *
95
- * The final batch may be smaller than the batch size.
96
- *
97
- * @example
98
- *
99
- * ```javascript
100
- * import parallelBatch from 'it-parallel-batch'
101
- * import all from 'it-all'
102
- * import delay from 'delay'
103
- *
104
- * // This can also be an iterator, async iterator, generator, etc
105
- * const input = [
106
- * async () => {
107
- * await delay(500)
108
- *
109
- * return 1
110
- * },
111
- * async () => {
112
- * await delay(200)
113
- *
114
- * return 2
115
- * },
116
- * async () => {
117
- * await delay(100)
118
- *
119
- * return 3
120
- * }
121
- * ]
122
- *
123
- * const batchSize = 2
124
- *
125
- * const result = await all(parallelBatch(input, batchSize))
126
- *
127
- * console.info(result) // [1, 2, 3]
128
- * ```
129
- */
130
- /**
131
- * Takes an (async) iterator that emits promise-returning functions,
132
- * invokes them in parallel and emits the results as they become available but
133
- * in the same order as the input
134
- */
135
- async function* parallelBatch(source, size = 1) {
136
- for await (const tasks of batch(source, size)) {
137
- const things = tasks.map(async (p) => {
138
- return p().then((value) => ({
139
- ok: true,
140
- value
141
- }), (err) => ({
142
- ok: false,
143
- err
144
- }));
145
- });
146
- for (let i = 0; i < things.length; i++) {
147
- const result = await things[i];
148
- if (result.ok) yield result.value;
149
- else throw result.err;
150
- }
151
- }
152
- }
153
- //#endregion
154
14
  //#region node_modules/ipfs-unixfs-importer/node_modules/uint8arraylist/dist/src/index.js
155
15
  /**
156
16
  * @packageDocumentation
@@ -1,5 +1,6 @@
1
1
  import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
2
  import { t as all } from "./src-CYIMjhjK.js";
3
+ import { n as peekable, t as map } from "./src-Cpx2Sts8.js";
3
4
  import { i as first, n as src_exports$2 } from "./src-BOzgM7Fp.js";
4
5
  import http from "node:http";
5
6
  import { Buffer as Buffer$1 } from "node:buffer";
@@ -5831,7 +5832,7 @@ async function* browserReadableStreamToIt(stream, options = {}) {
5831
5832
  }
5832
5833
  }
5833
5834
  //#endregion
5834
- //#region node_modules/it-peekable/dist/src/index.js
5835
+ //#region node_modules/kubo-rpc-client/dist/src/lib/errors.js
5835
5836
  var import_err_code = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
5836
5837
  /**
5837
5838
  * @typedef {{ [key: string]: any }} Extensions
@@ -5879,132 +5880,6 @@ var import_err_code = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e
5879
5880
  }
5880
5881
  module.exports = createError;
5881
5882
  })))(), 1);
5882
- /**
5883
- * @packageDocumentation
5884
- *
5885
- * Lets you look at the contents of an async iterator and decide what to do
5886
- *
5887
- * @example
5888
- *
5889
- * ```javascript
5890
- * import peekable from 'it-peekable'
5891
- *
5892
- * // This can also be an iterator, generator, etc
5893
- * const values = [0, 1, 2, 3, 4]
5894
- *
5895
- * const it = peekable(value)
5896
- *
5897
- * const first = it.peek()
5898
- *
5899
- * console.info(first) // 0
5900
- *
5901
- * it.push(first)
5902
- *
5903
- * console.info([...it])
5904
- * // [ 0, 1, 2, 3, 4 ]
5905
- * ```
5906
- *
5907
- * Async sources must be awaited:
5908
- *
5909
- * ```javascript
5910
- * import peekable from 'it-peekable'
5911
- *
5912
- * const values = async function * () {
5913
- * yield * [0, 1, 2, 3, 4]
5914
- * }
5915
- *
5916
- * const it = peekable(values())
5917
- *
5918
- * const first = await it.peek()
5919
- *
5920
- * console.info(first) // 0
5921
- *
5922
- * it.push(first)
5923
- *
5924
- * console.info(await all(it))
5925
- * // [ 0, 1, 2, 3, 4 ]
5926
- * ```
5927
- */
5928
- function peekable(iterable) {
5929
- const [iterator, symbol] = iterable[Symbol.asyncIterator] != null ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] : [iterable[Symbol.iterator](), Symbol.iterator];
5930
- const queue = [];
5931
- return {
5932
- peek: () => {
5933
- return iterator.next();
5934
- },
5935
- push: (value) => {
5936
- queue.push(value);
5937
- },
5938
- next: () => {
5939
- if (queue.length > 0) return {
5940
- done: false,
5941
- value: queue.shift()
5942
- };
5943
- return iterator.next();
5944
- },
5945
- [symbol]() {
5946
- return this;
5947
- }
5948
- };
5949
- }
5950
- //#endregion
5951
- //#region node_modules/it-map/dist/src/index.js
5952
- /**
5953
- * @packageDocumentation
5954
- *
5955
- * Convert one value from an (async)iterator into another.
5956
- *
5957
- * @example
5958
- *
5959
- * ```javascript
5960
- * import map from 'it-map'
5961
- *
5962
- * // This can also be an iterator, generator, etc
5963
- * const values = [0, 1, 2, 3, 4]
5964
- *
5965
- * const result = map(values, (val, index) => val++)
5966
- *
5967
- * console.info(result) // [1, 2, 3, 4, 5]
5968
- * ```
5969
- *
5970
- * Async sources and transforms must be awaited:
5971
- *
5972
- * ```javascript
5973
- * import map from 'it-map'
5974
- *
5975
- * const values = async function * () {
5976
- * yield * [0, 1, 2, 3, 4]
5977
- * }
5978
- *
5979
- * const result = await map(values(), async (val, index) => val++)
5980
- *
5981
- * console.info(result) // [1, 2, 3, 4, 5]
5982
- * ```
5983
- */
5984
- function isAsyncIterable$3(thing) {
5985
- return thing[Symbol.asyncIterator] != null;
5986
- }
5987
- function map(source, func) {
5988
- let index = 0;
5989
- if (isAsyncIterable$3(source)) return (async function* () {
5990
- for await (const val of source) yield func(val, index++);
5991
- })();
5992
- const peekable$6 = peekable(source);
5993
- const { value, done } = peekable$6.next();
5994
- if (done === true) return function* () {}();
5995
- const res = func(value, index++);
5996
- if (typeof res.then === "function") return (async function* () {
5997
- yield await res;
5998
- for (const val of peekable$6) yield func(val, index++);
5999
- })();
6000
- const fn = func;
6001
- return (function* () {
6002
- yield res;
6003
- for (const val of peekable$6) yield fn(val, index++);
6004
- })();
6005
- }
6006
- //#endregion
6007
- //#region node_modules/kubo-rpc-client/dist/src/lib/errors.js
6008
5883
  var HTTPError$2 = class extends Error {
6009
5884
  response;
6010
5885
  constructor(response) {
@@ -0,0 +1,127 @@
1
+ //#region node_modules/it-peekable/dist/src/index.js
2
+ /**
3
+ * @packageDocumentation
4
+ *
5
+ * Lets you look at the contents of an async iterator and decide what to do
6
+ *
7
+ * @example
8
+ *
9
+ * ```javascript
10
+ * import peekable from 'it-peekable'
11
+ *
12
+ * // This can also be an iterator, generator, etc
13
+ * const values = [0, 1, 2, 3, 4]
14
+ *
15
+ * const it = peekable(value)
16
+ *
17
+ * const first = it.peek()
18
+ *
19
+ * console.info(first) // 0
20
+ *
21
+ * it.push(first)
22
+ *
23
+ * console.info([...it])
24
+ * // [ 0, 1, 2, 3, 4 ]
25
+ * ```
26
+ *
27
+ * Async sources must be awaited:
28
+ *
29
+ * ```javascript
30
+ * import peekable from 'it-peekable'
31
+ *
32
+ * const values = async function * () {
33
+ * yield * [0, 1, 2, 3, 4]
34
+ * }
35
+ *
36
+ * const it = peekable(values())
37
+ *
38
+ * const first = await it.peek()
39
+ *
40
+ * console.info(first) // 0
41
+ *
42
+ * it.push(first)
43
+ *
44
+ * console.info(await all(it))
45
+ * // [ 0, 1, 2, 3, 4 ]
46
+ * ```
47
+ */
48
+ function peekable(iterable) {
49
+ const [iterator, symbol] = iterable[Symbol.asyncIterator] != null ? [iterable[Symbol.asyncIterator](), Symbol.asyncIterator] : [iterable[Symbol.iterator](), Symbol.iterator];
50
+ const queue = [];
51
+ return {
52
+ peek: () => {
53
+ return iterator.next();
54
+ },
55
+ push: (value) => {
56
+ queue.push(value);
57
+ },
58
+ next: () => {
59
+ if (queue.length > 0) return {
60
+ done: false,
61
+ value: queue.shift()
62
+ };
63
+ return iterator.next();
64
+ },
65
+ [symbol]() {
66
+ return this;
67
+ }
68
+ };
69
+ }
70
+ //#endregion
71
+ //#region node_modules/it-map/dist/src/index.js
72
+ /**
73
+ * @packageDocumentation
74
+ *
75
+ * Convert one value from an (async)iterator into another.
76
+ *
77
+ * @example
78
+ *
79
+ * ```javascript
80
+ * import map from 'it-map'
81
+ *
82
+ * // This can also be an iterator, generator, etc
83
+ * const values = [0, 1, 2, 3, 4]
84
+ *
85
+ * const result = map(values, (val, index) => val++)
86
+ *
87
+ * console.info(result) // [1, 2, 3, 4, 5]
88
+ * ```
89
+ *
90
+ * Async sources and transforms must be awaited:
91
+ *
92
+ * ```javascript
93
+ * import map from 'it-map'
94
+ *
95
+ * const values = async function * () {
96
+ * yield * [0, 1, 2, 3, 4]
97
+ * }
98
+ *
99
+ * const result = await map(values(), async (val, index) => val++)
100
+ *
101
+ * console.info(result) // [1, 2, 3, 4, 5]
102
+ * ```
103
+ */
104
+ function isAsyncIterable(thing) {
105
+ return thing[Symbol.asyncIterator] != null;
106
+ }
107
+ function map(source, func) {
108
+ let index = 0;
109
+ if (isAsyncIterable(source)) return (async function* () {
110
+ for await (const val of source) yield func(val, index++);
111
+ })();
112
+ const peekable$1 = peekable(source);
113
+ const { value, done } = peekable$1.next();
114
+ if (done === true) return function* () {}();
115
+ const res = func(value, index++);
116
+ if (typeof res.then === "function") return (async function* () {
117
+ yield await res;
118
+ for (const val of peekable$1) yield func(val, index++);
119
+ })();
120
+ const fn = func;
121
+ return (function* () {
122
+ yield res;
123
+ for (const val of peekable$1) yield fn(val, index++);
124
+ })();
125
+ }
126
+ //#endregion
127
+ export { peekable as n, map as t };