@pkcprotocol/pkc-js 0.0.154 → 0.0.156
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/README.md +2 -2
- package/dist/browser/clients/rpc-client/schema.js +2 -2
- package/dist/browser/clients/rpc-client/schema.js.map +1 -1
- package/dist/browser/community/remote-community.js +8 -2
- package/dist/browser/community/remote-community.js.map +1 -1
- package/dist/browser/community/schema.js +4 -0
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/community-list/community-list.js +3 -2
- package/dist/browser/community-list/community-list.js.map +1 -1
- package/dist/browser/errors.d.ts +14 -0
- package/dist/browser/errors.js +14 -0
- package/dist/browser/errors.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/pkc/pkc.js +13 -4
- package/dist/browser/pkc/pkc.js.map +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment.js +25 -9
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/publications/comment/crosspost-runtime.js +10 -2
- package/dist/browser/publications/comment/crosspost-runtime.js.map +1 -1
- package/dist/browser/publications/comment/schema.d.ts +1 -1
- package/dist/browser/publications/comment/schema.js +30 -1
- package/dist/browser/publications/comment/schema.js.map +1 -1
- package/dist/browser/publications/publication.d.ts +4 -0
- package/dist/browser/publications/publication.js +135 -38
- package/dist/browser/publications/publication.js.map +1 -1
- package/dist/browser/rpc/src/index.js +3 -3
- package/dist/browser/rpc/src/index.js.map +1 -1
- package/dist/browser/runtime/browser/util.d.ts +3 -1
- package/dist/browser/runtime/browser/util.js +8 -2
- package/dist/browser/runtime/browser/util.js.map +1 -1
- package/dist/browser/runtime/node/blockstore.d.ts +2 -2
- package/dist/browser/runtime/node/blockstore.js +2 -2
- package/dist/browser/runtime/node/community/challenges/validate-challenge-result.js +2 -1
- package/dist/browser/runtime/node/community/challenges/validate-challenge-result.js.map +1 -1
- package/dist/browser/runtime/node/community/communities-registry.d.ts +96 -0
- package/dist/browser/runtime/node/community/communities-registry.js +964 -0
- package/dist/browser/runtime/node/community/communities-registry.js.map +1 -0
- package/dist/browser/runtime/node/community/db-handler.d.ts +3 -0
- package/dist/browser/runtime/node/community/db-handler.js +82 -35
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/editing.js +16 -8
- package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/lifecycle.js +68 -19
- package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.d.ts +1 -2
- package/dist/browser/runtime/node/community/local-community/publication-validation.js +23 -0
- package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community.d.ts +2 -1
- package/dist/browser/runtime/node/community/local-community.js +5 -9
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/browser/runtime/node/community/pkc-instance-lock.d.ts +17 -0
- package/dist/browser/runtime/node/community/pkc-instance-lock.js +142 -0
- package/dist/browser/runtime/node/community/pkc-instance-lock.js.map +1 -0
- package/dist/browser/runtime/node/storage.js +5 -0
- package/dist/browser/runtime/node/storage.js.map +1 -1
- package/dist/browser/runtime/node/util.d.ts +4 -6
- package/dist/browser/runtime/node/util.js +32 -278
- package/dist/browser/runtime/node/util.js.map +1 -1
- package/dist/browser/schema/schema-util.js +18 -4
- package/dist/browser/schema/schema-util.js.map +1 -1
- package/dist/browser/signer/author-wallet-proof.d.ts +19 -0
- package/dist/browser/signer/author-wallet-proof.js +89 -0
- package/dist/browser/signer/author-wallet-proof.js.map +1 -0
- package/dist/browser/signer/signatures.js +29 -0
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/browser/test/test-util.d.ts +12 -0
- package/dist/browser/test/test-util.js +23 -0
- package/dist/browser/test/test-util.js.map +1 -1
- package/dist/browser/unknown-props.d.ts +24 -0
- package/dist/browser/unknown-props.js +95 -0
- package/dist/browser/unknown-props.js.map +1 -0
- package/dist/browser/util.js +7 -0
- package/dist/browser/util.js.map +1 -1
- package/dist/browser/version.js +1 -1
- package/dist/bundled/bundle-manifest.json +66 -59
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-CG9YohPs.js → helia-for-pkc-CceaAEzV.js} +4 -4
- package/dist/bundled/chunks/{local-community-V8_VyEhO.js → local-community-BzZbcwm-.js} +128 -57
- package/dist/bundled/chunks/{local-community-CaQmhX8D.js → local-community-C8Qwak8F.js} +1 -1
- package/dist/bundled/chunks/{node-c4vpD2VN.js → node-CleFjKjX.js} +161 -49
- package/dist/bundled/chunks/{page-sort-scoring-d1frahfd.js → page-sort-scoring-BAl6dNeR.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-DDAibWpE.js → rpc-local-community-CW6GnMsd.js} +4482 -1673
- package/dist/bundled/chunks/{util-BwEIge-b.js → util-C0MpIK71.js} +62 -16
- package/dist/bundled/chunks/{util-B_dKP7Te.js → util-C29b1mlK.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-DfpNf4oq.js → validate-package-factories-CAwF_8n6.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 +5 -6
- package/dist/node/clients/rpc-client/schema.js +2 -2
- package/dist/node/clients/rpc-client/schema.js.map +1 -1
- package/dist/node/community/remote-community.js +8 -2
- package/dist/node/community/remote-community.js.map +1 -1
- package/dist/node/community/schema.js +4 -0
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/community-list/community-list.js +3 -2
- package/dist/node/community-list/community-list.js.map +1 -1
- package/dist/node/errors.d.ts +14 -0
- package/dist/node/errors.js +14 -0
- package/dist/node/errors.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/pkc/pkc.js +13 -4
- package/dist/node/pkc/pkc.js.map +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment.js +25 -9
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/publications/comment/crosspost-runtime.js +10 -2
- package/dist/node/publications/comment/crosspost-runtime.js.map +1 -1
- package/dist/node/publications/comment/schema.d.ts +1 -1
- package/dist/node/publications/comment/schema.js +30 -1
- package/dist/node/publications/comment/schema.js.map +1 -1
- package/dist/node/publications/publication.d.ts +4 -0
- package/dist/node/publications/publication.js +135 -38
- package/dist/node/publications/publication.js.map +1 -1
- package/dist/node/rpc/src/index.js +3 -3
- package/dist/node/rpc/src/index.js.map +1 -1
- package/dist/node/runtime/browser/util.d.ts +3 -1
- package/dist/node/runtime/browser/util.js +8 -2
- package/dist/node/runtime/browser/util.js.map +1 -1
- package/dist/node/runtime/node/blockstore.d.ts +2 -2
- package/dist/node/runtime/node/blockstore.js +2 -2
- package/dist/node/runtime/node/community/challenges/validate-challenge-result.js +2 -1
- package/dist/node/runtime/node/community/challenges/validate-challenge-result.js.map +1 -1
- package/dist/node/runtime/node/community/communities-registry.d.ts +96 -0
- package/dist/node/runtime/node/community/communities-registry.js +964 -0
- package/dist/node/runtime/node/community/communities-registry.js.map +1 -0
- package/dist/node/runtime/node/community/db-handler.d.ts +3 -0
- package/dist/node/runtime/node/community/db-handler.js +82 -35
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/editing.js +16 -8
- package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/lifecycle.js +68 -19
- package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.d.ts +1 -2
- package/dist/node/runtime/node/community/local-community/publication-validation.js +23 -0
- package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/node/runtime/node/community/local-community.d.ts +2 -1
- package/dist/node/runtime/node/community/local-community.js +5 -9
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/runtime/node/community/pkc-instance-lock.d.ts +17 -0
- package/dist/node/runtime/node/community/pkc-instance-lock.js +142 -0
- package/dist/node/runtime/node/community/pkc-instance-lock.js.map +1 -0
- package/dist/node/runtime/node/storage.js +5 -0
- package/dist/node/runtime/node/storage.js.map +1 -1
- package/dist/node/runtime/node/util.d.ts +4 -6
- package/dist/node/runtime/node/util.js +32 -278
- package/dist/node/runtime/node/util.js.map +1 -1
- package/dist/node/schema/schema-util.js +18 -4
- package/dist/node/schema/schema-util.js.map +1 -1
- package/dist/node/signer/author-wallet-proof.d.ts +19 -0
- package/dist/node/signer/author-wallet-proof.js +89 -0
- package/dist/node/signer/author-wallet-proof.js.map +1 -0
- package/dist/node/signer/signatures.js +29 -0
- package/dist/node/signer/signatures.js.map +1 -1
- package/dist/node/test/test-util.d.ts +12 -0
- package/dist/node/test/test-util.js +23 -0
- package/dist/node/test/test-util.js.map +1 -1
- package/dist/node/unknown-props.d.ts +24 -0
- package/dist/node/unknown-props.js +95 -0
- package/dist/node/unknown-props.js.map +1 -0
- package/dist/node/util.js +7 -0
- package/dist/node/util.js.map +1 -1
- package/dist/node/version.js +1 -1
- package/package.json +3 -2
- package/dist/browser/runtime/node/community/start-lock.d.ts +0 -17
- package/dist/browser/runtime/node/community/start-lock.js +0 -161
- package/dist/browser/runtime/node/community/start-lock.js.map +0 -1
- package/dist/node/runtime/node/community/start-lock.d.ts +0 -17
- package/dist/node/runtime/node/community/start-lock.js +0 -161
- package/dist/node/runtime/node/community/start-lock.js.map +0 -1
|
@@ -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 ChallengeAnswerMessageSchema, C as hideClassPrivateProps, D as isIpfsCid, Dt as require_sha256, E as isAbortError,
|
|
3
|
-
import { $
|
|
4
|
-
import { s as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $ as retryKuboIpfsAdd, At as ChallengeAnswerMessageSchema, Br as messages, C as hideClassPrivateProps, Cr as e, D as isIpfsCid, Dt as require_sha256, E as isAbortError, Er as r, Et as untrackUpdatingCommunity, Fr as FailedToFetchCommentUpdateFromGatewaysError, In as CommentUpdateForChallengeVerificationSchema, It as ChallengeVerificationMessageSchema, Jt as version_default, Mt as ChallengeMessageSchema, Nr as require_retry$1, Ot as TimeoutError, Pr as FailedToFetchCommentIpfsFromGatewaysError, Pt as ChallengeRequestMessageSchema, Rr as FailedToFetchPageIpfsFromGatewaysError, Sr as t$1, St as trackUpdatingComment, T as ipnsNameToIpnsOverPubsubTopic, Tt as untrackUpdatingComment, U as rejectWhenAbortSignalFires, Vr as logger_default, W as rejectWhenCommunityStopsOrAborts, Wr as setErrorMap, X as replaceXWithY, Y as removeUndefinedValuesRecursively, Z as resolveWhenPredicateIsTrue, _t as listUpdatingCommunities, a as calculateStringSizeSameAsIpfsAddCidV0Sync, at as throwIfAbortSignalAborted, br as n$1, cn as CommunityAnchorSchema, d as deepMergeRuntimeFields, dt as findStartedCommunity, et as retryKuboIpfsAddAndProvide, ft as findUpdatingComment, gr as isStringDomain, gt as listUpdatingComments, ht as listStartedCommunities, i as calculateStringSizeSameAsIpfsAddCidV0, ii as en_default, jn as CommentIpfsSchema, k as isIpns, kt as pTimeout, 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$2, vt as refreshTrackedCommentAliases, wr as e$1, x as getPostUpdateTimestampRange, xn as PubsubTopicSchema, z as linkAbortSignals, zn as CommentUpdateSchema, zr as PKCError } from "./util-C0MpIK71.js";
|
|
3
|
+
import { $r as t$2, $t as RpcPublishCommunityListParamSchema, A as findCommentInParsedPages, An as signVote, At as parseRpcCommentUpdateEventWithPKCErrorIfItFails, B as GenericStateClient, Br as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Bt as RpcCommunityIdentifierParamSchema, C as RepliesPages, Cn as signCommentEdit, Ct as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, D as extractCommunityRuntimeFieldsFromParsedPages, Dt as parseJsonWithPKCErrorIfFails, Er as findLocalCommunityAddress, Et as parseDecryptedChallengeWithPKCErrorIfItFails, F as cloneCrosspostForRuntime, Fn as verifyCommentEdit, Ft as RpcAuthorNameParamSchema, G as PKCTypedEmitter, Gr as toCommunitiesEntry, Gt as RpcExportCommunityParamSchema, H as InflightResourceTypes, Hn as verifyCommunityList, Ht as RpcEditCommunityParamSchema, I as collectCrosspostAuthorsToResolve, In as verifyCommentIpfs, Ir as registerLocalCommunity, It as RpcCancelExportParamSchema, J as decodeRpcChallengeRequestPubsubMsg, Jn as buildRuntimeAuthor, Jt as RpcFetchCidResultSchema, K as decodeRpcChallengeAnswerPubsubMsg, Kn as mergeAuthorProps, Kt as RpcExportCommunityResultSchema, Ln as verifyCommentModeration, Lt as RpcCidParamSchema, M as parseRawPages, Mn as verifyChallengeMessage, Mr as isLocalCommunityAddress, Nr as markLocalCommunityDbAsBeingWritten, Nt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, O as findCommentInPageInstance, On as signCommunityEdit, Ot as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, P as applyNameResolvedCacheToCrosspost, Pn as verifyChallengeVerification, Pr as monitorCommunitiesDirectory, Pt as RpcAnchorPublishPreparationResultSchema, Qn as normalizeCreatePublicationAuthor, Qt as RpcPublishChallengeAnswersParamSchema, R as stripNameResolvedFromCrosspost, Rn as verifyCommentPubsubMessage, Rt as RpcCommentRepliesPageParamSchema, Sn as signComment, St as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, Tt as parseDecryptedChallengeVerification, Un as verifyVote, Ut as RpcExportCommunityModLogsParamSchema, V as InflightFetchManager, Vn as verifyCommunityEdit, Vt as RpcCommunityPageParamSchema, Wn as assignUnknownProps, Wr as findCommunitiesEntry, Wt as RpcExportCommunityModLogsResultSchema, Xn as getAuthorNameFromRuntime, Xr as t$3, Xt as RpcFetchCommunityListResultSchema, Y as decodeRpcChallengeVerificationPubsubMsg, Yn as cleanWireAuthor, Yt as RpcFetchCommunityListParamSchema, Zn as getAuthorNameFromWire, Zr as n$3, Zt as RpcPublishAnchorRecordParamSchema, _n as cleanUpBeforePublishing, _t as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, an as RpcUnsubscribeParamSchema, ar as buildRuntimeCommunityFields, b as KeyvBetterSqlite3, bn as signChallengeRequest, cn as require_lib$1, cr as getCommunityPublicKeyFromWire, ct as parseCommentUpdateSchemaWithPKCErrorIfItFails, dn as createAnchorIpnsRecord$1, ei as t$4, en as RpcPublishCommunityListResultSchema, er as CreateCommunityListWithCidOptionsSchema, et as parseCidStringSchemaWithPKCErrorIfItFails, fn as decryptEd25519AesGcm, fr as getBufferedPKCAddressFromPublicKey, ft as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, gt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, hr as getPKCAddressFromPublicKeySync, ht as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, ii as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, in as RpcSuccessResultSchema, it as parseCommentIpfsSchemaWithPKCErrorIfItFails, jt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as signCommunityList, kr as getDefaultDataPath, kt as parseRpcCommentEventWithPKCErrorIfItFails, l as pkcJsPageSorts, lr as normalizeCommunityInputFromCommunity, lt as parseCommunityAddressWithPKCErrorIfItFails, m as pkcJsChallenges, mn as encryptEd25519AesGcm, mt as parseCommunityListSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, ni as NAME_RESOLVED_FALSE_TTL_MS, nn as RpcResolveAuthorNameResultSchema, nr as MAX_COMMUNITY_LIST_SIZE_BYTES, on as findCommunityRecordNameMismatch, or as getCommunityAddressFromRecord, ot as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, q as decodeRpcChallengePubsubMsg, qn as withoutForbiddenKeys, qr as t$5, qt as RpcFetchCidParamSchema, ri as NAME_RESOLVED_TRUE_TTL_MS, rn as RpcSubscriptionIdResultSchema, rt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, si as nativeFunctions$2, sn as verifyAuthorWalletEntry, sr as getCommunityNameFromWire, st as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, t as RpcLocalCommunity, ti as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, tn as RpcPublishedAnchorRecordResultSchema, tr as CreateNewCommunityListOptionsSchema, un as createSigner, ur as decode, v as TrackedInstanceRegistry, vn as signChallengeAnswer, vt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, wn as signCommentModeration, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, x as RemoteCommunity, xr as createKuboRpcClient, xt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, y as LRUCache, z as PKCClientsManager, zn as verifyCommentUpdate, zr as setNativeFunctions$1, zt as RpcCommunitiesChangeEventResultSchema } from "./rpc-local-community-CW6GnMsd.js";
|
|
4
|
+
import { s as getHeliaDebugContext } from "./util-C29b1mlK.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -27382,7 +27382,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27382
27382
|
this._updatePublishingStateWithEmission("stopped");
|
|
27383
27383
|
this._setStateWithEmission("stopped");
|
|
27384
27384
|
this._initClients();
|
|
27385
|
-
this._handleChallengeExchange = this._handleChallengeExchange.bind(this);
|
|
27385
|
+
this._handleChallengeExchange = this._guardDetachedHandler("_handleChallengeExchange", this._handleChallengeExchange.bind(this));
|
|
27386
27386
|
this.publish = this.publish.bind(this);
|
|
27387
27387
|
this.on("error", (...args) => this.listenerCount("error") === 1 && this._pkc.emit("error", ...args));
|
|
27388
27388
|
this._publishToDifferentProviderThresholdSeconds = 10;
|
|
@@ -27409,10 +27409,16 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27409
27409
|
author: props.author,
|
|
27410
27410
|
signaturePublicKey: props.signature.publicKey
|
|
27411
27411
|
});
|
|
27412
|
-
|
|
27413
|
-
|
|
27414
|
-
|
|
27415
|
-
|
|
27412
|
+
const author = {};
|
|
27413
|
+
const { skipped } = mergeAuthorProps({
|
|
27414
|
+
target: author,
|
|
27415
|
+
props: {
|
|
27416
|
+
...runtimeAuthor,
|
|
27417
|
+
shortAddress: shortifyAddress(runtimeAuthor.address)
|
|
27418
|
+
}
|
|
27419
|
+
});
|
|
27420
|
+
if (skipped.length > 0) logger_default("pkc-js:publication:_initAuthor").error("Refused author props of a record that collide with an object", skipped);
|
|
27421
|
+
this.author = author;
|
|
27416
27422
|
this.protocolVersion = props.protocolVersion;
|
|
27417
27423
|
}
|
|
27418
27424
|
_initUnsignedLocalProps(opts) {
|
|
@@ -27497,18 +27503,21 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27497
27503
|
await this._tearDownThenWriteFailure(e);
|
|
27498
27504
|
return;
|
|
27499
27505
|
}
|
|
27500
|
-
|
|
27501
|
-
|
|
27502
|
-
|
|
27503
|
-
|
|
27504
|
-
|
|
27505
|
-
|
|
27506
|
-
|
|
27507
|
-
|
|
27508
|
-
|
|
27509
|
-
|
|
27510
|
-
|
|
27511
|
-
|
|
27506
|
+
try {
|
|
27507
|
+
if (this instanceof Comment && runtimeFields) deepMergeRuntimeFields(this, runtimeFields);
|
|
27508
|
+
this._setRpcClientState("stopped");
|
|
27509
|
+
const newPublishingState = verification.challengeSuccess ? "succeeded" : "failed";
|
|
27510
|
+
this._changePublicationStateEmitEventEmitStateChangeEvent({
|
|
27511
|
+
newPublishingState,
|
|
27512
|
+
newState: "stopped",
|
|
27513
|
+
event: {
|
|
27514
|
+
name: "challengeverification",
|
|
27515
|
+
args: [verification, this instanceof Comment && verification.comment ? this : void 0]
|
|
27516
|
+
}
|
|
27517
|
+
});
|
|
27518
|
+
} finally {
|
|
27519
|
+
await this._tearDownWithoutThrowing();
|
|
27520
|
+
}
|
|
27512
27521
|
}
|
|
27513
27522
|
async _handleIncomingChallengePubsubMessage(msg) {
|
|
27514
27523
|
const log = logger_default("pkc-js:publication:_handleIncomingChallengePubsubMessage");
|
|
@@ -27677,16 +27686,19 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27677
27686
|
}
|
|
27678
27687
|
log("Updated the props of this instance with challengeverification.encrypted");
|
|
27679
27688
|
}
|
|
27680
|
-
|
|
27681
|
-
|
|
27682
|
-
|
|
27683
|
-
|
|
27684
|
-
|
|
27685
|
-
|
|
27686
|
-
|
|
27687
|
-
|
|
27688
|
-
|
|
27689
|
-
|
|
27689
|
+
try {
|
|
27690
|
+
Object.values(this._challengeExchanges).forEach((exchange) => this._updatePubsubState("stopped", exchange.providerUrl));
|
|
27691
|
+
this._changePublicationStateEmitEventEmitStateChangeEvent({
|
|
27692
|
+
newPublishingState,
|
|
27693
|
+
newState: "stopped",
|
|
27694
|
+
event: {
|
|
27695
|
+
name: "challengeverification",
|
|
27696
|
+
args: [challengeVerificationMsg, this instanceof Comment && decryptedChallengeVerification ? this : void 0]
|
|
27697
|
+
}
|
|
27698
|
+
});
|
|
27699
|
+
} finally {
|
|
27700
|
+
await this._tearDownWithoutThrowing();
|
|
27701
|
+
}
|
|
27690
27702
|
}
|
|
27691
27703
|
async _endExchangeWithUnreadableChallengeVerification({ verification, error }) {
|
|
27692
27704
|
const exchange = this._challengeExchanges[verification.challengeRequestId.toString()];
|
|
@@ -27714,7 +27726,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27714
27726
|
return writeFailure();
|
|
27715
27727
|
}
|
|
27716
27728
|
async _tearDownThenWriteFailure(error) {
|
|
27717
|
-
await this.
|
|
27729
|
+
await this._tearDownWithoutThrowing();
|
|
27718
27730
|
this._changePublicationStateEmitEventEmitStateChangeEvent({
|
|
27719
27731
|
newPublishingState: "failed",
|
|
27720
27732
|
event: {
|
|
@@ -27875,6 +27887,27 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
27875
27887
|
communityAddress: this.communityAddress
|
|
27876
27888
|
});
|
|
27877
27889
|
}
|
|
27890
|
+
_validateAuthorWalletProofs() {
|
|
27891
|
+
const signed = this.raw.pubsubMessageToPublish;
|
|
27892
|
+
const wallets = signed?.author?.wallets;
|
|
27893
|
+
if (!wallets || !signed?.signature?.publicKey) return;
|
|
27894
|
+
const authorPublicKey = getPKCAddressFromPublicKeySync(signed.signature.publicKey);
|
|
27895
|
+
for (const [chainTicker, entry] of Object.entries(wallets)) {
|
|
27896
|
+
const result = verifyAuthorWalletEntry({
|
|
27897
|
+
entry,
|
|
27898
|
+
authorPublicKey,
|
|
27899
|
+
nowSeconds: timestamp()
|
|
27900
|
+
});
|
|
27901
|
+
if (result.outcome === "invalid") {
|
|
27902
|
+
if (this.state === "publishing") this._setStateWithEmission("stopped");
|
|
27903
|
+
throw new PKCError("ERR_AUTHOR_WALLET_PROOF_IS_INVALID", {
|
|
27904
|
+
chainTicker,
|
|
27905
|
+
reason: result.reason,
|
|
27906
|
+
entry
|
|
27907
|
+
});
|
|
27908
|
+
}
|
|
27909
|
+
}
|
|
27910
|
+
}
|
|
27878
27911
|
_validateCommunityFields() {
|
|
27879
27912
|
if (typeof this._community?.encryption?.publicKey !== "string") throw new PKCError("ERR_COMMUNITY_MISSING_FIELD", { communityPublicKey: this._community?.encryption?.publicKey });
|
|
27880
27913
|
}
|
|
@@ -28065,6 +28098,50 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
28065
28098
|
if (refresh) refresh.finally(() => this._pkc._publishingPublications.delete(this));
|
|
28066
28099
|
else this._pkc._publishingPublications.delete(this);
|
|
28067
28100
|
}
|
|
28101
|
+
_guardDetachedHandler(entryPoint, handler) {
|
|
28102
|
+
return async (...args) => {
|
|
28103
|
+
try {
|
|
28104
|
+
await handler(...args);
|
|
28105
|
+
} catch (e) {
|
|
28106
|
+
await this._endPublicationAfterDetachedFailure(entryPoint, e);
|
|
28107
|
+
}
|
|
28108
|
+
};
|
|
28109
|
+
}
|
|
28110
|
+
async _endPublicationAfterDetachedFailure(entryPoint, cause) {
|
|
28111
|
+
const log = logger_default("pkc-js:publication:_endPublicationAfterDetachedFailure");
|
|
28112
|
+
log.error(`Handler ${entryPoint} of a publication threw`, cause);
|
|
28113
|
+
const error = new PKCError("ERR_PUBLICATION_INTERNAL_ERROR", {
|
|
28114
|
+
entryPoint,
|
|
28115
|
+
cause
|
|
28116
|
+
});
|
|
28117
|
+
const endedBefore = this._publishEndedBy;
|
|
28118
|
+
const failsThePublication = this._claimPublishEnd("failure");
|
|
28119
|
+
try {
|
|
28120
|
+
if (failsThePublication) {
|
|
28121
|
+
try {
|
|
28122
|
+
await this._postSucessOrFailurePublishing();
|
|
28123
|
+
} catch (teardownError) {
|
|
28124
|
+
log.error(`Teardown after the failure of ${entryPoint} threw as well`, teardownError);
|
|
28125
|
+
}
|
|
28126
|
+
this._changePublicationStateEmitEventEmitStateChangeEvent({
|
|
28127
|
+
newPublishingState: "failed",
|
|
28128
|
+
event: {
|
|
28129
|
+
name: "error",
|
|
28130
|
+
args: [error]
|
|
28131
|
+
}
|
|
28132
|
+
});
|
|
28133
|
+
} else if (endedBefore !== "stop") this.emit("error", error);
|
|
28134
|
+
} catch (emitError) {
|
|
28135
|
+
log.error(`Could not report the failure of ${entryPoint}`, emitError);
|
|
28136
|
+
}
|
|
28137
|
+
}
|
|
28138
|
+
async _tearDownWithoutThrowing() {
|
|
28139
|
+
try {
|
|
28140
|
+
await this._postSucessOrFailurePublishing();
|
|
28141
|
+
} catch (teardownError) {
|
|
28142
|
+
logger_default("pkc-js:publication:_tearDownWithoutThrowing").error("The teardown that ends the publish threw", teardownError);
|
|
28143
|
+
}
|
|
28144
|
+
}
|
|
28068
28145
|
async _postSucessOrFailurePublishing() {
|
|
28069
28146
|
const log = logger_default("pkc-js:publication:_postSucessOrFailurePublishing");
|
|
28070
28147
|
this._publishRunAbortController?.abort();
|
|
@@ -28182,7 +28259,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
28182
28259
|
rpcClient.attachSubscriptionHandlersDeferred({
|
|
28183
28260
|
subscriptionId,
|
|
28184
28261
|
isStale: () => this._rpcPublishSubscriptionId !== subscriptionId,
|
|
28185
|
-
attach: (subscription) => subscription.on("challengerequest", unlessStopped(this._handleIncomingChallengeRequestFromRpc.bind(this))).on("challenge", unlessStopped(this._handleIncomingChallengeFromRpc.bind(this))).on("challengeanswer", unlessStopped(this._handleIncomingChallengeAnswerFromRpc.bind(this))).on("challengeverification", unlessStopped(this._handleIncomingChallengeVerificationFromRpc.bind(this))).on("publishingstatechange", unlessStopped(this._handleIncomingPublishingStateFromRpc.bind(this))).on("statechange", unlessStopped(this._handleIncomingStateFromRpc.bind(this))).on("error", unlessStopped(this._handleIncomingErrorFromRpc.bind(this))),
|
|
28262
|
+
attach: (subscription) => subscription.on("challengerequest", unlessStopped(this._guardDetachedHandler("_handleIncomingChallengeRequestFromRpc", this._handleIncomingChallengeRequestFromRpc.bind(this)))).on("challenge", unlessStopped(this._guardDetachedHandler("_handleIncomingChallengeFromRpc", this._handleIncomingChallengeFromRpc.bind(this)))).on("challengeanswer", unlessStopped(this._guardDetachedHandler("_handleIncomingChallengeAnswerFromRpc", this._handleIncomingChallengeAnswerFromRpc.bind(this)))).on("challengeverification", unlessStopped(this._guardDetachedHandler("_handleIncomingChallengeVerificationFromRpc", this._handleIncomingChallengeVerificationFromRpc.bind(this)))).on("publishingstatechange", unlessStopped(this._guardDetachedHandler("_handleIncomingPublishingStateFromRpc", this._handleIncomingPublishingStateFromRpc.bind(this)))).on("statechange", unlessStopped(this._guardDetachedHandler("_handleIncomingStateFromRpc", this._handleIncomingStateFromRpc.bind(this)))).on("error", unlessStopped(this._guardDetachedHandler("_handleIncomingErrorFromRpc", this._handleIncomingErrorFromRpc.bind(this)))),
|
|
28186
28263
|
replayErrorContainment: {
|
|
28187
28264
|
entityName: "publication",
|
|
28188
28265
|
log: logger_default("pkc-js:publication:publish:_publishWithRpc"),
|
|
@@ -28394,24 +28471,24 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
28394
28471
|
this._publishingToLocalCommunity = community;
|
|
28395
28472
|
const log = logger_default("pkc-js:publication:publish:_publishWithLocalCommunity");
|
|
28396
28473
|
log("Community is local, will not publish over pubsub, and instead will publish directly to the community by accessing pkc._startedCommunities");
|
|
28397
|
-
const communityChallengeListener = async (challenge) => {
|
|
28474
|
+
const communityChallengeListener = this._guardDetachedHandler("communityChallengeListener", async (challenge) => {
|
|
28398
28475
|
if (this._hasPublishEnded()) return;
|
|
28399
28476
|
if (challenge.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
28400
28477
|
const encryptedFields = ["challenges"];
|
|
28401
28478
|
log("Received a challenge from the local community", challenge);
|
|
28402
28479
|
await this._handleIncomingChallengePubsubMessage(n$1(challenge, encryptedFields));
|
|
28403
28480
|
}
|
|
28404
|
-
};
|
|
28481
|
+
});
|
|
28405
28482
|
community.on("challenge", communityChallengeListener);
|
|
28406
28483
|
let verificationHandling;
|
|
28407
|
-
const communityChallengeVerificationListener = async (decryptedChallengeVerification) => {
|
|
28484
|
+
const communityChallengeVerificationListener = this._guardDetachedHandler("communityChallengeVerificationListener", async (decryptedChallengeVerification) => {
|
|
28408
28485
|
if (this._hasPublishEnded()) return;
|
|
28409
28486
|
if (decryptedChallengeVerification.challengeRequestId.toString() === challengeRequest.challengeRequestId.toString()) {
|
|
28410
28487
|
log("Received a challenge verification from the local community", decryptedChallengeVerification);
|
|
28411
28488
|
verificationHandling = this._handleIncomingChallengeVerificationPubsubMessage(n$1(decryptedChallengeVerification, ["comment", "commentUpdate"]));
|
|
28412
28489
|
await verificationHandling;
|
|
28413
28490
|
}
|
|
28414
|
-
};
|
|
28491
|
+
});
|
|
28415
28492
|
community.on("challengeverification", communityChallengeVerificationListener);
|
|
28416
28493
|
this.emit("challengerequest", challengeRequest);
|
|
28417
28494
|
community.handleChallengeRequest(challengeRequest, true).then(() => {
|
|
@@ -28478,6 +28555,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
28478
28555
|
await this._signPublicationWithCommunityFields();
|
|
28479
28556
|
}
|
|
28480
28557
|
await this._validateSignatureHook();
|
|
28558
|
+
this._validateAuthorWalletProofs();
|
|
28481
28559
|
if (this._hasPublishEnded()) return;
|
|
28482
28560
|
this._isPublishSpent = true;
|
|
28483
28561
|
if (this._pkc._pkcRpcClient) return this._publishWithRpc();
|
|
@@ -28567,6 +28645,7 @@ var Publication = class extends import_lib.TypedEmitter {
|
|
|
28567
28645
|
acceptedChallengeTypes: options.acceptedChallengeTypes
|
|
28568
28646
|
}).catch((err) => {
|
|
28569
28647
|
log.error("Failed to handle not receiving response to challenge request", err);
|
|
28648
|
+
this._endPublicationAfterDetachedFailure("_handleNotReceivingResponseToChallengeRequest", err);
|
|
28570
28649
|
});
|
|
28571
28650
|
}
|
|
28572
28651
|
};
|
|
@@ -29862,9 +29941,13 @@ var Comment = class extends Publication {
|
|
|
29862
29941
|
this._initProps(props);
|
|
29863
29942
|
const unknownProps = r(t$1(props), t$1(CommentIpfsSchema.shape));
|
|
29864
29943
|
if (unknownProps.length > 0) {
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
|
|
29944
|
+
log(`Found unknown props on loaded CommentIpfs (cid: ${this.cid})`, t$5(props, unknownProps), "Will set them on the Comment instance");
|
|
29945
|
+
const { skipped } = assignUnknownProps({
|
|
29946
|
+
target: this,
|
|
29947
|
+
record: props,
|
|
29948
|
+
knownKeys: t$1(CommentIpfsSchema.shape)
|
|
29949
|
+
});
|
|
29950
|
+
if (skipped.length > 0) log.error(`Refused unknown props of CommentIpfs (cid: ${this.cid}) that collide with the instance`, skipped);
|
|
29868
29951
|
}
|
|
29869
29952
|
this._setAuthorNameResolvedFromCache();
|
|
29870
29953
|
}
|
|
@@ -29959,7 +30042,12 @@ var Comment = class extends Publication {
|
|
|
29959
30042
|
const unknownProps = r(t$1(props), t$1(CommentUpdateSchema.shape));
|
|
29960
30043
|
if (unknownProps.length > 0) {
|
|
29961
30044
|
log("Found unknown props on CommentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
29962
|
-
|
|
30045
|
+
const { skipped } = assignUnknownProps({
|
|
30046
|
+
target: this,
|
|
30047
|
+
record: props,
|
|
30048
|
+
knownKeys: t$1(CommentUpdateSchema.shape)
|
|
30049
|
+
});
|
|
30050
|
+
if (skipped.length > 0) log.error("Refused unknown props of CommentUpdate that collide with the instance", skipped);
|
|
29963
30051
|
}
|
|
29964
30052
|
}
|
|
29965
30053
|
this.upvoteCount = props.upvoteCount;
|
|
@@ -29977,7 +30065,13 @@ var Comment = class extends Publication {
|
|
|
29977
30065
|
this.protocolVersion = props.protocolVersion;
|
|
29978
30066
|
this.spoiler = typeof props.spoiler === "boolean" ? props.spoiler : typeof props.edit?.spoiler === "boolean" ? props.edit?.spoiler : this.spoiler;
|
|
29979
30067
|
this.nsfw = typeof props.nsfw === "boolean" ? props.nsfw : typeof props.edit?.nsfw === "boolean" ? props.edit?.nsfw : this.nsfw;
|
|
29980
|
-
if (props.author)
|
|
30068
|
+
if (props.author) {
|
|
30069
|
+
const { skipped } = mergeAuthorProps({
|
|
30070
|
+
target: this.author,
|
|
30071
|
+
props: props.author
|
|
30072
|
+
});
|
|
30073
|
+
if (skipped.length > 0) logger_default("pkc-js:comment:_initCommentUpdate").error("Refused author props of CommentUpdate that collide with an object", skipped);
|
|
30074
|
+
}
|
|
29981
30075
|
if (props.edit?.content) this.content = props.edit.content;
|
|
29982
30076
|
this.flairs = props.flairs || props.edit?.flairs || this.flairs;
|
|
29983
30077
|
this.author.flairs = props.author?.community?.flairs || props.edit?.author?.flairs || this.author?.flairs;
|
|
@@ -30116,7 +30210,13 @@ var Comment = class extends Publication {
|
|
|
30116
30210
|
}
|
|
30117
30211
|
_initCommentUpdateFromChallengeVerificationProps(commentUpdate) {
|
|
30118
30212
|
this.raw.commentUpdateFromChallengeVerification = commentUpdate;
|
|
30119
|
-
if (commentUpdate.author)
|
|
30213
|
+
if (commentUpdate.author) {
|
|
30214
|
+
const { skipped } = mergeAuthorProps({
|
|
30215
|
+
target: this.author,
|
|
30216
|
+
props: commentUpdate.author
|
|
30217
|
+
});
|
|
30218
|
+
if (skipped.length > 0) logger_default("pkc-js:comment:_initCommentUpdateFromChallengeVerificationProps").error("Refused author props of the challenge verification that collide with an object", skipped);
|
|
30219
|
+
}
|
|
30120
30220
|
this.protocolVersion = commentUpdate.protocolVersion;
|
|
30121
30221
|
if ("pendingApproval" in commentUpdate) this.pendingApproval = commentUpdate.pendingApproval;
|
|
30122
30222
|
else this.pendingApproval = false;
|
|
@@ -30131,7 +30231,12 @@ var Comment = class extends Publication {
|
|
|
30131
30231
|
const unknownProps = r(t$1(decryptedVerification.commentUpdate), t$1(CommentUpdateForChallengeVerificationSchema.shape));
|
|
30132
30232
|
if (unknownProps.length > 0) {
|
|
30133
30233
|
log("Found unknown props on decryptedVerification.commentUpdate record", unknownProps, "Will set them on Comment instance");
|
|
30134
|
-
|
|
30234
|
+
const { skipped } = assignUnknownProps({
|
|
30235
|
+
target: this,
|
|
30236
|
+
record: decryptedVerification.commentUpdate,
|
|
30237
|
+
knownKeys: t$1(CommentUpdateForChallengeVerificationSchema.shape)
|
|
30238
|
+
});
|
|
30239
|
+
if (skipped.length > 0) log.error("Refused unknown props of the challenge verification that collide with the instance", skipped);
|
|
30135
30240
|
}
|
|
30136
30241
|
this.emit("update", this);
|
|
30137
30242
|
if (!this._pkc._pkcRpcClient) this._resolveAuthorNamesInBackground();
|
|
@@ -30865,6 +30970,7 @@ var Storage = class {
|
|
|
30865
30970
|
dbFilePath = path.join(this._pkc.dataPath, "storage.db");
|
|
30866
30971
|
}
|
|
30867
30972
|
this._db = new Database(dbFilePath);
|
|
30973
|
+
if (dbFilePath !== ":memory:") this._db.pragma("journal_mode = WAL");
|
|
30868
30974
|
this._keyv = new KeyvBetterSqlite3(this._db);
|
|
30869
30975
|
this._keyv.on("error", (err) => {
|
|
30870
30976
|
err.details = {
|
|
@@ -35841,14 +35947,14 @@ var CommunityList = class extends import_lib.TypedEmitter {
|
|
|
35841
35947
|
_buildRuntimeEntry(entry) {
|
|
35842
35948
|
const address = entry.name || entry.publicKey;
|
|
35843
35949
|
return {
|
|
35844
|
-
...entry,
|
|
35950
|
+
...withoutForbiddenKeys(entry),
|
|
35845
35951
|
address,
|
|
35846
35952
|
shortAddress: shortifyAddress(address)
|
|
35847
35953
|
};
|
|
35848
35954
|
}
|
|
35849
35955
|
_buildRuntimeAuthor(wireAuthor, signaturePublicKey) {
|
|
35850
35956
|
const runtimeAuthor = buildRuntimeAuthor({
|
|
35851
|
-
author: wireAuthor,
|
|
35957
|
+
author: wireAuthor && withoutForbiddenKeys(wireAuthor),
|
|
35852
35958
|
signaturePublicKey
|
|
35853
35959
|
});
|
|
35854
35960
|
return {
|
|
@@ -36277,7 +36383,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36277
36383
|
this.clients.libp2pJsClients = {};
|
|
36278
36384
|
if (!this.libp2pJsClientsOptions) return;
|
|
36279
36385
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
36280
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
36386
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-CceaAEzV.js");
|
|
36281
36387
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
36282
36388
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
36283
36389
|
...clientOptions,
|
|
@@ -36654,8 +36760,8 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36654
36760
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
36655
36761
|
log.trace("Received community options to create a local community instance:", options);
|
|
36656
36762
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
36657
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
36658
|
-
const isLocalCommunity = (
|
|
36763
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-C8Qwak8F.js");
|
|
36764
|
+
const isLocalCommunity = isLocalCommunityAddress(this, options.address);
|
|
36659
36765
|
const community = new LocalCommunity(this);
|
|
36660
36766
|
if (isLocalCommunity) {
|
|
36661
36767
|
community.setAddress(options.address);
|
|
@@ -36666,7 +36772,13 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
36666
36772
|
} else if ("signer" in options) {
|
|
36667
36773
|
const parsedOptions = options;
|
|
36668
36774
|
await community.initNewLocalCommunityPropsNoMerge(parsedOptions);
|
|
36669
|
-
|
|
36775
|
+
const doneWritingDbFile = markLocalCommunityDbAsBeingWritten(this, community.address);
|
|
36776
|
+
try {
|
|
36777
|
+
await createNewLocalCommunityDb(community);
|
|
36778
|
+
} finally {
|
|
36779
|
+
doneWritingDbFile();
|
|
36780
|
+
}
|
|
36781
|
+
registerLocalCommunity(this, community.address);
|
|
36670
36782
|
log.trace(`Created a new local community (${community.address}) with props:`);
|
|
36671
36783
|
community.emit("update", community);
|
|
36672
36784
|
await this._awaitCommunitiesToIncludeCommunity(community.address);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bn as PageSortFileSchema,
|
|
1
|
+
import { bn as PageSortFileSchema, gr as isStringDomain, v as getEquivalentCommunityAddresses } from "./util-C0MpIK71.js";
|
|
2
2
|
//#region dist/node/pages/page-sort-scoring.js
|
|
3
3
|
function validatePageSortFile(rawFile) {
|
|
4
4
|
const validated = PageSortFileSchema.parse(rawFile);
|