@pkcprotocol/pkc-js 0.0.131 → 0.0.132
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 +17 -7
- package/dist/browser/clients/rpc-client/rpc-schema-util.d.ts +2 -0
- package/dist/browser/clients/rpc-client/schema.d.ts +24 -0
- package/dist/browser/community/schema.d.ts +193 -0
- package/dist/browser/community/schema.js +4 -0
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/errors.d.ts +7 -1
- package/dist/browser/errors.js +7 -1
- 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/index-with-compile-cache.d.ts +32 -0
- package/dist/browser/index.d.ts +64 -0
- package/dist/browser/pages/schema.d.ts +44 -0
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/publications/comment/comment.d.ts +1 -0
- package/dist/browser/publications/comment/comment.js +2 -0
- package/dist/browser/publications/comment/comment.js.map +1 -1
- package/dist/browser/publications/comment/schema.d.ts +133 -1
- package/dist/browser/publications/comment/schema.js +21 -6
- package/dist/browser/publications/comment/schema.js.map +1 -1
- package/dist/browser/publications/comment/types.d.ts +2 -1
- package/dist/browser/publications/community-edit/schema.d.ts +8 -0
- package/dist/browser/pubsub-messages/schema.d.ts +37 -0
- package/dist/browser/rpc/src/lib/pkc-js/index.d.ts +32 -0
- package/dist/browser/rpc/src/schema.d.ts +192 -0
- package/dist/browser/runtime/node/community/db-handler.js +3 -2
- package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.js +41 -17
- package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/browser/runtime/node/polyfill.js +3 -1
- package/dist/browser/runtime/node/polyfill.js.map +1 -1
- package/dist/browser/schema/schema-util.d.ts +82 -0
- package/dist/browser/schema.d.ts +256 -0
- package/dist/browser/test/test-util.d.ts +40 -0
- package/dist/browser/version.js +1 -1
- package/dist/bundled/bundle-manifest.json +446 -223
- package/dist/bundled/challenges.js +1 -1
- package/dist/bundled/chunks/{helia-for-pkc-C7_eLx63.js → helia-for-pkc-Be5IsnZy.js} +2 -2
- package/dist/bundled/chunks/{local-community-CtL1aSwt.js → local-community-BU2-PWv4.js} +1 -1
- package/dist/bundled/chunks/{local-community-RlYLG5QV.js → local-community-BjDsNdnK.js} +42 -26
- package/dist/bundled/chunks/node-Cpazwn3v.js +36843 -0
- package/dist/bundled/chunks/{page-sort-scoring-CaoGFyhT.js → page-sort-scoring-BqPwUozm.js} +1 -1
- package/dist/bundled/chunks/{rpc-local-community-BXt7eK9l.js → rpc-local-community-C5xdrdFG.js} +56826 -33747
- package/dist/bundled/chunks/{src-B07ldGHS.js → src-BggJ_InF.js} +435 -149
- package/dist/bundled/chunks/{src-629pKfxo.js → src-BsiPSkhv.js} +2 -2
- package/dist/bundled/chunks/{src-BOzgM7Fp.js → src-evzEHW9W.js} +26 -9
- package/dist/bundled/chunks/{util-cD0RAlzC.js → util-BLpE5ch7.js} +1 -1
- package/dist/bundled/chunks/{util-CaL93qd4.js → util-DaZGW5bK.js} +30 -9
- package/dist/bundled/chunks/{validate-package-factories-DWI4TSli.js → validate-package-factories-DBOjkq17.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 +24 -0
- package/dist/node/community/schema.d.ts +193 -0
- package/dist/node/community/schema.js +4 -0
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/errors.d.ts +7 -1
- package/dist/node/errors.js +7 -1
- 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/index-with-compile-cache.d.ts +32 -0
- package/dist/node/index.d.ts +64 -0
- package/dist/node/pages/schema.d.ts +44 -0
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/publications/comment/comment.d.ts +1 -0
- package/dist/node/publications/comment/comment.js +2 -0
- package/dist/node/publications/comment/comment.js.map +1 -1
- package/dist/node/publications/comment/schema.d.ts +133 -1
- package/dist/node/publications/comment/schema.js +21 -6
- package/dist/node/publications/comment/schema.js.map +1 -1
- package/dist/node/publications/comment/types.d.ts +2 -1
- package/dist/node/publications/community-edit/schema.d.ts +8 -0
- package/dist/node/pubsub-messages/schema.d.ts +37 -0
- package/dist/node/rpc/src/lib/pkc-js/index.d.ts +32 -0
- package/dist/node/rpc/src/schema.d.ts +192 -0
- package/dist/node/runtime/node/community/db-handler.js +3 -2
- package/dist/node/runtime/node/community/db-handler.js.map +1 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.js +41 -17
- package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/node/runtime/node/polyfill.js +3 -1
- package/dist/node/runtime/node/polyfill.js.map +1 -1
- package/dist/node/schema/schema-util.d.ts +82 -0
- package/dist/node/schema.d.ts +256 -0
- package/dist/node/test/test-util.d.ts +40 -0
- package/dist/node/version.js +1 -1
- package/package.json +18 -18
- package/dist/bundled/chunks/node-DFp6m62Y.js +0 -9770
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
import { n as peekable, t as map } from "./src-Cpx2Sts8.js";
|
|
4
|
-
import { i as first, n as src_exports$2 } from "./src-
|
|
4
|
+
import { i as first, n as src_exports$2 } from "./src-evzEHW9W.js";
|
|
5
5
|
import http from "node:http";
|
|
6
|
-
import { Buffer as Buffer$1 } from "node:buffer";
|
|
7
6
|
import { webcrypto } from "node:crypto";
|
|
7
|
+
import { Buffer as Buffer$1 } from "node:buffer";
|
|
8
8
|
import { CID } from "multiformats/cid";
|
|
9
9
|
import { peerIdFromString } from "@libp2p/peer-id";
|
|
10
10
|
import { toString } from "uint8arrays/to-string";
|
|
@@ -181,6 +181,9 @@ const maxUInt32 = 2 ** 31;
|
|
|
181
181
|
* @typedef {import('./interface.js').RawPBNode} RawPBNode
|
|
182
182
|
*/
|
|
183
183
|
/**
|
|
184
|
+
* @typedef {import('./interface.js').EncodeOptions} EncodeOptions
|
|
185
|
+
*/
|
|
186
|
+
/**
|
|
184
187
|
* encodeLink() is passed a slice of the parent byte array that ends where this
|
|
185
188
|
* link needs to end, so it packs to the right-most part of the passed `bytes`
|
|
186
189
|
*
|
|
@@ -212,27 +215,38 @@ function encodeLink(link, bytes) {
|
|
|
212
215
|
return bytes.length - i;
|
|
213
216
|
}
|
|
214
217
|
/**
|
|
218
|
+
* @param {number} i
|
|
219
|
+
* @param {RawPBNode} node
|
|
220
|
+
* @param {Uint8Array} bytes
|
|
221
|
+
* @returns number
|
|
222
|
+
*/
|
|
223
|
+
function encodeData(i, node, bytes) {
|
|
224
|
+
i -= node.Data.length;
|
|
225
|
+
bytes.set(node.Data, i);
|
|
226
|
+
i = encodeVarint(bytes, i, node.Data.length) - 1;
|
|
227
|
+
bytes[i] = 10;
|
|
228
|
+
return i;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
215
231
|
* Encodes a PBNode into a new byte array of precisely the correct size
|
|
216
232
|
*
|
|
217
233
|
* @param {RawPBNode} node
|
|
234
|
+
* @param {EncodeOptions} [options]
|
|
218
235
|
* @returns {Uint8Array}
|
|
219
236
|
*/
|
|
220
|
-
function encodeNode(node) {
|
|
237
|
+
function encodeNode(node, options) {
|
|
221
238
|
const size = sizeNode(node);
|
|
222
239
|
const bytes = new Uint8Array(size);
|
|
223
240
|
let i = size;
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
bytes.set(node.Data, i);
|
|
227
|
-
i = encodeVarint(bytes, i, node.Data.length) - 1;
|
|
228
|
-
bytes[i] = 10;
|
|
229
|
-
}
|
|
241
|
+
const fieldOrder = options?.fieldOrder === "data-first" ? options.fieldOrder : "links-first";
|
|
242
|
+
if (node.Data && fieldOrder === "links-first") i = encodeData(i, node, bytes);
|
|
230
243
|
if (node.Links) for (let index = node.Links.length - 1; index >= 0; index--) {
|
|
231
244
|
const size = encodeLink(node.Links[index], bytes.subarray(0, i));
|
|
232
245
|
i -= size;
|
|
233
246
|
i = encodeVarint(bytes, i, size) - 1;
|
|
234
247
|
bytes[i] = 18;
|
|
235
248
|
}
|
|
249
|
+
if (node.Data && fieldOrder === "data-first") i = encodeData(i, node, bytes);
|
|
236
250
|
return bytes;
|
|
237
251
|
}
|
|
238
252
|
/**
|
|
@@ -757,13 +771,16 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
757
771
|
/**
|
|
758
772
|
* @typedef {import('./interface.js').PBLink} PBLink
|
|
759
773
|
* @typedef {import('./interface.js').PBNode} PBNode
|
|
774
|
+
* @typedef {import('./interface.js').FieldOrder} FieldOrder
|
|
775
|
+
* @typedef {import('./interface.js').EncodeOptions} EncodeOptions
|
|
760
776
|
*/
|
|
761
777
|
const name = "dag-pb";
|
|
762
778
|
/**
|
|
763
779
|
* @param {PBNode} node
|
|
780
|
+
* @param {EncodeOptions} [options]
|
|
764
781
|
* @returns {ByteView<PBNode>}
|
|
765
782
|
*/
|
|
766
|
-
function encode(node) {
|
|
783
|
+
function encode(node, options) {
|
|
767
784
|
validate(node);
|
|
768
785
|
const pbn = {};
|
|
769
786
|
if (node.Links) pbn.Links = node.Links.map((l) => {
|
|
@@ -774,7 +791,7 @@ function encode(node) {
|
|
|
774
791
|
return link;
|
|
775
792
|
});
|
|
776
793
|
if (node.Data) pbn.Data = node.Data;
|
|
777
|
-
return encodeNode(pbn);
|
|
794
|
+
return encodeNode(pbn, options);
|
|
778
795
|
}
|
|
779
796
|
/**
|
|
780
797
|
* @param {ByteView<PBNode> | ArrayBufferView<PBNode>} bytes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as pubsubTopicToDhtKeyCid, Lr as PKCError } from "./util-
|
|
1
|
+
import { B as pubsubTopicToDhtKeyCid, Lr as PKCError } from "./util-DaZGW5bK.js";
|
|
2
2
|
import { ipnsSelector } from "ipns/selector";
|
|
3
3
|
import { ipnsValidator } from "ipns/validator";
|
|
4
4
|
import { unmarshalIPNSRecord } from "ipns";
|
|
@@ -7169,10 +7169,16 @@ var messages;
|
|
|
7169
7169
|
messages["ERR_COMMENT_HAS_LINK_THAT_IS_AUDIO"] = "This community does not allow comments with audio links";
|
|
7170
7170
|
messages["ERR_REPLY_HAS_LINK_THAT_IS_AUDIO"] = "This community does not allow replies with audio links";
|
|
7171
7171
|
messages["ERR_REPLY_HAS_LINK"] = "This community does not allow replies with links";
|
|
7172
|
+
messages["ERR_POST_GALLERY_NOT_ALLOWED"] = "This community does not allow posts with a gallery";
|
|
7173
|
+
messages["ERR_REPLY_GALLERY_NOT_ALLOWED"] = "This community does not allow replies with a gallery";
|
|
7174
|
+
messages["ERR_POST_GALLERY_EXCEEDS_MAX_ITEMS"] = "The post's gallery has more items than this community's features.maxPostGalleryItems";
|
|
7175
|
+
messages["ERR_REPLY_GALLERY_EXCEEDS_MAX_ITEMS"] = "The reply's gallery has more items than this community's features.maxReplyGalleryItems";
|
|
7176
|
+
messages["ERR_GALLERY_ITEM_NOT_MEDIA"] = "Every gallery item url must be an https url with an image, video or audio file extension";
|
|
7177
|
+
messages["ERR_GALLERY_ITEM_HTML_TAG_NAME_MISMATCH"] = "A gallery item's htmlTagName does not match its url's media type (img for image, video for video, audio for audio)";
|
|
7172
7178
|
messages["ERR_COMMENT_CONTENT_CONTAINS_MARKDOWN_AUDIO"] = "This community does not allow embedding audio in markdown content";
|
|
7173
7179
|
messages["ERR_REPLY_HAS_SPOILER_ENABLED"] = "This community does not allow authors to mark replies as spoilers";
|
|
7174
7180
|
messages["ERR_NESTED_REPLIES_NOT_ALLOWED"] = "This community does not allow nested replies (depth > 1)";
|
|
7175
|
-
messages["ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE"] = "Comment has no content, link, title or
|
|
7181
|
+
messages["ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE"] = "Comment has no content, link, title, crosspost or gallery";
|
|
7176
7182
|
messages["ERR_COMMENT_EDIT_HAS_NO_EDIT_FIELD"] = "CommentEdit has no editable field. At least one of content, deleted, flairs, spoiler or nsfw must be defined";
|
|
7177
7183
|
messages["ERR_COMMENT_MODERATION_HAS_NO_MODERATION_FIELD"] = "CommentModeration has no moderation field. At least one moderation field other than reason must be defined";
|
|
7178
7184
|
messages["ERR_REQUEST_ENCRYPTED_IS_INVALID_JSON_AFTER_DECRYPTION"] = "request.encrypted is an invalid json after decrypting";
|
|
@@ -8143,6 +8149,17 @@ const CrosspostSchema = object({
|
|
|
8143
8149
|
cid: CidStringSchema,
|
|
8144
8150
|
comment: lazy(() => CommentIpfsSchema.loose())
|
|
8145
8151
|
});
|
|
8152
|
+
const CommentGalleryItemSchema = looseObject({
|
|
8153
|
+
url: string().min(1).max(2e3),
|
|
8154
|
+
htmlTagName: _enum([
|
|
8155
|
+
"img",
|
|
8156
|
+
"video",
|
|
8157
|
+
"audio"
|
|
8158
|
+
]),
|
|
8159
|
+
width: number().positive().optional(),
|
|
8160
|
+
height: number().positive().optional(),
|
|
8161
|
+
alt: string().max(1e3).optional()
|
|
8162
|
+
});
|
|
8146
8163
|
const CreateCommentOptionsSchema = object({
|
|
8147
8164
|
flairs: FlairSchema.array().optional(),
|
|
8148
8165
|
spoiler: boolean().optional(),
|
|
@@ -8156,15 +8173,17 @@ const CreateCommentOptionsSchema = object({
|
|
|
8156
8173
|
parentCid: CidStringSchema.optional(),
|
|
8157
8174
|
postCid: CidStringSchema.optional(),
|
|
8158
8175
|
quotedCids: array(CidStringSchema).optional(),
|
|
8159
|
-
crosspost: CrosspostSchema.optional()
|
|
8176
|
+
crosspost: CrosspostSchema.optional(),
|
|
8177
|
+
gallery: CommentGalleryItemSchema.array().min(1).optional()
|
|
8160
8178
|
}).merge(CreatePublicationUserOptionsSchema).strict();
|
|
8161
|
-
const
|
|
8179
|
+
const commentHasPayload = (arg) => Boolean(arg.link || arg.content || arg.title || arg.crosspost || arg.gallery);
|
|
8180
|
+
const CreateCommentOptionsWithRefinementSchema = CreateCommentOptionsSchema.refine(commentHasPayload, messages.ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE).refine((arg) => arg.parentCid ? arg.postCid : true, messages.ERR_REPLY_HAS_NOT_DEFINED_POST_CID).refine(hasAtLeastOneCommunityIdentifier, atLeastOneCommunityIdentifierMessage);
|
|
8162
8181
|
const CommentSignedPropertyNames = t$3(n$3(CreateCommentOptionsSchema.shape, keysToOmitFromSignedPropertyNames));
|
|
8163
8182
|
const commentPubsubKeys = t$2([...CommentSignedPropertyNames, "signature"], (x) => [x, true]);
|
|
8164
8183
|
const CommentPubsubMessagePublicationSchema = CreateCommentOptionsSchema.merge(PublicationBaseBeforeSigning).extend({ signature: JsonSignatureSchema }).pick(commentPubsubKeys).strict();
|
|
8165
8184
|
const CommentPubsubMessageWithFlexibleAuthorSchema = CommentPubsubMessagePublicationSchema.merge(object({ author: AuthorPubsubSchema.loose().optional() })).strict();
|
|
8166
|
-
const CommentPubsubMessageWithFlexibleAuthorRefinementSchema = CommentPubsubMessageWithFlexibleAuthorSchema.loose().refine(
|
|
8167
|
-
CommentPubsubMessagePublicationSchema.refine(
|
|
8185
|
+
const CommentPubsubMessageWithFlexibleAuthorRefinementSchema = CommentPubsubMessageWithFlexibleAuthorSchema.loose().refine(commentHasPayload, messages.ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE);
|
|
8186
|
+
CommentPubsubMessagePublicationSchema.refine(commentHasPayload, messages.ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE).refine((arg) => arg.parentCid ? arg.postCid : true, messages.ERR_REPLY_HAS_NOT_DEFINED_POST_CID);
|
|
8168
8187
|
const CommentChallengeRequestToEncryptSchema = CreateCommentOptionsSchema.shape.challengeRequest.unwrap().extend({ comment: CommentPubsubMessageWithFlexibleAuthorSchema.loose() }).strict();
|
|
8169
8188
|
const CommentIpfsSchema = CommentPubsubMessageWithFlexibleAuthorSchema.extend({
|
|
8170
8189
|
depth: number().nonnegative().int(),
|
|
@@ -8178,7 +8197,7 @@ const CommentIpfsSchema = CommentPubsubMessageWithFlexibleAuthorSchema.extend({
|
|
|
8178
8197
|
"per-author"
|
|
8179
8198
|
]).optional()
|
|
8180
8199
|
}).strict();
|
|
8181
|
-
CommentIpfsSchema.refine(
|
|
8200
|
+
CommentIpfsSchema.refine(commentHasPayload, messages.ERR_COMMENT_HAS_NO_CONTENT_LINK_TITLE);
|
|
8182
8201
|
const AuthorWithCommentUpdateSchema = CommentPubsubMessagePublicationSchema.shape.author.unwrap().extend({ community: CommunityAuthorSchema.optional() }).loose();
|
|
8183
8202
|
const CommentUpdateSchema = object({
|
|
8184
8203
|
cid: CidStringSchema,
|
|
@@ -16141,6 +16160,8 @@ const CommunityFeaturesSchema = looseObject({
|
|
|
16141
16160
|
requirePostLinkIsMedia: boolean().optional(),
|
|
16142
16161
|
requireReplyLink: boolean().optional(),
|
|
16143
16162
|
requireReplyLinkIsMedia: boolean().optional(),
|
|
16163
|
+
maxPostGalleryItems: number().int().nonnegative().optional(),
|
|
16164
|
+
maxReplyGalleryItems: number().int().nonnegative().optional(),
|
|
16144
16165
|
pseudonymityMode: _enum([
|
|
16145
16166
|
"per-post",
|
|
16146
16167
|
"per-reply",
|
|
@@ -16526,14 +16547,14 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
|
|
|
16526
16547
|
], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
|
|
16527
16548
|
//#endregion
|
|
16528
16549
|
//#region dist/node/generated-version.js
|
|
16529
|
-
const version = "0.0.
|
|
16550
|
+
const version = "0.0.132";
|
|
16530
16551
|
//#endregion
|
|
16531
16552
|
//#region dist/node/version.js
|
|
16532
16553
|
const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
|
|
16533
16554
|
const pkcJsVersion = version;
|
|
16534
16555
|
var version_default = {
|
|
16535
16556
|
PKC_JS_VERSION: pkcJsVersion,
|
|
16536
|
-
DB_VERSION:
|
|
16557
|
+
DB_VERSION: 45,
|
|
16537
16558
|
PROTOCOL_VERSION: protocolVersion,
|
|
16538
16559
|
USER_AGENT: UserAgentSchema.parse(`/pkc-js:${pkcJsVersion}/`)
|
|
16539
16560
|
};
|
|
@@ -18284,7 +18305,7 @@ function calculateStringSizeSameAsIpfsAddCidV0Sync(content) {
|
|
|
18284
18305
|
}
|
|
18285
18306
|
async function calculateStringSizeSameAsIpfsAddCidV0(content) {
|
|
18286
18307
|
const { MemoryBlockstore } = await import("blockstore-core");
|
|
18287
|
-
const { importFile } = await import("./src-
|
|
18308
|
+
const { importFile } = await import("./src-BggJ_InF.js");
|
|
18288
18309
|
const blockstore = new MemoryBlockstore();
|
|
18289
18310
|
const entry = await importFile({
|
|
18290
18311
|
path: "content.json",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Lr as PKCError, on as ChallengeFileFactorySchema, sn as ChallengeFileSchema, yn as PageSortFileFactorySchema } from "./util-
|
|
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-DaZGW5bK.js";
|
|
2
|
+
import { s as validatePageSortFile } from "./page-sort-scoring-BqPwUozm.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-Cpazwn3v.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-DBOjkq17.js";
|
|
2
2
|
export { validatePageSortFileFactory };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as retryKuboIpfsAddAndProvide, C as hideClassPrivateProps, Lr as PKCError, Y as replaceXWithY, br as t, dt as findStartedCommunity, i as calculateStringSizeSameAsIpfsAddCidV0, kt as pTimeout, vr as n, zr as logger_default } from "../../chunks/util-
|
|
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 { Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Gr as stringify, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, Pr as toCommunitiesWireEntry, Rr as t$1, T as buildPageRuntimeFields, Tr as listCommunitiesSync, 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, 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 { $ as retryKuboIpfsAddAndProvide, C as hideClassPrivateProps, Lr as PKCError, Y as replaceXWithY, br as t, dt as findStartedCommunity, i as calculateStringSizeSameAsIpfsAddCidV0, kt as pTimeout, vr as n, zr as logger_default } from "../../chunks/util-DaZGW5bK.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-Cpazwn3v.js";
|
|
3
|
+
import { Dt as parseJsonWithPKCErrorIfFails, E as buildPagesRuntimeFields, Gr as stringify, L as extractCrosspostRuntimeFields, Mt as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, Pr as toCommunitiesWireEntry, Rr as t$1, T as buildPageRuntimeFields, Tr as listCommunitiesSync, 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, sn as require_lib, tt as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, wt as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails } from "../../chunks/rpc-local-community-C5xdrdFG.js";
|
|
4
|
+
import { t as LocalCommunity } from "../../chunks/local-community-BjDsNdnK.js";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import path from "path";
|
|
7
7
|
import assert from "assert";
|
|
@@ -87,6 +87,8 @@ export declare const parseRpcEditCommunityParam: (params: unknown) => {
|
|
|
87
87
|
requirePostLinkIsMedia?: boolean | undefined;
|
|
88
88
|
requireReplyLink?: boolean | undefined;
|
|
89
89
|
requireReplyLinkIsMedia?: boolean | undefined;
|
|
90
|
+
maxPostGalleryItems?: number | undefined;
|
|
91
|
+
maxReplyGalleryItems?: number | undefined;
|
|
90
92
|
pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined;
|
|
91
93
|
} | undefined;
|
|
92
94
|
suggested?: {
|
|
@@ -31,6 +31,17 @@ export declare const RpcCommentEventResultSchema: z.ZodObject<{
|
|
|
31
31
|
postCid: z.ZodOptional<z.ZodString>;
|
|
32
32
|
quotedCids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
33
33
|
crosspost: z.ZodOptional<z.ZodType<import("../../publications/comment/schema.js").Crosspost, import("../../publications/comment/schema.js").Crosspost, z.core.$ZodTypeInternals<import("../../publications/comment/schema.js").Crosspost, import("../../publications/comment/schema.js").Crosspost>>>;
|
|
34
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
|
+
url: z.ZodString;
|
|
36
|
+
htmlTagName: z.ZodEnum<{
|
|
37
|
+
img: "img";
|
|
38
|
+
video: "video";
|
|
39
|
+
audio: "audio";
|
|
40
|
+
}>;
|
|
41
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$loose>>>;
|
|
34
45
|
author: z.ZodOptional<z.ZodObject<{
|
|
35
46
|
name: z.ZodOptional<z.ZodString>;
|
|
36
47
|
previousCommentCid: z.ZodOptional<z.ZodString>;
|
|
@@ -212,6 +223,17 @@ export declare const RpcCommentUpdateResultSchema: z.ZodObject<{
|
|
|
212
223
|
postCid: z.ZodOptional<z.ZodString>;
|
|
213
224
|
quotedCids: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
214
225
|
crosspost: z.ZodOptional<z.ZodType<import("../../publications/comment/schema.js").Crosspost, import("../../publications/comment/schema.js").Crosspost, z.core.$ZodTypeInternals<import("../../publications/comment/schema.js").Crosspost, import("../../publications/comment/schema.js").Crosspost>>>;
|
|
226
|
+
gallery: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
227
|
+
url: z.ZodString;
|
|
228
|
+
htmlTagName: z.ZodEnum<{
|
|
229
|
+
img: "img";
|
|
230
|
+
video: "video";
|
|
231
|
+
audio: "audio";
|
|
232
|
+
}>;
|
|
233
|
+
width: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
height: z.ZodOptional<z.ZodNumber>;
|
|
235
|
+
alt: z.ZodOptional<z.ZodString>;
|
|
236
|
+
}, z.core.$loose>>>;
|
|
215
237
|
author: z.ZodOptional<z.ZodObject<{
|
|
216
238
|
name: z.ZodOptional<z.ZodString>;
|
|
217
239
|
previousCommentCid: z.ZodOptional<z.ZodString>;
|
|
@@ -356,6 +378,8 @@ export declare const RpcEditCommunityParamSchema: z.ZodObject<{
|
|
|
356
378
|
requirePostLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
357
379
|
requireReplyLink: z.ZodOptional<z.ZodBoolean>;
|
|
358
380
|
requireReplyLinkIsMedia: z.ZodOptional<z.ZodBoolean>;
|
|
381
|
+
maxPostGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
382
|
+
maxReplyGalleryItems: z.ZodOptional<z.ZodNumber>;
|
|
359
383
|
pseudonymityMode: z.ZodOptional<z.ZodEnum<{
|
|
360
384
|
"per-post": "per-post";
|
|
361
385
|
"per-reply": "per-reply";
|