@pkcprotocol/pkc-js 0.0.62 → 0.0.64
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 +15 -15
- package/dist/browser/clients/base-client-manager.js.map +1 -1
- package/dist/browser/community/community-client-manager.js +10 -12
- 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/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +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 +19 -13
- package/dist/browser/pkc/pkc.js.map +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 +16 -16
- 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 +54 -15
- 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/browser/util.d.ts +1 -1
- package/dist/browser/runtime/browser/util.js +4 -2
- package/dist/browser/runtime/browser/util.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.d.ts +1 -1
- package/dist/browser/runtime/node/util.js +12 -8
- package/dist/browser/runtime/node/util.js.map +1 -1
- package/dist/browser/schema/schema.js +4 -4
- 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/types.d.ts +1 -1
- package/dist/browser/util.d.ts +2 -2
- package/dist/browser/util.js +24 -22
- package/dist/browser/util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +242 -312
- package/dist/bundled/chunks/chunk-2rV9d50f.js +35 -0
- package/dist/bundled/chunks/{helia-for-pkc-55fcY7oN.js → helia-for-pkc-CYDRSysz.js} +6 -6
- package/dist/bundled/chunks/{local-community-Bdasy8ZJ.js → local-community-DYvRQWsK.js} +148 -98
- package/dist/bundled/chunks/{local-community-Bz-P-EGM.js → local-community-DyaGG6lj.js} +1 -1
- package/dist/bundled/chunks/{node-DU0tGecu.js → node-DadVit9c.js} +50 -43
- package/dist/bundled/chunks/{rpc-local-community-NkCEOv2-.js → rpc-local-community-1Uvl5iwp.js} +343 -111
- package/dist/bundled/chunks/schema-Dtvt2tQ8.js +16182 -0
- package/dist/bundled/chunks/src-0J9-Tmgd.js +4147 -0
- package/dist/bundled/chunks/src-4u0f92eE.js +9899 -0
- package/dist/bundled/chunks/src-BOzgM7Fp.js +800 -0
- package/dist/bundled/chunks/src-CYIMjhjK.js +48 -0
- package/dist/bundled/chunks/{util-DpR-szdu.js → util-CjfTxkQ8.js} +1 -1
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/rpc/src/index.js +44 -25
- package/dist/node/clients/base-client-manager.js +15 -15
- package/dist/node/clients/base-client-manager.js.map +1 -1
- package/dist/node/community/community-client-manager.js +10 -12
- 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/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +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 +19 -13
- package/dist/node/pkc/pkc.js.map +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 +16 -16
- 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 +54 -15
- 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/browser/util.d.ts +1 -1
- package/dist/node/runtime/browser/util.js +4 -2
- package/dist/node/runtime/browser/util.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.d.ts +1 -1
- package/dist/node/runtime/node/util.js +12 -8
- package/dist/node/runtime/node/util.js.map +1 -1
- package/dist/node/schema/schema.js +4 -4
- 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/types.d.ts +1 -1
- package/dist/node/util.d.ts +2 -2
- package/dist/node/util.js +24 -22
- package/dist/node/util.js.map +1 -1
- package/package.json +2 -2
- package/dist/bundled/chunks/schema-qXcvCeAO.js +0 -34744
|
@@ -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-DYvRQWsK.js";
|
|
2
2
|
export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
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, 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-Dtvt2tQ8.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-1Uvl5iwp.js";
|
|
4
|
+
import { n as getHeliaDebugContext } from "./util-CjfTxkQ8.js";
|
|
4
5
|
import path from "path";
|
|
5
6
|
import assert from "assert";
|
|
6
7
|
import fs from "fs";
|
|
7
8
|
import Database from "better-sqlite3";
|
|
9
|
+
import { CID } from "multiformats/cid";
|
|
8
10
|
import { of } from "typestub-ipfs-only-hash";
|
|
9
11
|
import EventEmitter from "events";
|
|
10
12
|
import { Client } from "rpc-websockets";
|
|
@@ -141,10 +143,15 @@ if (Number(process.versions.node.split(".")[0]) >= 18) {
|
|
|
141
143
|
}
|
|
142
144
|
if (typeof globalThis.WebSocket === "undefined") Reflect.set(globalThis, "WebSocket", import_undici.WebSocket);
|
|
143
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
|
|
144
152
|
//#region dist/node/publications/publication.js
|
|
145
153
|
var import_retry = /* @__PURE__ */ __toESM(require_retry(), 1);
|
|
146
154
|
var import_lib = require_lib$1();
|
|
147
|
-
var import_commonjs = /* @__PURE__ */ __toESM(require_commonjs(), 1);
|
|
148
155
|
var Publication = class extends import_lib.TypedEmitter {
|
|
149
156
|
constructor(pkc) {
|
|
150
157
|
super();
|
|
@@ -466,7 +473,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
466
473
|
return;
|
|
467
474
|
}
|
|
468
475
|
if (pubsubMsgParsed.type === "CHALLENGEREQUEST" || pubsubMsgParsed.type === "CHALLENGEANSWER") log.trace("Received unrelated pubsub message of type", pubsubMsgParsed.type);
|
|
469
|
-
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`);
|
|
470
477
|
else if (pubsubMsgParsed.type === "CHALLENGE") return this._handleIncomingChallengePubsubMessage(pubsubMsgParsed);
|
|
471
478
|
else if (pubsubMsgParsed.type === "CHALLENGEVERIFICATION") return this._handleIncomingChallengeVerificationPubsubMessage(pubsubMsgParsed);
|
|
472
479
|
}
|
|
@@ -587,7 +594,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
587
594
|
this.emit("statechange", newState);
|
|
588
595
|
}
|
|
589
596
|
_setRpcClientState(newState) {
|
|
590
|
-
const currentRpcUrl =
|
|
597
|
+
const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
|
|
591
598
|
if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
|
|
592
599
|
this.clients.pkcRpcClients[currentRpcUrl].state = newState;
|
|
593
600
|
this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
|
|
@@ -803,7 +810,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
803
810
|
};
|
|
804
811
|
const omitEncrypted = (msg) => {
|
|
805
812
|
if (!msg) return void 0;
|
|
806
|
-
return
|
|
813
|
+
return n$1(msg, ["encrypted"]);
|
|
807
814
|
};
|
|
808
815
|
return Object.values(this._challengeExchanges).map((exchange) => ({
|
|
809
816
|
challengeRequest: omitEncrypted(exchange.challengeRequest),
|
|
@@ -903,7 +910,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
903
910
|
}
|
|
904
911
|
}
|
|
905
912
|
_getPubsubProviders() {
|
|
906
|
-
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);
|
|
907
914
|
if (providers.length === 0) throw new PKCError("ERR_NO_PUBSUB_PROVIDERS_AVAILABLE_TO_PUBLISH_OVER_PUBSUB", { providers });
|
|
908
915
|
if (providers.length === 1) providers.push(providers[0]);
|
|
909
916
|
return providers;
|
|
@@ -916,14 +923,14 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
916
923
|
if (challenge.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
917
924
|
const encryptedFields = ["challenges"];
|
|
918
925
|
log("Received a challenge from the local community", challenge);
|
|
919
|
-
await this._handleIncomingChallengePubsubMessage(
|
|
926
|
+
await this._handleIncomingChallengePubsubMessage(n$1(challenge, encryptedFields));
|
|
920
927
|
}
|
|
921
928
|
};
|
|
922
929
|
community.on("challenge", communityChallengeListener);
|
|
923
930
|
const communityChallengeVerificationListener = async (decryptedChallengeVerification) => {
|
|
924
931
|
if (decryptedChallengeVerification.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
925
932
|
log("Received a challenge verification from the local community", decryptedChallengeVerification);
|
|
926
|
-
await this._handleIncomingChallengeVerificationPubsubMessage(
|
|
933
|
+
await this._handleIncomingChallengeVerificationPubsubMessage(n$1(decryptedChallengeVerification, ["comment", "commentUpdate"]));
|
|
927
934
|
}
|
|
928
935
|
};
|
|
929
936
|
community.on("challengeverification", communityChallengeVerificationListener);
|
|
@@ -1092,9 +1099,9 @@ var Comment = class extends Publication {
|
|
|
1092
1099
|
const log = logger_default("pkc-js:comment:_initIpfsProps");
|
|
1093
1100
|
this.raw.comment = props;
|
|
1094
1101
|
this._initProps(props);
|
|
1095
|
-
const unknownProps =
|
|
1102
|
+
const unknownProps = r(t$1(props), t$1(CommentIpfsSchema.shape));
|
|
1096
1103
|
if (unknownProps.length > 0) {
|
|
1097
|
-
const unknownPropsWithValues =
|
|
1104
|
+
const unknownPropsWithValues = t$4(props, unknownProps);
|
|
1098
1105
|
log(`Found unknown props on loaded CommentIpfs (cid: ${this.cid})`, unknownPropsWithValues, "Full props:", props, "Will set them on the Comment instance");
|
|
1099
1106
|
Object.assign(this, unknownPropsWithValues);
|
|
1100
1107
|
}
|
|
@@ -1177,10 +1184,10 @@ var Comment = class extends Publication {
|
|
|
1177
1184
|
const log = logger_default("pkc-js:comment:_initCommentUpdate");
|
|
1178
1185
|
if ("depth" in props) {} else {
|
|
1179
1186
|
this.raw.commentUpdate = props;
|
|
1180
|
-
const unknownProps =
|
|
1187
|
+
const unknownProps = r(t$1(props), t$1(CommentUpdateSchema.shape));
|
|
1181
1188
|
if (unknownProps.length > 0) {
|
|
1182
1189
|
log("Found unknown props on CommentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
1183
|
-
Object.assign(this,
|
|
1190
|
+
Object.assign(this, t$4(props, unknownProps));
|
|
1184
1191
|
}
|
|
1185
1192
|
}
|
|
1186
1193
|
this.upvoteCount = props.upvoteCount;
|
|
@@ -1235,7 +1242,7 @@ var Comment = class extends Publication {
|
|
|
1235
1242
|
pageCids: {}
|
|
1236
1243
|
});
|
|
1237
1244
|
else if ("pages" in newReplies && newReplies.pages && "pageCids" in newReplies && newReplies.pageCids) {
|
|
1238
|
-
if (!
|
|
1245
|
+
if (!t$3(this.replies.pageCids, newReplies.pageCids)) {
|
|
1239
1246
|
log.trace(`Updating the props of comment instance (${this.cid}) replies`);
|
|
1240
1247
|
const parsedPages = parseRawPages(newReplies);
|
|
1241
1248
|
this.replies.updateProps({
|
|
@@ -1249,10 +1256,9 @@ var Comment = class extends Publication {
|
|
|
1249
1256
|
async _verifyChallengeVerificationCommentProps(decryptedVerification) {
|
|
1250
1257
|
const log = logger_default("pkc-js:comment:publish:_verifyChallengeVerificationCommentProps");
|
|
1251
1258
|
if (!this.raw.pubsubMessageToPublish) throw Error("comment._pubsubMsgToPublish should be defined at this point");
|
|
1252
|
-
const keysToCompare =
|
|
1253
|
-
const pubsubMsgFromCommentIpfs =
|
|
1254
|
-
|
|
1255
|
-
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))) {
|
|
1256
1262
|
const error = new PKCError("ERR_COMMUNITY_CHANGED_COMMENT_PUBSUB_PUBLICATION_PROPS", {
|
|
1257
1263
|
pubsubMsgFromSub: pubsubMsgFromCommentIpfs,
|
|
1258
1264
|
originalPubsubMsg: this.raw.pubsubMessageToPublish
|
|
@@ -1354,10 +1360,10 @@ var Comment = class extends Publication {
|
|
|
1354
1360
|
this.setCid(decryptedVerification.commentUpdate.cid);
|
|
1355
1361
|
this._initIpfsProps(decryptedVerification.comment);
|
|
1356
1362
|
this._initCommentUpdateFromChallengeVerificationProps(decryptedVerification.commentUpdate);
|
|
1357
|
-
const unknownProps =
|
|
1363
|
+
const unknownProps = r(t$1(decryptedVerification.commentUpdate), t$1(CommentUpdateForChallengeVerificationSchema.shape));
|
|
1358
1364
|
if (unknownProps.length > 0) {
|
|
1359
1365
|
log("Found unknown props on decryptedVerification.commentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
1360
|
-
Object.assign(this,
|
|
1366
|
+
Object.assign(this, t$4(decryptedVerification.commentUpdate, unknownProps));
|
|
1361
1367
|
}
|
|
1362
1368
|
this.emit("update", this);
|
|
1363
1369
|
if (!this._pkc._pkcRpcClient) this._resolveAuthorNamesInBackground();
|
|
@@ -1549,7 +1555,7 @@ var Comment = class extends Publication {
|
|
|
1549
1555
|
this.emit("updatingstatechange", this._updatingState);
|
|
1550
1556
|
}
|
|
1551
1557
|
_setRpcClientState(newState) {
|
|
1552
|
-
const currentRpcUrl =
|
|
1558
|
+
const currentRpcUrl = t$1(this.clients.pkcRpcClients)[0];
|
|
1553
1559
|
if (newState === this.clients.pkcRpcClients[currentRpcUrl].state) return;
|
|
1554
1560
|
this.clients.pkcRpcClients[currentRpcUrl].state = newState;
|
|
1555
1561
|
this.clients.pkcRpcClients[currentRpcUrl].emit("statechange", newState);
|
|
@@ -1781,7 +1787,7 @@ var Comment = class extends Publication {
|
|
|
1781
1787
|
updatingCommentInstance.on("error", this._updatingCommentInstance.error);
|
|
1782
1788
|
updatingCommentInstance.on("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
|
|
1783
1789
|
updatingCommentInstance.on("statechange", this._updatingCommentInstance.statechange);
|
|
1784
|
-
const clientKeys =
|
|
1790
|
+
const clientKeys = t$1(this.clients);
|
|
1785
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]);
|
|
1786
1792
|
updatingCommentInstance._numOfListenersForUpdatingInstance++;
|
|
1787
1793
|
this._useUpdatePropsFromUpdatingCommentIfPossible();
|
|
@@ -1839,7 +1845,7 @@ var Comment = class extends Publication {
|
|
|
1839
1845
|
this._updatingCommentInstance.comment.removeListener("updatingstatechange", this._updatingCommentInstance.updatingstatechange);
|
|
1840
1846
|
this._updatingCommentInstance.comment.removeListener("update", this._updatingCommentInstance.update);
|
|
1841
1847
|
this._updatingCommentInstance.comment.removeListener("error", this._updatingCommentInstance.error);
|
|
1842
|
-
const clientKeys =
|
|
1848
|
+
const clientKeys = t$1(this.clients);
|
|
1843
1849
|
for (const clientType of clientKeys) if (this.clients[clientType]) for (const clientUrl of Object.keys(this.clients[clientType])) this.clients[clientType][clientUrl].unmirror();
|
|
1844
1850
|
this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance--;
|
|
1845
1851
|
if (this._updatingCommentInstance.comment._numOfListenersForUpdatingInstance === 0 && this._updatingCommentInstance.comment.state !== "stopped") {
|
|
@@ -2013,16 +2019,16 @@ var Stats = class {
|
|
|
2013
2019
|
return 1 / (successAverageMs + 150) / (1 / (successAverageMs + 100) + 1 / 150) * .2 + (successCounts + .288) / (failureCounts * 2 + successCounts + 1) * .8;
|
|
2014
2020
|
}
|
|
2015
2021
|
async sortGatewaysAccordingToScore(type) {
|
|
2016
|
-
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;
|
|
2017
2023
|
assert(gatewayType, "Can't find the gateway type to sort");
|
|
2018
|
-
const gateways =
|
|
2024
|
+
const gateways = t$1(this._pkc.clients[gatewayType]);
|
|
2019
2025
|
const score = async (gatewayUrl) => {
|
|
2020
2026
|
const failureCounts = await this._pkc._storage.getItem(this._getFailuresCountKey(gatewayUrl, type)) || 0;
|
|
2021
2027
|
const successCounts = await this._pkc._storage.getItem(this._getSuccessCountKey(gatewayUrl, type)) || 0;
|
|
2022
2028
|
const successAverageMs = await this._pkc._storage.getItem(this._getSuccessAverageKey(gatewayUrl, type)) || 0;
|
|
2023
2029
|
return this._gatewayScore(failureCounts, successCounts, successAverageMs);
|
|
2024
2030
|
};
|
|
2025
|
-
return
|
|
2031
|
+
return t(gateways, score);
|
|
2026
2032
|
}
|
|
2027
2033
|
};
|
|
2028
2034
|
//#endregion
|
|
@@ -6340,7 +6346,7 @@ var SqliteCache = class {
|
|
|
6340
6346
|
key,
|
|
6341
6347
|
now: now()
|
|
6342
6348
|
});
|
|
6343
|
-
if (!
|
|
6349
|
+
if (!e(res) || !("value" in res)) return;
|
|
6344
6350
|
let value = res.value;
|
|
6345
6351
|
return import_cbor.default.decode(value);
|
|
6346
6352
|
}
|
|
@@ -8562,7 +8568,7 @@ async function _setHttpRouterOptionsOnKuboNode(kuboClient, routingValue) {
|
|
|
8562
8568
|
await _setProvideDhtSweepEnabledOnKuboNode(kuboClient, false);
|
|
8563
8569
|
const endpointsBefore = Object.values(routingConfigBeforeChanging?.Routers || {}).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
|
|
8564
8570
|
const endpointsAfter = Object.values(mergedRoutingValue.Routers).map((router) => router.Parameters?.Endpoint).filter((endpoint) => endpoint !== void 0);
|
|
8565
|
-
if (!
|
|
8571
|
+
if (!t$3(endpointsBefore.sort(), endpointsAfter.sort())) {
|
|
8566
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");
|
|
8567
8573
|
const shutdownUrl = `${kuboClient._clientOptions.url}/shutdown`;
|
|
8568
8574
|
try {
|
|
@@ -8798,8 +8804,8 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8798
8804
|
});
|
|
8799
8805
|
this._promiseToWaitForFirstCommunitieschangeEvent = new Promise((resolve) => this.once("communitieschange", resolve));
|
|
8800
8806
|
this.clients = {};
|
|
8801
|
-
this.
|
|
8802
|
-
this.
|
|
8807
|
+
this.clients.kuboRpcClients = {};
|
|
8808
|
+
this.clients.pubsubKuboRpcClients = {};
|
|
8803
8809
|
this._initRpcClientsIfNeeded();
|
|
8804
8810
|
this._initIpfsGatewaysIfNeeded();
|
|
8805
8811
|
this._initMemCaches();
|
|
@@ -8825,11 +8831,11 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8825
8831
|
nameResolvedCache: new LRUCache({ max: 5e3 })
|
|
8826
8832
|
};
|
|
8827
8833
|
}
|
|
8828
|
-
_initKuboRpcClientsIfNeeded() {
|
|
8834
|
+
async _initKuboRpcClientsIfNeeded() {
|
|
8829
8835
|
this.clients.kuboRpcClients = {};
|
|
8830
8836
|
if (!this.kuboRpcClientsOptions) return;
|
|
8831
8837
|
for (const clientOptions of this.kuboRpcClientsOptions) {
|
|
8832
|
-
const kuboRpcClient = createKuboRpcClient(clientOptions);
|
|
8838
|
+
const kuboRpcClient = await createKuboRpcClient(clientOptions);
|
|
8833
8839
|
this.clients.kuboRpcClients[clientOptions.url.toString()] = {
|
|
8834
8840
|
_client: kuboRpcClient,
|
|
8835
8841
|
_clientOptions: clientOptions,
|
|
@@ -8839,18 +8845,17 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8839
8845
|
};
|
|
8840
8846
|
}
|
|
8841
8847
|
}
|
|
8842
|
-
_initKuboPubsubClientsIfNeeded() {
|
|
8848
|
+
async _initKuboPubsubClientsIfNeeded() {
|
|
8843
8849
|
this.clients.pubsubKuboRpcClients = {};
|
|
8844
8850
|
if (!this.pubsubKuboRpcClientsOptions) return;
|
|
8845
8851
|
for (const clientOptions of this.pubsubKuboRpcClientsOptions) {
|
|
8846
|
-
const kuboRpcClient = createKuboRpcClient(clientOptions);
|
|
8852
|
+
const kuboRpcClient = await createKuboRpcClient(clientOptions);
|
|
8847
8853
|
this.clients.pubsubKuboRpcClients[clientOptions.url.toString()] = {
|
|
8848
8854
|
_client: kuboRpcClient,
|
|
8849
8855
|
_clientOptions: clientOptions,
|
|
8850
8856
|
peers: async () => {
|
|
8851
8857
|
const topics = await kuboRpcClient.pubsub.ls();
|
|
8852
|
-
|
|
8853
|
-
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()));
|
|
8854
8859
|
},
|
|
8855
8860
|
url: clientOptions.url.toString(),
|
|
8856
8861
|
destroy: async () => {}
|
|
@@ -8861,7 +8866,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8861
8866
|
this.clients.libp2pJsClients = {};
|
|
8862
8867
|
if (!this.libp2pJsClientsOptions) return;
|
|
8863
8868
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
8864
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
8869
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-CYDRSysz.js");
|
|
8865
8870
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
8866
8871
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
8867
8872
|
...clientOptions,
|
|
@@ -8904,6 +8909,8 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8904
8909
|
}
|
|
8905
8910
|
async _init() {
|
|
8906
8911
|
const log = logger_default("pkc-js:pkc:_init");
|
|
8912
|
+
await this._initKuboRpcClientsIfNeeded();
|
|
8913
|
+
await this._initKuboPubsubClientsIfNeeded();
|
|
8907
8914
|
this._storage = new Storage(this);
|
|
8908
8915
|
await this._storage.init();
|
|
8909
8916
|
this._stats = new Stats({
|
|
@@ -8952,7 +8959,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8952
8959
|
}
|
|
8953
8960
|
}
|
|
8954
8961
|
async _initMissingFieldsOfPublicationBeforeSigning(pubOptions, log) {
|
|
8955
|
-
const finalOptions =
|
|
8962
|
+
const finalOptions = t$5(pubOptions);
|
|
8956
8963
|
if (!finalOptions.signer) throw Error("User did not provide a signer to create a local publication");
|
|
8957
8964
|
let cleanedAuthor = cleanWireAuthor(normalizeCreatePublicationAuthor(finalOptions.author));
|
|
8958
8965
|
if (cleanedAuthor) {
|
|
@@ -8960,7 +8967,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8960
8967
|
const val = cleanedAuthor[key];
|
|
8961
8968
|
if (typeof val === "object" && val !== null && !Array.isArray(val) && Object.keys(val).length === 0) delete cleanedAuthor[key];
|
|
8962
8969
|
}
|
|
8963
|
-
if (
|
|
8970
|
+
if (e$1(cleanedAuthor)) cleanedAuthor = void 0;
|
|
8964
8971
|
}
|
|
8965
8972
|
const filledTimestamp = typeof finalOptions.timestamp !== "number" ? timestamp() : finalOptions.timestamp;
|
|
8966
8973
|
const filledSigner = await this.createSigner(finalOptions.signer);
|
|
@@ -9024,7 +9031,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9024
9031
|
if (derivedCommunityAddress) commentInstance.setCommunityAddress(derivedCommunityAddress);
|
|
9025
9032
|
if ("depth" in options) {
|
|
9026
9033
|
if ("cid" in options) commentInstance.setCid(parseCidStringSchemaWithPKCErrorIfItFails(options.cid));
|
|
9027
|
-
const commentIpfs =
|
|
9034
|
+
const commentIpfs = n$1(options, ["cid"]);
|
|
9028
9035
|
if (!("signature" in options)) Object.assign(commentInstance, options);
|
|
9029
9036
|
else commentInstance._initIpfsProps(parseCommentIpfsSchemaWithPKCErrorIfItFails(commentIpfs));
|
|
9030
9037
|
if (commentInstance.author?.nameResolved !== void 0) delete commentInstance.author.nameResolved;
|
|
@@ -9070,7 +9077,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9070
9077
|
}
|
|
9071
9078
|
if (!community.raw.communityIpfs) {
|
|
9072
9079
|
if (options.signature) {
|
|
9073
|
-
const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(
|
|
9080
|
+
const resParseCommunityIpfs = CommunityIpfsSchema.loose().safeParse(t$4(options, [...options.signature.signedPropertyNames, "signature"]));
|
|
9074
9081
|
if (resParseCommunityIpfs.success) {
|
|
9075
9082
|
const cleanedRecord = removeUndefinedValuesRecursively(resParseCommunityIpfs.data);
|
|
9076
9083
|
await community.initCommunityIpfsPropsNoMerge(cleanedRecord);
|
|
@@ -9107,7 +9114,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9107
9114
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
9108
9115
|
log.trace("Received community options to create a local community instance:", options);
|
|
9109
9116
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
9110
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
9117
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-DyaGG6lj.js");
|
|
9111
9118
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
9112
9119
|
const community = new LocalCommunity(this);
|
|
9113
9120
|
if (isLocalCommunity) {
|