@pkcprotocol/pkc-js 0.0.142 → 0.0.143
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 +1 -0
- package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +2 -0
- package/dist/browser/clients/rpc-client/schema.d.ts +2 -0
- package/dist/browser/community/schema.d.ts +19 -0
- package/dist/browser/community/schema.js +7 -3
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/index-with-compile-cache.d.ts +2 -0
- package/dist/browser/index.d.ts +4 -0
- package/dist/browser/object-key-util.js +5 -1
- package/dist/browser/object-key-util.js.map +1 -1
- package/dist/browser/pages/pkc-js-page-sorts/top.js +2 -1
- package/dist/browser/pages/pkc-js-page-sorts/top.js.map +1 -1
- package/dist/browser/pages/schema.js +3 -1
- package/dist/browser/pages/schema.js.map +1 -1
- package/dist/browser/publications/community-edit/schema.d.ts +8 -0
- package/dist/browser/pubsub-messages/schema.d.ts +4 -0
- package/dist/browser/rpc/src/lib/pkc-js/index.d.ts +2 -0
- package/dist/browser/rpc/src/schema.d.ts +12 -0
- package/dist/browser/runtime/node/community/db-handler.d.ts +3 -0
- package/dist/browser/runtime/node/community/db-handler.js +17 -2
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/comment-updates.d.ts +1 -0
- package/dist/browser/runtime/node/community/local-community/comment-updates.js +70 -19
- 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 +14 -0
- package/dist/browser/runtime/node/community/local-community/post-updates-bucket.js +206 -0
- package/dist/browser/runtime/node/community/local-community/post-updates-bucket.js.map +1 -0
- package/dist/browser/runtime/node/community/local-community.d.ts +1 -0
- package/dist/browser/runtime/node/community/local-community.js +4 -0
- package/dist/browser/runtime/node/community/local-community.js.map +1 -1
- package/dist/browser/runtime/node/community/page-sorts/index.js +10 -10
- package/dist/browser/runtime/node/community/page-sorts/index.js.map +1 -1
- package/dist/browser/schema/schema-util.d.ts +8 -0
- package/dist/browser/schema.d.ts +16 -0
- package/dist/browser/util.d.ts +1 -0
- package/dist/browser/util.js +23 -5
- package/dist/browser/util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +159 -117
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-pBsoz9YH.js → helia-for-pkc-DpsMZzv8.js} +33 -33
- package/dist/bundled/chunks/{local-community-B4rXLDqy.js → local-community-BglT8AUy.js} +282 -45
- package/dist/bundled/chunks/{local-community-B9D4Iu_Q.js → local-community-DEaDtekb.js} +1 -1
- package/dist/bundled/chunks/{node-CsvN3ADZ.js → node-Tkx_TCqE.js} +5 -5
- package/dist/bundled/chunks/{page-sort-scoring-2Q6exRbl.js → page-sort-scoring-DY7SvqJA.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-D3V1Sto-.js → rpc-local-community-Br_xomgn.js} +17 -8
- package/dist/bundled/chunks/src-ABfmT8J2.js +2323 -0
- package/dist/bundled/chunks/src-BC60-Q7v.js +2 -0
- package/dist/bundled/chunks/src-BHqirG63.js +2 -0
- package/dist/bundled/chunks/{src-BggJ_InF.js → src-Bj5iE3qB.js} +2 -1999
- package/dist/bundled/chunks/src-CNab3O7M.js +2001 -0
- package/dist/bundled/chunks/{src-BsiPSkhv.js → src-ltPxiZKf.js} +1312 -3632
- package/dist/bundled/chunks/{util-DVrZupXz.js → util-C5RiQF_G.js} +24 -9
- package/dist/bundled/chunks/{util-LhCb7940.js → util-DIkZirPy.js} +1 -1
- package/dist/bundled/chunks/{validate-package-factories-Bl2AyT4N.js → validate-package-factories-DnW2JiL5.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/clients/rpc-client/rpc-schema-util.d.ts +2 -0
- package/dist/node/clients/rpc-client/schema.d.ts +2 -0
- package/dist/node/community/schema.d.ts +19 -0
- package/dist/node/community/schema.js +7 -3
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/index-with-compile-cache.d.ts +2 -0
- package/dist/node/index.d.ts +4 -0
- package/dist/node/object-key-util.js +5 -1
- package/dist/node/object-key-util.js.map +1 -1
- package/dist/node/pages/pkc-js-page-sorts/top.js +2 -1
- package/dist/node/pages/pkc-js-page-sorts/top.js.map +1 -1
- package/dist/node/pages/schema.js +3 -1
- package/dist/node/pages/schema.js.map +1 -1
- package/dist/node/publications/community-edit/schema.d.ts +8 -0
- package/dist/node/pubsub-messages/schema.d.ts +4 -0
- package/dist/node/rpc/src/lib/pkc-js/index.d.ts +2 -0
- package/dist/node/rpc/src/schema.d.ts +12 -0
- package/dist/node/runtime/node/community/db-handler.d.ts +3 -0
- package/dist/node/runtime/node/community/db-handler.js +17 -2
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/comment-updates.d.ts +1 -0
- package/dist/node/runtime/node/community/local-community/comment-updates.js +70 -19
- 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 +14 -0
- package/dist/node/runtime/node/community/local-community/post-updates-bucket.js +206 -0
- package/dist/node/runtime/node/community/local-community/post-updates-bucket.js.map +1 -0
- package/dist/node/runtime/node/community/local-community.d.ts +1 -0
- package/dist/node/runtime/node/community/local-community.js +4 -0
- package/dist/node/runtime/node/community/local-community.js.map +1 -1
- package/dist/node/runtime/node/community/page-sorts/index.js +10 -10
- package/dist/node/runtime/node/community/page-sorts/index.js.map +1 -1
- package/dist/node/schema/schema-util.d.ts +8 -0
- package/dist/node/schema.d.ts +16 -0
- package/dist/node/util.d.ts +1 -0
- package/dist/node/util.js +23 -5
- package/dist/node/util.js.map +1 -1
- package/package.json +4 -1
package/dist/bundled/chunks/{rpc-local-community-D3V1Sto-.js → rpc-local-community-Br_xomgn.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 { $n as CommentEditSignedPropertyNames, $r as record, $t as CommunityEditPubsubMessagePublicationSchema, A as isIpnsPath, An as CommentChallengeRequestToEncryptSchema, Ar as t$9, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cn as RpcRemoteCommunityUpdateEventResultSchema, Cr as e$5, D as isIpfsCid, Dr as n$8, Dt as untrackUpdatingCommunity, E as isAbortError, En as VotePubsubMessagePublicationSchema, Er as t$12, Fn as CommentSignedPropertyNames, Fr as FailedToFetchCommunityFromGatewaysError, Gn as GetPageParamSchema, Gr as array, Gt as NameResolverSerializedSchema, H as raceAgainstAbort, Hr as require_ms$1, Ht as DecryptedChallengeSchema, In as CommentUpdateChallengeReservedFieldNames, Ir as FailedToFetchGenericIpfsFromGatewaysError, It as ChallengeRequestMessageSignedPropertyNames, Jn as isReservedObjectKey, Jr as literal, Jt as PKCUserOptionsSchema, Kn as ModQueuePageIpfsSchema, Kr as boolean, Kt as PKCParsedOptionsSchema, L as isRequestPubsubPublicationOfPost, Lr as FailedToFetchPageIpfsFromGatewaysError, Mn as CommentIpfsSchema, Mr as require_retry$2, Mt as ChallengeAnswerMessageSignedPropertyNames, Nr as FailedToFetchCommentIpfsFromGatewaysError, O as isIpfsPath, On as VoteSignedPropertyNames, Or as r$7, Ot as require_sha256$1, Pn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Pr as FailedToFetchCommentUpdateFromGatewaysError, Pt as ChallengeMessageSignedPropertyNames, Qr as preprocess, Qt as CommunityEditPublicationSignedPropertyNames, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateForChallengeVerificationSignedPropertyNames, Rr as PKCError, Rt as ChallengeVerificationMessageSignedPropertyNames, S as hasTransientNetworkErrorCode, Sr as e$6, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tn as VoteChallengeRequestToEncryptSchema, Tr as r$8, Tt as untrackStartedCommunity, Ut as DecryptedChallengeVerificationSchema, Vn as CommentUpdateSignedPropertyNames, Vr as require_supports_color, Wn as CreateCommentOptionsWithRefinementSchema, Wr as _enum, Wt as NameResolveCacheOptionsSchema, Xr as number, Xt as CommunityEditPublicationChallengeRequestToEncryptSchema, Yn as CommentEditChallengeRequestToEncryptSchema, Yr as looseObject, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zr as object, _n as CreateRemoteCommunityFunctionArgumentSchema, _r as n$9, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, at as throwIfAbortSignalAborted, bn as PageSortFileFactorySchema, bt as refreshTrackedCommunityAliases, cn as ChallengeFileSchema, cr as CidStringSchema, d as deepMergeRuntimeFields, dn as CommunityEditOptionsSchema, dr as CreateSignerSchema, ei as string, en as CreateCommunityEditPublicationOptionsWithRefinementSchema, f as derivePublicationFromChallengeRequest, fn as CommunityExportRecordsSchema, fr as JsonSignatureSchema, ft as findStartedCommunity, gn as CreateNewLocalCommunityUserOptionsSchema, gr as isStringDomain, h as fetchAndValidateIpnsRecordFromGateway, hn as CommunitySignedPropertyNames, hr as areEquivalentNames, ht as forgetTrackedUpdatingCommunityName, in as CommentModerationSignedPropertyNames, ir as AuthorPubsubSchema, jn as CommentIpfsReservedFields, jr as e$4, k as isIpns, kr as t$10, lr as CommunityAddressSchema, m as extractNetworkErrorDetails, mn as CommunityIpfsSchema, mr as ProtocolVersionSchema, mt as findUpdatingCommunity, nn as CommentModerationPubsubMessagePublicationSchema, nr as AuthorAddressSchema, nt as shortifyCid, on as CreateCommentModerationOptionsWithRefinementSchema, or as ChallengeAnswersSchema, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsReservedFields, pr as PKCTimestampSchema, q as removeNullUndefinedEmptyObjectsValuesRecursively, qn as PageIpfsSchema, qr as custom, qt as PKCUserOptionBaseSchema, r as calculateIpfsCidV0, rr as AuthorCommentIpfsReservedFields, rt as sleepUntilTimeoutOrAbort, sn as ChallengeFileFactorySchema, sr as CidPathSchema, t as areEquivalentCommunityAddresses, ti as union, tn as CommentModerationChallengeRequestToEncryptSchema, tr as CreateCommentEditOptionsWithRefinementSchema, tt as shortifyAddress, u as createAbortError, un as CommunityChallengeSettingSchema, ur as CommunityAuthorChallengeReservedFieldNames, vn as CreateRpcCommunityFunctionArgumentSchema, w as interruptibleSleep, wn as CreateVoteUserOptionsWithRefinementSchema, wr as t$11, wt as trackUpdatingCommunity, xn as PageSortFileSchema, xr as t$13, yn as ExportCommunityModLogsOptionsSchema, yr as n$10, z as linkAbortSignals, zn as CommentUpdateReservedFields, zr as messages, zt as DecryptedChallengeAnswerSchema } from "./util-
|
|
2
|
+
import { $n as CommentEditSignedPropertyNames, $r as record, $t as CommunityEditPubsubMessagePublicationSchema, A as isIpnsPath, An as CommentChallengeRequestToEncryptSchema, Ar as t$9, At as pTimeout, B as pubsubTopicToDhtKey, Bn as CommentUpdateSchema, Br as logger_default, C as hideClassPrivateProps, Cn as RpcRemoteCommunityUpdateEventResultSchema, Cr as e$5, D as isIpfsCid, Dr as n$8, Dt as untrackUpdatingCommunity, E as isAbortError, En as VotePubsubMessagePublicationSchema, Er as t$12, Fn as CommentSignedPropertyNames, Fr as FailedToFetchCommunityFromGatewaysError, Gn as GetPageParamSchema, Gr as array, Gt as NameResolverSerializedSchema, H as raceAgainstAbort, Hr as require_ms$1, Ht as DecryptedChallengeSchema, In as CommentUpdateChallengeReservedFieldNames, Ir as FailedToFetchGenericIpfsFromGatewaysError, It as ChallengeRequestMessageSignedPropertyNames, Jn as isReservedObjectKey, Jr as literal, Jt as PKCUserOptionsSchema, Kn as ModQueuePageIpfsSchema, Kr as boolean, Kt as PKCParsedOptionsSchema, L as isRequestPubsubPublicationOfPost, Lr as FailedToFetchPageIpfsFromGatewaysError, Mn as CommentIpfsSchema, Mr as require_retry$2, Mt as ChallengeAnswerMessageSignedPropertyNames, Nr as FailedToFetchCommentIpfsFromGatewaysError, O as isIpfsPath, On as VoteSignedPropertyNames, Or as r$7, Ot as require_sha256$1, Pn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Pr as FailedToFetchCommentUpdateFromGatewaysError, Pt as ChallengeMessageSignedPropertyNames, Qr as preprocess, Qt as CommunityEditPublicationSignedPropertyNames, R as isRequestPubsubPublicationOfReply, Rn as CommentUpdateForChallengeVerificationSignedPropertyNames, Rr as PKCError, Rt as ChallengeVerificationMessageSignedPropertyNames, S as hasTransientNetworkErrorCode, Sr as e$6, St as trackStartedCommunity, T as ipnsNameToIpnsOverPubsubTopic, Tn as VoteChallengeRequestToEncryptSchema, Tr as r$8, Tt as untrackStartedCommunity, Ut as DecryptedChallengeVerificationSchema, Vn as CommentUpdateSignedPropertyNames, Vr as require_supports_color, Wn as CreateCommentOptionsWithRefinementSchema, Wr as _enum, Wt as NameResolveCacheOptionsSchema, Xr as number, Xt as CommunityEditPublicationChallengeRequestToEncryptSchema, Yn as CommentEditChallengeRequestToEncryptSchema, Yr as looseObject, Zn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Zr as object, _n as CreateRemoteCommunityFunctionArgumentSchema, _r as n$9, an as CommentModerationsTableRowSchema, ar as AuthorReservedFields, at as throwIfAbortSignalAborted, bn as PageSortFileFactorySchema, bt as refreshTrackedCommunityAliases, cn as ChallengeFileSchema, cr as CidStringSchema, d as deepMergeRuntimeFields, dn as CommunityEditOptionsSchema, dr as CreateSignerSchema, ei as string, en as CreateCommunityEditPublicationOptionsWithRefinementSchema, f as derivePublicationFromChallengeRequest, fn as CommunityExportRecordsSchema, fr as JsonSignatureSchema, ft as findStartedCommunity, gn as CreateNewLocalCommunityUserOptionsSchema, gr as isStringDomain, h as fetchAndValidateIpnsRecordFromGateway, hn as CommunitySignedPropertyNames, hr as areEquivalentNames, ht as forgetTrackedUpdatingCommunityName, in as CommentModerationSignedPropertyNames, ir as AuthorPubsubSchema, jn as CommentIpfsReservedFields, jr as e$4, k as isIpns, kr as t$10, lr as CommunityAddressSchema, m as extractNetworkErrorDetails, mn as CommunityIpfsSchema, mr as ProtocolVersionSchema, mt as findUpdatingCommunity, nn as CommentModerationPubsubMessagePublicationSchema, nr as AuthorAddressSchema, nt as shortifyCid, on as CreateCommentModerationOptionsWithRefinementSchema, or as ChallengeAnswersSchema, ot as timestamp, p as doesDomainAddressHaveCapitalLetter, pn as CommunityIpfsReservedFields, pr as PKCTimestampSchema, q as removeNullUndefinedEmptyObjectsValuesRecursively, qn as PageIpfsSchema, qr as custom, qt as PKCUserOptionBaseSchema, r as calculateIpfsCidV0, rr as AuthorCommentIpfsReservedFields, rt as sleepUntilTimeoutOrAbort, sn as ChallengeFileFactorySchema, sr as CidPathSchema, t as areEquivalentCommunityAddresses, ti as union, tn as CommentModerationChallengeRequestToEncryptSchema, tr as CreateCommentEditOptionsWithRefinementSchema, tt as shortifyAddress, u as createAbortError, un as CommunityChallengeSettingSchema, ur as CommunityAuthorChallengeReservedFieldNames, vn as CreateRpcCommunityFunctionArgumentSchema, w as interruptibleSleep, wn as CreateVoteUserOptionsWithRefinementSchema, wr as t$11, wt as trackUpdatingCommunity, xn as PageSortFileSchema, xr as t$13, yn as ExportCommunityModLogsOptionsSchema, yr as n$10, z as linkAbortSignals, zn as CommentUpdateReservedFields, zr as messages, zt as DecryptedChallengeAnswerSchema } from "./util-C5RiQF_G.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-DY7SvqJA.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
7
|
import dns from "node:dns";
|
|
@@ -118106,7 +118106,7 @@ async function moveCommunityDbToDeletedDirectory(communityAddress, pkc) {
|
|
|
118106
118106
|
}
|
|
118107
118107
|
async function createKuboRpcClient(kuboRpcClientOptions) {
|
|
118108
118108
|
logger_default("pkc-js:pkc:createKuboRpcClient").trace("Creating a new kubo client on node with options", kuboRpcClientOptions);
|
|
118109
|
-
const { create: CreateKuboRpcClient } = await import("./src-
|
|
118109
|
+
const { create: CreateKuboRpcClient } = await import("./src-ltPxiZKf.js");
|
|
118110
118110
|
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;
|
|
118111
118111
|
const onehourMs = 1e3 * 60 * 60;
|
|
118112
118112
|
return CreateKuboRpcClient({
|
|
@@ -155386,6 +155386,7 @@ function computePageSortsFingerprint({ pagesSettings, resolved, factories }) {
|
|
|
155386
155386
|
}) ?? "");
|
|
155387
155387
|
}
|
|
155388
155388
|
const describePageSort = (pageSortSettings) => pageSortSettings.name || pageSortSettings.path || "unknown page sort";
|
|
155389
|
+
const resolveSortName = ({ pageSortSettings, file }) => pageSortSettings.sortName ?? file.sortName;
|
|
155389
155390
|
async function loadPageSortFile({ pageSortSettings, pkc }) {
|
|
155390
155391
|
let factory;
|
|
155391
155392
|
try {
|
|
@@ -155430,11 +155431,15 @@ function withoutRemovedPageSortSettingOptions(pageSortSettings) {
|
|
|
155430
155431
|
};
|
|
155431
155432
|
}
|
|
155432
155433
|
function resolveOneEntry({ pageSortSettings, file, scope, pageSortIndex }) {
|
|
155434
|
+
const sortName = resolveSortName({
|
|
155435
|
+
pageSortSettings,
|
|
155436
|
+
file
|
|
155437
|
+
});
|
|
155433
155438
|
const baseDetails = {
|
|
155434
155439
|
scope,
|
|
155435
155440
|
pageSortIndex,
|
|
155436
155441
|
pageSortName: describePageSort(pageSortSettings),
|
|
155437
|
-
sortName
|
|
155442
|
+
sortName
|
|
155438
155443
|
};
|
|
155439
155444
|
const entryOptions = pageSortSettings.options ?? {};
|
|
155440
155445
|
if (file.scope && file.scope !== scope) return { error: new PKCError("ERR_PAGE_SORT_SCOPE_MISMATCH", {
|
|
@@ -155491,7 +155496,7 @@ function resolveOneEntry({ pageSortSettings, file, scope, pageSortIndex }) {
|
|
|
155491
155496
|
}
|
|
155492
155497
|
return { resolved: {
|
|
155493
155498
|
...reserved,
|
|
155494
|
-
sortName
|
|
155499
|
+
sortName,
|
|
155495
155500
|
scope,
|
|
155496
155501
|
file,
|
|
155497
155502
|
settings: pageSortSettings,
|
|
@@ -155527,7 +155532,11 @@ async function resolvePageSortsAndCollectFailures({ pagesSettings, pkc, tolerate
|
|
|
155527
155532
|
});
|
|
155528
155533
|
continue;
|
|
155529
155534
|
}
|
|
155530
|
-
|
|
155535
|
+
const sortName = resolveSortName({
|
|
155536
|
+
pageSortSettings,
|
|
155537
|
+
file
|
|
155538
|
+
});
|
|
155539
|
+
if (seenSortNames.has(sortName)) {
|
|
155531
155540
|
failures.push({
|
|
155532
155541
|
scope,
|
|
155533
155542
|
pageSortIndex,
|
|
@@ -155536,12 +155545,12 @@ async function resolvePageSortsAndCollectFailures({ pagesSettings, pkc, tolerate
|
|
|
155536
155545
|
scope,
|
|
155537
155546
|
pageSortIndex,
|
|
155538
155547
|
pageSortName,
|
|
155539
|
-
sortName
|
|
155548
|
+
sortName
|
|
155540
155549
|
})
|
|
155541
155550
|
});
|
|
155542
155551
|
continue;
|
|
155543
155552
|
}
|
|
155544
|
-
seenSortNames.add(
|
|
155553
|
+
seenSortNames.add(sortName);
|
|
155545
155554
|
const result = resolveOneEntry({
|
|
155546
155555
|
pageSortSettings,
|
|
155547
155556
|
file,
|