@pkcprotocol/pkc-js 0.0.63 → 0.0.65
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/clients/base-client-manager.js +14 -14
- package/dist/browser/clients/base-client-manager.js.map +1 -1
- package/dist/browser/community/community-client-manager.js +9 -11
- package/dist/browser/community/community-client-manager.js.map +1 -1
- package/dist/browser/community/community-gateway-selection.js +4 -4
- package/dist/browser/community/community-gateway-selection.js.map +1 -1
- package/dist/browser/community/community-wire.js +3 -3
- package/dist/browser/community/community-wire.js.map +1 -1
- package/dist/browser/community/remote-community.d.ts +1 -1
- package/dist/browser/community/remote-community.js +10 -7
- package/dist/browser/community/remote-community.js.map +1 -1
- package/dist/browser/community/rpc-local-community.js +3 -3
- package/dist/browser/community/rpc-local-community.js.map +1 -1
- package/dist/browser/community/rpc-remote-community.js +5 -5
- package/dist/browser/community/rpc-remote-community.js.map +1 -1
- package/dist/browser/community/schema.js +5 -5
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/errors.d.ts +1 -0
- package/dist/browser/errors.js +1 -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/helia/helia-for-pkc.js +52 -6
- package/dist/browser/helia/helia-for-pkc.js.map +1 -1
- package/dist/browser/helia/types.d.ts +2 -0
- package/dist/browser/helia/util.d.ts +18 -0
- package/dist/browser/helia/util.js +123 -0
- package/dist/browser/helia/util.js.map +1 -1
- package/dist/browser/pages/pages-client-manager.js +11 -15
- package/dist/browser/pages/pages-client-manager.js.map +1 -1
- package/dist/browser/pages/util.js +9 -9
- package/dist/browser/pages/util.js.map +1 -1
- package/dist/browser/pkc/pkc-client-manager.js +6 -6
- package/dist/browser/pkc/pkc-client-manager.js.map +1 -1
- package/dist/browser/pkc/pkc.js +7 -7
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment-client-manager.js +5 -5
- package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/browser/publications/comment/comment.js +15 -15
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/publications/comment/schema.js +17 -17
- package/dist/browser/publications/comment/schema.js.map +1 -1
- package/dist/browser/publications/comment-edit/schema.js +7 -7
- package/dist/browser/publications/comment-edit/schema.js.map +1 -1
- package/dist/browser/publications/comment-moderation/schema.js +11 -7
- package/dist/browser/publications/comment-moderation/schema.js.map +1 -1
- package/dist/browser/publications/community-edit/schema.js +6 -6
- package/dist/browser/publications/community-edit/schema.js.map +1 -1
- package/dist/browser/publications/publication-author.js +3 -3
- package/dist/browser/publications/publication-author.js.map +1 -1
- package/dist/browser/publications/publication-client-manager.js +4 -4
- package/dist/browser/publications/publication-client-manager.js.map +1 -1
- package/dist/browser/publications/publication.js +9 -9
- package/dist/browser/publications/publication.js.map +1 -1
- package/dist/browser/publications/vote/schema.js +11 -7
- package/dist/browser/publications/vote/schema.js.map +1 -1
- package/dist/browser/publications/vote/vote.js.map +1 -1
- package/dist/browser/pubsub-messages/schema.js +5 -5
- package/dist/browser/pubsub-messages/schema.js.map +1 -1
- package/dist/browser/rpc/src/index.js +12 -12
- package/dist/browser/rpc/src/index.js.map +1 -1
- package/dist/browser/runtime/browser/localforage-lru.js +2 -2
- package/dist/browser/runtime/browser/localforage-lru.js.map +1 -1
- package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js +3 -3
- package/dist/browser/runtime/node/addresses-rewriter-proxy-server.js.map +1 -1
- package/dist/browser/runtime/node/community/challenges/index.js +3 -3
- package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
- package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +4 -4
- package/dist/browser/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -1
- package/dist/browser/runtime/node/community/db-handler.js +32 -32
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/challenges.js +7 -7
- package/dist/browser/runtime/node/community/local-community/challenges.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.js +5 -5
- package/dist/browser/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/db-state.js +8 -8
- package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/editing.js +6 -6
- package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js +10 -7
- package/dist/browser/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/lifecycle.js +4 -4
- package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-store.js +13 -19
- package/dist/browser/runtime/node/community/local-community/publication-store.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.js +10 -10
- package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js +5 -5
- package/dist/browser/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community.js +7 -7
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/browser/runtime/node/community/page-generator.js +5 -7
- package/dist/browser/runtime/node/community/page-generator.js.map +1 -1
- package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js +2 -2
- package/dist/browser/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -1
- package/dist/browser/runtime/node/sqlite-lru-cache.js +2 -2
- package/dist/browser/runtime/node/sqlite-lru-cache.js.map +1 -1
- package/dist/browser/runtime/node/util.js +8 -6
- package/dist/browser/runtime/node/util.js.map +1 -1
- package/dist/browser/schema/schema.js +3 -3
- package/dist/browser/schema/schema.js.map +1 -1
- package/dist/browser/signer/constants.d.ts +1 -2
- package/dist/browser/signer/constants.js +9 -1
- package/dist/browser/signer/constants.js.map +1 -1
- package/dist/browser/signer/signatures.js +14 -12
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/browser/stats.js +5 -5
- package/dist/browser/stats.js.map +1 -1
- package/dist/browser/test/test-util.d.ts +9 -10
- package/dist/browser/test/test-util.js +25 -37
- package/dist/browser/test/test-util.js.map +1 -1
- package/dist/browser/util.js +18 -17
- package/dist/browser/util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +61 -190
- package/dist/bundled/chunks/{helia-for-pkc-C6vMsrJ-.js → helia-for-pkc-h-rjuHh7.js} +46 -3
- package/dist/bundled/chunks/{local-community-BQmiwsV4.js → local-community-DEWf2apw.js} +170 -121
- package/dist/bundled/chunks/{local-community-BoIoFZHk.js → local-community-DdDpaZqk.js} +1 -1
- package/dist/bundled/chunks/{node-G40jxRL2.js → node-CrnvA79m.js} +40 -37
- package/dist/bundled/chunks/{rpc-local-community-D4-NEPJb.js → rpc-local-community-CpN6R3ZN.js} +337 -108
- package/dist/bundled/chunks/{schema-SPGmy_14.js → schema-Db4geGeo.js} +248 -3900
- package/dist/bundled/chunks/{util-CJ6nXIW9.js → util-DrHyKxFe.js} +98 -2
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/rpc/src/index.js +18 -22
- package/dist/node/clients/base-client-manager.js +14 -14
- package/dist/node/clients/base-client-manager.js.map +1 -1
- package/dist/node/community/community-client-manager.js +9 -11
- package/dist/node/community/community-client-manager.js.map +1 -1
- package/dist/node/community/community-gateway-selection.js +4 -4
- package/dist/node/community/community-gateway-selection.js.map +1 -1
- package/dist/node/community/community-wire.js +3 -3
- package/dist/node/community/community-wire.js.map +1 -1
- package/dist/node/community/remote-community.d.ts +1 -1
- package/dist/node/community/remote-community.js +10 -7
- package/dist/node/community/remote-community.js.map +1 -1
- package/dist/node/community/rpc-local-community.js +3 -3
- package/dist/node/community/rpc-local-community.js.map +1 -1
- package/dist/node/community/rpc-remote-community.js +5 -5
- package/dist/node/community/rpc-remote-community.js.map +1 -1
- package/dist/node/community/schema.js +5 -5
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/errors.d.ts +1 -0
- package/dist/node/errors.js +1 -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/helia/helia-for-pkc.js +52 -6
- package/dist/node/helia/helia-for-pkc.js.map +1 -1
- package/dist/node/helia/types.d.ts +2 -0
- package/dist/node/helia/util.d.ts +18 -0
- package/dist/node/helia/util.js +123 -0
- package/dist/node/helia/util.js.map +1 -1
- package/dist/node/pages/pages-client-manager.js +11 -15
- package/dist/node/pages/pages-client-manager.js.map +1 -1
- package/dist/node/pages/util.js +9 -9
- package/dist/node/pages/util.js.map +1 -1
- package/dist/node/pkc/pkc-client-manager.js +6 -6
- package/dist/node/pkc/pkc-client-manager.js.map +1 -1
- package/dist/node/pkc/pkc.js +7 -7
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment-client-manager.js +5 -5
- package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
- package/dist/node/publications/comment/comment.js +15 -15
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/publications/comment/schema.js +17 -17
- package/dist/node/publications/comment/schema.js.map +1 -1
- package/dist/node/publications/comment-edit/schema.js +7 -7
- package/dist/node/publications/comment-edit/schema.js.map +1 -1
- package/dist/node/publications/comment-moderation/schema.js +11 -7
- package/dist/node/publications/comment-moderation/schema.js.map +1 -1
- package/dist/node/publications/community-edit/schema.js +6 -6
- package/dist/node/publications/community-edit/schema.js.map +1 -1
- package/dist/node/publications/publication-author.js +3 -3
- package/dist/node/publications/publication-author.js.map +1 -1
- package/dist/node/publications/publication-client-manager.js +4 -4
- package/dist/node/publications/publication-client-manager.js.map +1 -1
- package/dist/node/publications/publication.js +9 -9
- package/dist/node/publications/publication.js.map +1 -1
- package/dist/node/publications/vote/schema.js +11 -7
- package/dist/node/publications/vote/schema.js.map +1 -1
- package/dist/node/publications/vote/vote.js.map +1 -1
- package/dist/node/pubsub-messages/schema.js +5 -5
- package/dist/node/pubsub-messages/schema.js.map +1 -1
- package/dist/node/rpc/src/index.js +12 -12
- package/dist/node/rpc/src/index.js.map +1 -1
- package/dist/node/runtime/browser/localforage-lru.js +2 -2
- package/dist/node/runtime/browser/localforage-lru.js.map +1 -1
- package/dist/node/runtime/node/addresses-rewriter-proxy-server.js +3 -3
- package/dist/node/runtime/node/addresses-rewriter-proxy-server.js.map +1 -1
- package/dist/node/runtime/node/community/challenges/index.js +3 -3
- package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
- package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js +4 -4
- package/dist/node/runtime/node/community/challenges/pkc-js-challenges/publication-match.js.map +1 -1
- package/dist/node/runtime/node/community/db-handler.js +32 -32
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/challenges.js +7 -7
- package/dist/node/runtime/node/community/local-community/challenges.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.js +5 -5
- package/dist/node/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/db-state.js +8 -8
- package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/editing.js +6 -6
- package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js +10 -7
- package/dist/node/runtime/node/community/local-community/ipns-publishing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/lifecycle.js +4 -4
- package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-store.js +13 -19
- package/dist/node/runtime/node/community/local-community/publication-store.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.js +10 -10
- package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js +5 -5
- package/dist/node/runtime/node/community/local-community/reprovide-on-address-change.js.map +1 -1
- package/dist/node/runtime/node/community/local-community.js +7 -7
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/runtime/node/community/page-generator.js +5 -7
- package/dist/node/runtime/node/community/page-generator.js.map +1 -1
- package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js +2 -2
- package/dist/node/runtime/node/setup-kubo-address-rewriter-and-http-router.js.map +1 -1
- package/dist/node/runtime/node/sqlite-lru-cache.js +2 -2
- package/dist/node/runtime/node/sqlite-lru-cache.js.map +1 -1
- package/dist/node/runtime/node/util.js +8 -6
- package/dist/node/runtime/node/util.js.map +1 -1
- package/dist/node/schema/schema.js +3 -3
- package/dist/node/schema/schema.js.map +1 -1
- package/dist/node/signer/constants.d.ts +1 -2
- package/dist/node/signer/constants.js +9 -1
- package/dist/node/signer/constants.js.map +1 -1
- package/dist/node/signer/signatures.js +14 -12
- package/dist/node/signer/signatures.js.map +1 -1
- package/dist/node/stats.js +5 -5
- package/dist/node/stats.js.map +1 -1
- package/dist/node/test/test-util.d.ts +9 -10
- package/dist/node/test/test-util.js +25 -37
- package/dist/node/test/test-util.js.map +1 -1
- package/dist/node/util.js +18 -17
- package/dist/node/util.js.map +1 -1
- package/package.json +2 -2
|
@@ -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-DEWf2apw.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { B as isIpfsCid, Cn as CommentUpdateForChallengeVerificationSchema, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dt as refreshTrackedCommentAliases, E as createAbortError, En as CommentUpdateSchema, Et as listUpdatingCommunities, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Pt as untrackUpdatingComment, Q as isStringDomain, Qn as
|
|
3
|
-
import { $ as RepliesPages, $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, 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, 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
|
|
4
|
-
import {
|
|
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, 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, 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-Db4geGeo.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, 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-CpN6R3ZN.js";
|
|
4
|
+
import { r as getHeliaDebugContext } from "./util-DrHyKxFe.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -143,10 +143,15 @@ if (Number(process.versions.node.split(".")[0]) >= 18) {
|
|
|
143
143
|
}
|
|
144
144
|
if (typeof globalThis.WebSocket === "undefined") Reflect.set(globalThis, "WebSocket", import_undici.WebSocket);
|
|
145
145
|
//#endregion
|
|
146
|
+
//#region node_modules/remeda/dist/sortBy.js
|
|
147
|
+
function t(...t) {
|
|
148
|
+
return t$2(n, t);
|
|
149
|
+
}
|
|
150
|
+
const n = (e, t) => [...e].sort(t);
|
|
151
|
+
//#endregion
|
|
146
152
|
//#region dist/node/publications/publication.js
|
|
147
153
|
var import_retry = /* @__PURE__ */ __toESM(require_retry(), 1);
|
|
148
154
|
var import_lib = require_lib$1();
|
|
149
|
-
var import_commonjs = /* @__PURE__ */ __toESM(require_commonjs(), 1);
|
|
150
155
|
var Publication = class extends import_lib.TypedEmitter {
|
|
151
156
|
constructor(pkc) {
|
|
152
157
|
super();
|
|
@@ -468,7 +473,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
468
473
|
return;
|
|
469
474
|
}
|
|
470
475
|
if (pubsubMsgParsed.type === "CHALLENGEREQUEST" || pubsubMsgParsed.type === "CHALLENGEANSWER") log.trace("Received unrelated pubsub message of type", pubsubMsgParsed.type);
|
|
471
|
-
else if (!Object.values(this._challengeExchanges).some((exchange) =>
|
|
476
|
+
else if (!Object.values(this._challengeExchanges).some((exchange) => t$3(pubsubMsgParsed.challengeRequestId, exchange.challengeRequest.challengeRequestId))) log.trace(`Received pubsub message with different challenge request id, ignoring it`);
|
|
472
477
|
else if (pubsubMsgParsed.type === "CHALLENGE") return this._handleIncomingChallengePubsubMessage(pubsubMsgParsed);
|
|
473
478
|
else if (pubsubMsgParsed.type === "CHALLENGEVERIFICATION") return this._handleIncomingChallengeVerificationPubsubMessage(pubsubMsgParsed);
|
|
474
479
|
}
|
|
@@ -589,7 +594,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
589
594
|
this.emit("statechange", newState);
|
|
590
595
|
}
|
|
591
596
|
_setRpcClientState(newState) {
|
|
592
|
-
const currentRpcUrl =
|
|
597
|
+
const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
|
|
593
598
|
if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
|
|
594
599
|
this.clients.pkcRpcClients[currentRpcUrl].state = newState;
|
|
595
600
|
this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
|
|
@@ -805,7 +810,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
805
810
|
};
|
|
806
811
|
const omitEncrypted = (msg) => {
|
|
807
812
|
if (!msg) return void 0;
|
|
808
|
-
return
|
|
813
|
+
return n$1(msg, ["encrypted"]);
|
|
809
814
|
};
|
|
810
815
|
return Object.values(this._challengeExchanges).map((exchange) => ({
|
|
811
816
|
challengeRequest: omitEncrypted(exchange.challengeRequest),
|
|
@@ -905,7 +910,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
905
910
|
}
|
|
906
911
|
}
|
|
907
912
|
_getPubsubProviders() {
|
|
908
|
-
const providers = this.clients.libp2pJsClients &&
|
|
913
|
+
const providers = this.clients.libp2pJsClients && t$1(this.clients.libp2pJsClients).length > 0 ? t$1(this.clients.libp2pJsClients) : t$1(this.clients.pubsubKuboRpcClients);
|
|
909
914
|
if (providers.length === 0) throw new PKCError("ERR_NO_PUBSUB_PROVIDERS_AVAILABLE_TO_PUBLISH_OVER_PUBSUB", { providers });
|
|
910
915
|
if (providers.length === 1) providers.push(providers[0]);
|
|
911
916
|
return providers;
|
|
@@ -918,14 +923,14 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
918
923
|
if (challenge.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
919
924
|
const encryptedFields = ["challenges"];
|
|
920
925
|
log("Received a challenge from the local community", challenge);
|
|
921
|
-
await this._handleIncomingChallengePubsubMessage(
|
|
926
|
+
await this._handleIncomingChallengePubsubMessage(n$1(challenge, encryptedFields));
|
|
922
927
|
}
|
|
923
928
|
};
|
|
924
929
|
community.on("challenge", communityChallengeListener);
|
|
925
930
|
const communityChallengeVerificationListener = async (decryptedChallengeVerification) => {
|
|
926
931
|
if (decryptedChallengeVerification.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
927
932
|
log("Received a challenge verification from the local community", decryptedChallengeVerification);
|
|
928
|
-
await this._handleIncomingChallengeVerificationPubsubMessage(
|
|
933
|
+
await this._handleIncomingChallengeVerificationPubsubMessage(n$1(decryptedChallengeVerification, ["comment", "commentUpdate"]));
|
|
929
934
|
}
|
|
930
935
|
};
|
|
931
936
|
community.on("challengeverification", communityChallengeVerificationListener);
|
|
@@ -1094,9 +1099,9 @@ var Comment = class extends Publication {
|
|
|
1094
1099
|
const log = logger_default("pkc-js:comment:_initIpfsProps");
|
|
1095
1100
|
this.raw.comment = props;
|
|
1096
1101
|
this._initProps(props);
|
|
1097
|
-
const unknownProps =
|
|
1102
|
+
const unknownProps = r(t$1(props), t$1(CommentIpfsSchema.shape));
|
|
1098
1103
|
if (unknownProps.length > 0) {
|
|
1099
|
-
const unknownPropsWithValues =
|
|
1104
|
+
const unknownPropsWithValues = t$4(props, unknownProps);
|
|
1100
1105
|
log(`Found unknown props on loaded CommentIpfs (cid: ${this.cid})`, unknownPropsWithValues, "Full props:", props, "Will set them on the Comment instance");
|
|
1101
1106
|
Object.assign(this, unknownPropsWithValues);
|
|
1102
1107
|
}
|
|
@@ -1179,10 +1184,10 @@ var Comment = class extends Publication {
|
|
|
1179
1184
|
const log = logger_default("pkc-js:comment:_initCommentUpdate");
|
|
1180
1185
|
if ("depth" in props) {} else {
|
|
1181
1186
|
this.raw.commentUpdate = props;
|
|
1182
|
-
const unknownProps =
|
|
1187
|
+
const unknownProps = r(t$1(props), t$1(CommentUpdateSchema.shape));
|
|
1183
1188
|
if (unknownProps.length > 0) {
|
|
1184
1189
|
log("Found unknown props on CommentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
1185
|
-
Object.assign(this,
|
|
1190
|
+
Object.assign(this, t$4(props, unknownProps));
|
|
1186
1191
|
}
|
|
1187
1192
|
}
|
|
1188
1193
|
this.upvoteCount = props.upvoteCount;
|
|
@@ -1237,7 +1242,7 @@ var Comment = class extends Publication {
|
|
|
1237
1242
|
pageCids: {}
|
|
1238
1243
|
});
|
|
1239
1244
|
else if ("pages" in newReplies && newReplies.pages && "pageCids" in newReplies && newReplies.pageCids) {
|
|
1240
|
-
if (!
|
|
1245
|
+
if (!t$3(this.replies.pageCids, newReplies.pageCids)) {
|
|
1241
1246
|
log.trace(`Updating the props of comment instance (${this.cid}) replies`);
|
|
1242
1247
|
const parsedPages = parseRawPages(newReplies);
|
|
1243
1248
|
this.replies.updateProps({
|
|
@@ -1251,10 +1256,9 @@ var Comment = class extends Publication {
|
|
|
1251
1256
|
async _verifyChallengeVerificationCommentProps(decryptedVerification) {
|
|
1252
1257
|
const log = logger_default("pkc-js:comment:publish:_verifyChallengeVerificationCommentProps");
|
|
1253
1258
|
if (!this.raw.pubsubMessageToPublish) throw Error("comment._pubsubMsgToPublish should be defined at this point");
|
|
1254
|
-
const keysToCompare =
|
|
1255
|
-
const pubsubMsgFromCommentIpfs =
|
|
1256
|
-
|
|
1257
|
-
if (!import_commonjs.isDeepEqual(pubsubMsgFromCommentIpfs, pubsubMsgFromPublishedPubsubMsg)) {
|
|
1259
|
+
const keysToCompare = t$1(n$1(this.raw.pubsubMessageToPublish, ["signature", "author"]));
|
|
1260
|
+
const pubsubMsgFromCommentIpfs = t$4(decryptedVerification.comment, keysToCompare);
|
|
1261
|
+
if (!t$3(pubsubMsgFromCommentIpfs, t$4(this.raw.pubsubMessageToPublish, keysToCompare))) {
|
|
1258
1262
|
const error = new PKCError("ERR_COMMUNITY_CHANGED_COMMENT_PUBSUB_PUBLICATION_PROPS", {
|
|
1259
1263
|
pubsubMsgFromSub: pubsubMsgFromCommentIpfs,
|
|
1260
1264
|
originalPubsubMsg: this.raw.pubsubMessageToPublish
|
|
@@ -1356,10 +1360,10 @@ var Comment = class extends Publication {
|
|
|
1356
1360
|
this.setCid(decryptedVerification.commentUpdate.cid);
|
|
1357
1361
|
this._initIpfsProps(decryptedVerification.comment);
|
|
1358
1362
|
this._initCommentUpdateFromChallengeVerificationProps(decryptedVerification.commentUpdate);
|
|
1359
|
-
const unknownProps =
|
|
1363
|
+
const unknownProps = r(t$1(decryptedVerification.commentUpdate), t$1(CommentUpdateForChallengeVerificationSchema.shape));
|
|
1360
1364
|
if (unknownProps.length > 0) {
|
|
1361
1365
|
log("Found unknown props on decryptedVerification.commentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
1362
|
-
Object.assign(this,
|
|
1366
|
+
Object.assign(this, t$4(decryptedVerification.commentUpdate, unknownProps));
|
|
1363
1367
|
}
|
|
1364
1368
|
this.emit("update", this);
|
|
1365
1369
|
if (!this._pkc._pkcRpcClient) this._resolveAuthorNamesInBackground();
|
|
@@ -1551,7 +1555,7 @@ var Comment = class extends Publication {
|
|
|
1551
1555
|
this.emit("updatingstatechange", this._updatingState);
|
|
1552
1556
|
}
|
|
1553
1557
|
_setRpcClientState(newState) {
|
|
1554
|
-
const currentRpcUrl =
|
|
1558
|
+
const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
|
|
1555
1559
|
if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
|
|
1556
1560
|
this.clients.pkcRpcClients[currentRpcUrl].state = newState;
|
|
1557
1561
|
this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
|
|
@@ -1783,7 +1787,7 @@ var Comment = class extends Publication {
|
|
|
1783
1787
|
updatingCommentInstance.on("error", this._updatingCommentInstance.error);
|
|
1784
1788
|
updatingCommentInstance.on("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
|
|
1785
1789
|
updatingCommentInstance.on("statechange", this._updatingCommentInstance.statechange);
|
|
1786
|
-
const clientKeys =
|
|
1790
|
+
const clientKeys = t$1(this.clients);
|
|
1787
1791
|
for (const clientType of clientKeys) if (this.clients[clientType]) for (const clientUrl of Object.keys(this.clients[clientType])) this.clients[clientType][clientUrl].mirror(updatingCommentInstance.clients[clientType][clientUrl]);
|
|
1788
1792
|
updatingCommentInstance._numOfListenersForUpdatingInstance++;
|
|
1789
1793
|
this._useUpdatePropsFromUpdatingCommentIfPossible();
|
|
@@ -1841,7 +1845,7 @@ var Comment = class extends Publication {
|
|
|
1841
1845
|
this._updatingCommentInstance.comment.removeListener("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
|
|
1842
1846
|
this._updatingCommentInstance.comment.removeListener("update", this._updatingCommentInstance.update);
|
|
1843
1847
|
this._updatingCommentInstance.comment.removeListener("error", this._updatingCommentInstance.error);
|
|
1844
|
-
const clientKeys =
|
|
1848
|
+
const clientKeys = t$1(this.clients);
|
|
1845
1849
|
for (const clientType of clientKeys) if (this.clients[clientType]) for (const clientUrl of Object.keys(this.clients[clientType])) this.clients[clientType][clientUrl].unmirror();
|
|
1846
1850
|
this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance--;
|
|
1847
1851
|
if (this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance === 0 && this._updatingCommentInstance.comment.state !== "stopped") {
|
|
@@ -2015,16 +2019,16 @@ var Stats = class {
|
|
|
2015
2019
|
return 1 / (successAverageMs + 150) / (1 / (successAverageMs + 100) + 1 / 150) * .2 + (successCounts + .288) / (failureCounts * 2 + successCounts + 1) * .8;
|
|
2016
2020
|
}
|
|
2017
2021
|
async sortGatewaysAccordingToScore(type) {
|
|
2018
|
-
const gatewayType = type === "ipfs" || type === "ipns" ? "ipfsGateways" : type === "pubsub-publish" || type === "pubsub-subscribe" ?
|
|
2022
|
+
const gatewayType = type === "ipfs" || type === "ipns" ? "ipfsGateways" : type === "pubsub-publish" || type === "pubsub-subscribe" ? t$1(this._pkc.clients.pubsubKuboRpcClients).length > 0 ? "pubsubKuboRpcClients" : t$1(this._pkc.clients.libp2pJsClients).length > 0 ? "libp2pJsClients" : void 0 : void 0;
|
|
2019
2023
|
assert(gatewayType, "Can't find the gateway type to sort");
|
|
2020
|
-
const gateways =
|
|
2024
|
+
const gateways = t$1(this._pkc.clients[gatewayType]);
|
|
2021
2025
|
const score = async (gatewayUrl) => {
|
|
2022
2026
|
const failureCounts = await this._pkc._storage.getItem(this._getFailuresCountKey(gatewayUrl, type)) || 0;
|
|
2023
2027
|
const successCounts = await this._pkc._storage.getItem(this._getSuccessCountKey(gatewayUrl, type)) || 0;
|
|
2024
2028
|
const successAverageMs = await this._pkc._storage.getItem(this._getSuccessAverageKey(gatewayUrl, type)) || 0;
|
|
2025
2029
|
return this._gatewayScore(failureCounts, successCounts, successAverageMs);
|
|
2026
2030
|
};
|
|
2027
|
-
return
|
|
2031
|
+
return t(gateways, score);
|
|
2028
2032
|
}
|
|
2029
2033
|
};
|
|
2030
2034
|
//#endregion
|
|
@@ -6342,7 +6346,7 @@ var SqliteCache = class {
|
|
|
6342
6346
|
key,
|
|
6343
6347
|
now: now()
|
|
6344
6348
|
});
|
|
6345
|
-
if (!
|
|
6349
|
+
if (!e(res) || !("value" in res)) return;
|
|
6346
6350
|
let value = res.value;
|
|
6347
6351
|
return import_cbor.default.decode(value);
|
|
6348
6352
|
}
|
|
@@ -8564,7 +8568,7 @@ async function _setHttpRouterOptionsOnKuboNode(kuboClient, routingValue) {
|
|
|
8564
8568
|
await _setProvideDhtSweepEnabledOnKuboNode(kuboClient, false);
|
|
8565
8569
|
const endpointsBefore = Object.values(routingConfigBeforeChanging?.Routers || {}).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
|
|
8566
8570
|
const endpointsAfter = Object.values(mergedRoutingValue.Routers).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
|
|
8567
|
-
if (!
|
|
8571
|
+
if (!t$3(endpointsBefore.sort(), endpointsAfter.sort())) {
|
|
8568
8572
|
log("Config on kubo node has been changed. PKC-js will send shutdown command to node", kuboClient._clientOptions.url, "Clients of pkc-js should restart ipfs node");
|
|
8569
8573
|
const shutdownUrl = `${kuboClient._clientOptions.url}/shutdown`;
|
|
8570
8574
|
try {
|
|
@@ -8851,8 +8855,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8851
8855
|
_clientOptions: clientOptions,
|
|
8852
8856
|
peers: async () => {
|
|
8853
8857
|
const topics = await kuboRpcClient.pubsub.ls();
|
|
8854
|
-
|
|
8855
|
-
return import_commonjs.unique(topicPeers.map((topicPeer) => topicPeer.toString()));
|
|
8858
|
+
return n$2(n$3(await Promise.all(topics.map((topic) => kuboRpcClient.pubsub.peers(topic)))).map((topicPeer) => topicPeer.toString()));
|
|
8856
8859
|
},
|
|
8857
8860
|
url: clientOptions.url.toString(),
|
|
8858
8861
|
destroy: async () => {}
|
|
@@ -8863,7 +8866,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8863
8866
|
this.clients.libp2pJsClients = {};
|
|
8864
8867
|
if (!this.libp2pJsClientsOptions) return;
|
|
8865
8868
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
8866
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
8869
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-h-rjuHh7.js");
|
|
8867
8870
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
8868
8871
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
8869
8872
|
...clientOptions,
|
|
@@ -8956,7 +8959,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8956
8959
|
}
|
|
8957
8960
|
}
|
|
8958
8961
|
async _initMissingFieldsOfPublicationBeforeSigning(pubOptions, log) {
|
|
8959
|
-
const finalOptions =
|
|
8962
|
+
const finalOptions = t$5(pubOptions);
|
|
8960
8963
|
if (!finalOptions.signer) throw Error("User did not provide a signer to create a local publication");
|
|
8961
8964
|
let cleanedAuthor = cleanWireAuthor(normalizeCreatePublicationAuthor(finalOptions.author));
|
|
8962
8965
|
if (cleanedAuthor) {
|
|
@@ -8964,7 +8967,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8964
8967
|
const val = cleanedAuthor[key];
|
|
8965
8968
|
if (typeof val === "object" && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) delete cleanedAuthor[key];
|
|
8966
8969
|
}
|
|
8967
|
-
if (
|
|
8970
|
+
if (e$1(cleanedAuthor)) cleanedAuthor = void 0;
|
|
8968
8971
|
}
|
|
8969
8972
|
const filledTimestamp = typeof finalOptions.timestamp !== "number" ? timestamp() : finalOptions.timestamp;
|
|
8970
8973
|
const filledSigner = await this.createSigner(finalOptions.signer);
|
|
@@ -9028,7 +9031,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9028
9031
|
if (derivedCommunityAddress) commentInstance.setCommunityAddress(derivedCommunityAddress);
|
|
9029
9032
|
if ("depth" in options) {
|
|
9030
9033
|
if ("cid" in options) commentInstance.setCid(parseCidStringSchemaWithPKCErrorIfItFails(options.cid));
|
|
9031
|
-
const commentIpfs =
|
|
9034
|
+
const commentIpfs = n$1(options, ["cid"]);
|
|
9032
9035
|
if (!("signature" in options)) Object.assign(commentInstance, options);
|
|
9033
9036
|
else commentInstance._initIpfsProps(parseCommentIpfsSchemaWithPKCErrorIfItFails(commentIpfs));
|
|
9034
9037
|
if (commentInstance.author?.nameResolved !== void 0) delete commentInstance.author.nameResolved;
|
|
@@ -9074,7 +9077,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9074
9077
|
}
|
|
9075
9078
|
if (!community.raw.communityIpfs) {
|
|
9076
9079
|
if (options.signature) {
|
|
9077
|
-
const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(
|
|
9080
|
+
const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(t$4(options, [...options.signature.signedPropertyNames, "signature"]));
|
|
9078
9081
|
if (resParseCommunityIpfs.success) {
|
|
9079
9082
|
const cleanedRecord = removeUndefinedValuesRecursively(resParseCommunityIpfs.data);
|
|
9080
9083
|
await community.initCommunityIpfsPropsNoMerge(cleanedRecord);
|
|
@@ -9111,7 +9114,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9111
9114
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
9112
9115
|
log.trace("Received community options to create a local community instance:", options);
|
|
9113
9116
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
9114
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
9117
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-DdDpaZqk.js");
|
|
9115
9118
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
9116
9119
|
const community = new LocalCommunity(this);
|
|
9117
9120
|
if (isLocalCommunity) {
|