@pkcprotocol/pkc-js 0.0.120 → 0.0.121

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.
@@ -1 +1 @@
1
- export declare const version = "0.0.120";
1
+ export declare const version = "0.0.121";
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by config/generate-version.js — do not edit
2
- export const version = "0.0.120";
2
+ export const version = "0.0.121";
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -49,7 +49,11 @@ export const decryptStringAesGcm = async (ciphertext, key, iv, tag) => {
49
49
  const cipher = forge.cipher.createDecipher("AES-GCM", keyAsForgeBuffer);
50
50
  cipher.start({ iv: ivAsForgeBuffer, tag: tagAsForgeBuffer });
51
51
  cipher.update(uint8ArrayToNodeForgeBuffer(ciphertext));
52
- cipher.finish();
52
+ // finish() returns false when the authentication tag doesn't match; cipher.output is then unauthenticated and must not be read
53
+ // https://github.com/pkcprotocol/pkc-js/issues/418
54
+ const authenticated = cipher.finish();
55
+ if (!authenticated)
56
+ throw Error("decryptStringAesGcm failed to decrypt, the AES-GCM authentication tag does not match the ciphertext, key and iv");
53
57
  const decrypted = cipher.output.toString();
54
58
  return decrypted;
55
59
  };
@@ -1 +1 @@
1
- {"version":3,"file":"encryption.js","sourceRoot":"","sources":["../../../src/signer/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,EAAE,UAAU,IAAI,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAG3D,MAAM,gBAAgB,GAAG,CAAC,GAAQ,EAAE,EAAE,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,CAAC;AAEjG,MAAM,2BAA2B,GAAG,CAAC,UAAsB,EAAE,EAAE;IAC3D,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI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AS,GAAG,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAChE,+BAA+B;IAC/B,MAAM,gBAAgB,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhD,8EAA8E;IAC9E,IAAI,SAAS,GAAG,MAAM,mBAAmB,CAAC,SAAS,CAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAE/G,iBAAiB;IACjB,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAEzC,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC"}
@@ -3,7 +3,7 @@
3
3
  "challenges.js": {
4
4
  "isEntry": true,
5
5
  "imports": [
6
- "chunks/validate-package-factories-BpJjVrRb.js"
6
+ "chunks/validate-package-factories-DoUgLmab.js"
7
7
  ],
8
8
  "dynamicImports": [],
9
9
  "inputs": [
@@ -16,7 +16,7 @@
16
16
  "node:module"
17
17
  ],
18
18
  "dynamicImports": [
19
- "chunks/node-CsHuIZmP.js"
19
+ "chunks/node-ByPmdQSD.js"
20
20
  ],
21
21
  "inputs": [
22
22
  "dist/node/runtime/node/compile-cache.js",
@@ -26,7 +26,7 @@
26
26
  "index.js": {
27
27
  "isEntry": true,
28
28
  "imports": [
29
- "chunks/node-CsHuIZmP.js"
29
+ "chunks/node-ByPmdQSD.js"
30
30
  ],
31
31
  "dynamicImports": [],
32
32
  "inputs": []
@@ -34,7 +34,7 @@
34
34
  "page-sorts.js": {
35
35
  "isEntry": true,
36
36
  "imports": [
37
- "chunks/validate-package-factories-BpJjVrRb.js"
37
+ "chunks/validate-package-factories-DoUgLmab.js"
38
38
  ],
39
39
  "dynamicImports": [],
40
40
  "inputs": [
@@ -44,10 +44,10 @@
44
44
  "rpc/src/index.js": {
45
45
  "isEntry": true,
46
46
  "imports": [
47
- "chunks/rpc-local-community-DMDs0XGh.js",
48
- "chunks/node-CsHuIZmP.js",
49
- "chunks/util-CXxGmK2P.js",
50
- "chunks/local-community-BbJyIuOc.js",
47
+ "chunks/rpc-local-community-WmgDVdST.js",
48
+ "chunks/node-ByPmdQSD.js",
49
+ "chunks/util-ok4F-vdA.js",
50
+ "chunks/local-community-CMkVMrOZ.js",
51
51
  "node:url",
52
52
  "path",
53
53
  "assert",
@@ -77,12 +77,12 @@
77
77
  "\u0000rolldown/runtime.js"
78
78
  ]
79
79
  },
80
- "chunks/helia-for-pkc-Dk9JTeUn.js": {
80
+ "chunks/helia-for-pkc-Bw9KzcSY.js": {
81
81
  "isEntry": false,
82
82
  "imports": [
83
83
  "chunks/chunk-2rV9d50f.js",
84
- "chunks/util-CXxGmK2P.js",
85
- "chunks/util-_DJ6MgmW.js",
84
+ "chunks/util-ok4F-vdA.js",
85
+ "chunks/util-BzXGIQ9v.js",
86
86
  "chunks/src-DKntVmyX.js",
87
87
  "chunks/src-Cpx2Sts8.js",
88
88
  "node:url",
@@ -201,13 +201,13 @@
201
201
  "dist/node/helia/helia-for-pkc.js"
202
202
  ]
203
203
  },
204
- "chunks/local-community-BbJyIuOc.js": {
204
+ "chunks/local-community-CMkVMrOZ.js": {
205
205
  "isEntry": false,
206
206
  "imports": [
207
207
  "chunks/chunk-2rV9d50f.js",
208
- "chunks/rpc-local-community-DMDs0XGh.js",
209
- "chunks/util-CXxGmK2P.js",
210
- "chunks/page-sort-scoring-B2iu-tyC.js",
208
+ "chunks/rpc-local-community-WmgDVdST.js",
209
+ "chunks/util-ok4F-vdA.js",
210
+ "chunks/page-sort-scoring-DEib5648.js",
211
211
  "node:crypto",
212
212
  "node:url",
213
213
  "node:path",
@@ -266,21 +266,21 @@
266
266
  "dist/node/runtime/node/community/local-community.js"
267
267
  ]
268
268
  },
269
- "chunks/local-community-BkZDlh4z.js": {
269
+ "chunks/local-community-feziLP2d.js": {
270
270
  "isEntry": false,
271
271
  "imports": [
272
- "chunks/local-community-BbJyIuOc.js"
272
+ "chunks/local-community-CMkVMrOZ.js"
273
273
  ],
274
274
  "dynamicImports": [],
275
275
  "inputs": []
276
276
  },
277
- "chunks/node-CsHuIZmP.js": {
277
+ "chunks/node-ByPmdQSD.js": {
278
278
  "isEntry": false,
279
279
  "imports": [
280
280
  "chunks/chunk-2rV9d50f.js",
281
- "chunks/rpc-local-community-DMDs0XGh.js",
282
- "chunks/util-CXxGmK2P.js",
283
- "chunks/util-_DJ6MgmW.js",
281
+ "chunks/rpc-local-community-WmgDVdST.js",
282
+ "chunks/util-ok4F-vdA.js",
283
+ "chunks/util-BzXGIQ9v.js",
284
284
  "path",
285
285
  "assert",
286
286
  "fs",
@@ -291,8 +291,8 @@
291
291
  "rpc-websockets"
292
292
  ],
293
293
  "dynamicImports": [
294
- "chunks/helia-for-pkc-Dk9JTeUn.js",
295
- "chunks/local-community-BbJyIuOc.js"
294
+ "chunks/helia-for-pkc-Bw9KzcSY.js",
295
+ "chunks/local-community-CMkVMrOZ.js"
296
296
  ],
297
297
  "inputs": [
298
298
  "node_modules/zod/v4/locales/en.js",
@@ -339,22 +339,22 @@
339
339
  "dist/node/index.js"
340
340
  ]
341
341
  },
342
- "chunks/page-sort-scoring-B2iu-tyC.js": {
342
+ "chunks/page-sort-scoring-DEib5648.js": {
343
343
  "isEntry": false,
344
344
  "imports": [
345
- "chunks/util-CXxGmK2P.js"
345
+ "chunks/util-ok4F-vdA.js"
346
346
  ],
347
347
  "dynamicImports": [],
348
348
  "inputs": [
349
349
  "dist/node/pages/page-sort-scoring.js"
350
350
  ]
351
351
  },
352
- "chunks/rpc-local-community-DMDs0XGh.js": {
352
+ "chunks/rpc-local-community-WmgDVdST.js": {
353
353
  "isEntry": false,
354
354
  "imports": [
355
355
  "chunks/chunk-2rV9d50f.js",
356
- "chunks/util-CXxGmK2P.js",
357
- "chunks/page-sort-scoring-B2iu-tyC.js",
356
+ "chunks/util-ok4F-vdA.js",
357
+ "chunks/page-sort-scoring-DEib5648.js",
358
358
  "chunks/src-CYIMjhjK.js",
359
359
  "node:crypto",
360
360
  "node:url",
@@ -1302,7 +1302,21 @@
1302
1302
  "node_modules/it-parallel-batch/dist/src/index.js"
1303
1303
  ]
1304
1304
  },
1305
- "chunks/util-CXxGmK2P.js": {
1305
+ "chunks/util-BzXGIQ9v.js": {
1306
+ "isEntry": false,
1307
+ "imports": [
1308
+ "chunks/util-ok4F-vdA.js",
1309
+ "ipns/selector",
1310
+ "ipns/validator",
1311
+ "ipns",
1312
+ "uint8arrays/equals"
1313
+ ],
1314
+ "dynamicImports": [],
1315
+ "inputs": [
1316
+ "dist/node/helia/util.js"
1317
+ ]
1318
+ },
1319
+ "chunks/util-ok4F-vdA.js": {
1306
1320
  "isEntry": false,
1307
1321
  "imports": [
1308
1322
  "chunks/chunk-2rV9d50f.js",
@@ -1396,25 +1410,11 @@
1396
1410
  "dist/node/util.js"
1397
1411
  ]
1398
1412
  },
1399
- "chunks/util-_DJ6MgmW.js": {
1400
- "isEntry": false,
1401
- "imports": [
1402
- "chunks/util-CXxGmK2P.js",
1403
- "ipns/selector",
1404
- "ipns/validator",
1405
- "ipns",
1406
- "uint8arrays/equals"
1407
- ],
1408
- "dynamicImports": [],
1409
- "inputs": [
1410
- "dist/node/helia/util.js"
1411
- ]
1412
- },
1413
- "chunks/validate-package-factories-BpJjVrRb.js": {
1413
+ "chunks/validate-package-factories-DoUgLmab.js": {
1414
1414
  "isEntry": false,
1415
1415
  "imports": [
1416
- "chunks/util-CXxGmK2P.js",
1417
- "chunks/page-sort-scoring-B2iu-tyC.js"
1416
+ "chunks/util-ok4F-vdA.js",
1417
+ "chunks/page-sort-scoring-DEib5648.js"
1418
1418
  ],
1419
1419
  "dynamicImports": [],
1420
1420
  "inputs": [
@@ -1,2 +1,2 @@
1
- import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-BpJjVrRb.js";
1
+ import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-DoUgLmab.js";
2
2
  export { validateChallengeFileFactory };
@@ -1,12 +1,12 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { Ar as PKCError, Mr as logger_default, S as hideClassPrivateProps, n as binaryKeyToPubsubTopic, w as ipnsNameToIpnsOverPubsubTopic } from "./util-CXxGmK2P.js";
3
- import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-_DJ6MgmW.js";
2
+ import { Ar as PKCError, Mr as logger_default, S as hideClassPrivateProps, n as binaryKeyToPubsubTopic, w as ipnsNameToIpnsOverPubsubTopic } from "./util-ok4F-vdA.js";
3
+ import { a as directFetchIpnsRecordFromProviders, c as readFreshCachedIpnsRecordFromPubsubLocalStore, i as connectToPubsubPeers, l as selectBitswapSessionSeedPeers, n as REACHABILITY_DOCS_URL, o as fetchBlockWithStalledSessionFailover, r as cacheIpnsRecordInPubsubLocalStore, s as getHeliaDebugContext, u as summarizeProviderReachability } from "./util-BzXGIQ9v.js";
4
4
  import { t as map } from "./src-Cpx2Sts8.js";
5
5
  import { t as parallelBatch } from "./src-DKntVmyX.js";
6
6
  import { fileURLToPath } from "node:url";
7
7
  import fsp, { rename, writeFile } from "node:fs/promises";
8
- import Path, { basename, dirname, join } from "node:path";
9
- import path from "path";
8
+ import path, { basename, dirname, join } from "node:path";
9
+ import path$1 from "path";
10
10
  import { CID } from "multiformats/cid";
11
11
  import { peerIdFromString } from "@libp2p/peer-id";
12
12
  import * as Digest from "multiformats/hashes/digest";
@@ -151,7 +151,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
151
151
  Object.defineProperty(exports, "__esModule", { value: true });
152
152
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
153
153
  const os$1 = __require("os");
154
- const path$9 = __require("path");
154
+ const path$10 = __require("path");
155
155
  const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
156
156
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
157
157
  /**
@@ -180,7 +180,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
180
180
  }
181
181
  exports.unixify = unixify;
182
182
  function makeAbsolute(cwd, filepath) {
183
- return path$9.resolve(cwd, filepath);
183
+ return path$10.resolve(cwd, filepath);
184
184
  }
185
185
  exports.makeAbsolute = makeAbsolute;
186
186
  function removeLeadingDotSegment(entry) {
@@ -1432,7 +1432,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1432
1432
  //#endregion
1433
1433
  //#region node_modules/picomatch/lib/constants.js
1434
1434
  var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1435
- const path$8 = __require("path");
1435
+ const path$9 = __require("path");
1436
1436
  const WIN_SLASH = "\\\\/";
1437
1437
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1438
1438
  const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -1557,7 +1557,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1557
1557
  CHAR_UNDERSCORE: 95,
1558
1558
  CHAR_VERTICAL_LINE: 124,
1559
1559
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1560
- SEP: path$8.sep,
1560
+ SEP: path$9.sep,
1561
1561
  /**
1562
1562
  * Create EXTGLOB_CHARS
1563
1563
  */
@@ -1601,7 +1601,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1601
1601
  //#endregion
1602
1602
  //#region node_modules/picomatch/lib/utils.js
1603
1603
  var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
1604
- const path$7 = __require("path");
1604
+ const path$8 = __require("path");
1605
1605
  const win32 = process.platform === "win32";
1606
1606
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
1607
1607
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -1621,7 +1621,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
1621
1621
  };
1622
1622
  exports.isWindows = (options) => {
1623
1623
  if (options && typeof options.windows === "boolean") return options.windows;
1624
- return win32 === true || path$7.sep === "\\";
1624
+ return win32 === true || path$8.sep === "\\";
1625
1625
  };
1626
1626
  exports.escapeLast = (input, char, lastIdx) => {
1627
1627
  const idx = input.lastIndexOf(char, lastIdx);
@@ -2991,7 +2991,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2991
2991
  //#endregion
2992
2992
  //#region node_modules/picomatch/lib/picomatch.js
2993
2993
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2994
- const path$6 = __require("path");
2994
+ const path$7 = __require("path");
2995
2995
  const scan = require_scan();
2996
2996
  const parse = require_parse();
2997
2997
  const utils = require_utils$2();
@@ -3130,7 +3130,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3130
3130
  * @api public
3131
3131
  */
3132
3132
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3133
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$6.basename(input));
3133
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$7.basename(input));
3134
3134
  };
3135
3135
  /**
3136
3136
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -3685,7 +3685,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3685
3685
  var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3686
3686
  Object.defineProperty(exports, "__esModule", { value: true });
3687
3687
  exports.isAbsolute = exports.partitionAbsoluteAndRelative = exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
3688
- const path$5 = __require("path");
3688
+ const path$6 = __require("path");
3689
3689
  const globParent = require_glob_parent();
3690
3690
  const micromatch = require_micromatch();
3691
3691
  const GLOBSTAR = "**";
@@ -3793,7 +3793,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3793
3793
  }
3794
3794
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
3795
3795
  function isAffectDepthOfReadingPattern(pattern) {
3796
- const basename = path$5.basename(pattern);
3796
+ const basename = path$6.basename(pattern);
3797
3797
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
3798
3798
  }
3799
3799
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -3867,7 +3867,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3867
3867
  }
3868
3868
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
3869
3869
  function isAbsolute(pattern) {
3870
- return path$5.isAbsolute(pattern);
3870
+ return path$6.isAbsolute(pattern);
3871
3871
  }
3872
3872
  exports.isAbsolute = isAbsolute;
3873
3873
  }));
@@ -4495,7 +4495,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
4495
4495
  //#region node_modules/@nodelib/fs.scandir/out/settings.js
4496
4496
  var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
4497
4497
  Object.defineProperty(exports, "__esModule", { value: true });
4498
- const path$4 = __require("path");
4498
+ const path$5 = __require("path");
4499
4499
  const fsStat = require_out$3();
4500
4500
  const fs = require_fs();
4501
4501
  var Settings = class {
@@ -4503,7 +4503,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
4503
4503
  this._options = _options;
4504
4504
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
4505
4505
  this.fs = fs.createFileSystemAdapter(this._options.fs);
4506
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
4506
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$5.sep);
4507
4507
  this.stats = this._getValue(this._options.stats, false);
4508
4508
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
4509
4509
  this.fsStatSettings = new fsStat.Settings({
@@ -5097,7 +5097,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
5097
5097
  //#region node_modules/@nodelib/fs.walk/out/settings.js
5098
5098
  var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5099
5099
  Object.defineProperty(exports, "__esModule", { value: true });
5100
- const path$3 = __require("path");
5100
+ const path$4 = __require("path");
5101
5101
  const fsScandir = require_out$2();
5102
5102
  var Settings = class {
5103
5103
  constructor(_options = {}) {
@@ -5107,7 +5107,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5107
5107
  this.deepFilter = this._getValue(this._options.deepFilter, null);
5108
5108
  this.entryFilter = this._getValue(this._options.entryFilter, null);
5109
5109
  this.errorFilter = this._getValue(this._options.errorFilter, null);
5110
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$3.sep);
5110
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
5111
5111
  this.fsScandirSettings = new fsScandir.Settings({
5112
5112
  followSymbolicLinks: this._options.followSymbolicLinks,
5113
5113
  fs: this._options.fs,
@@ -5159,7 +5159,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5159
5159
  //#region node_modules/fast-glob/out/readers/reader.js
5160
5160
  var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
5161
5161
  Object.defineProperty(exports, "__esModule", { value: true });
5162
- const path$2 = __require("path");
5162
+ const path$3 = __require("path");
5163
5163
  const fsStat = require_out$3();
5164
5164
  const utils = require_utils$1();
5165
5165
  var Reader = class {
@@ -5172,7 +5172,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
5172
5172
  });
5173
5173
  }
5174
5174
  _getFullEntryPath(filepath) {
5175
- return path$2.resolve(this._settings.cwd, filepath);
5175
+ return path$3.resolve(this._settings.cwd, filepath);
5176
5176
  }
5177
5177
  _makeEntry(stats, pattern) {
5178
5178
  const entry = {
@@ -5507,7 +5507,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
5507
5507
  //#region node_modules/fast-glob/out/providers/provider.js
5508
5508
  var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
5509
5509
  Object.defineProperty(exports, "__esModule", { value: true });
5510
- const path$1 = __require("path");
5510
+ const path$2 = __require("path");
5511
5511
  const deep_1 = require_deep();
5512
5512
  const entry_1 = require_entry$1();
5513
5513
  const error_1 = require_error();
@@ -5521,7 +5521,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
5521
5521
  this.entryTransformer = new entry_2.default(this._settings);
5522
5522
  }
5523
5523
  _getRootDirectory(task) {
5524
- return path$1.resolve(this._settings.cwd, task.base);
5524
+ return path$2.resolve(this._settings.cwd, task.base);
5525
5525
  }
5526
5526
  _getReaderOptions(task) {
5527
5527
  const basePath = task.base === "." ? "" : task.base;
@@ -5852,7 +5852,7 @@ var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((export
5852
5852
  * Async iterable filename pattern matcher
5853
5853
  */
5854
5854
  async function* glob(dir, pattern, options = {}) {
5855
- const absoluteDir = Path.resolve(dir);
5855
+ const absoluteDir = path.resolve(dir);
5856
5856
  const stats = await fsp.stat(absoluteDir);
5857
5857
  for await (const entry of import_out.default.stream(pattern, {
5858
5858
  ...options,
@@ -6022,7 +6022,7 @@ var NextToLast = class {
6022
6022
  };
6023
6023
  }
6024
6024
  decode(str) {
6025
- let fileName = Path.basename(str);
6025
+ let fileName = path.basename(str);
6026
6026
  if (fileName.endsWith(this.extension)) fileName = fileName.substring(0, fileName.length - this.extension.length);
6027
6027
  return CID.decode(this.base.decoder.decode(fileName));
6028
6028
  }
@@ -6048,7 +6048,7 @@ var NextToLast = class {
6048
6048
  async function writeFile$1(file, contents, options) {
6049
6049
  try {
6050
6050
  options?.signal?.throwIfAborted();
6051
- await raceSignal(fsp.mkdir(Path.dirname(file), { recursive: true }), options?.signal);
6051
+ await raceSignal(fsp.mkdir(path.dirname(file), { recursive: true }), options?.signal);
6052
6052
  const writer = new Writer(file);
6053
6053
  options?.signal?.throwIfAborted();
6054
6054
  await writer.write(contents);
@@ -6073,7 +6073,7 @@ var FsBlockstore = class {
6073
6073
  deleteManyConcurrency;
6074
6074
  shardingStrategy;
6075
6075
  constructor(location, init = {}) {
6076
- this.path = Path.resolve(location);
6076
+ this.path = path.resolve(location);
6077
6077
  this.createIfMissing = init.createIfMissing ?? true;
6078
6078
  this.errorIfExists = init.errorIfExists ?? false;
6079
6079
  this.deleteManyConcurrency = init.deleteManyConcurrency ?? 50;
@@ -6099,7 +6099,7 @@ var FsBlockstore = class {
6099
6099
  async put(key, val, options) {
6100
6100
  const { dir, file } = this.shardingStrategy.encode(key);
6101
6101
  try {
6102
- await writeFile$1(Path.join(this.path, dir, file), val, options);
6102
+ await writeFile$1(path.join(this.path, dir, file), val, options);
6103
6103
  return key;
6104
6104
  } catch (err) {
6105
6105
  throw new PutFailedError(String(err));
@@ -6118,7 +6118,7 @@ var FsBlockstore = class {
6118
6118
  let handle;
6119
6119
  try {
6120
6120
  options?.signal?.throwIfAborted();
6121
- handle = await raceSignal(fsp.open(Path.join(this.path, dir, file)), options?.signal);
6121
+ handle = await raceSignal(fsp.open(path.join(this.path, dir, file)), options?.signal);
6122
6122
  yield* handle.createReadStream();
6123
6123
  } catch (err) {
6124
6124
  if (handle != null) await raceSignal(handle.close(), options?.signal);
@@ -6139,7 +6139,7 @@ var FsBlockstore = class {
6139
6139
  const { dir, file } = this.shardingStrategy.encode(key);
6140
6140
  try {
6141
6141
  options?.signal?.throwIfAborted();
6142
- await raceSignal(fsp.unlink(Path.join(this.path, dir, file)), options?.signal);
6142
+ await raceSignal(fsp.unlink(path.join(this.path, dir, file)), options?.signal);
6143
6143
  } catch (err) {
6144
6144
  if (err.code === "ENOENT") return;
6145
6145
  throw new DeleteFailedError(String(err));
@@ -6157,14 +6157,14 @@ var FsBlockstore = class {
6157
6157
  const { dir, file } = this.shardingStrategy.encode(key);
6158
6158
  try {
6159
6159
  options?.signal?.throwIfAborted();
6160
- await raceSignal(fsp.access(Path.join(this.path, dir, file)), options?.signal);
6160
+ await raceSignal(fsp.access(path.join(this.path, dir, file)), options?.signal);
6161
6161
  } catch (err) {
6162
6162
  return false;
6163
6163
  }
6164
6164
  return true;
6165
6165
  }
6166
6166
  async *getAll(options) {
6167
- const pattern = `**/*${this.shardingStrategy.extension}`.split(Path.sep).join("/");
6167
+ const pattern = `**/*${this.shardingStrategy.extension}`.split(path.sep).join("/");
6168
6168
  const files = glob(this.path, pattern, { absolute: true });
6169
6169
  for await (const file of files) try {
6170
6170
  options?.signal?.throwIfAborted();
@@ -6216,7 +6216,7 @@ async function createBlockstoreForLibp2pJsClient({ dataPath, key }) {
6216
6216
  defaultMaxBytes: DEFAULT_IN_MEMORY_BLOCKSTORE_MAX_BYTES,
6217
6217
  close: async () => {}
6218
6218
  };
6219
- const store = new FsBlockstore(path.join(dataPath, "blockstore", key));
6219
+ const store = new FsBlockstore(path$1.join(dataPath, "blockstore", key));
6220
6220
  await store.open();
6221
6221
  return {
6222
6222
  blockstore: store,
@@ -1,13 +1,13 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-CXxGmK2P.js";
3
- import { $n as backupCommunityDb, An as verifyCommunity, Cn as verifyChallengeRequest, Cr as n$4, Dn as verifyCommentModeration, En as verifyCommentIpfs, Er as stringify, Gn as decode, Hn as getCommunityNameFromWire, In as getAuthorNameFromWire, Jn as getIpfsKeyFromPrivateKey, Kn as encode, Mn as verifyVote, Mr as require_lodash_merge, Nn as buildRuntimeAuthor, On as verifyCommentPubsubMessage, Pn as cleanWireAuthor, Q as createSchemaRowParser, Qn as BackupAbortError, Rn as crosspostChainDepthUpTo, S as KeyvBetterSqlite3, Sr as n$5, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tr as t$9, Tt as parseJsonWithPKCErrorIfFails, U as pLimit, Un as getCommunityPublicKeyFromWire, X as coerceSchemaRowJson, Xn as getPKCAddressFromPublicKeySync, Y as coerceSchemaRowBoolean, Yn as getPKCAddressFromPublicKey, Z as collectSchemaRowCoercions, Zn as getPublicKeyFromPrivateKey, _ as createAuthorIdentityMatcher, _n as signCommentUpdateForChallengeVerification, a as generatePagesReportingFailedSorts, ar as deriveDbPosts, br as r$2, c as resolvePageSortsOrThrow, cn as cleanUpBeforePublishing, d as getChallengeVerification, en as SignerWithPublicKeyAddress, er as calculateExpectedSignatureSize, f as getCommunityChallengeFromCommunityChallengeSettings, fn as signChallengeVerification, ft as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, g as authorNameResolveFailureReason, gn as signCommentUpdate, h as authorIdentityMatcherForRequest, hr as resolveDbPostsCidRefs, i as derivePublicPageSorts, in as decryptEd25519AesGcmPublicKeyBuffer, ir as deriveCommentIpfsFromCommentTableRow, j as iterateOverPageCidsToFindAllCids, jn as verifyCommunityEdit, jr as STORAGE_KEYS, kn as verifyCommentUpdate, lr as getThumbnailPropsOfLink, m as pkcJsChallenges, mn as signCommentEdit, mr as refreshCommunitiesList, o as loadPageSortsForStartedCommunity, on as encryptEd25519AesGcmPublicKeyBuffer, or as deriveDbReplies, p as loadChallengeFileFromCommunityChallengeSettings, pn as signComment, pr as moveCommunityDbToDeletedDirectory, r as computePageSortsFingerprint, rr as deleteOldCommunityInWindows, s as lookupPageSortFactories, sn as _validateSignatureOfPKCRecord, sr as getDefaultCommunityDbConfig, t as RpcLocalCommunity, tr as calculateInlineRepliesBudget, u as deriveCommunityChallengesOrThrow, un as signChallengeMessage, ur as importSignerIntoKuboNode, ut as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, v as TrackedInstanceRegistry, vn as signCommunity, vr as t$10, w as TIMEFRAMES_TO_SECONDS, x as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, xn as verifyChallengeAnswer, xr as t$8, y as LRUCache, yr as t$11, zn as effectiveMaxCrosspostDepth } from "./rpc-local-community-DMDs0XGh.js";
4
- import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-B2iu-tyC.js";
2
+ import { $t as CommentModerationPubsubMessagePublicationSchema, A as isLinkOfAnimatedImage, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Bn as CommentUpdateTableRowSchema, Dn as VoteTablesRowSchema, Dt as pTimeout, F as isLinkValid, Gr as ZodError, Jn as CommentEditPubsubMessagePublicationSchema, Jt as CommunityEditPublicationPubsubReservedFields, K as removeNullUndefinedValues, Kt as version_default, Lt as DecryptedChallengeRequestPublicationSchema, M as isLinkOfImage, Mr as logger_default, Mt as ChallengeRequestMessageSchema, N as isLinkOfMedia, Ot as ChallengeAnswerMessageSchema, P as isLinkOfVideo, Pt as ChallengeVerificationMessageSchema, Q as retryKuboIpfsAddAndProvide, Qn as CommentEditsTableRowSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rt as DecryptedChallengeRequestSchema, S as hideClassPrivateProps, Sr as t$2, St as untrackStartedCommunity, Tn as VotePubsubReservedFields, Tt as require_sha256, U as removeBlocksFromKuboNode, Vn as CommentsTableRowSchema, W as removeMfsFilesSafely, X as retryKuboBlockPutPinAndProvidePubsubTopic, Xn as CommentEditReservedFields, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, _ as getEquivalentCommunityAddresses, _r as r$1, a as calculateUnixFsDagSizeCidV0, c as contentContainsMarkdownVideos, ct as writeKuboFilesWithTimeout, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$2, en as CommentModerationReservedFields, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, fr as t$5, ft as findUpdatingCommunity, g as genToArray, h as findMalformedUnicodeString, hr as e, i as calculateStringSizeSameAsIpfsAddCidV0, it as timestamp, j as isLinkOfAudio, jn as CommentPubsubMessageReservedFields, jr as messages, lr as n$3, lt as findCommunityInRegistry, mr as e$1, nn as CommentModerationsTableRowSchema, nr as AuthorReservedFields, nt as statMfsPathSafely, o as contentContainsMarkdownAudio, ot as withSortedKeys, pr as t$6, r as calculateIpfsCidV0, s as contentContainsMarkdownImages, st as withSortedKeysDeep, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, ur as t$7, ut as findStartedCommunity, v as getErrorCodeFromMessage, vr as t$3, vt as syncCommunityRegistryEntry, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, xr as t$4, xt as trackUpdatingCommunity, y as getIpnsRecordInLocalKuboNode, yt as trackStartedCommunity } from "./util-ok4F-vdA.js";
3
+ import { $n as backupCommunityDb, An as verifyCommunity, Cn as verifyChallengeRequest, Cr as n$4, Dn as verifyCommentModeration, En as verifyCommentIpfs, Er as stringify, Gn as decode, Hn as getCommunityNameFromWire, In as getAuthorNameFromWire, Jn as getIpfsKeyFromPrivateKey, Kn as encode, Mn as verifyVote, Mr as require_lodash_merge, Nn as buildRuntimeAuthor, On as verifyCommentPubsubMessage, Pn as cleanWireAuthor, Q as createSchemaRowParser, Qn as BackupAbortError, Rn as crosspostChainDepthUpTo, S as KeyvBetterSqlite3, Sr as n$5, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tr as t$9, Tt as parseJsonWithPKCErrorIfFails, U as pLimit, Un as getCommunityPublicKeyFromWire, X as coerceSchemaRowJson, Xn as getPKCAddressFromPublicKeySync, Y as coerceSchemaRowBoolean, Yn as getPKCAddressFromPublicKey, Z as collectSchemaRowCoercions, Zn as getPublicKeyFromPrivateKey, _ as createAuthorIdentityMatcher, _n as signCommentUpdateForChallengeVerification, a as generatePagesReportingFailedSorts, ar as deriveDbPosts, br as r$2, c as resolvePageSortsOrThrow, cn as cleanUpBeforePublishing, d as getChallengeVerification, en as SignerWithPublicKeyAddress, er as calculateExpectedSignatureSize, f as getCommunityChallengeFromCommunityChallengeSettings, fn as signChallengeVerification, ft as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, g as authorNameResolveFailureReason, gn as signCommentUpdate, h as authorIdentityMatcherForRequest, hr as resolveDbPostsCidRefs, i as derivePublicPageSorts, in as decryptEd25519AesGcmPublicKeyBuffer, ir as deriveCommentIpfsFromCommentTableRow, j as iterateOverPageCidsToFindAllCids, jn as verifyCommunityEdit, jr as STORAGE_KEYS, kn as verifyCommentUpdate, lr as getThumbnailPropsOfLink, m as pkcJsChallenges, mn as signCommentEdit, mr as refreshCommunitiesList, o as loadPageSortsForStartedCommunity, on as encryptEd25519AesGcmPublicKeyBuffer, or as deriveDbReplies, p as loadChallengeFileFromCommunityChallengeSettings, pn as signComment, pr as moveCommunityDbToDeletedDirectory, r as computePageSortsFingerprint, rr as deleteOldCommunityInWindows, s as lookupPageSortFactories, sn as _validateSignatureOfPKCRecord, sr as getDefaultCommunityDbConfig, t as RpcLocalCommunity, tr as calculateInlineRepliesBudget, u as deriveCommunityChallengesOrThrow, un as signChallengeMessage, ur as importSignerIntoKuboNode, ut as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, v as TrackedInstanceRegistry, vn as signCommunity, vr as t$10, w as TIMEFRAMES_TO_SECONDS, x as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, xn as verifyChallengeAnswer, xr as t$8, y as LRUCache, yr as t$11, zn as effectiveMaxCrosspostDepth } from "./rpc-local-community-WmgDVdST.js";
4
+ import { a as scorePageCommentsWithFile, i as partitionPageCommentsForSort, n as filterRepliesForPageSort, o as stripRepliesFromPageComment, r as orderPageCommentsByScore, t as createDescendantsLookup } from "./page-sort-scoring-DEib5648.js";
5
5
  import { randomFillSync, randomUUID } from "node:crypto";
6
6
  import { fileURLToPath, pathToFileURL } from "node:url";
7
- import Path from "node:path";
7
+ import path from "node:path";
8
8
  import os from "os";
9
9
  import { existsSync, promises } from "node:fs";
10
- import path from "path";
10
+ import path$1 from "path";
11
11
  import assert from "assert";
12
12
  import { Buffer as Buffer$1 } from "buffer";
13
13
  import fs from "fs";
@@ -1692,15 +1692,15 @@ async function throwIfChallengeSettingsAreInvalid({ challengeSettings, pkc, comm
1692
1692
  const processStartedCommunities = new TrackedInstanceRegistry();
1693
1693
  function normalizeRegistryDataPath(dataPath) {
1694
1694
  if (dataPath === void 0) return void 0;
1695
- const resolved = path.resolve(dataPath);
1695
+ const resolved = path$1.resolve(dataPath);
1696
1696
  let existing = resolved;
1697
1697
  let tail = "";
1698
1698
  while (true) try {
1699
- return path.join(fs.realpathSync.native(existing), tail);
1699
+ return path$1.join(fs.realpathSync.native(existing), tail);
1700
1700
  } catch {
1701
- const parent = path.dirname(existing);
1701
+ const parent = path$1.dirname(existing);
1702
1702
  if (parent === existing) return resolved;
1703
- tail = path.join(path.basename(existing), tail);
1703
+ tail = path$1.join(path$1.basename(existing), tail);
1704
1704
  existing = parent;
1705
1705
  }
1706
1706
  }
@@ -3081,9 +3081,9 @@ var DbHandler = class {
3081
3081
  if (needToMigrate) {
3082
3082
  if (dbExistsAlready && currentDbVersion > 0) {
3083
3083
  this.destoryConnection();
3084
- backupDbPath = path.join(path.dirname(dbPath), ".backup_before_migration", `${path.basename(dbPath)}.${currentDbVersion}.${timestamp()}`);
3085
- log(`Copying db ${path.basename(dbPath)} to ${backupDbPath} before migration`);
3086
- if (!fs.existsSync(path.dirname(backupDbPath))) await fs.promises.mkdir(path.dirname(backupDbPath), { recursive: true });
3084
+ backupDbPath = path$1.join(path$1.dirname(dbPath), ".backup_before_migration", `${path$1.basename(dbPath)}.${currentDbVersion}.${timestamp()}`);
3085
+ log(`Copying db ${path$1.basename(dbPath)} to ${backupDbPath} before migration`);
3086
+ if (!fs.existsSync(path$1.dirname(backupDbPath))) await fs.promises.mkdir(path$1.dirname(backupDbPath), { recursive: true });
3087
3087
  const sourceDb = new Database(dbPath, { fileMustExist: true });
3088
3088
  await sourceDb.backup(backupDbPath);
3089
3089
  sourceDb.close();
@@ -5182,10 +5182,10 @@ var DbHandler = class {
5182
5182
  if (this._db || this._keyv) await this.destoryConnection();
5183
5183
  this._transactionDepth = 0;
5184
5184
  const dataPath = this._community._pkc.dataPath;
5185
- const oldPathString = path.join(dataPath, "communities", oldDbName);
5186
- const newPathString = path.join(dataPath, "communities", newDbName);
5187
- await fs.promises.mkdir(path.dirname(oldPathString), { recursive: true });
5188
- await fs.promises.mkdir(path.dirname(newPathString), { recursive: true });
5185
+ const oldPathString = path$1.join(dataPath, "communities", oldDbName);
5186
+ const newPathString = path$1.join(dataPath, "communities", newDbName);
5187
+ await fs.promises.mkdir(path$1.dirname(oldPathString), { recursive: true });
5188
+ await fs.promises.mkdir(path$1.dirname(newPathString), { recursive: true });
5189
5189
  try {
5190
5190
  if (!fs.existsSync(oldPathString)) log(`Old DB file ${oldPathString} does not exist. Cannot backup/rename.`);
5191
5191
  else {
@@ -5207,8 +5207,8 @@ var DbHandler = class {
5207
5207
  }
5208
5208
  async lockCommunityStart(communityAddress = this._community.address) {
5209
5209
  const log = logger_default("pkc-js:local-community:db-handler:lock:start");
5210
- const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5211
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
5210
+ const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5211
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
5212
5212
  try {
5213
5213
  await import_src.default.lock(communityDbPath, {
5214
5214
  lockfilePath,
@@ -5229,8 +5229,8 @@ var DbHandler = class {
5229
5229
  async unlockCommunityStart(communityAddress = this._community.address) {
5230
5230
  const log = logger_default("pkc-js:local-community:db-handler:unlock:start");
5231
5231
  log.trace(`Attempting to unlock the start of community (${communityAddress})`);
5232
- const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5233
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
5232
+ const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5233
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
5234
5234
  if (!fs.existsSync(lockfilePath) || !fs.existsSync(communityDbPath)) return;
5235
5235
  try {
5236
5236
  await import_src.default.unlock(communityDbPath, { lockfilePath });
@@ -5241,8 +5241,8 @@ var DbHandler = class {
5241
5241
  }
5242
5242
  }
5243
5243
  async isCommunityStartLocked(communityAddress = this._community.address) {
5244
- const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5245
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
5244
+ const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
5245
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
5246
5246
  return await import_src.default.check(communityDbPath, {
5247
5247
  lockfilePath,
5248
5248
  realpath: false,
@@ -5251,8 +5251,8 @@ var DbHandler = class {
5251
5251
  }
5252
5252
  async lockCommunityState() {
5253
5253
  const log = logger_default("pkc-js:local-community:db-handler:lock:lockCommunityState");
5254
- const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
5255
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
5254
+ const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
5255
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
5256
5256
  try {
5257
5257
  await import_src.default.lock(communityDbPath, {
5258
5258
  lockfilePath,
@@ -5269,8 +5269,8 @@ var DbHandler = class {
5269
5269
  }
5270
5270
  async unlockCommunityState() {
5271
5271
  const log = logger_default("pkc-js:local-community:db-handler:lock:unlockCommunityState");
5272
- const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
5273
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
5272
+ const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
5273
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
5274
5274
  if (!fs.existsSync(lockfilePath)) return;
5275
5275
  try {
5276
5276
  await import_src.default.unlock(communityDbPath, { lockfilePath });
@@ -5280,7 +5280,7 @@ var DbHandler = class {
5280
5280
  }
5281
5281
  }
5282
5282
  communityDbExists() {
5283
- const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
5283
+ const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
5284
5284
  return fs.existsSync(communityDbPath);
5285
5285
  }
5286
5286
  markCommentsAsPublishedToPostUpdates(commentCids) {
@@ -8357,11 +8357,11 @@ async function edit(community, newCommunityOptions) {
8357
8357
  const EXPORTS_KEY = STORAGE_KEYS[STORAGE_KEYS.EXPORTS];
8358
8358
  function defaultExportPathFor(community, exportId) {
8359
8359
  if (typeof community._pkc.dataPath !== "string") throw new PKCError("ERR_DATA_PATH_IS_NOT_DEFINED", { communityAddress: community.address });
8360
- return Path.join(community._pkc.dataPath, "exports", `${exportId}.sqlite`);
8360
+ return path.join(community._pkc.dataPath, "exports", `${exportId}.sqlite`);
8361
8361
  }
8362
8362
  function sourceDbPathFor(community) {
8363
8363
  if (typeof community._pkc.dataPath !== "string") throw new PKCError("ERR_DATA_PATH_IS_NOT_DEFINED", { communityAddress: community.address });
8364
- return Path.join(community._pkc.dataPath, "communities", community.address);
8364
+ return path.join(community._pkc.dataPath, "communities", community.address);
8365
8365
  }
8366
8366
  async function persistExports(community) {
8367
8367
  if (!community._dbHandler) return;
@@ -8437,9 +8437,9 @@ async function runExportTask(community, exportId, opts) {
8437
8437
  async function exportCommunityEmbedded(community, options = {}) {
8438
8438
  if (options.signal?.aborted) throw options.signal.reason ?? new DOMException("The operation was aborted.", "AbortError");
8439
8439
  const exportId = v4();
8440
- const destPath = options.exportPath ? Path.resolve(options.exportPath) : defaultExportPathFor(community, exportId);
8440
+ const destPath = options.exportPath ? path.resolve(options.exportPath) : defaultExportPathFor(community, exportId);
8441
8441
  const includePrivateKey = options.includePrivateKey === true;
8442
- if (Path.resolve(destPath) === Path.resolve(sourceDbPathFor(community))) throw new PKCError("ERR_EXPORT_PATH_TARGETS_LIVE_DB", {
8442
+ if (path.resolve(destPath) === path.resolve(sourceDbPathFor(community))) throw new PKCError("ERR_EXPORT_PATH_TARGETS_LIVE_DB", {
8443
8443
  communityAddress: community.address,
8444
8444
  exportPath: destPath
8445
8445
  });
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-BbJyIuOc.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-CMkVMrOZ.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };
@@ -1,7 +1,7 @@
1
1
  import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
2
- import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-CXxGmK2P.js";
3
- import { $ as parseCidStringSchemaWithPKCErrorIfItFails, $t as require_lib$1, A as findCommentInParsedPages, Ar as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, B as InflightFetchManager, Bn as buildRuntimeCommunityFields, Bt as RpcExportCommunityModLogsParamSchema, C as RepliesPages, Ct as parseDecryptedChallengeVerification, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as verifyCommentModeration, Dr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Dt as parseRpcCommentEventWithPKCErrorIfItFails, En as verifyCommentIpfs, Et as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, F as collectCrosspostAuthorsToResolve, Fn as getAuthorNameFromRuntime, Ft as RpcCidParamSchema, G as decodeRpcChallengeAnswerPubsubMsg, Gn as decode, Gt as RpcFetchCidResultSchema, Hn as getCommunityNameFromWire, Ht as RpcExportCommunityParamSchema, It as RpcCommentRepliesPageParamSchema, J as decodeRpcChallengeVerificationPubsubMsg, Jt as RpcPublishedAnchorRecordResultSchema, K as decodeRpcChallengePubsubMsg, Kt as RpcPublishAnchorRecordParamSchema, L as stripNameResolvedFromCrosspost, Ln as normalizeCreatePublicationAuthor, Lt as RpcCommunityIdentifierParamSchema, M as parseRawPages, Mn as verifyVote, Mt as RpcAnchorPublishPreparationResultSchema, N as applyNameResolvedCacheToCrosspost, Nn as buildRuntimeAuthor, Nr as nativeFunctions$2, Nt as RpcAuthorNameParamSchema, O as findCommentInPageInstance, On as verifyCommentPubsubMessage, Or as NAME_RESOLVED_FALSE_TTL_MS, Ot as parseRpcCommentUpdateEventWithPKCErrorIfItFails, P as cloneCrosspostForRuntime, Pn as cleanWireAuthor, Pr as require_undici, Pt as RpcCancelExportParamSchema, Qt as RpcUnsubscribeParamSchema, R as PKCClientsManager, Rt as RpcCommunityPageParamSchema, S as KeyvBetterSqlite3, Sn as verifyChallengeMessage, Sr as n$3, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tr as t$4, Tt as parseJsonWithPKCErrorIfFails, Un as getCommunityPublicKeyFromWire, Ut as RpcExportCommunityResultSchema, V as InflightResourceTypes, Vn as getCommunityAddressFromRecord, Vt as RpcExportCommunityModLogsResultSchema, W as PKCTypedEmitter, Wn as normalizeCommunityInputFromCommunity, Wt as RpcFetchCidParamSchema, Xn as getPKCAddressFromPublicKeySync, Xt as RpcSubscriptionIdResultSchema, Yt as RpcResolveAuthorNameResultSchema, Zt as RpcSuccessResultSchema, _r as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, an as encryptEd25519AesGcm, at as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, b as RemoteCommunity, bn as signVote, bt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, cn as cleanUpBeforePublishing, cr as getDefaultDataPath, ct as parseCommunityAddressWithPKCErrorIfItFails, dn as signChallengeRequest, dr as listCommunitiesSync, dt as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, fr as monitorCommunitiesDirectory, gr as setNativeFunctions$1, gt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, hn as signCommentModeration, ht as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, jn as verifyCommunityEdit, jt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as verifyCommentUpdate, kr as NAME_RESOLVED_TRUE_TTL_MS, kt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as signChallengeAnswer, m as pkcJsChallenges, mn as signCommentEdit, mt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as createAnchorIpnsRecord$1, nr as createKuboRpcClient, nt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ot as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, pn as signComment, pt as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeRequestPubsubMsg, qn as getBufferedPKCAddressFromPublicKey, qt as RpcPublishChallengeAnswersParamSchema, rn as decryptEd25519AesGcm, rt as parseCommentIpfsSchemaWithPKCErrorIfItFails, st as parseCommentUpdateSchemaWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createSigner, v as TrackedInstanceRegistry, vr as t$5, wn as verifyChallengeVerification, wr as t$2, wt as parseDecryptedChallengeWithPKCErrorIfItFails, xr as t$3, xt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signCommunityEdit, yt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as GenericStateClient, zt as RpcEditCommunityParamSchema } from "./rpc-local-community-DMDs0XGh.js";
4
- import { s as getHeliaDebugContext } from "./util-_DJ6MgmW.js";
2
+ import { $ as shortifyAddress, An as CommentIpfsSchema, Ar as PKCError, At as ChallengeMessageSchema, Ct as untrackUpdatingComment, Dt as pTimeout, E as isIpfsCid, Er as FailedToFetchCommentUpdateFromGatewaysError, Et as TimeoutError, Fn as CommentUpdateForChallengeVerificationSchema, Fr as setErrorMap, H as rejectWhenCommunityStopsOrAborts, J as replaceXWithY, Jr as stringifyPrimitive, Kr as joinValues, Kt as version_default, Mr as logger_default, Mt as ChallengeRequestMessageSchema, O as isIpns, Ot as ChallengeAnswerMessageSchema, Pt as ChallengeVerificationMessageSchema, Rn as CommentUpdateSchema, S as hideClassPrivateProps, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256, V as rejectWhenAbortSignalFires, Y as resolveWhenPredicateIsTrue, Z as retryKuboIpfsAdd, _r as r, at as waitForUpdateInCommunityInstanceWithErrorAndTimeout, b as getPostUpdateTimestampRange, bt as trackUpdatingComment, dn as CommunityIpfsSchema, dr as n$1, dt as findUpdatingComment, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, ft as findUpdatingCommunity, gt as refreshTrackedCommentAliases, hr as e$1, ht as listUpdatingCommunities, it as timestamp, jr as messages, l as createAbortError, lr as n$2, mr as e, mt as listUpdatingComments, on as CommunityAnchorSchema, pr as t$1, pt as listStartedCommunities, q as removeUndefinedValuesRecursively, qr as parsedType, rt as throwIfAbortSignalAborted, t as areEquivalentCommunityAddresses, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, ut as findStartedCommunity, w as ipnsNameToIpnsOverPubsubTopic, wr as require_retry, wt as untrackUpdatingCommunity, xn as isStringDomain, yn as PubsubTopicSchema } from "./util-ok4F-vdA.js";
3
+ import { $ as parseCidStringSchemaWithPKCErrorIfItFails, $t as require_lib$1, A as findCommentInParsedPages, Ar as NAME_RESOLVE_FAILED_RETRY_FLOOR_MS, B as InflightFetchManager, Bn as buildRuntimeCommunityFields, Bt as RpcExportCommunityModLogsParamSchema, C as RepliesPages, Ct as parseDecryptedChallengeVerification, D as extractCommunityRuntimeFieldsFromParsedPages, Dn as verifyCommentModeration, Dr as MAX_FILE_SIZE_BYTES_FOR_COMMENT_UPDATE, Dt as parseRpcCommentEventWithPKCErrorIfItFails, En as verifyCommentIpfs, Et as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, F as collectCrosspostAuthorsToResolve, Fn as getAuthorNameFromRuntime, Ft as RpcCidParamSchema, G as decodeRpcChallengeAnswerPubsubMsg, Gn as decode, Gt as RpcFetchCidResultSchema, Hn as getCommunityNameFromWire, Ht as RpcExportCommunityParamSchema, It as RpcCommentRepliesPageParamSchema, J as decodeRpcChallengeVerificationPubsubMsg, Jt as RpcPublishedAnchorRecordResultSchema, K as decodeRpcChallengePubsubMsg, Kt as RpcPublishAnchorRecordParamSchema, L as stripNameResolvedFromCrosspost, Ln as normalizeCreatePublicationAuthor, Lt as RpcCommunityIdentifierParamSchema, M as parseRawPages, Mn as verifyVote, Mt as RpcAnchorPublishPreparationResultSchema, N as applyNameResolvedCacheToCrosspost, Nn as buildRuntimeAuthor, Nr as nativeFunctions$2, Nt as RpcAuthorNameParamSchema, O as findCommentInPageInstance, On as verifyCommentPubsubMessage, Or as NAME_RESOLVED_FALSE_TTL_MS, Ot as parseRpcCommentUpdateEventWithPKCErrorIfItFails, P as cloneCrosspostForRuntime, Pn as cleanWireAuthor, Pr as require_undici, Pt as RpcCancelExportParamSchema, Qt as RpcUnsubscribeParamSchema, R as PKCClientsManager, Rt as RpcCommunityPageParamSchema, S as KeyvBetterSqlite3, Sn as verifyChallengeMessage, Sr as n$3, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, Tn as verifyCommentEdit, Tr as t$4, Tt as parseJsonWithPKCErrorIfFails, Un as getCommunityPublicKeyFromWire, Ut as RpcExportCommunityResultSchema, V as InflightResourceTypes, Vn as getCommunityAddressFromRecord, Vt as RpcExportCommunityModLogsResultSchema, W as PKCTypedEmitter, Wn as normalizeCommunityInputFromCommunity, Wt as RpcFetchCidParamSchema, Xn as getPKCAddressFromPublicKeySync, Xt as RpcSubscriptionIdResultSchema, Yt as RpcResolveAuthorNameResultSchema, Zt as RpcSuccessResultSchema, _r as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, an as encryptEd25519AesGcm, at as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, b as RemoteCommunity, bn as signVote, bt as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, cn as cleanUpBeforePublishing, cr as getDefaultDataPath, ct as parseCommunityAddressWithPKCErrorIfItFails, dn as signChallengeRequest, dr as listCommunitiesSync, dt as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, fr as monitorCommunitiesDirectory, gr as setNativeFunctions$1, gt as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, hn as signCommentModeration, ht as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, jn as verifyCommunityEdit, jt as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, k as findCommentInPageInstanceRecursively, kn as verifyCommentUpdate, kr as NAME_RESOLVED_TRUE_TTL_MS, kt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, l as pkcJsPageSorts, ln as signChallengeAnswer, m as pkcJsChallenges, mn as signCommentEdit, mt as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, n as RpcRemoteCommunity, nn as createAnchorIpnsRecord$1, nr as createKuboRpcClient, nt as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, ot as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, pn as signComment, pt as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, q as decodeRpcChallengeRequestPubsubMsg, qn as getBufferedPKCAddressFromPublicKey, qt as RpcPublishChallengeAnswersParamSchema, rn as decryptEd25519AesGcm, rt as parseCommentIpfsSchemaWithPKCErrorIfItFails, st as parseCommentUpdateSchemaWithPKCErrorIfItFails, t as RpcLocalCommunity, tn as createSigner, v as TrackedInstanceRegistry, vr as t$5, wn as verifyChallengeVerification, wr as t$2, wt as parseDecryptedChallengeWithPKCErrorIfItFails, xr as t$3, xt as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, y as LRUCache, yn as signCommunityEdit, yt as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, z as GenericStateClient, zt as RpcEditCommunityParamSchema } from "./rpc-local-community-WmgDVdST.js";
4
+ import { s as getHeliaDebugContext } from "./util-BzXGIQ9v.js";
5
5
  import path from "path";
6
6
  import assert from "assert";
7
7
  import fs from "fs";
@@ -8386,7 +8386,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8386
8386
  this.clients.libp2pJsClients = {};
8387
8387
  if (!this.libp2pJsClientsOptions) return;
8388
8388
  if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
8389
- const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-Dk9JTeUn.js");
8389
+ const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-Bw9KzcSY.js");
8390
8390
  for (const clientOptions of this.libp2pJsClientsOptions) {
8391
8391
  const heliaNode = await createLibp2pJsClientOrUseExistingOne({
8392
8392
  ...clientOptions,
@@ -8665,7 +8665,7 @@ var PKC$1 = class extends PKCTypedEmitter {
8665
8665
  const log = logger_default("pkc-js:pkc:createLocalCommunity");
8666
8666
  log.trace("Received community options to create a local community instance:", options);
8667
8667
  if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
8668
- const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-BkZDlh4z.js");
8668
+ const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-feziLP2d.js");
8669
8669
  const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
8670
8670
  const community = new LocalCommunity(this);
8671
8671
  if (isLocalCommunity) {
@@ -1,4 +1,4 @@
1
- import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema, xn as isStringDomain } from "./util-CXxGmK2P.js";
1
+ import { _ as getEquivalentCommunityAddresses, vn as PageSortFileSchema, xn as isStringDomain } from "./util-ok4F-vdA.js";
2
2
  //#region dist/node/pages/page-sort-scoring.js
3
3
  function validatePageSortFile(rawFile) {
4
4
  const validated = PageSortFileSchema.parse(rawFile);
@@ -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 { $ as shortifyAddress, $n as CreateCommentEditOptionsWithRefinementSchema, $t as CommentModerationPubsubMessagePublicationSchema, An as CommentIpfsSchema, Ar as PKCError, B as raceAgainstAbort, Br as literal, Bt as DecryptedChallengeVerificationSchema, C as interruptibleSleep, Cn as VoteChallengeRequestToEncryptSchema, Cr as e$4, D as isIpfsPath, Dr as FailedToFetchCommunityFromGatewaysError, Dt as pTimeout, E as isIpfsCid, En as VoteSignedPropertyNames, Er as FailedToFetchCommentUpdateFromGatewaysError, Ft as ChallengeVerificationMessageSignedPropertyNames, G as removeNullUndefinedEmptyObjectsValuesRecursively, Gn as PageIpfsSchema, Gt as PKCUserOptionsSchema, Hn as CreateCommentOptionsWithRefinementSchema, Hr as object, Ht as NameResolverSerializedSchema, I as isRequestPubsubPublicationOfPost, In as CommentUpdateForChallengeVerificationSignedPropertyNames, Ir as _enum, It as DecryptedChallengeAnswerSchema, Kn as isReservedObjectKey, L as isRequestPubsubPublicationOfReply, Ln as CommentUpdateReservedFields, Lr as array, Mn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Mr as logger_default, Nn as CommentSignedPropertyNames, Nr as require_supports_color, Nt as ChallengeRequestMessageSignedPropertyNames, O as isIpns, On as CommentChallengeRequestToEncryptSchema, Or as FailedToFetchGenericIpfsFromGatewaysError, Pn as CommentUpdateChallengeReservedFieldNames, Pr as require_ms$1, Qt as CommentModerationChallengeRequestToEncryptSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rr as boolean, S as hideClassPrivateProps, Sn as CreateVoteUserOptionsWithRefinementSchema, Sr as t$9, St as untrackStartedCommunity, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256$1, Un as GetPageParamSchema, Ur as record, Ut as PKCParsedOptionsSchema, Vr as number, Vt as NameResolveCacheOptionsSchema, Wn as ModQueuePageIpfsSchema, Wr as string, Wt as PKCUserOptionBaseSchema, Xt as CommunityEditPubsubMessagePublicationSchema, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Yt as CommunityEditPublicationSignedPropertyNames, Zn as CommentEditSignedPropertyNames, Zt as CreateCommunityEditPublicationOptionsWithRefinementSchema, _n as PageSortFileFactorySchema, _r as r$8, _t as refreshTrackedCommunityAliases, an as ChallengeFileSchema, ar as CidStringSchema, bn as RpcRemoteCommunityUpdateEventResultSchema, br as r$7, cn as CommunityEditOptionsSchema, cr as CreateSignerSchema, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$10, er as AuthorAddressSchema, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, ft as findUpdatingCommunity, gn as ExportCommunityModLogsOptionsSchema, gr as t$11, hn as CreateRpcCommunityFunctionArgumentSchema, hr as e$5, in as ChallengeFileFactorySchema, ir as CidPathSchema, it as timestamp, jr as messages, jt as ChallengeMessageSignedPropertyNames, k as isIpnsPath, kn as CommentIpfsReservedFields, kr as FailedToFetchPageIpfsFromGatewaysError, kt as ChallengeAnswerMessageSignedPropertyNames, l as createAbortError, ln as CommunityExportRecordsSchema, lr as n$9, m as fetchAndValidateIpnsRecordFromGateway, mn as CreateRemoteCommunityFunctionArgumentSchema, mr as e$6, nn as CommentModerationsTableRowSchema, or as CommunityAddressSchema, p as extractNetworkErrorDetails, pn as CreateNewLocalCommunityUserOptionsSchema, pr as t$13, qn as CommentEditChallengeRequestToEncryptSchema, qt as CommunityEditPublicationChallengeRequestToEncryptSchema, r as calculateIpfsCidV0, rn as CreateCommentModerationOptionsWithRefinementSchema, rr as ChallengeAnswersSchema, rt as throwIfAbortSignalAborted, sn as CommunityChallengeSettingSchema, sr as CommunityAuthorChallengeReservedFieldNames, t as areEquivalentCommunityAddresses, tn as CommentModerationSignedPropertyNames, tr as AuthorCommentIpfsReservedFields, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, un as CommunityIpfsReservedFields, ut as findStartedCommunity, vn as PageSortFileSchema, vr as t$12, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry$1, wt as untrackUpdatingCommunity, x as hasTransientNetworkErrorCode, xn as isStringDomain, xr as t$10, xt as trackUpdatingCommunity, yr as n$8, yt as trackStartedCommunity, zn as CommentUpdateSignedPropertyNames, zr as custom, zt as DecryptedChallengeSchema } from "./util-CXxGmK2P.js";
2
+ import { $ as shortifyAddress, $n as CreateCommentEditOptionsWithRefinementSchema, $t as CommentModerationPubsubMessagePublicationSchema, An as CommentIpfsSchema, Ar as PKCError, B as raceAgainstAbort, Br as literal, Bt as DecryptedChallengeVerificationSchema, C as interruptibleSleep, Cn as VoteChallengeRequestToEncryptSchema, Cr as e$4, D as isIpfsPath, Dr as FailedToFetchCommunityFromGatewaysError, Dt as pTimeout, E as isIpfsCid, En as VoteSignedPropertyNames, Er as FailedToFetchCommentUpdateFromGatewaysError, Ft as ChallengeVerificationMessageSignedPropertyNames, G as removeNullUndefinedEmptyObjectsValuesRecursively, Gn as PageIpfsSchema, Gt as PKCUserOptionsSchema, Hn as CreateCommentOptionsWithRefinementSchema, Hr as object, Ht as NameResolverSerializedSchema, I as isRequestPubsubPublicationOfPost, In as CommentUpdateForChallengeVerificationSignedPropertyNames, Ir as _enum, It as DecryptedChallengeAnswerSchema, Kn as isReservedObjectKey, L as isRequestPubsubPublicationOfReply, Ln as CommentUpdateReservedFields, Lr as array, Mn as CommentPubsubMessageWithFlexibleAuthorRefinementSchema, Mr as logger_default, Nn as CommentSignedPropertyNames, Nr as require_supports_color, Nt as ChallengeRequestMessageSignedPropertyNames, O as isIpns, On as CommentChallengeRequestToEncryptSchema, Or as FailedToFetchGenericIpfsFromGatewaysError, Pn as CommentUpdateChallengeReservedFieldNames, Pr as require_ms$1, Qt as CommentModerationChallengeRequestToEncryptSchema, R as pubsubTopicToDhtKey, Rn as CommentUpdateSchema, Rr as boolean, S as hideClassPrivateProps, Sn as CreateVoteUserOptionsWithRefinementSchema, Sr as t$9, St as untrackStartedCommunity, T as isAbortError, Tr as FailedToFetchCommentIpfsFromGatewaysError, Tt as require_sha256$1, Un as GetPageParamSchema, Ur as record, Ut as PKCParsedOptionsSchema, Vr as number, Vt as NameResolveCacheOptionsSchema, Wn as ModQueuePageIpfsSchema, Wr as string, Wt as PKCUserOptionBaseSchema, Xt as CommunityEditPubsubMessagePublicationSchema, Yn as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, Yt as CommunityEditPublicationSignedPropertyNames, Zn as CommentEditSignedPropertyNames, Zt as CreateCommunityEditPublicationOptionsWithRefinementSchema, _n as PageSortFileFactorySchema, _r as r$8, _t as refreshTrackedCommunityAliases, an as ChallengeFileSchema, ar as CidStringSchema, bn as RpcRemoteCommunityUpdateEventResultSchema, br as r$7, cn as CommunityEditOptionsSchema, cr as CreateSignerSchema, d as derivePublicationFromChallengeRequest, dn as CommunityIpfsSchema, dr as n$10, er as AuthorAddressSchema, et as shortifyCid, f as doesDomainAddressHaveCapitalLetter, fn as CommunitySignedPropertyNames, ft as findUpdatingCommunity, gn as ExportCommunityModLogsOptionsSchema, gr as t$11, hn as CreateRpcCommunityFunctionArgumentSchema, hr as e$5, in as ChallengeFileFactorySchema, ir as CidPathSchema, it as timestamp, jr as messages, jt as ChallengeMessageSignedPropertyNames, k as isIpnsPath, kn as CommentIpfsReservedFields, kr as FailedToFetchPageIpfsFromGatewaysError, kt as ChallengeAnswerMessageSignedPropertyNames, l as createAbortError, ln as CommunityExportRecordsSchema, lr as n$9, m as fetchAndValidateIpnsRecordFromGateway, mn as CreateRemoteCommunityFunctionArgumentSchema, mr as e$6, nn as CommentModerationsTableRowSchema, or as CommunityAddressSchema, p as extractNetworkErrorDetails, pn as CreateNewLocalCommunityUserOptionsSchema, pr as t$13, qn as CommentEditChallengeRequestToEncryptSchema, qt as CommunityEditPublicationChallengeRequestToEncryptSchema, r as calculateIpfsCidV0, rn as CreateCommentModerationOptionsWithRefinementSchema, rr as ChallengeAnswersSchema, rt as throwIfAbortSignalAborted, sn as CommunityChallengeSettingSchema, sr as CommunityAuthorChallengeReservedFieldNames, t as areEquivalentCommunityAddresses, tn as CommentModerationSignedPropertyNames, tr as AuthorCommentIpfsReservedFields, tt as sleepUntilTimeoutOrAbort, u as deepMergeRuntimeFields, un as CommunityIpfsReservedFields, ut as findStartedCommunity, vn as PageSortFileSchema, vr as t$12, w as ipnsNameToIpnsOverPubsubTopic, wn as VotePubsubMessagePublicationSchema, wr as require_retry$1, wt as untrackUpdatingCommunity, x as hasTransientNetworkErrorCode, xn as isStringDomain, xr as t$10, xt as trackUpdatingCommunity, yr as n$8, yt as trackStartedCommunity, zn as CommentUpdateSignedPropertyNames, zr as custom, zt as DecryptedChallengeSchema } from "./util-ok4F-vdA.js";
3
3
  import { t as all } from "./src-CYIMjhjK.js";
4
- import { s as validatePageSortFile } from "./page-sort-scoring-B2iu-tyC.js";
4
+ import { s as validatePageSortFile } from "./page-sort-scoring-DEib5648.js";
5
5
  import { createHash } from "node:crypto";
6
6
  import { pathToFileURL } from "node:url";
7
7
  import dns from "node:dns";
@@ -120854,7 +120854,7 @@ const decryptStringAesGcm = async (ciphertext, key, iv, tag) => {
120854
120854
  tag: tagAsForgeBuffer
120855
120855
  });
120856
120856
  cipher.update(uint8ArrayToNodeForgeBuffer(ciphertext));
120857
- cipher.finish();
120857
+ if (!cipher.finish()) throw Error("decryptStringAesGcm failed to decrypt, the AES-GCM authentication tag does not match the ciphertext, key and iv");
120858
120858
  return cipher.output.toString();
120859
120859
  };
120860
120860
  const encryptEd25519AesGcm = async (plaintext, privateKeyBase64, publicKeyBase64) => {
@@ -1,4 +1,4 @@
1
- import { Ar as PKCError, z as pubsubTopicToDhtKeyCid } from "./util-CXxGmK2P.js";
1
+ import { Ar as PKCError, z as pubsubTopicToDhtKeyCid } from "./util-ok4F-vdA.js";
2
2
  import { ipnsSelector } from "ipns/selector";
3
3
  import { ipnsValidator } from "ipns/validator";
4
4
  import { unmarshalIPNSRecord } from "ipns";
@@ -14804,7 +14804,7 @@ const CommunityEditPublicationPubsubReservedFields = r$2([
14804
14804
  ], t$3(CommunityEditPubsubMessagePublicationSchema.shape));
14805
14805
  //#endregion
14806
14806
  //#region dist/node/generated-version.js
14807
- const version = "0.0.120";
14807
+ const version = "0.0.121";
14808
14808
  //#endregion
14809
14809
  //#region dist/node/version.js
14810
14810
  const protocolVersion = ProtocolVersionSchema.parse("1.0.0");
@@ -1,5 +1,5 @@
1
- import { Ar as PKCError, _n as PageSortFileFactorySchema, an as ChallengeFileSchema, in as ChallengeFileFactorySchema } from "./util-CXxGmK2P.js";
2
- import { s as validatePageSortFile } from "./page-sort-scoring-B2iu-tyC.js";
1
+ import { Ar as PKCError, _n as PageSortFileFactorySchema, an as ChallengeFileSchema, in as ChallengeFileFactorySchema } from "./util-ok4F-vdA.js";
2
+ import { s as validatePageSortFile } from "./page-sort-scoring-DEib5648.js";
3
3
  //#region dist/node/validate-package-factories.js
4
4
  function validateChallengeFileFactory(factory, { name }) {
5
5
  try {
@@ -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-CsHuIZmP.js";
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-ByPmdQSD.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-BpJjVrRb.js";
1
+ import { n as validatePageSortFileFactory } from "./chunks/validate-package-factories-DoUgLmab.js";
2
2
  export { validatePageSortFileFactory };
@@ -1,7 +1,7 @@
1
- import { Ar as PKCError, Dt as pTimeout, J as replaceXWithY, Mr as logger_default, S as hideClassPrivateProps, dr as n, pr as t, ut as findStartedCommunity } from "../../chunks/util-CXxGmK2P.js";
2
- import { _ as parseRpcExportCommunityParam, b as parseRpcUnsubscribeParam, 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 parseRpcPublishAnchorRecordParam, y as parseRpcPublishChallengeAnswersParam } from "../../chunks/node-CsHuIZmP.js";
3
- import { $t as require_lib, At as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, E as buildPagesRuntimeFields, Er as stringify, H as pRetry, I as extractCrosspostRuntimeFields, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pLimit, _t as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails, et as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, it as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, kt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, lt as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, tt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, vt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, yr as t$1 } from "../../chunks/rpc-local-community-DMDs0XGh.js";
4
- import { t as LocalCommunity } from "../../chunks/local-community-BbJyIuOc.js";
1
+ import { Ar as PKCError, Dt as pTimeout, J as replaceXWithY, Mr as logger_default, S as hideClassPrivateProps, dr as n, pr as t, ut as findStartedCommunity } from "../../chunks/util-ok4F-vdA.js";
2
+ import { _ as parseRpcExportCommunityParam, b as parseRpcUnsubscribeParam, 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 parseRpcPublishAnchorRecordParam, y as parseRpcPublishChallengeAnswersParam } from "../../chunks/node-ByPmdQSD.js";
3
+ import { $t as require_lib, At as parseVoteChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, E as buildPagesRuntimeFields, Er as stringify, H as pRetry, I as extractCrosspostRuntimeFields, St as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, T as buildPageRuntimeFields, U as pLimit, _t as parseCreateNewLocalCommunityUserOptionsSchemaWithPKCErrorIfItFails, et as parseCommentChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, it as parseCommentModerationChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, kt as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, lt as parseCommunityEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, tt as parseCommentEditChallengeRequestToEncryptSchemaWithPKCErrorIfItFails, ut as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, vt as parseCreatePKCWsServerOptionsSchemaWithPKCErrorIfItFails, yr as t$1 } from "../../chunks/rpc-local-community-WmgDVdST.js";
4
+ import { t as LocalCommunity } from "../../chunks/local-community-CMkVMrOZ.js";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import path from "path";
7
7
  import assert from "assert";
@@ -1 +1 @@
1
- export declare const version = "0.0.120";
1
+ export declare const version = "0.0.121";
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by config/generate-version.js — do not edit
2
- export const version = "0.0.120";
2
+ export const version = "0.0.121";
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -49,7 +49,11 @@ export const decryptStringAesGcm = async (ciphertext, key, iv, tag) => {
49
49
  const cipher = forge.cipher.createDecipher("AES-GCM", keyAsForgeBuffer);
50
50
  cipher.start({ iv: ivAsForgeBuffer, tag: tagAsForgeBuffer });
51
51
  cipher.update(uint8ArrayToNodeForgeBuffer(ciphertext));
52
- cipher.finish();
52
+ // finish() returns false when the authentication tag doesn't match; cipher.output is then unauthenticated and must not be read
53
+ // https://github.com/pkcprotocol/pkc-js/issues/418
54
+ const authenticated = cipher.finish();
55
+ if (!authenticated)
56
+ throw Error("decryptStringAesGcm failed to decrypt, the AES-GCM authentication tag does not match the ciphertext, key and iv");
53
57
  const decrypted = cipher.output.toString();
54
58
  return decrypted;
55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AAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IAC1E,IAAI,gBAAgB,CAAC,MAAM,KAAK,EAAE;QAC9B,MAAM,KAAK,CAAC,gFAAgF,gBAAgB,CAAC,MAAM,SAAS,CAAC,CAAC;IAClI,IAAI,eAAe,CAAC,MAAM,KAAK,EAAE;QAC7B,MAAM,KAAK,CACP,yCAAyC,eAAe,6CAA6C,eAAe,CAAC,MAAM,SAAS,CACvI,CAAC;IAEN,yFAAyF;IACzF,uFAAuF;IACvF,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACtE,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;IAChE,+BAA+B;IAC/B,MAAM,gBAAgB,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEhD,8EAA8E;IAC9E,IAAI,SAAS,GAAG,MAAM,mBAAmB,CAAC,SAAS,CAAC,UAAU,EAAE,gBAAgB,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAE/G,iBAAiB;IACjB,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAEzC,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pkcprotocol/pkc-js",
3
- "version": "0.0.120",
3
+ "version": "0.0.121",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prebuild": "node config/generate-version.js",