@pkcprotocol/pkc-js 0.0.149 → 0.0.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/errors.d.ts +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 +85 -11
- package/dist/browser/helia/helia-for-pkc.js.map +1 -1
- package/dist/browser/helia/util.d.ts +3 -2
- package/dist/browser/helia/util.js +17 -7
- package/dist/browser/helia/util.js.map +1 -1
- package/dist/browser/pkc/pkc.js +19 -5
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment.d.ts +3 -1
- package/dist/browser/publications/comment/comment.js +40 -28
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/cleanup.js +3 -0
- package/dist/browser/runtime/node/community/local-community/cleanup.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.js +30 -62
- package/dist/browser/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/post-updates-bucket.d.ts +7 -5
- package/dist/browser/runtime/node/community/local-community/post-updates-bucket.js +122 -121
- package/dist/browser/runtime/node/community/local-community/post-updates-bucket.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/unixfs-directory-patch.d.ts +20 -0
- package/dist/browser/runtime/node/community/local-community/unixfs-directory-patch.js +231 -0
- package/dist/browser/runtime/node/community/local-community/unixfs-directory-patch.js.map +1 -0
- package/dist/browser/runtime/node/community/local-community.d.ts +1 -1
- package/dist/browser/runtime/node/community/local-community.js +3 -4
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/browser/util.d.ts +1 -12
- package/dist/browser/util.js +0 -53
- package/dist/browser/util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +122 -108
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-8iett8xl.js → helia-for-pkc-C86lDfh5.js} +62 -12
- package/dist/bundled/chunks/{local-community-ChZZa9bm.js → local-community-DKZRsY97.js} +1 -1
- package/dist/bundled/chunks/{local-community-BlBIYSsF.js → local-community-k_ETfr57.js} +374 -156
- package/dist/bundled/chunks/{node-BH_HrtON.js → node-Br5aH83u.js} +43 -26
- package/dist/bundled/chunks/{page-sort-scoring-NpdjWYfa.js → page-sort-scoring-DK29vmN0.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-Byj5ZmMa.js → rpc-local-community-Cfc2G6NP.js} +3 -3
- package/dist/bundled/chunks/src-66iuMY_4.js +2 -0
- package/dist/bundled/chunks/{src-evzEHW9W.js → src-BSYNGtIQ.js} +2 -44
- package/dist/bundled/chunks/{src-CNab3O7M.js → src-CAvdjq_i.js} +2 -2
- package/dist/bundled/chunks/{src-Bj5iE3qB.js → src-DIOHVUq9.js} +5 -4
- package/dist/bundled/chunks/src-DeIT_BDx.js +44 -0
- package/dist/bundled/chunks/{src-ltPxiZKf.js → src-NvrGEL7T.js} +2 -1
- package/dist/bundled/chunks/{util-CUZ1U2Go.js → util-Bmd1e0QJ.js} +4 -45
- package/dist/bundled/chunks/{util-DmmLFRbV.js → util-XNoDQ4hb.js} +19 -7
- package/dist/bundled/chunks/{validate-package-factories-CkU4qFQx.js → validate-package-factories-evt2DaRs.js} +2 -2
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/page-sorts.js +1 -1
- package/dist/bundled/rpc/src/index.js +4 -4
- package/dist/node/errors.d.ts +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 +85 -11
- package/dist/node/helia/helia-for-pkc.js.map +1 -1
- package/dist/node/helia/util.d.ts +3 -2
- package/dist/node/helia/util.js +17 -7
- package/dist/node/helia/util.js.map +1 -1
- package/dist/node/pkc/pkc.js +19 -5
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment.d.ts +3 -1
- package/dist/node/publications/comment/comment.js +40 -28
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/cleanup.js +3 -0
- package/dist/node/runtime/node/community/local-community/cleanup.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.js +30 -62
- package/dist/node/runtime/node/community/local-community/comment-updates.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/post-updates-bucket.d.ts +7 -5
- package/dist/node/runtime/node/community/local-community/post-updates-bucket.js +122 -121
- package/dist/node/runtime/node/community/local-community/post-updates-bucket.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/unixfs-directory-patch.d.ts +20 -0
- package/dist/node/runtime/node/community/local-community/unixfs-directory-patch.js +231 -0
- package/dist/node/runtime/node/community/local-community/unixfs-directory-patch.js.map +1 -0
- package/dist/node/runtime/node/community/local-community.d.ts +1 -1
- package/dist/node/runtime/node/community/local-community.js +3 -4
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/util.d.ts +1 -12
- package/dist/node/util.js +0 -53
- package/dist/node/util.js.map +1 -1
- package/package.json +3 -1
- package/dist/bundled/chunks/src-BC60-Q7v.js +0 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as retryKuboIpfsAdd, At as
|
|
3
|
-
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Cr as getDefaultDataPath, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dr as monitorCommunitiesDirectory, Dt as parseJsonWithPKCErrorIfFails, Er as listCommunitiesSync, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Fr as toCommunitiesEntry, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gr as t$2, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Hr as t$3, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as t$4, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lt as RpcCidParamSchema, M as parseRawPages, Mr as setNativeFunctions$1, Nn as verifyChallengeVerification, Nr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Pt as RpcAnchorPublishPreparationResultSchema, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as n$3, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xr as NAME_RESOLVED_TRUE_TTL_MS, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVED_FALSE_TTL_MS, Yt as RpcFetchCommunityListParamSchema, Zr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, ei as nativeFunctions$2, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zr as t$5, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as retryKuboIpfsAdd, At as ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Et as untrackUpdatingCommunity, Hr as setErrorMap, In as CommentUpdateForChallengeVerificationSchema, Ir as FailedToFetchPageIpfsFromGatewaysError, It as ChallengeVerificationMessageSchema, Jt as version_default, Lr as PKCError, Mr as FailedToFetchCommentIpfsFromGatewaysError, Mt as ChallengeMessageSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Ot as TimeoutError, Pt as ChallengeRequestMessageSchema, Rr as messages, Sr as e$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenAbortSignalFires, W as rejectWhenCommunityStopsOrAborts, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Z as resolveWhenPredicateIsTrue, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, br as t$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as retryKuboIpfsAddAndProvide, ft as findUpdatingComment, gr as n$2, gt as listUpdatingComments, hr as isStringDomain, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, jn as CommentIpfsSchema, jr as require_retry$1, k as isIpns, kt as pTimeout, ni as en_default, nt as shortifyCid, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pt as findUpdatingCommunity, r as calculateIpfsCidV0, rt as sleepUntilTimeoutOrAbort, st as waitForUpdateInCommunityInstanceWithErrorAndTimeout, tt as shortifyAddress, u as createAbortError, vr as n$1, vt as refreshTrackedCommentAliases, wr as r, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, xr as e, z as linkAbortSignals, zn as CommentUpdateSchema, zr as logger_default } from "./util-Bmd1e0QJ.js";
|
|
3
|
+
import { $n as buildRuntimeCommunityFields, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Bn as verifyCommunityEdit, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentModeration, Cr as getDefaultDataPath, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as signCommunityEdit, Dr as monitorCommunitiesDirectory, Dt as parseJsonWithPKCErrorIfFails, Er as listCommunitiesSync, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentIpfs, Fr as toCommunitiesEntry, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gn as getAuthorNameFromRuntime, Gr as t$2, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyVote, Hr as t$3, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentModeration, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as CreateCommunityListWithCidOptionsSchema, Jr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as getAuthorNameFromWire, Kr as t$4, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentPubsubMessage, Lt as RpcCidParamSchema, M as parseRawPages, Mr as setNativeFunctions$1, Nn as verifyChallengeVerification, Nr as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityList, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyCommentEdit, Pr as findCommunitiesEntry, Pt as RpcAnchorPublishPreparationResultSchema, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentUpdate, Rt as RpcCommentRepliesPageParamSchema, Sn as signCommentEdit, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as buildRuntimeAuthor, Ur as n$3, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityList, Vt as RpcCommunityPageParamSchema, Wn as cleanWireAuthor, Wt as RpcExportCommunityModLogsResultSchema, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, Xr as NAME_RESOLVED_TRUE_TTL_MS, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as CreateNewCommunityListOptionsSchema, Yr as NAME_RESOLVED_FALSE_TTL_MS, Yt as RpcFetchCommunityListParamSchema, Zr as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, Zt as RpcPublishAnchorRecordParamSchema, _n as signChallengeAnswer, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, b as KeyvBetterSqlite3, br as findLocalCommunityAddress, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as decryptEd25519AesGcm, ei as nativeFunctions$2, en as RpcPublishCommunityListResultSchema, er as getCommunityAddressFromRecord, et as parseCidStringSchemaWithPKCErrorIfItFails, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gn as cleanUpBeforePublishing, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as createKuboRpcClient, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, in as RpcSuccessResultSchema, ir as decode, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jn as verifyChallengeMessage, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signVote, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as createSigner, lr as getPKCAddressFromPublicKeySync, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as RpcResolveAuthorNameResultSchema, nr as getCommunityPublicKeyFromWire, on as findCommunityRecordNameMismatch, or as getBufferedPKCAddressFromPublicKey, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, pn as encryptEd25519AesGcm, q as decodeRpcChallengePubsubMsg, qn as normalizeCreatePublicationAuthor, qt as RpcFetchCidParamSchema, rn as RpcSubscriptionIdResultSchema, rr as normalizeCommunityInputFromCommunity, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, sn as require_lib$1, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as RpcPublishedAnchorRecordResultSchema, tr as getCommunityNameFromWire, un as createAnchorIpnsRecord$1, v as TrackedInstanceRegistry, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xn as signComment, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signChallengeRequest, z as PKCClientsManager, zr as t$5, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-Cfc2G6NP.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-XNoDQ4hb.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -30064,23 +30064,29 @@ var Comment = class extends Publication {
|
|
|
30064
30064
|
});
|
|
30065
30065
|
});
|
|
30066
30066
|
}
|
|
30067
|
-
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
|
|
30071
|
-
|
|
30072
|
-
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
|
|
30078
|
-
|
|
30079
|
-
|
|
30080
|
-
|
|
30081
|
-
|
|
30082
|
-
|
|
30083
|
-
|
|
30067
|
+
async _startParallelCommunityConnect({ abortSignal }) {
|
|
30068
|
+
const log = logger_default("pkc-js:comment:_startParallelCommunityConnect");
|
|
30069
|
+
if (!this.communityName && !this.communityPublicKey) return void 0;
|
|
30070
|
+
if (this.raw.comment) return void 0;
|
|
30071
|
+
if (abortSignal?.aborted || this._pkc.destroyed) return void 0;
|
|
30072
|
+
if (!(Object.keys(this._pkc.clients.libp2pJsClients).length > 0 || Object.keys(this._pkc.clients.kuboRpcClients).length > 0)) return void 0;
|
|
30073
|
+
if (findUpdatingCommunity(this._pkc, {
|
|
30074
|
+
publicKey: this.communityPublicKey,
|
|
30075
|
+
name: this.communityName
|
|
30076
|
+
})) return void 0;
|
|
30077
|
+
log("Starting parallel pkc.getCommunity for", this.cid, "so bitswap can fetch the comment block from community peers");
|
|
30078
|
+
try {
|
|
30079
|
+
await this._pkc.getCommunity({
|
|
30080
|
+
name: this.communityName,
|
|
30081
|
+
publicKey: this.communityPublicKey,
|
|
30082
|
+
abortSignal
|
|
30083
|
+
});
|
|
30084
|
+
return;
|
|
30085
|
+
} catch (err) {
|
|
30086
|
+
if (abortSignal?.aborted || isAbortError(err)) return void 0;
|
|
30087
|
+
log.error("Parallel pkc.getCommunity failed for", this.cid, err);
|
|
30088
|
+
return err;
|
|
30089
|
+
}
|
|
30084
30090
|
}
|
|
30085
30091
|
async _attemptToFetchCommentIpfsIfNeeded(log) {
|
|
30086
30092
|
if (this.cid && !this.raw.comment) {
|
|
@@ -30088,6 +30094,7 @@ var Comment = class extends Publication {
|
|
|
30088
30094
|
if (newCommentIpfsOrNonRetriableError instanceof Error) {
|
|
30089
30095
|
if (isAbortError(newCommentIpfsOrNonRetriableError) && (this.state === "stopped" || this._isStopAbortRequested())) return;
|
|
30090
30096
|
log.error(`Encountered a non retriable error while loading CommentIpfs (${this.cid}), will stop the update loop`, newCommentIpfsOrNonRetriableError);
|
|
30097
|
+
this._abortStopOperations(`Aborting comment operations for ${this.cid} because its CommentIpfs failed to load`);
|
|
30091
30098
|
await this._stopUpdateLoop();
|
|
30092
30099
|
this._changeCommentStateEmitEventEmitStateChangeEvent({
|
|
30093
30100
|
newUpdatingState: "failed",
|
|
@@ -30141,7 +30148,7 @@ var Comment = class extends Publication {
|
|
|
30141
30148
|
async loadCommentIpfsAndStartCommentUpdateSubscription() {
|
|
30142
30149
|
const log = logger_default("pkc-js:update:loadCommentIpfsAndStartCommentUpdateSubscription");
|
|
30143
30150
|
this._createStopAbortController();
|
|
30144
|
-
this.
|
|
30151
|
+
this._startParallelCommunityConnect({ abortSignal: this._getStopAbortSignal() });
|
|
30145
30152
|
await this._attemptInfintelyToLoadCommentIpfs();
|
|
30146
30153
|
if (!this.raw.comment) {
|
|
30147
30154
|
if (this.state === "stopped" || this._isStopAbortRequested()) return;
|
|
@@ -36102,7 +36109,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36102
36109
|
this.clients.libp2pJsClients = {};
|
|
36103
36110
|
if (!this.libp2pJsClientsOptions) return;
|
|
36104
36111
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
36105
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
36112
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-C86lDfh5.js");
|
|
36106
36113
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
36107
36114
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
36108
36115
|
...clientOptions,
|
|
@@ -36205,6 +36212,9 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36205
36212
|
abortPromise.catch(() => {});
|
|
36206
36213
|
abortSignal?.addEventListener("abort", abortListener);
|
|
36207
36214
|
comment._createStopAbortController();
|
|
36215
|
+
const communityConnectAbortController = new AbortController();
|
|
36216
|
+
let communityLoadError;
|
|
36217
|
+
comment._startParallelCommunityConnect({ abortSignal: communityConnectAbortController.signal }).then((error) => communityLoadError = error);
|
|
36208
36218
|
const commentTimeout = this._timeouts["comment-ipfs"];
|
|
36209
36219
|
try {
|
|
36210
36220
|
await pTimeout(Promise.race([comment._attemptInfintelyToLoadCommentIpfs(), abortPromise]), {
|
|
@@ -36215,10 +36225,17 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36215
36225
|
comment._clearStopAbortController();
|
|
36216
36226
|
return comment;
|
|
36217
36227
|
} catch (e) {
|
|
36218
|
-
|
|
36219
|
-
if (
|
|
36220
|
-
|
|
36228
|
+
const errorToThrow = abortError ?? lastUpdateError ?? e;
|
|
36229
|
+
if (communityLoadError) {
|
|
36230
|
+
if (errorToThrow instanceof PKCError) errorToThrow.details = {
|
|
36231
|
+
...errorToThrow.details,
|
|
36232
|
+
communityLoadError
|
|
36233
|
+
};
|
|
36234
|
+
else if (errorToThrow instanceof Error) Object.assign(errorToThrow, { details: { communityLoadError } });
|
|
36235
|
+
}
|
|
36236
|
+
throw errorToThrow;
|
|
36221
36237
|
} finally {
|
|
36238
|
+
communityConnectAbortController.abort();
|
|
36222
36239
|
abortSignal?.removeEventListener("abort", abortListener);
|
|
36223
36240
|
comment.removeListener("error", errorListener);
|
|
36224
36241
|
await comment.stop();
|
|
@@ -36469,7 +36486,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36469
36486
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36470
36487
|
log.trace("Received community options to create a local community instance:", options);
|
|
36471
36488
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36472
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36489
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-DKZRsY97.js");
|
|
36473
36490
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
36474
36491
|
const community = new LocalCommunity(this);
|
|
36475
36492
|
if (isLocalCommunity) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { bn as PageSortFileSchema, hr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-Bmd1e0QJ.js";
|
|
2
2
|
//#region dist/node/pages/page-sort-scoring.js
|
|
3
3
|
function validatePageSortFile(rawFile) {
|
|
4
4
|
const validated = PageSortFileSchema.parse(rawFile);
|
package/dist/bundled/chunks/{rpc-local-community-Byj5ZmMa.js → rpc-local-community-Cfc2G6NP.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as __toESM, n as __exportAll, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $
|
|
2
|
+
import { $r as string, $t as CreateCommunityEditPublicationOptionsWithRefinementSchema, A as isIpnsPath, An as CommentIpfsReservedFields, Ar as e$4, B as pubsubTopicToDhtKey, Bn as CommentUpdateSignedPropertyNames, Br as require_supports_color, C as hideClassPrivateProps, Cn as CreateVoteUserOptionsWithRefinementSchema, Cr as t$11, Ct as trackUpdatingCommunity, D as isIpfsCid, Dn as VoteSignedPropertyNames, Dr as r$7, Dt as require_sha256$1, E as isAbortError, Er as n$8, Et as untrackUpdatingCommunity, Fn as CommentUpdateChallengeReservedFieldNames, Fr as FailedToFetchGenericIpfsFromGatewaysError, Ft as ChallengeRequestMessageSignedPropertyNames, Gn as ModQueuePageIpfsSchema, Gr as boolean, Gt as PKCParsedOptionsSchema, H as raceAgainstAbort, Ht as DecryptedChallengeVerificationSchema, Ir as FailedToFetchPageIpfsFromGatewaysError, Jn as CommentEditChallengeRequestToEncryptSchema, Jr as looseObject, Kn as PageIpfsSchema, Kr as custom, Kt as PKCUserOptionBaseSchema, L as isRequestPubsubPublicationOfPost, Ln as CommentUpdateForChallengeVerificationSignedPropertyNames, Lr as PKCError, Lt as ChallengeVerificationMessageSignedPropertyNames, Mr as FailedToFetchCommentIpfsFromGatewaysError, Nn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Nr as FailedToFetchCommentUpdateFromGatewaysError, Nt as ChallengeMessageSignedPropertyNames, O as isIpfsPath, Or as t$10, Pn as CommentSignedPropertyNames, Pr as FailedToFetchCommunityFromGatewaysError, Qn as CommentEditSignedPropertyNames, Qr as record, Qt as CommunityEditPubsubMessagePublicationSchema, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateReservedFields, Rr as messages, Rt as DecryptedChallengeAnswerSchema, S as hasTransientNetworkErrorCode, Sn as RpcRemoteCommunityUpdateEventResultSchema, Sr as e$5, T as ipnsNameToIpnsOverPubsubTopic, Tn as VotePubsubMessagePublicationSchema, Tr as t$12, Un as CreateCommentOptionsWithRefinementSchema, Ur as _enum, Ut as NameResolveCacheOptionsSchema, Vr as require_ms$1, Vt as DecryptedChallengeSchema, Wn as GetPageParamSchema, Wr as array, Wt as NameResolverSerializedSchema, Xn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Xr as object, Yr as number, Yt as CommunityEditPublicationChallengeRequestToEncryptSchema, Zr as preprocess, Zt as CommunityEditPublicationSignedPropertyNames, _n as CreateRpcCommunityFunctionArgumentSchema, an as CreateCommentModerationOptionsWithRefinementSchema, ar as ChallengeAnswersSchema, at as throwIfAbortSignalAborted, bn as PageSortFileSchema, br as t$13, cr as CommunityAddressSchema, d as deepMergeRuntimeFields, dn as CommunityExportRecordsSchema, dr as JsonSignatureSchema, dt as findStartedCommunity, ei as union, en as CommentModerationChallengeRequestToEncryptSchema, er as CreateCommentEditOptionsWithRefinementSchema, f as derivePublicationFromChallengeRequest, fn as CommunityIpfsReservedFields, fr as PKCTimestampSchema, gn as CreateRemoteCommunityFunctionArgumentSchema, gr as n$9, h as fetchAndValidateIpnsRecordFromGateway, hn as CreateNewLocalCommunityUserOptionsSchema, hr as isStringDomain, in as CommentModerationsTableRowSchema, ir as AuthorReservedFields, jn as CommentIpfsSchema, jr as require_retry$2, jt as ChallengeAnswerMessageSignedPropertyNames, k as isIpns, kn as CommentChallengeRequestToEncryptSchema, kr as t$9, kt as pTimeout, ln as CommunityChallengeSettingSchema, lr as CommunityAuthorChallengeReservedFieldNames, m as extractNetworkErrorDetails, mn as CommunitySignedPropertyNames, mr as areEquivalentNames, mt as forgetTrackedUpdatingCommunityName, nr as AuthorCommentIpfsReservedFields, nt as shortifyCid, on as ChallengeFileFactorySchema, or as CidPathSchema, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsSchema, pr as ProtocolVersionSchema, pt as findUpdatingCommunity, q as removeNullUndefinedEmptyObjectsValuesRecursively, qn as isReservedObjectKey, qr as literal, qt as PKCUserOptionsSchema, r as calculateIpfsCidV0, rn as CommentModerationSignedPropertyNames, rr as AuthorPubsubSchema, rt as sleepUntilTimeoutOrAbort, sn as ChallengeFileSchema, sr as CidStringSchema, t as areEquivalentCommunityAddresses, tn as CommentModerationPubsubMessagePublicationSchema, tr as AuthorAddressSchema, tt as shortifyAddress, u as createAbortError, un as CommunityEditOptionsSchema, ur as CreateSignerSchema, vn as ExportCommunityModLogsOptionsSchema, vr as n$10, w as interruptibleSleep, wn as VoteChallengeRequestToEncryptSchema, wr as r$8, wt as untrackStartedCommunity, xr as e$6, xt as trackStartedCommunity, yn as PageSortFileFactorySchema, yt as refreshTrackedCommunityAliases, z as linkAbortSignals, zn as CommentUpdateSchema, zr as logger_default } from "./util-Bmd1e0QJ.js";
|
|
3
3
|
import { t as all } from "./src-CYIMjhjK.js";
|
|
4
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
4
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-DK29vmN0.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import dns from "node:dns";
|
|
@@ -118191,7 +118191,7 @@ async function moveCommunityDbToDeletedDirectory(communityAddress, pkc) {
|
|
|
118191
118191
|
}
|
|
118192
118192
|
async function createKuboRpcClient(kuboRpcClientOptions) {
|
|
118193
118193
|
logger_default("pkc-js:pkc:createKuboRpcClient").trace("Creating a new kubo client on node with options", kuboRpcClientOptions);
|
|
118194
|
-
const { create: CreateKuboRpcClient } = await import("./src-
|
|
118194
|
+
const { create: CreateKuboRpcClient } = await import("./src-NvrGEL7T.js");
|
|
118195
118195
|
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;
|
|
118196
118196
|
const onehourMs = 1e3 * 60 * 60;
|
|
118197
118197
|
return CreateKuboRpcClient({
|
|
@@ -1,48 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./chunk-2rV9d50f.js";
|
|
2
2
|
import { CID } from "multiformats/cid";
|
|
3
|
-
//#region node_modules/it-first/dist/src/index.js
|
|
4
|
-
/**
|
|
5
|
-
* @packageDocumentation
|
|
6
|
-
*
|
|
7
|
-
* Return the first value in an (async)iterable
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
*
|
|
11
|
-
* ```javascript
|
|
12
|
-
* import first from 'it-first'
|
|
13
|
-
*
|
|
14
|
-
* // This can also be an iterator, generator, etc
|
|
15
|
-
* const values = [0, 1, 2, 3, 4]
|
|
16
|
-
*
|
|
17
|
-
* const res = first(values)
|
|
18
|
-
*
|
|
19
|
-
* console.info(res) // 0
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
* Async sources must be awaited:
|
|
23
|
-
*
|
|
24
|
-
* ```javascript
|
|
25
|
-
* import first from 'it-first'
|
|
26
|
-
*
|
|
27
|
-
* const values = async function * () {
|
|
28
|
-
* yield * [0, 1, 2, 3, 4]
|
|
29
|
-
* }
|
|
30
|
-
*
|
|
31
|
-
* const res = await first(values())
|
|
32
|
-
*
|
|
33
|
-
* console.info(res) // 0
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
function isAsyncIterable(thing) {
|
|
37
|
-
return thing[Symbol.asyncIterator] != null;
|
|
38
|
-
}
|
|
39
|
-
function first(source) {
|
|
40
|
-
if (isAsyncIterable(source)) return (async () => {
|
|
41
|
-
for await (const entry of source) return entry;
|
|
42
|
-
})();
|
|
43
|
-
for (const entry of source) return entry;
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
3
|
//#region node_modules/@ipld/dag-pb/src/pb-decode.js
|
|
47
4
|
const textDecoder = new TextDecoder();
|
|
48
5
|
/**
|
|
@@ -775,6 +732,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
775
732
|
* @typedef {import('./interface.js').EncodeOptions} EncodeOptions
|
|
776
733
|
*/
|
|
777
734
|
const name = "dag-pb";
|
|
735
|
+
const code = 112;
|
|
778
736
|
/**
|
|
779
737
|
* @param {PBNode} node
|
|
780
738
|
* @param {EncodeOptions} [options]
|
|
@@ -814,4 +772,4 @@ function decode(bytes) {
|
|
|
814
772
|
return node;
|
|
815
773
|
}
|
|
816
774
|
//#endregion
|
|
817
|
-
export {
|
|
775
|
+
export { src_exports as a, prepare as c, name as i, validate as l, decode as n, createLink as o, encode as r, createNode as s, code as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fromString } from "uint8arrays/from-string";
|
|
2
|
-
import { allocUnsafe } from "uint8arrays/alloc";
|
|
3
2
|
import { withArrayBuffer } from "uint8arrays/with-array-buffer";
|
|
3
|
+
import { allocUnsafe } from "uint8arrays/alloc";
|
|
4
4
|
//#region node_modules/ipfs-unixfs/dist/src/errors.js
|
|
5
5
|
var InvalidTypeError = class InvalidTypeError extends Error {
|
|
6
6
|
static name = "InvalidTypeError";
|
|
@@ -1998,4 +1998,4 @@ var UnixFS = class UnixFS {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
};
|
|
2000
2000
|
//#endregion
|
|
2001
|
-
export {
|
|
2001
|
+
export { UnixFS as t };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { i as __toESM, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
+
import { a as src_exports, c as prepare, r as encode } from "./src-BSYNGtIQ.js";
|
|
3
|
+
import { t as UnixFS } from "./src-CAvdjq_i.js";
|
|
2
4
|
import { n as batch, t as parallelBatch } from "./src-DKntVmyX.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as UnixFS } from "./src-CNab3O7M.js";
|
|
5
|
+
import { t as first } from "./src-DeIT_BDx.js";
|
|
5
6
|
import { CID } from "multiformats/cid";
|
|
6
7
|
import { fromString } from "uint8arrays/from-string";
|
|
7
8
|
import { equals } from "uint8arrays/equals";
|
|
8
9
|
import { concat } from "uint8arrays/concat";
|
|
9
10
|
import { sha256 } from "multiformats/hashes/sha2";
|
|
10
|
-
import * as raw from "multiformats/codecs/raw";
|
|
11
|
-
import { alloc, allocUnsafe } from "uint8arrays/alloc";
|
|
12
11
|
import { murmur3128 } from "@multiformats/murmur3";
|
|
12
|
+
import { alloc, allocUnsafe } from "uint8arrays/alloc";
|
|
13
|
+
import * as raw from "multiformats/codecs/raw";
|
|
13
14
|
import { BlackHoleBlockstore } from "blockstore-core/black-hole";
|
|
14
15
|
//#region node_modules/ipfs-unixfs-importer/node_modules/uint8arraylist/dist/src/index.js
|
|
15
16
|
/**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region node_modules/it-first/dist/src/index.js
|
|
2
|
+
/**
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*
|
|
5
|
+
* Return the first value in an (async)iterable
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* ```javascript
|
|
10
|
+
* import first from 'it-first'
|
|
11
|
+
*
|
|
12
|
+
* // This can also be an iterator, generator, etc
|
|
13
|
+
* const values = [0, 1, 2, 3, 4]
|
|
14
|
+
*
|
|
15
|
+
* const res = first(values)
|
|
16
|
+
*
|
|
17
|
+
* console.info(res) // 0
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* Async sources must be awaited:
|
|
21
|
+
*
|
|
22
|
+
* ```javascript
|
|
23
|
+
* import first from 'it-first'
|
|
24
|
+
*
|
|
25
|
+
* const values = async function * () {
|
|
26
|
+
* yield * [0, 1, 2, 3, 4]
|
|
27
|
+
* }
|
|
28
|
+
*
|
|
29
|
+
* const res = await first(values())
|
|
30
|
+
*
|
|
31
|
+
* console.info(res) // 0
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
function isAsyncIterable(thing) {
|
|
35
|
+
return thing[Symbol.asyncIterator] != null;
|
|
36
|
+
}
|
|
37
|
+
function first(source) {
|
|
38
|
+
if (isAsyncIterable(source)) return (async () => {
|
|
39
|
+
for await (const entry of source) return entry;
|
|
40
|
+
})();
|
|
41
|
+
for (const entry of source) return entry;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { first as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
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 { a as src_exports$2 } from "./src-BSYNGtIQ.js";
|
|
3
4
|
import { n as peekable, t as map } from "./src-Cpx2Sts8.js";
|
|
4
5
|
import { n as encode$7, t as decode$8 } from "./src-ABfmT8J2.js";
|
|
5
|
-
import {
|
|
6
|
+
import { t as first } from "./src-DeIT_BDx.js";
|
|
6
7
|
import http from "node:http";
|
|
7
8
|
import { webcrypto } from "node:crypto";
|
|
8
9
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
@@ -6895,6 +6895,7 @@ var messages;
|
|
|
6895
6895
|
messages["ERR_PUBSUB_TOPIC_PEER_WAIT_ABORTED"] = "Aborted while waiting for a peer to subscribe to a pubsub topic";
|
|
6896
6896
|
messages["ERR_IPNS_DIRECT_FETCH_ABORTED"] = "Aborted while fetching an IPNS record directly from subscribers/providers";
|
|
6897
6897
|
messages["ERR_TIMED_OUT_RM_MFS_FILE"] = "Timed out removing MFS paths";
|
|
6898
|
+
messages["ERR_POST_UPDATES_BUCKET_SWAP_WAS_LOST"] = "Kubo reported the postUpdates bucket as swapped into MFS, but the bucket MFS holds does not link the posts' new CommentUpdate files";
|
|
6898
6899
|
messages["ERR_ABORTED_RESOLVING_TEXT_RECORD"] = "Aborted resolving text record on domain";
|
|
6899
6900
|
messages["ERR_CALLED_COMMUNITY_STOP_WITHOUT_UPDATE"] = "community.stop() called without calling update() first";
|
|
6900
6901
|
messages["ERR_PKC_MISSING_NATIVE_FUNCTIONS"] = "missing nativeFunctions required to create a community";
|
|
@@ -16556,7 +16557,7 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
|
|
|
16556
16557
|
], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
|
|
16557
16558
|
//#endregion
|
|
16558
16559
|
//#region dist/node/generated-version.js
|
|
16559
|
-
const version = "0.0.
|
|
16560
|
+
const version = "0.0.151";
|
|
16560
16561
|
//#endregion
|
|
16561
16562
|
//#region dist/node/version.js
|
|
16562
16563
|
const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
|
|
@@ -18028,48 +18029,6 @@ async function retryKuboIpfsAdd({ ipfsClient: kuboRpcClient, log, content, input
|
|
|
18028
18029
|
});
|
|
18029
18030
|
});
|
|
18030
18031
|
}
|
|
18031
|
-
function isMfsUnflushedLimitError(error) {
|
|
18032
|
-
return error instanceof Error && error.message.includes("unflushed MFS operations");
|
|
18033
|
-
}
|
|
18034
|
-
async function writeKuboFilesWithTimeout({ ipfsClient: kuboRpcClient, log, path, content, inputNumOfRetries, options, timeoutMs }) {
|
|
18035
|
-
const numOfRetries = inputNumOfRetries ?? 3;
|
|
18036
|
-
const timeoutMilliseconds = timeoutMs ?? 6e4;
|
|
18037
|
-
let writeOptions = {
|
|
18038
|
-
timeout: timeoutMilliseconds,
|
|
18039
|
-
...options
|
|
18040
|
-
};
|
|
18041
|
-
const write = () => pTimeout(kuboRpcClient.files.write(path, content, writeOptions), {
|
|
18042
|
-
milliseconds: timeoutMilliseconds + 5e3,
|
|
18043
|
-
message: `Timed out writing to MFS path ${path} after ${timeoutMilliseconds + 5e3}ms`
|
|
18044
|
-
});
|
|
18045
|
-
return new Promise((resolve, reject) => {
|
|
18046
|
-
const operation = import_retry.operation({
|
|
18047
|
-
retries: numOfRetries,
|
|
18048
|
-
factor: 2,
|
|
18049
|
-
minTimeout: 2e3
|
|
18050
|
-
});
|
|
18051
|
-
operation.attempt(async (currentAttempt) => {
|
|
18052
|
-
try {
|
|
18053
|
-
try {
|
|
18054
|
-
await write();
|
|
18055
|
-
} catch (error) {
|
|
18056
|
-
if (writeOptions.flush !== false || !isMfsUnflushedLimitError(error)) throw error;
|
|
18057
|
-
log(`Kubo reached its unflushed MFS operation limit, writing ${path} with flush:true instead`);
|
|
18058
|
-
writeOptions = {
|
|
18059
|
-
...writeOptions,
|
|
18060
|
-
flush: true
|
|
18061
|
-
};
|
|
18062
|
-
await write();
|
|
18063
|
-
}
|
|
18064
|
-
resolve();
|
|
18065
|
-
} catch (error) {
|
|
18066
|
-
log.error(`Failed attempt ${currentAttempt}/${numOfRetries + 1} to write content to MFS path ${path}:`, error);
|
|
18067
|
-
if (operation.retry(error)) return;
|
|
18068
|
-
reject(operation.mainError() || error);
|
|
18069
|
-
}
|
|
18070
|
-
});
|
|
18071
|
-
});
|
|
18072
|
-
}
|
|
18073
18032
|
async function removeBlocksFromKuboNode({ ipfsClient: kuboRpcClient, log, cids, inputNumOfRetries, options }) {
|
|
18074
18033
|
const cidsToRemove = cids.map((cid) => CID.parse(cid));
|
|
18075
18034
|
const numOfRetries = inputNumOfRetries ?? 3;
|
|
@@ -18362,7 +18321,7 @@ function calculateStringSizeSameAsIpfsAddCidV0Sync(content) {
|
|
|
18362
18321
|
}
|
|
18363
18322
|
async function calculateStringSizeSameAsIpfsAddCidV0(content) {
|
|
18364
18323
|
const { MemoryBlockstore } = await import("blockstore-core");
|
|
18365
|
-
const { importFile } = await import("./src-
|
|
18324
|
+
const { importFile } = await import("./src-DIOHVUq9.js");
|
|
18366
18325
|
const blockstore = new MemoryBlockstore();
|
|
18367
18326
|
const entry = await importFile({
|
|
18368
18327
|
path: "content.json",
|
|
@@ -18416,4 +18375,4 @@ function hasTransientNetworkErrorCode(details) {
|
|
|
18416
18375
|
return details.causes?.some(hasTransientNetworkErrorCode) ?? false;
|
|
18417
18376
|
}
|
|
18418
18377
|
//#endregion
|
|
18419
|
-
export { retryKuboIpfsAdd as $,
|
|
18378
|
+
export { retryKuboIpfsAdd as $, CommentEditsTableRowSchema as $n, string as $r, CreateCommunityEditPublicationOptionsWithRefinementSchema as $t, isIpnsPath as A, CommentIpfsReservedFields as An, e$4 as Ar, ChallengeAnswerMessageSchema as At, pubsubTopicToDhtKey as B, CommentUpdateSignedPropertyNames as Bn, require_supports_color as Br, DecryptedChallengeRequestSchema as Bt, hideClassPrivateProps as C, CreateVoteUserOptionsWithRefinementSchema as Cn, t$4 as Cr, trackUpdatingCommunity as Ct, isIpfsCid as D, VoteSignedPropertyNames as Dn, r$4 as Dr, require_sha256 as Dt, isAbortError as E, VotePubsubReservedFields as En, n$7 as Er, untrackUpdatingCommunity as Et, isLinkOfVideo as F, CommentUpdateChallengeReservedFieldNames as Fn, FailedToFetchGenericIpfsFromGatewaysError as Fr, ChallengeRequestMessageSignedPropertyNames as Ft, removeBlocksFromKuboNode as G, ModQueuePageIpfsSchema as Gn, boolean as Gr, PKCParsedOptionsSchema as Gt, raceAgainstAbort as H, CommentsTableRowSchema as Hn, setErrorMap as Hr, DecryptedChallengeVerificationSchema as Ht, isLinkValid as I, CommentUpdateForChallengeVerificationSchema as In, FailedToFetchPageIpfsFromGatewaysError as Ir, ChallengeVerificationMessageSchema as It, removeNullUndefinedValues as J, CommentEditChallengeRequestToEncryptSchema as Jn, looseObject as Jr, version_default as Jt, removeMfsFilesSafely as K, PageIpfsSchema as Kn, custom as Kr, PKCUserOptionBaseSchema as Kt, isRequestPubsubPublicationOfPost as L, CommentUpdateForChallengeVerificationSignedPropertyNames as Ln, PKCError as Lr, ChallengeVerificationMessageSignedPropertyNames as Lt, isLinkOfAudio as M, CommentPubsubMessageReservedFields as Mn, FailedToFetchCommentIpfsFromGatewaysError as Mr, ChallengeMessageSchema as Mt, isLinkOfImage as N, CommentPubsubMessageWithFlexibleAuthorRefinementSchema as Nn, FailedToFetchCommentUpdateFromGatewaysError as Nr, ChallengeMessageSignedPropertyNames as Nt, isIpfsPath as O, VoteTablesRowSchema as On, t$7 as Or, TimeoutError as Ot, isLinkOfMedia as P, CommentSignedPropertyNames as Pn, FailedToFetchCommunityFromGatewaysError as Pr, ChallengeRequestMessageSchema as Pt, retryKuboBlockPutPinAndProvidePubsubTopic as Q, CommentEditSignedPropertyNames as Qn, record as Qr, CommunityEditPubsubMessagePublicationSchema as Qt, isRequestPubsubPublicationOfReply as R, CommentUpdateReservedFields as Rn, messages as Rr, DecryptedChallengeAnswerSchema as Rt, hasTransientNetworkErrorCode as S, RpcRemoteCommunityUpdateEventResultSchema as Sn, e$2 as Sr, trackUpdatingComment as St, ipnsNameToIpnsOverPubsubTopic as T, VotePubsubMessagePublicationSchema as Tn, t$5 as Tr, untrackUpdatingComment as Tt, rejectWhenAbortSignalFires as U, CreateCommentOptionsWithRefinementSchema as Un, _enum as Ur, NameResolveCacheOptionsSchema as Ut, pubsubTopicToDhtKeyCid as V, CommentUpdateTableRowSchema as Vn, require_ms as Vr, DecryptedChallengeSchema as Vt, rejectWhenCommunityStopsOrAborts as W, GetPageParamSchema as Wn, array as Wr, NameResolverSerializedSchema as Wt, replaceXWithY as X, CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema as Xn, object as Xr, CommunityEditPublicationPubsubReservedFields as Xt, removeUndefinedValuesRecursively as Y, CommentEditPubsubMessagePublicationSchema as Yn, number as Yr, CommunityEditPublicationChallengeRequestToEncryptSchema as Yt, resolveWhenPredicateIsTrue as Z, CommentEditReservedFields as Zn, preprocess as Zr, CommunityEditPublicationSignedPropertyNames as Zt, genToArray as _, CreateRpcCommunityFunctionArgumentSchema as _n, t$1 as _r, listUpdatingCommunities as _t, calculateStringSizeSameAsIpfsAddCidV0Sync as a, CreateCommentModerationOptionsWithRefinementSchema as an, ChallengeAnswersSchema as ar, throwIfAbortSignalAborted as at, getIpnsRecordInLocalKuboNode as b, PageSortFileSchema as bn, t$3 as br, syncCommunityRegistryEntry as bt, contentContainsMarkdownImages as c, CommunityAnchorSchema as cn, CommunityAddressSchema as cr, withSortedKeys as ct, deepMergeRuntimeFields as d, CommunityExportRecordsSchema as dn, JsonSignatureSchema as dr, findStartedCommunity as dt, union as ei, CommentModerationChallengeRequestToEncryptSchema as en, CreateCommentEditOptionsWithRefinementSchema as er, retryKuboIpfsAddAndProvide as et, derivePublicationFromChallengeRequest as f, CommunityIpfsReservedFields as fn, PKCTimestampSchema as fr, findUpdatingComment as ft, findMalformedUnicodeString as g, CreateRemoteCommunityFunctionArgumentSchema as gn, n as gr, listUpdatingComments as gt, fetchAndValidateIpnsRecordFromGateway as h, CreateNewLocalCommunityUserOptionsSchema as hn, isStringDomain as hr, listStartedCommunities as ht, calculateStringSizeSameAsIpfsAddCidV0 as i, CommentModerationsTableRowSchema as in, AuthorReservedFields as ir, statMfsPathSafely as it, isLinkOfAnimatedImage as j, CommentIpfsSchema as jn, require_retry as jr, ChallengeAnswerMessageSignedPropertyNames as jt, isIpns as k, CommentChallengeRequestToEncryptSchema as kn, t$8 as kr, pTimeout as kt, contentContainsMarkdownVideos as l, CommunityChallengeSettingSchema as ln, CommunityAuthorChallengeReservedFieldNames as lr, withSortedKeysDeep as lt, extractNetworkErrorDetails as m, CommunitySignedPropertyNames as mn, areEquivalentNames as mr, forgetTrackedUpdatingCommunityName as mt, binaryKeyToPubsubTopic as n, en_default as ni, CommentModerationReservedFields as nn, AuthorCommentIpfsReservedFields as nr, shortifyCid as nt, calculateUnixFsDagSizeCidV0 as o, ChallengeFileFactorySchema as on, CidPathSchema as or, timestamp as ot, doesDomainAddressHaveCapitalLetter as p, CommunityIpfsSchema as pn, ProtocolVersionSchema as pr, findUpdatingCommunity as pt, removeNullUndefinedEmptyObjectsValuesRecursively as q, isReservedObjectKey as qn, literal as qr, PKCUserOptionsSchema as qt, calculateIpfsCidV0 as r, CommentModerationSignedPropertyNames as rn, AuthorPubsubSchema as rr, sleepUntilTimeoutOrAbort as rt, contentContainsMarkdownAudio as s, ChallengeFileSchema as sn, CidStringSchema as sr, waitForUpdateInCommunityInstanceWithErrorAndTimeout as st, areEquivalentCommunityAddresses as t, ZodError as ti, CommentModerationPubsubMessagePublicationSchema as tn, AuthorAddressSchema as tr, shortifyAddress as tt, createAbortError as u, CommunityEditOptionsSchema as un, CreateSignerSchema as ur, findCommunityInRegistry as ut, getEquivalentCommunityAddresses as v, ExportCommunityModLogsOptionsSchema as vn, n$3 as vr, refreshTrackedCommentAliases as vt, interruptibleSleep as w, VoteChallengeRequestToEncryptSchema as wn, r$2 as wr, untrackStartedCommunity as wt, getPostUpdateTimestampRange as x, PubsubTopicSchema as xn, e as xr, trackStartedCommunity as xt, getErrorCodeFromMessage as y, PageSortFileFactorySchema as yn, t$2 as yr, refreshTrackedCommunityAliases as yt, linkAbortSignals as z, CommentUpdateSchema as zn, logger_default as zr, DecryptedChallengeRequestPublicationSchema as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Lr as PKCError, V as pubsubTopicToDhtKeyCid, z as linkAbortSignals } from "./util-Bmd1e0QJ.js";
|
|
2
2
|
import { ipnsSelector } from "ipns/selector";
|
|
3
3
|
import { ipnsValidator } from "ipns/validator";
|
|
4
4
|
import { unmarshalIPNSRecord } from "ipns";
|
|
@@ -154,13 +154,25 @@ function waitForMeshPeer({ helia, topic, timeoutMs, abortSignal }) {
|
|
|
154
154
|
tryResolve();
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
|
-
async function connectToPubsubPeers(
|
|
157
|
+
async function connectToPubsubPeers(params) {
|
|
158
|
+
const waitLink = linkAbortSignals([params.options?.signal, params.stopSignal]);
|
|
159
|
+
try {
|
|
160
|
+
return await connectToPubsubPeersUntilSubscriber({
|
|
161
|
+
...params,
|
|
162
|
+
waitSignal: waitLink.signal
|
|
163
|
+
});
|
|
164
|
+
} finally {
|
|
165
|
+
waitLink.dispose();
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
async function connectToPubsubPeersUntilSubscriber({ helia, pubsubTopic, maxPeers, options, stopSignal, waitSignal, log }) {
|
|
169
|
+
const isAborted = () => Boolean(options?.signal?.aborted || stopSignal?.aborted);
|
|
158
170
|
const contentCid = pubsubTopicToDhtKeyCid(pubsubTopic);
|
|
159
171
|
const peersWithContent = [];
|
|
160
172
|
const connectedPeersWithContent = [];
|
|
161
173
|
const peerDialToError = {};
|
|
162
174
|
const findProvidersAbort = new AbortController();
|
|
163
|
-
const findProvidersSignal =
|
|
175
|
+
const findProvidersSignal = waitSignal ? AbortSignal.any([waitSignal, findProvidersAbort.signal]) : findProvidersAbort.signal;
|
|
164
176
|
const subscriberAppearedPromise = waitForTopicSubscriber({
|
|
165
177
|
helia,
|
|
166
178
|
topic: pubsubTopic,
|
|
@@ -184,7 +196,7 @@ async function connectToPubsubPeers({ helia, pubsubTopic, maxPeers, options, log
|
|
|
184
196
|
const retryScheduler = createAddrMergeRetryScheduler({
|
|
185
197
|
helia,
|
|
186
198
|
runRetry: async (peerId) => {
|
|
187
|
-
if (
|
|
199
|
+
if (isAborted()) return "done";
|
|
188
200
|
try {
|
|
189
201
|
const conn = await helia.libp2p.dial(peerId, dialOptions);
|
|
190
202
|
connectedPeersWithContent.push(conn);
|
|
@@ -204,7 +216,7 @@ async function connectToPubsubPeers({ helia, pubsubTopic, maxPeers, options, log
|
|
|
204
216
|
privateOnlyReleased = true;
|
|
205
217
|
clearTimeout(privateOnlyTimer);
|
|
206
218
|
for (const peer of privateOnlyPeers.splice(0)) {
|
|
207
|
-
if (
|
|
219
|
+
if (isAborted() || connectedPeersWithContent.length >= maxPeers) break;
|
|
208
220
|
startDial(peer);
|
|
209
221
|
}
|
|
210
222
|
};
|
|
@@ -288,14 +300,14 @@ async function connectToPubsubPeers({ helia, pubsubTopic, maxPeers, options, log
|
|
|
288
300
|
helia,
|
|
289
301
|
topic: pubsubTopic,
|
|
290
302
|
timeoutMs: MESH_PEER_WAIT_TIMEOUT_MS,
|
|
291
|
-
abortSignal:
|
|
303
|
+
abortSignal: waitSignal
|
|
292
304
|
});
|
|
293
305
|
const meshPeerCount = pubsub.getMeshPeers(pubsubTopic).length;
|
|
294
306
|
const waitMs = Date.now() - meshWaitStart;
|
|
295
307
|
if (meshPeerCount === 0) log.trace("Timed out waiting for mesh peers for topic", pubsubTopic, "after", waitMs, "ms");
|
|
296
308
|
else log.trace("Mesh peers count after wait", meshPeerCount, "for topic", pubsubTopic, "took", waitMs, "ms");
|
|
297
309
|
}
|
|
298
|
-
if (graftError &&
|
|
310
|
+
if (graftError && isAborted()) throw graftError;
|
|
299
311
|
if (connectedPeersWithContent.length === 0 && graftError) {
|
|
300
312
|
const error = new PKCError("ERR_FAILED_TO_DIAL_ANY_PEERS_PROVIDING_CID", {
|
|
301
313
|
contentCid,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as validatePageSortFile } from "./page-sort-scoring-
|
|
1
|
+
import { Lr as PKCError, on as ChallengeFileFactorySchema, sn as ChallengeFileSchema, yn as PageSortFileFactorySchema } from "./util-Bmd1e0QJ.js";
|
|
2
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-DK29vmN0.js";
|
|
3
3
|
//#region dist/node/validate-package-factories.js
|
|
4
4
|
function validateChallengeFileFactory(factory, { name }) {
|
|
5
5
|
try {
|
package/dist/bundled/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getShortCid, c as setNativeFunctions, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as pageSorts, t as PKC } from "./chunks/node-
|
|
1
|
+
import { a as getShortCid, c as setNativeFunctions, i as getShortAddress, n as challenges, o as nativeFunctions, r as createAnchorIpnsRecord, s as pageSorts, t as PKC } from "./chunks/node-Br5aH83u.js";
|
|
2
2
|
export { challenges, createAnchorIpnsRecord, PKC as default, getShortAddress, getShortCid, nativeFunctions, pageSorts, setNativeFunctions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as validatePageSortFileFactory } from "./chunks/validate-package-factories-
|
|
1
|
+
import { n as validatePageSortFileFactory } from "./chunks/validate-package-factories-evt2DaRs.js";
|
|
2
2
|
export { validatePageSortFileFactory };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { S as parseRpcUnsubscribeParam, _ as parseRpcExportCommunityParam, b as parseRpcPublishChallengeAnswersParam, d as parseRpcCidParam, f as parseRpcCommentRepliesPageParam, g as parseRpcExportCommunityModLogsParam, h as parseRpcEditCommunityParam, l as parseRpcAuthorNameParam, m as parseRpcCommunityPageParam, p as parseRpcCommunityIdentifierParam, t as PKC, u as parseRpcCancelExportParam, v as parseRpcFetchCommunityListParam, x as parseRpcPublishCommunityListParam, y as parseRpcPublishAnchorRecordParam } from "../../chunks/node-
|
|
3
|
-
import { Br as t$1, Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Er as listCommunitiesSync, Ir as toCommunitiesWireEntry, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pRetry, Vn as verifyCommunityList, W as pLimit, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, at as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, br as findLocalCommunityAddress, bt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, mt as parseCommunityListSchemaWithPKCErrorIfItFails, nt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, qr as stringify, sn as require_lib, tt as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-
|
|
4
|
-
import { t as LocalCommunity } from "../../chunks/local-community-
|
|
1
|
+
import { C as hideClassPrivateProps, Lr as PKCError, X as replaceXWithY, br as t, dt as findStartedCommunity, et as retryKuboIpfsAddAndProvide, i as calculateStringSizeSameAsIpfsAddCidV0, kt as pTimeout, vr as n, zr as logger_default } from "../../chunks/util-Bmd1e0QJ.js";
|
|
2
|
+
import { S as parseRpcUnsubscribeParam, _ as parseRpcExportCommunityParam, b as parseRpcPublishChallengeAnswersParam, d as parseRpcCidParam, f as parseRpcCommentRepliesPageParam, g as parseRpcExportCommunityModLogsParam, h as parseRpcEditCommunityParam, l as parseRpcAuthorNameParam, m as parseRpcCommunityPageParam, p as parseRpcCommunityIdentifierParam, t as PKC, u as parseRpcCancelExportParam, v as parseRpcFetchCommunityListParam, x as parseRpcPublishCommunityListParam, y as parseRpcPublishAnchorRecordParam } from "../../chunks/node-Br5aH83u.js";
|
|
3
|
+
import { Br as t$1, Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Er as listCommunitiesSync, Ir as toCommunitiesWireEntry, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pRetry, Vn as verifyCommunityList, W as pLimit, Xn as MAX_COMMUNITY_LIST_SIZE_BYTES, at as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, br as findLocalCommunityAddress, bt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, dt as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, mt as parseCommunityListSchemaWithPKCErrorIfItFails, nt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, qr as stringify, sn as require_lib, tt as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-Cfc2G6NP.js";
|
|
4
|
+
import { t as LocalCommunity } from "../../chunks/local-community-k_ETfr57.js";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import assert from "assert";
|
package/dist/node/errors.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export declare enum messages {
|
|
|
29
29
|
ERR_PUBSUB_TOPIC_PEER_WAIT_ABORTED = "Aborted while waiting for a peer to subscribe to a pubsub topic",
|
|
30
30
|
ERR_IPNS_DIRECT_FETCH_ABORTED = "Aborted while fetching an IPNS record directly from subscribers/providers",
|
|
31
31
|
ERR_TIMED_OUT_RM_MFS_FILE = "Timed out removing MFS paths",
|
|
32
|
+
ERR_POST_UPDATES_BUCKET_SWAP_WAS_LOST = "Kubo reported the postUpdates bucket as swapped into MFS, but the bucket MFS holds does not link the posts' new CommentUpdate files",
|
|
32
33
|
ERR_ABORTED_RESOLVING_TEXT_RECORD = "Aborted resolving text record on domain",
|
|
33
34
|
ERR_CALLED_COMMUNITY_STOP_WITHOUT_UPDATE = "community.stop() called without calling update() first",
|
|
34
35
|
ERR_PKC_MISSING_NATIVE_FUNCTIONS = "missing nativeFunctions required to create a community",
|
package/dist/node/errors.js
CHANGED
|
@@ -30,6 +30,7 @@ export var messages;
|
|
|
30
30
|
messages["ERR_PUBSUB_TOPIC_PEER_WAIT_ABORTED"] = "Aborted while waiting for a peer to subscribe to a pubsub topic";
|
|
31
31
|
messages["ERR_IPNS_DIRECT_FETCH_ABORTED"] = "Aborted while fetching an IPNS record directly from subscribers/providers";
|
|
32
32
|
messages["ERR_TIMED_OUT_RM_MFS_FILE"] = "Timed out removing MFS paths";
|
|
33
|
+
messages["ERR_POST_UPDATES_BUCKET_SWAP_WAS_LOST"] = "Kubo reported the postUpdates bucket as swapped into MFS, but the bucket MFS holds does not link the posts' new CommentUpdate files";
|
|
33
34
|
messages["ERR_ABORTED_RESOLVING_TEXT_RECORD"] = "Aborted resolving text record on domain";
|
|
34
35
|
// PKC errors
|
|
35
36
|
messages["ERR_CALLED_COMMUNITY_STOP_WITHOUT_UPDATE"] = "community.stop() called without calling update() first";
|