@pkcprotocol/pkc-js 0.0.79 → 0.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/browser/community/community-client-manager.d.ts +2 -0
- package/dist/browser/community/community-client-manager.js +164 -9
- package/dist/browser/community/community-client-manager.js.map +1 -1
- package/dist/browser/community/remote-community.d.ts +2 -1
- package/dist/browser/community/remote-community.js +30 -7
- package/dist/browser/community/remote-community.js.map +1 -1
- package/dist/browser/community/rpc-local-community.js.map +1 -1
- package/dist/browser/community/schema.d.ts +31 -4
- package/dist/browser/community/schema.js +16 -10
- package/dist/browser/community/schema.js.map +1 -1
- package/dist/browser/errors.d.ts +3 -0
- package/dist/browser/errors.js +3 -0
- package/dist/browser/errors.js.map +1 -1
- package/dist/browser/generated-version.d.ts +1 -1
- package/dist/browser/generated-version.js +1 -1
- package/dist/browser/pkc-error.d.ts +1 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.js +7 -1
- package/dist/browser/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/browser/schema/schema-util.d.ts +15 -0
- package/dist/browser/signer/signatures.d.ts +1 -0
- package/dist/browser/signer/signatures.js +25 -2
- package/dist/browser/signer/signatures.js.map +1 -1
- package/dist/browser/test/test-util.d.ts +7 -0
- package/dist/browser/test/test-util.js +6 -0
- package/dist/browser/test/test-util.js.map +1 -1
- package/dist/bundled/bundle-manifest.json +25 -25
- package/dist/bundled/chunks/{helia-for-pkc-7wubsFuU.js → helia-for-pkc-BsYWQ7qS.js} +58 -58
- package/dist/bundled/chunks/{local-community-BhRsFFg0.js → local-community-CHzhypCp.js} +30 -27
- package/dist/bundled/chunks/{local-community-Cs0aQLE3.js → local-community-EqWKTLxr.js} +1 -1
- package/dist/bundled/chunks/{node-BKnzoR3G.js → node-4qAZNuJG.js} +5 -5
- package/dist/bundled/chunks/{rpc-local-community-DlgrBPH8.js → rpc-local-community-Cog5rZLG.js} +123 -34
- package/dist/bundled/chunks/{schema-C_dFmYMp.js → schema-Iavj-cRD.js} +6 -2
- package/dist/bundled/chunks/{util-CsiYk_QO.js → util-CfSUfLkV.js} +1 -1
- package/dist/bundled/index.js +1 -1
- package/dist/bundled/rpc/src/index.js +4 -4
- package/dist/node/community/community-client-manager.d.ts +2 -0
- package/dist/node/community/community-client-manager.js +164 -9
- package/dist/node/community/community-client-manager.js.map +1 -1
- package/dist/node/community/remote-community.d.ts +2 -1
- package/dist/node/community/remote-community.js +30 -7
- package/dist/node/community/remote-community.js.map +1 -1
- package/dist/node/community/rpc-local-community.js.map +1 -1
- package/dist/node/community/schema.d.ts +31 -4
- package/dist/node/community/schema.js +16 -10
- package/dist/node/community/schema.js.map +1 -1
- package/dist/node/errors.d.ts +3 -0
- package/dist/node/errors.js +3 -0
- package/dist/node/errors.js.map +1 -1
- package/dist/node/generated-version.d.ts +1 -1
- package/dist/node/generated-version.js +1 -1
- package/dist/node/pkc-error.d.ts +1 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.js +7 -1
- package/dist/node/runtime/node/community/local-community/publication-validation.js.map +1 -1
- package/dist/node/schema/schema-util.d.ts +15 -0
- package/dist/node/signer/signatures.d.ts +1 -0
- package/dist/node/signer/signatures.js +25 -2
- package/dist/node/signer/signatures.js.map +1 -1
- package/dist/node/test/test-util.d.ts +7 -0
- package/dist/node/test/test-util.js +6 -0
- package/dist/node/test/test-util.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, br as logger_default, vr as PKCError } from "./schema-
|
|
3
|
-
import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-
|
|
2
|
+
import { L as hideClassPrivateProps, R as ipnsNameToIpnsOverPubsubTopic, br as logger_default, vr as PKCError } from "./schema-Iavj-cRD.js";
|
|
3
|
+
import { a as fetchBlockWithStalledSessionFailover, i as directFetchIpnsRecordFromProviders, n as cacheIpnsRecordInPubsubLocalStore, o as getHeliaDebugContext, r as connectToPubsubPeers, s as selectBitswapSessionSeedPeers } from "./util-CfSUfLkV.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
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import path from "path";
|
|
7
|
+
import fs, { rename, writeFile } from "node:fs/promises";
|
|
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";
|
|
@@ -148,7 +148,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
148
148
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
149
149
|
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
150
150
|
const os$1 = __require("os");
|
|
151
|
-
const path$
|
|
151
|
+
const path$10 = __require("path");
|
|
152
152
|
const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
|
|
153
153
|
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
154
154
|
/**
|
|
@@ -177,7 +177,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
177
177
|
}
|
|
178
178
|
exports.unixify = unixify;
|
|
179
179
|
function makeAbsolute(cwd, filepath) {
|
|
180
|
-
return path$
|
|
180
|
+
return path$10.resolve(cwd, filepath);
|
|
181
181
|
}
|
|
182
182
|
exports.makeAbsolute = makeAbsolute;
|
|
183
183
|
function removeLeadingDotSegment(entry) {
|
|
@@ -1429,7 +1429,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1429
1429
|
//#endregion
|
|
1430
1430
|
//#region node_modules/picomatch/lib/constants.js
|
|
1431
1431
|
var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1432
|
-
const path$
|
|
1432
|
+
const path$9 = __require("path");
|
|
1433
1433
|
const WIN_SLASH = "\\\\/";
|
|
1434
1434
|
const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
1435
1435
|
const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
@@ -1554,7 +1554,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1554
1554
|
CHAR_UNDERSCORE: 95,
|
|
1555
1555
|
CHAR_VERTICAL_LINE: 124,
|
|
1556
1556
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
1557
|
-
SEP: path$
|
|
1557
|
+
SEP: path$9.sep,
|
|
1558
1558
|
/**
|
|
1559
1559
|
* Create EXTGLOB_CHARS
|
|
1560
1560
|
*/
|
|
@@ -1598,7 +1598,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
1598
1598
|
//#endregion
|
|
1599
1599
|
//#region node_modules/picomatch/lib/utils.js
|
|
1600
1600
|
var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
1601
|
-
const path$
|
|
1601
|
+
const path$8 = __require("path");
|
|
1602
1602
|
const win32 = process.platform === "win32";
|
|
1603
1603
|
const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
|
|
1604
1604
|
exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
|
|
@@ -1618,7 +1618,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1618
1618
|
};
|
|
1619
1619
|
exports.isWindows = (options) => {
|
|
1620
1620
|
if (options && typeof options.windows === "boolean") return options.windows;
|
|
1621
|
-
return win32 === true || path$
|
|
1621
|
+
return win32 === true || path$8.sep === "\\";
|
|
1622
1622
|
};
|
|
1623
1623
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
1624
1624
|
const idx = input.lastIndexOf(char, lastIdx);
|
|
@@ -2988,7 +2988,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
2988
2988
|
//#endregion
|
|
2989
2989
|
//#region node_modules/picomatch/lib/picomatch.js
|
|
2990
2990
|
var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2991
|
-
const path$
|
|
2991
|
+
const path$7 = __require("path");
|
|
2992
2992
|
const scan = require_scan();
|
|
2993
2993
|
const parse = require_parse();
|
|
2994
2994
|
const utils = require_utils$2();
|
|
@@ -3127,7 +3127,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3127
3127
|
* @api public
|
|
3128
3128
|
*/
|
|
3129
3129
|
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
3130
|
-
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$
|
|
3130
|
+
return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$7.basename(input));
|
|
3131
3131
|
};
|
|
3132
3132
|
/**
|
|
3133
3133
|
* Returns true if **any** of the given glob `patterns` match the specified `string`.
|
|
@@ -3682,7 +3682,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
3682
3682
|
var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
3683
3683
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3684
3684
|
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;
|
|
3685
|
-
const path$
|
|
3685
|
+
const path$6 = __require("path");
|
|
3686
3686
|
const globParent = require_glob_parent();
|
|
3687
3687
|
const micromatch = require_micromatch();
|
|
3688
3688
|
const GLOBSTAR = "**";
|
|
@@ -3790,7 +3790,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3790
3790
|
}
|
|
3791
3791
|
exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
|
|
3792
3792
|
function isAffectDepthOfReadingPattern(pattern) {
|
|
3793
|
-
const basename = path$
|
|
3793
|
+
const basename = path$6.basename(pattern);
|
|
3794
3794
|
return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
|
|
3795
3795
|
}
|
|
3796
3796
|
exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
|
|
@@ -3864,7 +3864,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3864
3864
|
}
|
|
3865
3865
|
exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
|
|
3866
3866
|
function isAbsolute(pattern) {
|
|
3867
|
-
return path$
|
|
3867
|
+
return path$6.isAbsolute(pattern);
|
|
3868
3868
|
}
|
|
3869
3869
|
exports.isAbsolute = isAbsolute;
|
|
3870
3870
|
}));
|
|
@@ -4150,12 +4150,12 @@ var require_sync$5 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4150
4150
|
var require_fs$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4151
4151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4152
4152
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4153
|
-
const fs$
|
|
4153
|
+
const fs$3 = __require("fs");
|
|
4154
4154
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4155
|
-
lstat: fs$
|
|
4156
|
-
stat: fs$
|
|
4157
|
-
lstatSync: fs$
|
|
4158
|
-
statSync: fs$
|
|
4155
|
+
lstat: fs$3.lstat,
|
|
4156
|
+
stat: fs$3.stat,
|
|
4157
|
+
lstatSync: fs$3.lstatSync,
|
|
4158
|
+
statSync: fs$3.statSync
|
|
4159
4159
|
};
|
|
4160
4160
|
function createFileSystemAdapter(fsMethods) {
|
|
4161
4161
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -4473,14 +4473,14 @@ var require_sync$4 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4473
4473
|
var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4474
4474
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4475
4475
|
exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
|
|
4476
|
-
const fs$
|
|
4476
|
+
const fs$2 = __require("fs");
|
|
4477
4477
|
exports.FILE_SYSTEM_ADAPTER = {
|
|
4478
|
-
lstat: fs$
|
|
4479
|
-
stat: fs$
|
|
4480
|
-
lstatSync: fs$
|
|
4481
|
-
statSync: fs$
|
|
4482
|
-
readdir: fs$
|
|
4483
|
-
readdirSync: fs$
|
|
4478
|
+
lstat: fs$2.lstat,
|
|
4479
|
+
stat: fs$2.stat,
|
|
4480
|
+
lstatSync: fs$2.lstatSync,
|
|
4481
|
+
statSync: fs$2.statSync,
|
|
4482
|
+
readdir: fs$2.readdir,
|
|
4483
|
+
readdirSync: fs$2.readdirSync
|
|
4484
4484
|
};
|
|
4485
4485
|
function createFileSystemAdapter(fsMethods) {
|
|
4486
4486
|
if (fsMethods === void 0) return exports.FILE_SYSTEM_ADAPTER;
|
|
@@ -4492,7 +4492,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4492
4492
|
//#region node_modules/@nodelib/fs.scandir/out/settings.js
|
|
4493
4493
|
var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
4494
4494
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4495
|
-
const path$
|
|
4495
|
+
const path$5 = __require("path");
|
|
4496
4496
|
const fsStat = require_out$3();
|
|
4497
4497
|
const fs = require_fs();
|
|
4498
4498
|
var Settings = class {
|
|
@@ -4500,7 +4500,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4500
4500
|
this._options = _options;
|
|
4501
4501
|
this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
|
|
4502
4502
|
this.fs = fs.createFileSystemAdapter(this._options.fs);
|
|
4503
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
4503
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$5.sep);
|
|
4504
4504
|
this.stats = this._getValue(this._options.stats, false);
|
|
4505
4505
|
this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
|
|
4506
4506
|
this.fsStatSettings = new fsStat.Settings({
|
|
@@ -5094,7 +5094,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5094
5094
|
//#region node_modules/@nodelib/fs.walk/out/settings.js
|
|
5095
5095
|
var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5096
5096
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5097
|
-
const path$
|
|
5097
|
+
const path$4 = __require("path");
|
|
5098
5098
|
const fsScandir = require_out$2();
|
|
5099
5099
|
var Settings = class {
|
|
5100
5100
|
constructor(_options = {}) {
|
|
@@ -5104,7 +5104,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5104
5104
|
this.deepFilter = this._getValue(this._options.deepFilter, null);
|
|
5105
5105
|
this.entryFilter = this._getValue(this._options.entryFilter, null);
|
|
5106
5106
|
this.errorFilter = this._getValue(this._options.errorFilter, null);
|
|
5107
|
-
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$
|
|
5107
|
+
this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
|
|
5108
5108
|
this.fsScandirSettings = new fsScandir.Settings({
|
|
5109
5109
|
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
5110
5110
|
fs: this._options.fs,
|
|
@@ -5156,7 +5156,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5156
5156
|
//#region node_modules/fast-glob/out/readers/reader.js
|
|
5157
5157
|
var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5158
5158
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5159
|
-
const path$
|
|
5159
|
+
const path$3 = __require("path");
|
|
5160
5160
|
const fsStat = require_out$3();
|
|
5161
5161
|
const utils = require_utils$1();
|
|
5162
5162
|
var Reader = class {
|
|
@@ -5169,7 +5169,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5169
5169
|
});
|
|
5170
5170
|
}
|
|
5171
5171
|
_getFullEntryPath(filepath) {
|
|
5172
|
-
return path$
|
|
5172
|
+
return path$3.resolve(this._settings.cwd, filepath);
|
|
5173
5173
|
}
|
|
5174
5174
|
_makeEntry(stats, pattern) {
|
|
5175
5175
|
const entry = {
|
|
@@ -5504,7 +5504,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5504
5504
|
//#region node_modules/fast-glob/out/providers/provider.js
|
|
5505
5505
|
var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5506
5506
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5507
|
-
const path$
|
|
5507
|
+
const path$2 = __require("path");
|
|
5508
5508
|
const deep_1 = require_deep();
|
|
5509
5509
|
const entry_1 = require_entry$1();
|
|
5510
5510
|
const error_1 = require_error();
|
|
@@ -5518,7 +5518,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5518
5518
|
this.entryTransformer = new entry_2.default(this._settings);
|
|
5519
5519
|
}
|
|
5520
5520
|
_getRootDirectory(task) {
|
|
5521
|
-
return path$
|
|
5521
|
+
return path$2.resolve(this._settings.cwd, task.base);
|
|
5522
5522
|
}
|
|
5523
5523
|
_getReaderOptions(task) {
|
|
5524
5524
|
const basePath = task.base === "." ? "" : task.base;
|
|
@@ -5674,7 +5674,7 @@ var require_sync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5674
5674
|
var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
5675
5675
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5676
5676
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
5677
|
-
const fs = __require("fs");
|
|
5677
|
+
const fs$1 = __require("fs");
|
|
5678
5678
|
const os = __require("os");
|
|
5679
5679
|
/**
|
|
5680
5680
|
* The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
|
|
@@ -5682,12 +5682,12 @@ var require_settings = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5682
5682
|
*/
|
|
5683
5683
|
const CPU_COUNT = Math.max(os.cpus().length, 1);
|
|
5684
5684
|
exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
5685
|
-
lstat: fs.lstat,
|
|
5686
|
-
lstatSync: fs.lstatSync,
|
|
5687
|
-
stat: fs.stat,
|
|
5688
|
-
statSync: fs.statSync,
|
|
5689
|
-
readdir: fs.readdir,
|
|
5690
|
-
readdirSync: fs.readdirSync
|
|
5685
|
+
lstat: fs$1.lstat,
|
|
5686
|
+
lstatSync: fs$1.lstatSync,
|
|
5687
|
+
stat: fs$1.stat,
|
|
5688
|
+
statSync: fs$1.statSync,
|
|
5689
|
+
readdir: fs$1.readdir,
|
|
5690
|
+
readdirSync: fs$1.readdirSync
|
|
5691
5691
|
};
|
|
5692
5692
|
var Settings = class {
|
|
5693
5693
|
constructor(_options = {}) {
|
|
@@ -5849,8 +5849,8 @@ var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((export
|
|
|
5849
5849
|
* Async iterable filename pattern matcher
|
|
5850
5850
|
*/
|
|
5851
5851
|
async function* glob(dir, pattern, options = {}) {
|
|
5852
|
-
const absoluteDir =
|
|
5853
|
-
const stats = await
|
|
5852
|
+
const absoluteDir = path.resolve(dir);
|
|
5853
|
+
const stats = await fs.stat(absoluteDir);
|
|
5854
5854
|
for await (const entry of import_out.default.stream(pattern, {
|
|
5855
5855
|
...options,
|
|
5856
5856
|
cwd: stats.isDirectory() ? dir : process.cwd()
|
|
@@ -6024,7 +6024,7 @@ var NextToLast = class {
|
|
|
6024
6024
|
};
|
|
6025
6025
|
}
|
|
6026
6026
|
decode(str) {
|
|
6027
|
-
let fileName =
|
|
6027
|
+
let fileName = path.basename(str);
|
|
6028
6028
|
if (fileName.endsWith(this.extension)) fileName = fileName.substring(0, fileName.length - this.extension.length);
|
|
6029
6029
|
return CID.decode(this.base.decoder.decode(fileName));
|
|
6030
6030
|
}
|
|
@@ -6050,14 +6050,14 @@ var NextToLast = class {
|
|
|
6050
6050
|
async function writeFile$1(file, contents, options) {
|
|
6051
6051
|
try {
|
|
6052
6052
|
options?.signal?.throwIfAborted();
|
|
6053
|
-
await raceSignal(
|
|
6053
|
+
await raceSignal(fs.mkdir(path.dirname(file), { recursive: true }), options?.signal);
|
|
6054
6054
|
const writer = new Writer(file);
|
|
6055
6055
|
options?.signal?.throwIfAborted();
|
|
6056
6056
|
await writer.write(contents);
|
|
6057
6057
|
} catch (err) {
|
|
6058
6058
|
if (err.syscall === "rename" && ["ENOENT", "EPERM"].includes(err.code)) {
|
|
6059
6059
|
options?.signal?.throwIfAborted();
|
|
6060
|
-
await raceSignal(
|
|
6060
|
+
await raceSignal(fs.access(file, fs.constants.F_OK | fs.constants.W_OK), options?.signal);
|
|
6061
6061
|
return;
|
|
6062
6062
|
}
|
|
6063
6063
|
throw err;
|
|
@@ -6075,7 +6075,7 @@ var FsBlockstore = class {
|
|
|
6075
6075
|
deleteManyConcurrency;
|
|
6076
6076
|
shardingStrategy;
|
|
6077
6077
|
constructor(location, init = {}) {
|
|
6078
|
-
this.path =
|
|
6078
|
+
this.path = path.resolve(location);
|
|
6079
6079
|
this.createIfMissing = init.createIfMissing ?? true;
|
|
6080
6080
|
this.errorIfExists = init.errorIfExists ?? false;
|
|
6081
6081
|
this.deleteManyConcurrency = init.deleteManyConcurrency ?? 50;
|
|
@@ -6085,11 +6085,11 @@ var FsBlockstore = class {
|
|
|
6085
6085
|
}
|
|
6086
6086
|
async open() {
|
|
6087
6087
|
try {
|
|
6088
|
-
await
|
|
6088
|
+
await fs.access(this.path, fs.constants.F_OK | fs.constants.W_OK);
|
|
6089
6089
|
if (this.errorIfExists) throw new OpenFailedError(`Blockstore directory: ${this.path} already exists`);
|
|
6090
6090
|
} catch (err) {
|
|
6091
6091
|
if (err.code === "ENOENT") if (this.createIfMissing) {
|
|
6092
|
-
await
|
|
6092
|
+
await fs.mkdir(this.path, { recursive: true });
|
|
6093
6093
|
return;
|
|
6094
6094
|
} else throw new OpenFailedError(`Blockstore directory: ${this.path} does not exist`);
|
|
6095
6095
|
throw err;
|
|
@@ -6101,7 +6101,7 @@ var FsBlockstore = class {
|
|
|
6101
6101
|
async put(key, val, options) {
|
|
6102
6102
|
const { dir, file } = this.shardingStrategy.encode(key);
|
|
6103
6103
|
try {
|
|
6104
|
-
await writeFile$1(
|
|
6104
|
+
await writeFile$1(path.join(this.path, dir, file), val, options);
|
|
6105
6105
|
return key;
|
|
6106
6106
|
} catch (err) {
|
|
6107
6107
|
throw new PutFailedError(String(err));
|
|
@@ -6120,7 +6120,7 @@ var FsBlockstore = class {
|
|
|
6120
6120
|
let handle;
|
|
6121
6121
|
try {
|
|
6122
6122
|
options?.signal?.throwIfAborted();
|
|
6123
|
-
handle = await raceSignal(
|
|
6123
|
+
handle = await raceSignal(fs.open(path.join(this.path, dir, file)), options?.signal);
|
|
6124
6124
|
yield* handle.createReadStream();
|
|
6125
6125
|
} catch (err) {
|
|
6126
6126
|
if (handle != null) await raceSignal(handle.close(), options?.signal);
|
|
@@ -6141,7 +6141,7 @@ var FsBlockstore = class {
|
|
|
6141
6141
|
const { dir, file } = this.shardingStrategy.encode(key);
|
|
6142
6142
|
try {
|
|
6143
6143
|
options?.signal?.throwIfAborted();
|
|
6144
|
-
await raceSignal(
|
|
6144
|
+
await raceSignal(fs.unlink(path.join(this.path, dir, file)), options?.signal);
|
|
6145
6145
|
} catch (err) {
|
|
6146
6146
|
if (err.code === "ENOENT") return;
|
|
6147
6147
|
throw new DeleteFailedError(String(err));
|
|
@@ -6159,14 +6159,14 @@ var FsBlockstore = class {
|
|
|
6159
6159
|
const { dir, file } = this.shardingStrategy.encode(key);
|
|
6160
6160
|
try {
|
|
6161
6161
|
options?.signal?.throwIfAborted();
|
|
6162
|
-
await raceSignal(
|
|
6162
|
+
await raceSignal(fs.access(path.join(this.path, dir, file)), options?.signal);
|
|
6163
6163
|
} catch (err) {
|
|
6164
6164
|
return false;
|
|
6165
6165
|
}
|
|
6166
6166
|
return true;
|
|
6167
6167
|
}
|
|
6168
6168
|
async *getAll(options) {
|
|
6169
|
-
const pattern = `**/*${this.shardingStrategy.extension}`.split(
|
|
6169
|
+
const pattern = `**/*${this.shardingStrategy.extension}`.split(path.sep).join("/");
|
|
6170
6170
|
const files = glob(this.path, pattern, { absolute: true });
|
|
6171
6171
|
for await (const file of files) try {
|
|
6172
6172
|
options?.signal?.throwIfAborted();
|
|
@@ -6175,7 +6175,7 @@ var FsBlockstore = class {
|
|
|
6175
6175
|
bytes: (async function* () {
|
|
6176
6176
|
let handle;
|
|
6177
6177
|
try {
|
|
6178
|
-
handle = await raceSignal(
|
|
6178
|
+
handle = await raceSignal(fs.open(file), options?.signal);
|
|
6179
6179
|
yield* handle.createReadStream();
|
|
6180
6180
|
} finally {
|
|
6181
6181
|
if (handle != null) await raceSignal(handle.close(), options?.signal);
|
|
@@ -6218,7 +6218,7 @@ async function createBlockstoreForLibp2pJsClient({ dataPath, key }) {
|
|
|
6218
6218
|
defaultMaxBytes: DEFAULT_IN_MEMORY_BLOCKSTORE_MAX_BYTES,
|
|
6219
6219
|
close: async () => {}
|
|
6220
6220
|
};
|
|
6221
|
-
const store = new FsBlockstore(path.join(dataPath, "blockstore", key));
|
|
6221
|
+
const store = new FsBlockstore(path$1.join(dataPath, "blockstore", key));
|
|
6222
6222
|
await store.open();
|
|
6223
6223
|
return {
|
|
6224
6224
|
blockstore: store,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-2rV9d50f.js";
|
|
2
|
-
import { $ as pubsubTopicToDhtKey, $n as n$3, An as CommentsTableRowSchema, At as trackStartedCommunity, Bn as CommentEditsTableRowSchema, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, Dn as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, M as genToArray, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nr as ZodError, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as t$8, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, W as isLinkOfAnimatedImage, Wn as AuthorReservedFields, Y as isLinkValid, Zn as n$4, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r$1, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageReservedFields, br as logger_default, bt as findCommunityInRegistry, d as DecryptedChallengeRequestSchema, dt as retryKuboIpfsAddAndProvide, er as t$7, fr as require_retry, gn as VoteTablesRowSchema, ht as statMfsPathSafely, in as CommunitySignedPropertyNames, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$5, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mn as VotePubsubReservedFields, mt as sleepUntilTimeoutOrAbort, nr as e, nt as removeBlocksFromKuboNode, or as t$4, pn as VotePubsubMessagePublicationSchema, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as t$6, u as DecryptedChallengeRequestPublicationSchema, ur as t$3, vr as PKCError, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, yt as writeKuboFilesWithTimeout } from "./schema-
|
|
3
|
-
import { $n as t$11, A as deriveCommentIpfsFromCommentTableRow, At as verifyCommunity, B as resolveDbPostsCidRefs, Bt as getCommunityNameFromWire, C as encryptEd25519AesGcmPublicKeyBuffer, Ct as verifyChallengeRequest, D as calculateInlineRepliesBudget, Dt as verifyCommentModeration, E as calculateExpectedSignatureSize, Et as verifyCommentIpfs, F as getThumbnailPropsOfLink, G as POST_REPLIES_SORT_TYPES, I as importSignerIntoKuboNode, It as getAuthorNameFromWire, Jt as getPKCAddressFromPublicKeySync, K as REPLY_REPLIES_SORT_TYPES, Kt as getIpfsKeyFromPrivateKey, M as deriveDbReplies, Mt as verifyVote, N as getDefaultCommunityDbConfig, Nt as buildRuntimeAuthor, Ot as verifyCommentPubsubMessage, Pt as cleanWireAuthor, Q as iterateOverPageCidsToFindAllCids, Qn as r$2, Sn as parseJsonWithPKCErrorIfFails, T as backupCommunityDb, Tt as verifyCommentEdit, Ut as decode, Vt as getCommunityPublicKeyFromWire, W as POSTS_SORT_TYPES, Wt as encode, Xn as t$9, Xt as createSchemaRowParser, Yt as getPublicKeyFromPrivateKey, Zn as t$12, _ as SignerWithPublicKeyAddress, _t as signCommentUpdateForChallengeVerification, a as pkcJsChallenges, ar as STORAGE_KEYS, at as pLimit, ct as cleanUpBeforePublishing, d as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, er as n$6, f as KeyvBetterSqlite3, ft as signChallengeVerification, gt as signCommentUpdate, i as getCommunityChallengeFromCommunityChallengeSettings, ir as stringify, j as deriveDbPosts, jt as verifyCommunityEdit, k as deleteOldCommunityInWindows, kt as verifyCommentUpdate, l as normalizeSelfAddrsForProvider, ln as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, mt as signCommentEdit, o as TrackedInstanceRegistry, or as require_lodash_merge, pt as signComment, q as TIMEFRAMES_TO_SECONDS, qt as getPKCAddressFromPublicKey, r as getChallengeVerification, rr as t$10, s as LRUCache, sn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, t as RpcLocalCommunity, tr as n$5, ut as signChallengeMessage, vt as signCommunity, w as BackupAbortError, x as decryptEd25519AesGcmPublicKeyBuffer, xt as verifyChallengeAnswer, yn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, z as moveCommunityDbToDeletedDirectory } from "./rpc-local-community-
|
|
2
|
+
import { $ as pubsubTopicToDhtKey, $n as n$3, An as CommentsTableRowSchema, At as trackStartedCommunity, Bn as CommentEditsTableRowSchema, Bt as CommunityEditPublicationPubsubReservedFields, C as contentContainsMarkdownAudio, Ct as findUpdatingCommunity, Dn as CommentUpdateSchema, F as getIpnsRecordInLocalKuboNode, Ft as untrackUpdatingCommunity, G as isLinkOfAudio, Gt as CommentModerationPubsubMessagePublicationSchema, In as CommentEditPubsubMessagePublicationSchema, It as require_sha256, J as isLinkOfVideo, Jt as CommentModerationsTableRowSchema, K as isLinkOfImage, Kt as CommentModerationReservedFields, L as hideClassPrivateProps, Ln as CommentEditPubsubMessagePublicationWithFlexibleAuthorSchema, M as genToArray, Mt as trackUpdatingCommunity, N as getEquivalentCommunityAddresses, Nr as ZodError, Nt as untrackStartedCommunity, O as derivePublicationFromChallengeRequest, P as getErrorCodeFromMessage, Q as isStringDomain, Qn as t$8, R as ipnsNameToIpnsOverPubsubTopic, Rn as CommentEditReservedFields, S as calculateStringSizeSameAsIpfsAddCidV0, T as contentContainsMarkdownVideos, W as isLinkOfAnimatedImage, Wn as AuthorReservedFields, Y as isLinkValid, Zn as n$4, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r$1, at as removeNullUndefinedValues, b as areEquivalentCommunityAddresses, bn as CommentPubsubMessageReservedFields, br as logger_default, bt as findCommunityInRegistry, d as DecryptedChallengeRequestSchema, dt as retryKuboIpfsAddAndProvide, er as t$7, fr as require_retry, gn as VoteTablesRowSchema, ht as statMfsPathSafely, in as CommunitySignedPropertyNames, k as doesDomainAddressHaveCapitalLetter, kn as CommentUpdateTableRowSchema, kt as syncCommunityRegistryEntry, lr as t$5, lt as retryKuboBlockPutPinAndProvidePubsubTopic, mn as VotePubsubReservedFields, mt as sleepUntilTimeoutOrAbort, nr as e, nt as removeBlocksFromKuboNode, or as t$4, pn as VotePubsubMessagePublicationSchema, q as isLinkOfMedia, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, rt as removeMfsFilesSafely, s as ChallengeVerificationMessageSchema, t as ChallengeAnswerMessageSchema, tr as t$6, u as DecryptedChallengeRequestPublicationSchema, ur as t$3, vr as PKCError, w as contentContainsMarkdownImages, x as calculateIpfsCidV0, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, yt as writeKuboFilesWithTimeout } from "./schema-Iavj-cRD.js";
|
|
3
|
+
import { $n as t$11, A as deriveCommentIpfsFromCommentTableRow, At as verifyCommunity, B as resolveDbPostsCidRefs, Bt as getCommunityNameFromWire, C as encryptEd25519AesGcmPublicKeyBuffer, Ct as verifyChallengeRequest, D as calculateInlineRepliesBudget, Dt as verifyCommentModeration, E as calculateExpectedSignatureSize, Et as verifyCommentIpfs, F as getThumbnailPropsOfLink, G as POST_REPLIES_SORT_TYPES, I as importSignerIntoKuboNode, It as getAuthorNameFromWire, Jt as getPKCAddressFromPublicKeySync, K as REPLY_REPLIES_SORT_TYPES, Kt as getIpfsKeyFromPrivateKey, M as deriveDbReplies, Mt as verifyVote, N as getDefaultCommunityDbConfig, Nt as buildRuntimeAuthor, Ot as verifyCommentPubsubMessage, Pt as cleanWireAuthor, Q as iterateOverPageCidsToFindAllCids, Qn as r$2, Sn as parseJsonWithPKCErrorIfFails, T as backupCommunityDb, Tt as verifyCommentEdit, Ut as decode, Vt as getCommunityPublicKeyFromWire, W as POSTS_SORT_TYPES, Wt as encode, Xn as t$9, Xt as createSchemaRowParser, Yt as getPublicKeyFromPrivateKey, Zn as t$12, _ as SignerWithPublicKeyAddress, _t as signCommentUpdateForChallengeVerification, a as pkcJsChallenges, ar as STORAGE_KEYS, at as pLimit, ct as cleanUpBeforePublishing, d as MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS, er as n$6, f as KeyvBetterSqlite3, ft as signChallengeVerification, gt as signCommentUpdate, i as getCommunityChallengeFromCommunityChallengeSettings, ir as stringify, j as deriveDbPosts, jt as verifyCommunityEdit, k as deleteOldCommunityInWindows, kt as verifyCommentUpdate, l as normalizeSelfAddrsForProvider, ln as parseCommunityIpfsSchemaPassthroughWithPKCErrorIfItFails, mt as signCommentEdit, o as TrackedInstanceRegistry, or as require_lodash_merge, pt as signComment, q as TIMEFRAMES_TO_SECONDS, qt as getPKCAddressFromPublicKey, r as getChallengeVerification, rr as t$10, s as LRUCache, sn as parseCommunityEditOptionsSchemaWithPKCErrorIfItFails, t as RpcLocalCommunity, tr as n$5, ut as signChallengeMessage, vt as signCommunity, w as BackupAbortError, x as decryptEd25519AesGcmPublicKeyBuffer, xt as verifyChallengeAnswer, yn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, z as moveCommunityDbToDeletedDirectory } from "./rpc-local-community-Cog5rZLG.js";
|
|
4
4
|
import { randomFillSync, randomUUID } from "node:crypto";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
|
-
import
|
|
6
|
+
import path from "node:path";
|
|
7
7
|
import os from "os";
|
|
8
8
|
import { existsSync, promises } from "node:fs";
|
|
9
|
-
import path from "path";
|
|
9
|
+
import path$1 from "path";
|
|
10
10
|
import assert from "assert";
|
|
11
11
|
import fs from "fs";
|
|
12
12
|
import Database from "better-sqlite3";
|
|
@@ -1195,7 +1195,10 @@ async function checkWireFormatAndCommunityAuthor(community, publication, authorC
|
|
|
1195
1195
|
if ("subplebbitAddress" in publication) return messages.ERR_PUBLICATION_USES_DEPRECATED_SUBPLEBBIT_ADDRESS;
|
|
1196
1196
|
if ("communityAddress" in publication) return messages.ERR_PUBLICATION_USES_DEPRECATED_COMMUNITY_ADDRESS;
|
|
1197
1197
|
const pubCommunityPublicKey = getCommunityPublicKeyFromWire(publication);
|
|
1198
|
-
if (!pubCommunityPublicKey || pubCommunityPublicKey !== communityIdentityPublicKey(community))
|
|
1198
|
+
if (!pubCommunityPublicKey || pubCommunityPublicKey !== communityIdentityPublicKey(community)) {
|
|
1199
|
+
if (community.anchor && pubCommunityPublicKey === community.signer.address) return messages.ERR_PUBLICATION_SIGNED_TO_MINTER_INSTEAD_OF_ANCHOR;
|
|
1200
|
+
return messages.ERR_PUBLICATION_INVALID_COMMUNITY_PUBLIC_KEY;
|
|
1201
|
+
}
|
|
1199
1202
|
const pubCommunityName = getCommunityNameFromWire(publication);
|
|
1200
1203
|
if (pubCommunityName && pubCommunityName !== community.address) return messages.ERR_PUBLICATION_INVALID_COMMUNITY_NAME;
|
|
1201
1204
|
if (publication.timestamp <= timestamp() - 300 || publication.timestamp >= timestamp() + 300) return messages.ERR_PUBLICATION_TIMESTAMP_IS_NOT_IN_PROPER_RANGE;
|
|
@@ -3470,9 +3473,9 @@ var DbHandler = class {
|
|
|
3470
3473
|
if (needToMigrate) {
|
|
3471
3474
|
if (dbExistsAlready && currentDbVersion > 0) {
|
|
3472
3475
|
this.destoryConnection();
|
|
3473
|
-
backupDbPath = path.join(path.dirname(dbPath), ".backup_before_migration", `${path.basename(dbPath)}.${currentDbVersion}.${timestamp()}`);
|
|
3474
|
-
log(`Copying db ${path.basename(dbPath)} to ${backupDbPath} before migration`);
|
|
3475
|
-
if (!fs.existsSync(path.dirname(backupDbPath))) await fs.promises.mkdir(path.dirname(backupDbPath), { recursive: true });
|
|
3476
|
+
backupDbPath = path$1.join(path$1.dirname(dbPath), ".backup_before_migration", `${path$1.basename(dbPath)}.${currentDbVersion}.${timestamp()}`);
|
|
3477
|
+
log(`Copying db ${path$1.basename(dbPath)} to ${backupDbPath} before migration`);
|
|
3478
|
+
if (!fs.existsSync(path$1.dirname(backupDbPath))) await fs.promises.mkdir(path$1.dirname(backupDbPath), { recursive: true });
|
|
3476
3479
|
const sourceDb = new Database(dbPath, { fileMustExist: true });
|
|
3477
3480
|
await sourceDb.backup(backupDbPath);
|
|
3478
3481
|
sourceDb.close();
|
|
@@ -5283,10 +5286,10 @@ var DbHandler = class {
|
|
|
5283
5286
|
if (this._db || this._keyv) await this.destoryConnection();
|
|
5284
5287
|
this._transactionDepth = 0;
|
|
5285
5288
|
const dataPath = this._community._pkc.dataPath;
|
|
5286
|
-
const oldPathString = path.join(dataPath, "communities", oldDbName);
|
|
5287
|
-
const newPathString = path.join(dataPath, "communities", newDbName);
|
|
5288
|
-
await fs.promises.mkdir(path.dirname(oldPathString), { recursive: true });
|
|
5289
|
-
await fs.promises.mkdir(path.dirname(newPathString), { recursive: true });
|
|
5289
|
+
const oldPathString = path$1.join(dataPath, "communities", oldDbName);
|
|
5290
|
+
const newPathString = path$1.join(dataPath, "communities", newDbName);
|
|
5291
|
+
await fs.promises.mkdir(path$1.dirname(oldPathString), { recursive: true });
|
|
5292
|
+
await fs.promises.mkdir(path$1.dirname(newPathString), { recursive: true });
|
|
5290
5293
|
try {
|
|
5291
5294
|
if (!fs.existsSync(oldPathString)) log(`Old DB file ${oldPathString} does not exist. Cannot backup/rename.`);
|
|
5292
5295
|
else {
|
|
@@ -5308,8 +5311,8 @@ var DbHandler = class {
|
|
|
5308
5311
|
}
|
|
5309
5312
|
async lockCommunityStart(communityAddress = this._community.address) {
|
|
5310
5313
|
const log = logger_default("pkc-js:local-community:db-handler:lock:start");
|
|
5311
|
-
const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5312
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5314
|
+
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5315
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5313
5316
|
try {
|
|
5314
5317
|
await import_src.default.lock(communityDbPath, {
|
|
5315
5318
|
lockfilePath,
|
|
@@ -5330,8 +5333,8 @@ var DbHandler = class {
|
|
|
5330
5333
|
async unlockCommunityStart(communityAddress = this._community.address) {
|
|
5331
5334
|
const log = logger_default("pkc-js:local-community:db-handler:unlock:start");
|
|
5332
5335
|
log.trace(`Attempting to unlock the start of community (${communityAddress})`);
|
|
5333
|
-
const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5334
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5336
|
+
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5337
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5335
5338
|
if (!fs.existsSync(lockfilePath) || !fs.existsSync(communityDbPath)) return;
|
|
5336
5339
|
try {
|
|
5337
5340
|
await import_src.default.unlock(communityDbPath, { lockfilePath });
|
|
@@ -5342,8 +5345,8 @@ var DbHandler = class {
|
|
|
5342
5345
|
}
|
|
5343
5346
|
}
|
|
5344
5347
|
async isCommunityStartLocked(communityAddress = this._community.address) {
|
|
5345
|
-
const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5346
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5348
|
+
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${communityAddress}.start.lock`);
|
|
5349
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", communityAddress);
|
|
5347
5350
|
return await import_src.default.check(communityDbPath, {
|
|
5348
5351
|
lockfilePath,
|
|
5349
5352
|
realpath: false,
|
|
@@ -5352,8 +5355,8 @@ var DbHandler = class {
|
|
|
5352
5355
|
}
|
|
5353
5356
|
async lockCommunityState() {
|
|
5354
5357
|
const log = logger_default("pkc-js:local-community:db-handler:lock:lockCommunityState");
|
|
5355
|
-
const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
|
|
5356
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5358
|
+
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
|
|
5359
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5357
5360
|
try {
|
|
5358
5361
|
await import_src.default.lock(communityDbPath, {
|
|
5359
5362
|
lockfilePath,
|
|
@@ -5370,8 +5373,8 @@ var DbHandler = class {
|
|
|
5370
5373
|
}
|
|
5371
5374
|
async unlockCommunityState() {
|
|
5372
5375
|
const log = logger_default("pkc-js:local-community:db-handler:lock:unlockCommunityState");
|
|
5373
|
-
const lockfilePath = path.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
|
|
5374
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5376
|
+
const lockfilePath = path$1.join(this._community._pkc.dataPath, "communities", `${this._community.address}.state.lock`);
|
|
5377
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5375
5378
|
if (!fs.existsSync(lockfilePath)) return;
|
|
5376
5379
|
try {
|
|
5377
5380
|
await import_src.default.unlock(communityDbPath, { lockfilePath });
|
|
@@ -5381,7 +5384,7 @@ var DbHandler = class {
|
|
|
5381
5384
|
}
|
|
5382
5385
|
}
|
|
5383
5386
|
communityDbExists() {
|
|
5384
|
-
const communityDbPath = path.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5387
|
+
const communityDbPath = path$1.join(this._community._pkc.dataPath, "communities", this._community.address);
|
|
5385
5388
|
return fs.existsSync(communityDbPath);
|
|
5386
5389
|
}
|
|
5387
5390
|
markCommentsAsPublishedToPostUpdates(commentCids) {
|
|
@@ -7096,11 +7099,11 @@ async function edit(community, newCommunityOptions) {
|
|
|
7096
7099
|
const EXPORTS_KEY = STORAGE_KEYS[STORAGE_KEYS.EXPORTS];
|
|
7097
7100
|
function defaultExportPathFor(community, exportId) {
|
|
7098
7101
|
if (typeof community._pkc.dataPath !== "string") throw new PKCError("ERR_DATA_PATH_IS_NOT_DEFINED", { communityAddress: community.address });
|
|
7099
|
-
return
|
|
7102
|
+
return path.join(community._pkc.dataPath, "exports", `${exportId}.sqlite`);
|
|
7100
7103
|
}
|
|
7101
7104
|
function sourceDbPathFor(community) {
|
|
7102
7105
|
if (typeof community._pkc.dataPath !== "string") throw new PKCError("ERR_DATA_PATH_IS_NOT_DEFINED", { communityAddress: community.address });
|
|
7103
|
-
return
|
|
7106
|
+
return path.join(community._pkc.dataPath, "communities", community.address);
|
|
7104
7107
|
}
|
|
7105
7108
|
async function persistExports(community) {
|
|
7106
7109
|
if (!community._dbHandler) return;
|
|
@@ -7176,9 +7179,9 @@ async function runExportTask(community, exportId, opts) {
|
|
|
7176
7179
|
async function exportCommunityEmbedded(community, options = {}) {
|
|
7177
7180
|
if (options.signal?.aborted) throw options.signal.reason ?? new DOMException("The operation was aborted.", "AbortError");
|
|
7178
7181
|
const exportId = v4();
|
|
7179
|
-
const destPath = options.exportPath ?
|
|
7182
|
+
const destPath = options.exportPath ? path.resolve(options.exportPath) : defaultExportPathFor(community, exportId);
|
|
7180
7183
|
const includePrivateKey = options.includePrivateKey === true;
|
|
7181
|
-
if (
|
|
7184
|
+
if (path.resolve(destPath) === path.resolve(sourceDbPathFor(community))) throw new PKCError("ERR_EXPORT_PATH_TARGETS_LIVE_DB", {
|
|
7182
7185
|
communityAddress: community.address,
|
|
7183
7186
|
exportPath: destPath
|
|
7184
7187
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-
|
|
1
|
+
import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-CHzhypCp.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 { $n as n$1, B as isIpfsCid, Cr as setErrorMap, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateSchema, Dt as refreshTrackedCommentAliases, E as createAbortError, Et as listUpdatingCommunities, Fr as parsedType, H as isIpns, Ir as stringifyPrimitive, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Pr as joinValues, Pt as untrackUpdatingComment, Q as isStringDomain, Qt as CommunityAnchorSchema, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, St as findUpdatingComment, Tt as listUpdatingComments, Zn as n$2, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r, b as areEquivalentCommunityAddresses, br as logger_default, ct as resolveWhenPredicateIsTrue, fr as require_retry, ft as shortifyAddress, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, ln as PubsubTopicSchema, mt as sleepUntilTimeoutOrAbort, nr as e, ot as removeUndefinedValuesRecursively, pr as FailedToFetchCommentIpfsFromGatewaysError, pt as shortifyCid, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, tr as t$1, ut as retryKuboIpfsAdd, vr as PKCError, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wn as CommentUpdateForChallengeVerificationSchema, wt as listStartedCommunities, xr as require_supports_color, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, z as isAbortError } from "./schema-
|
|
3
|
-
import { $ as parseRawPages, $n as t$3, An as RpcAuthorNameParamSchema, Bn as RpcExportCommunityResultSchema, Bt as getCommunityNameFromWire, Cn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Dt as verifyCommentModeration, En as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Et as verifyCommentIpfs, Fn as RpcCommunityPageParamSchema, Ft as getAuthorNameFromRuntime, Gn as RpcPublishedAnchorRecordResultSchema, Gt as getBufferedPKCAddressFromPublicKey, H as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Hn as RpcFetchCidResultSchema, Ht as normalizeCommunityInputFromCommunity, In as RpcEditCommunityParamSchema, Jn as RpcSuccessResultSchema, Jt as getPKCAddressFromPublicKeySync, Kn as RpcResolveAuthorNameResultSchema, L as listCommunitiesSync, Ln as RpcExportCommunityModLogsParamSchema, Lt as normalizeCreatePublicationAuthor, Mn as RpcCidParamSchema, Mt as verifyVote, Nn as RpcCommentRepliesPageParamSchema, Nt as buildRuntimeAuthor, O as createKuboRpcClient, On as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Ot as verifyCommentPubsubMessage, P as getDefaultDataPath, Pn as RpcCommunityIdentifierParamSchema, Pt as cleanWireAuthor, R as monitorCommunitiesDirectory, Rn as RpcExportCommunityModLogsResultSchema, Rt as buildRuntimeCommunityFields, S as encryptEd25519AesGcm, Sn as parseJsonWithPKCErrorIfFails, St as verifyChallengeMessage, Tn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, Tt as verifyCommentEdit, U as CommentClientsManager, Un as RpcPublishAnchorRecordParamSchema, Ut as decode, V as setNativeFunctions$1, Vn as RpcFetchCidParamSchema, Vt as getCommunityPublicKeyFromWire, Wn as RpcPublishChallengeAnswersParamSchema, X as extractCommunityRuntimeFieldsFromParsedPages, Xn as t$4, Yn as RpcUnsubscribeParamSchema, Z as findCommentInPageInstanceRecursively, Zt as parseCidStringSchemaWithPKCErrorIfItFails, _n as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, an as parseCommunityAddressWithPKCErrorIfItFails, b as decryptEd25519AesGcm, bn as parseDecryptedChallengeVerification, bt as signVote, c as AddressesRewriterProxyServer, cn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, cr as require_undici, ct as cleanUpBeforePublishing, dn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, dt as signChallengeRequest, en as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, er as n$3, et as RepliesPages, f as KeyvBetterSqlite3, fn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, ht as signCommentModeration, in as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, jn as RpcCancelExportParamSchema, jt as verifyCommunityEdit, kn as RpcAnchorPublishPreparationResultSchema, kt as verifyCommentUpdate, lt as signChallengeAnswer, m as decodeRpcChallengePubsubMsg, mt as signCommentEdit, n as RpcRemoteCommunity, nr as t$2, nt as PKCClientsManager, o as TrackedInstanceRegistry, ot as PKCTypedEmitter, p as decodeRpcChallengeAnswerPubsubMsg, pn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, pt as signComment, qn as RpcSubscriptionIdResultSchema, rn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, rr as t$5, rt as InflightFetchManager, s as LRUCache, sr as nativeFunctions$2, st as require_lib$1, t as RpcLocalCommunity, tn as parseCommentIpfsSchemaWithPKCErrorIfItFails, tt as PublicationClientsManager, u as RemoteCommunity, un as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, v as createSigner, vn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, wn as parseRpcCommentEventWithPKCErrorIfItFails, wt as verifyChallengeVerification, xn as parseDecryptedChallengeWithPKCErrorIfItFails, y as createAnchorIpnsRecord$1, yn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as signCommunityEdit, zn as RpcExportCommunityParamSchema, zt as getCommunityAddressFromRecord } from "./rpc-local-community-
|
|
4
|
-
import { o as getHeliaDebugContext } from "./util-
|
|
2
|
+
import { $n as n$1, B as isIpfsCid, Cr as setErrorMap, Ct as findUpdatingCommunity, D as deepMergeRuntimeFields, Dn as CommentUpdateSchema, Dt as refreshTrackedCommentAliases, E as createAbortError, Et as listUpdatingCommunities, Fr as parsedType, H as isIpns, Ir as stringifyPrimitive, It as require_sha256, L as hideClassPrivateProps, Lt as TimeoutError, Pr as joinValues, Pt as untrackUpdatingComment, Q as isStringDomain, Qt as CommunityAnchorSchema, R as ipnsNameToIpnsOverPubsubTopic, Rt as pTimeout, St as findUpdatingComment, Tt as listUpdatingComments, Zn as n$2, _t as timestamp, a as ChallengeRequestMessageSchema, ar as r, b as areEquivalentCommunityAddresses, br as logger_default, ct as resolveWhenPredicateIsTrue, fr as require_retry, ft as shortifyAddress, jt as trackUpdatingComment, k as doesDomainAddressHaveCapitalLetter, ln as PubsubTopicSchema, mt as sleepUntilTimeoutOrAbort, nr as e, ot as removeUndefinedValuesRecursively, pr as FailedToFetchCommentIpfsFromGatewaysError, pt as shortifyCid, r as ChallengeMessageSchema, rn as CommunityIpfsSchema, rr as e$1, s as ChallengeVerificationMessageSchema, st as replaceXWithY, t as ChallengeAnswerMessageSchema, tr as t$1, ut as retryKuboIpfsAdd, vr as PKCError, vt as waitForUpdateInCommunityInstanceWithErrorAndTimeout, wn as CommentUpdateForChallengeVerificationSchema, wt as listStartedCommunities, xr as require_supports_color, xt as findStartedCommunity, y as version_default, yn as CommentIpfsSchema, yr as messages, z as isAbortError } from "./schema-Iavj-cRD.js";
|
|
3
|
+
import { $ as parseRawPages, $n as t$3, An as RpcAuthorNameParamSchema, Bn as RpcExportCommunityResultSchema, Bt as getCommunityNameFromWire, Cn as parsePKCUserOptionsSchemaWithPKCErrorIfItFails, Dt as verifyCommentModeration, En as parseSetNewSettingsPKCWsServerSchemaWithPKCErrorIfItFails, Et as verifyCommentIpfs, Fn as RpcCommunityPageParamSchema, Ft as getAuthorNameFromRuntime, Gn as RpcPublishedAnchorRecordResultSchema, Gt as getBufferedPKCAddressFromPublicKey, H as tryToDeleteCommunitiesThatFailedToBeDeletedBefore, Hn as RpcFetchCidResultSchema, Ht as normalizeCommunityInputFromCommunity, In as RpcEditCommunityParamSchema, Jn as RpcSuccessResultSchema, Jt as getPKCAddressFromPublicKeySync, Kn as RpcResolveAuthorNameResultSchema, L as listCommunitiesSync, Ln as RpcExportCommunityModLogsParamSchema, Lt as normalizeCreatePublicationAuthor, Mn as RpcCidParamSchema, Mt as verifyVote, Nn as RpcCommentRepliesPageParamSchema, Nt as buildRuntimeAuthor, O as createKuboRpcClient, On as parseVotePubsubMessagePublicationSchemaWithPKCErrorIfItFails, Ot as verifyCommentPubsubMessage, P as getDefaultDataPath, Pn as RpcCommunityIdentifierParamSchema, Pt as cleanWireAuthor, R as monitorCommunitiesDirectory, Rn as RpcExportCommunityModLogsResultSchema, Rt as buildRuntimeCommunityFields, S as encryptEd25519AesGcm, Sn as parseJsonWithPKCErrorIfFails, St as verifyChallengeMessage, Tn as parseRpcCommentUpdateEventWithPKCErrorIfItFails, Tt as verifyCommentEdit, U as CommentClientsManager, Un as RpcPublishAnchorRecordParamSchema, Ut as decode, V as setNativeFunctions$1, Vn as RpcFetchCidParamSchema, Vt as getCommunityPublicKeyFromWire, Wn as RpcPublishChallengeAnswersParamSchema, X as extractCommunityRuntimeFieldsFromParsedPages, Xn as t$4, Yn as RpcUnsubscribeParamSchema, Z as findCommentInPageInstanceRecursively, Zt as parseCidStringSchemaWithPKCErrorIfItFails, _n as parseCreateRpcCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, a as pkcJsChallenges, an as parseCommunityAddressWithPKCErrorIfItFails, b as decryptEd25519AesGcm, bn as parseDecryptedChallengeVerification, bt as signVote, c as AddressesRewriterProxyServer, cn as parseCommunityEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, cr as require_undici, ct as cleanUpBeforePublishing, dn as parseCreateCommentModerationOptionsSchemaWithPKCErrorIfItFails, dt as signChallengeRequest, en as parseCommentEditPubsubMessagePublicationSchemaWithPKCErrorIfItFails, er as n$3, et as RepliesPages, f as KeyvBetterSqlite3, fn as parseCreateCommentOptionsSchemaWithPKCErrorIfItFails, g as decodeRpcChallengeVerificationPubsubMsg, gn as parseCreateRemoteCommunityFunctionArgumentSchemaWithPKCErrorIfItFails, h as decodeRpcChallengeRequestPubsubMsg, ht as signCommentModeration, in as parseCommentPubsubMessagePublicationWithPKCErrorIfItFails, jn as RpcCancelExportParamSchema, jt as verifyCommunityEdit, kn as RpcAnchorPublishPreparationResultSchema, kt as verifyCommentUpdate, lt as signChallengeAnswer, m as decodeRpcChallengePubsubMsg, mt as signCommentEdit, n as RpcRemoteCommunity, nr as t$2, nt as PKCClientsManager, o as TrackedInstanceRegistry, ot as PKCTypedEmitter, p as decodeRpcChallengeAnswerPubsubMsg, pn as parseCreateCommunityEditPublicationOptionsSchemaWithPKCErrorIfItFails, pt as signComment, qn as RpcSubscriptionIdResultSchema, rn as parseCommentModerationPubsubMessagePublicationSchemaWithPKCErrorIfItFails, rr as t$5, rt as InflightFetchManager, s as LRUCache, sr as nativeFunctions$2, st as require_lib$1, t as RpcLocalCommunity, tn as parseCommentIpfsSchemaWithPKCErrorIfItFails, tt as PublicationClientsManager, u as RemoteCommunity, un as parseCreateCommentEditOptionsSchemaWithPKCErrorIfItFails, v as createSigner, vn as parseCreateVoteOptionsSchemaWithPKCErrorIfItFails, wn as parseRpcCommentEventWithPKCErrorIfItFails, wt as verifyChallengeVerification, xn as parseDecryptedChallengeWithPKCErrorIfItFails, y as createAnchorIpnsRecord$1, yn as parseDecryptedChallengeAnswerWithPKCErrorIfItFails, yt as signCommunityEdit, zn as RpcExportCommunityParamSchema, zt as getCommunityAddressFromRecord } from "./rpc-local-community-Cog5rZLG.js";
|
|
4
|
+
import { o as getHeliaDebugContext } from "./util-CfSUfLkV.js";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import assert from "assert";
|
|
7
7
|
import fs from "fs";
|
|
@@ -8917,7 +8917,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
8917
8917
|
this.clients.libp2pJsClients = {};
|
|
8918
8918
|
if (!this.libp2pJsClientsOptions) return;
|
|
8919
8919
|
if (!this.httpRoutersOptions) throw Error("httpRoutersOptions is required for libp2pJsClient");
|
|
8920
|
-
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-
|
|
8920
|
+
const { createLibp2pJsClientOrUseExistingOne } = await import("./helia-for-pkc-BsYWQ7qS.js");
|
|
8921
8921
|
for (const clientOptions of this.libp2pJsClientsOptions) {
|
|
8922
8922
|
const heliaNode = await createLibp2pJsClientOrUseExistingOne({
|
|
8923
8923
|
...clientOptions,
|
|
@@ -9166,7 +9166,7 @@ var PKC$1 = class extends PKCTypedEmitter {
|
|
|
9166
9166
|
const log = logger_default("pkc-js:pkc:createLocalCommunity");
|
|
9167
9167
|
log.trace("Received community options to create a local community instance:", options);
|
|
9168
9168
|
if (!this._canCreateNewLocalCommunity()) throw new PKCError("ERR_CAN_NOT_CREATE_A_LOCAL_COMMUNITY", { pkcOptions: this._userPKCOptions });
|
|
9169
|
-
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-
|
|
9169
|
+
const { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb } = await import("./local-community-EqWKTLxr.js");
|
|
9170
9170
|
const isLocalCommunity = (await listCommunitiesSync(this)).includes(options.address);
|
|
9171
9171
|
const community = new LocalCommunity(this);
|
|
9172
9172
|
if (isLocalCommunity) {
|