@pkcprotocol/pkc-js 0.0.146 → 0.0.148

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.
Files changed (102) hide show
  1. package/README.md +88 -55
  2. package/dist/browser/clients/base-client-manager.js +14 -2
  3. package/dist/browser/clients/base-client-manager.js.map +1 -1
  4. package/dist/browser/errors.d.ts +3 -0
  5. package/dist/browser/errors.js +3 -0
  6. package/dist/browser/errors.js.map +1 -1
  7. package/dist/browser/generated-version.d.ts +1 -1
  8. package/dist/browser/generated-version.js +1 -1
  9. package/dist/browser/pkc-error.d.ts +1 -1
  10. package/dist/browser/publications/comment/comment-client-manager.d.ts +15 -3
  11. package/dist/browser/publications/comment/comment-client-manager.js +221 -10
  12. package/dist/browser/publications/comment/comment-client-manager.js.map +1 -1
  13. package/dist/browser/publications/comment/comment.js +1 -0
  14. package/dist/browser/publications/comment/comment.js.map +1 -1
  15. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js +1 -1
  16. package/dist/browser/runtime/node/community/challenges/exclude/exclude.js.map +1 -1
  17. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.d.ts +2 -2
  18. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js +21 -17
  19. package/dist/browser/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -1
  20. package/dist/browser/runtime/node/community/challenges/index.js +1 -1
  21. package/dist/browser/runtime/node/community/challenges/index.js.map +1 -1
  22. package/dist/browser/runtime/node/community/db-handler.d.ts +5 -1
  23. package/dist/browser/runtime/node/community/db-handler.js +64 -12
  24. package/dist/browser/runtime/node/community/db-handler.js.map +1 -1
  25. package/dist/browser/runtime/node/community/local-community/challenges.js +21 -11
  26. package/dist/browser/runtime/node/community/local-community/challenges.js.map +1 -1
  27. package/dist/browser/runtime/node/community/local-community/db-state.js +95 -13
  28. package/dist/browser/runtime/node/community/local-community/db-state.js.map +1 -1
  29. package/dist/browser/runtime/node/community/local-community/editing.js +92 -22
  30. package/dist/browser/runtime/node/community/local-community/editing.js.map +1 -1
  31. package/dist/browser/runtime/node/community/local-community/lifecycle.d.ts +2 -0
  32. package/dist/browser/runtime/node/community/local-community/lifecycle.js +72 -20
  33. package/dist/browser/runtime/node/community/local-community/lifecycle.js.map +1 -1
  34. package/dist/browser/runtime/node/community/local-community/publication-store.js +9 -0
  35. package/dist/browser/runtime/node/community/local-community/publication-store.js.map +1 -1
  36. package/dist/browser/runtime/node/community/local-community.d.ts +1 -0
  37. package/dist/browser/runtime/node/community/local-community.js +3 -0
  38. package/dist/browser/runtime/node/community/local-community.js.map +1 -1
  39. package/dist/browser/runtime/node/util.d.ts +9 -0
  40. package/dist/browser/runtime/node/util.js +141 -25
  41. package/dist/browser/runtime/node/util.js.map +1 -1
  42. package/dist/browser/test/test-util.d.ts +7 -1
  43. package/dist/browser/test/test-util.js +45 -16
  44. package/dist/browser/test/test-util.js.map +1 -1
  45. package/dist/bundled/bundle-manifest.json +40 -40
  46. package/dist/bundled/challenges.js +1 -1
  47. package/dist/bundled/chunks/{helia-for-pkc-PaZmkxgn.js → helia-for-pkc-BUVgQgXa.js} +33 -33
  48. package/dist/bundled/chunks/{local-community-CeuVhBBn.js → local-community-GWqz4s3g.js} +1 -1
  49. package/dist/bundled/chunks/{local-community-BY1ouP1-.js → local-community-dVaQtJNM.js} +292 -91
  50. package/dist/bundled/chunks/{node-BXilwSVE.js → node-fEBX1Nar.js} +162 -16
  51. package/dist/bundled/chunks/{page-sort-scoring-DgSzIxmE.js → page-sort-scoring-DbI7k_K5.js} +1 -1
  52. package/dist/bundled/chunks/{rpc-local-community-BK_HGb_u.js → rpc-local-community-ouDezuGZ.js} +146 -47
  53. package/dist/bundled/chunks/{util-Bnqvxk-6.js → util-B81IOt07.js} +4 -1
  54. package/dist/bundled/chunks/{util-DRSzW-LU.js → util-DofMBAFz.js} +1 -1
  55. package/dist/bundled/chunks/{validate-package-factories-MG5ehoSU.js → validate-package-factories-Bi1OLIPw.js} +2 -2
  56. package/dist/bundled/index.js +1 -1
  57. package/dist/bundled/page-sorts.js +1 -1
  58. package/dist/bundled/rpc/src/index.js +4 -4
  59. package/dist/node/clients/base-client-manager.js +14 -2
  60. package/dist/node/clients/base-client-manager.js.map +1 -1
  61. package/dist/node/errors.d.ts +3 -0
  62. package/dist/node/errors.js +3 -0
  63. package/dist/node/errors.js.map +1 -1
  64. package/dist/node/generated-version.d.ts +1 -1
  65. package/dist/node/generated-version.js +1 -1
  66. package/dist/node/pkc-error.d.ts +1 -1
  67. package/dist/node/publications/comment/comment-client-manager.d.ts +15 -3
  68. package/dist/node/publications/comment/comment-client-manager.js +221 -10
  69. package/dist/node/publications/comment/comment-client-manager.js.map +1 -1
  70. package/dist/node/publications/comment/comment.js +1 -0
  71. package/dist/node/publications/comment/comment.js.map +1 -1
  72. package/dist/node/runtime/node/community/challenges/exclude/exclude.js +1 -1
  73. package/dist/node/runtime/node/community/challenges/exclude/exclude.js.map +1 -1
  74. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.d.ts +2 -2
  75. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js +21 -17
  76. package/dist/node/runtime/node/community/challenges/exclude/rate-limiter.js.map +1 -1
  77. package/dist/node/runtime/node/community/challenges/index.js +1 -1
  78. package/dist/node/runtime/node/community/challenges/index.js.map +1 -1
  79. package/dist/node/runtime/node/community/db-handler.d.ts +5 -1
  80. package/dist/node/runtime/node/community/db-handler.js +64 -12
  81. package/dist/node/runtime/node/community/db-handler.js.map +1 -1
  82. package/dist/node/runtime/node/community/local-community/challenges.js +21 -11
  83. package/dist/node/runtime/node/community/local-community/challenges.js.map +1 -1
  84. package/dist/node/runtime/node/community/local-community/db-state.js +95 -13
  85. package/dist/node/runtime/node/community/local-community/db-state.js.map +1 -1
  86. package/dist/node/runtime/node/community/local-community/editing.js +92 -22
  87. package/dist/node/runtime/node/community/local-community/editing.js.map +1 -1
  88. package/dist/node/runtime/node/community/local-community/lifecycle.d.ts +2 -0
  89. package/dist/node/runtime/node/community/local-community/lifecycle.js +72 -20
  90. package/dist/node/runtime/node/community/local-community/lifecycle.js.map +1 -1
  91. package/dist/node/runtime/node/community/local-community/publication-store.js +9 -0
  92. package/dist/node/runtime/node/community/local-community/publication-store.js.map +1 -1
  93. package/dist/node/runtime/node/community/local-community.d.ts +1 -0
  94. package/dist/node/runtime/node/community/local-community.js +3 -0
  95. package/dist/node/runtime/node/community/local-community.js.map +1 -1
  96. package/dist/node/runtime/node/util.d.ts +9 -0
  97. package/dist/node/runtime/node/util.js +141 -25
  98. package/dist/node/runtime/node/util.js.map +1 -1
  99. package/dist/node/test/test-util.d.ts +7 -1
  100. package/dist/node/test/test-util.js +45 -16
  101. package/dist/node/test/test-util.js.map +1 -1
  102. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-MG5ehoSU.js";
1
+ import { t as validateChallengeFileFactory } from "./chunks/validate-package-factories-Bi1OLIPw.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 { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-Bnqvxk-6.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-DRSzW-LU.js";
2
+ import { Br as logger_default, C as hideClassPrivateProps, Rr as PKCError, T as ipnsNameToIpnsOverPubsubTopic, n as binaryKeyToPubsubTopic } from "./util-B81IOt07.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-DofMBAFz.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$1 from "path";
8
+ import Path, { basename, dirname, join } from "node:path";
9
+ import path 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";
@@ -152,7 +152,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
152
152
  Object.defineProperty(exports, "__esModule", { value: true });
153
153
  exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
154
154
  const os$1 = __require("os");
155
- const path$10 = __require("path");
155
+ const path$9 = __require("path");
156
156
  const IS_WINDOWS_PLATFORM = os$1.platform() === "win32";
157
157
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
158
158
  /**
@@ -181,7 +181,7 @@ var require_path = /* @__PURE__ */ __commonJSMin(((exports) => {
181
181
  }
182
182
  exports.unixify = unixify;
183
183
  function makeAbsolute(cwd, filepath) {
184
- return path$10.resolve(cwd, filepath);
184
+ return path$9.resolve(cwd, filepath);
185
185
  }
186
186
  exports.makeAbsolute = makeAbsolute;
187
187
  function removeLeadingDotSegment(entry) {
@@ -1433,7 +1433,7 @@ var require_braces = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1433
1433
  //#endregion
1434
1434
  //#region node_modules/picomatch/lib/constants.js
1435
1435
  var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1436
- const path$9 = __require("path");
1436
+ const path$8 = __require("path");
1437
1437
  const WIN_SLASH = "\\\\/";
1438
1438
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1439
1439
  const DEFAULT_MAX_EXTGLOB_RECURSION = 0;
@@ -1558,7 +1558,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1558
1558
  CHAR_UNDERSCORE: 95,
1559
1559
  CHAR_VERTICAL_LINE: 124,
1560
1560
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1561
- SEP: path$9.sep,
1561
+ SEP: path$8.sep,
1562
1562
  /**
1563
1563
  * Create EXTGLOB_CHARS
1564
1564
  */
@@ -1602,7 +1602,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1602
1602
  //#endregion
1603
1603
  //#region node_modules/picomatch/lib/utils.js
1604
1604
  var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
1605
- const path$8 = __require("path");
1605
+ const path$7 = __require("path");
1606
1606
  const win32 = process.platform === "win32";
1607
1607
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants$1();
1608
1608
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -1622,7 +1622,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
1622
1622
  };
1623
1623
  exports.isWindows = (options) => {
1624
1624
  if (options && typeof options.windows === "boolean") return options.windows;
1625
- return win32 === true || path$8.sep === "\\";
1625
+ return win32 === true || path$7.sep === "\\";
1626
1626
  };
1627
1627
  exports.escapeLast = (input, char, lastIdx) => {
1628
1628
  const idx = input.lastIndexOf(char, lastIdx);
@@ -2992,7 +2992,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2992
2992
  //#endregion
2993
2993
  //#region node_modules/picomatch/lib/picomatch.js
2994
2994
  var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
2995
- const path$7 = __require("path");
2995
+ const path$6 = __require("path");
2996
2996
  const scan = require_scan();
2997
2997
  const parse = require_parse();
2998
2998
  const utils = require_utils$2();
@@ -3131,7 +3131,7 @@ var require_picomatch$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3131
3131
  * @api public
3132
3132
  */
3133
3133
  picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
3134
- return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$7.basename(input));
3134
+ return (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path$6.basename(input));
3135
3135
  };
3136
3136
  /**
3137
3137
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -3686,7 +3686,7 @@ var require_micromatch = /* @__PURE__ */ __commonJSMin(((exports, module) => {
3686
3686
  var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3687
3687
  Object.defineProperty(exports, "__esModule", { value: true });
3688
3688
  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;
3689
- const path$6 = __require("path");
3689
+ const path$5 = __require("path");
3690
3690
  const globParent = require_glob_parent();
3691
3691
  const micromatch = require_micromatch();
3692
3692
  const GLOBSTAR = "**";
@@ -3794,7 +3794,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3794
3794
  }
3795
3795
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
3796
3796
  function isAffectDepthOfReadingPattern(pattern) {
3797
- const basename = path$6.basename(pattern);
3797
+ const basename = path$5.basename(pattern);
3798
3798
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
3799
3799
  }
3800
3800
  exports.isAffectDepthOfReadingPattern = isAffectDepthOfReadingPattern;
@@ -3868,7 +3868,7 @@ var require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {
3868
3868
  }
3869
3869
  exports.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
3870
3870
  function isAbsolute(pattern) {
3871
- return path$6.isAbsolute(pattern);
3871
+ return path$5.isAbsolute(pattern);
3872
3872
  }
3873
3873
  exports.isAbsolute = isAbsolute;
3874
3874
  }));
@@ -4496,7 +4496,7 @@ var require_fs = /* @__PURE__ */ __commonJSMin(((exports) => {
4496
4496
  //#region node_modules/@nodelib/fs.scandir/out/settings.js
4497
4497
  var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
4498
4498
  Object.defineProperty(exports, "__esModule", { value: true });
4499
- const path$5 = __require("path");
4499
+ const path$4 = __require("path");
4500
4500
  const fsStat = require_out$3();
4501
4501
  const fs = require_fs();
4502
4502
  var Settings = class {
@@ -4504,7 +4504,7 @@ var require_settings$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
4504
4504
  this._options = _options;
4505
4505
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
4506
4506
  this.fs = fs.createFileSystemAdapter(this._options.fs);
4507
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$5.sep);
4507
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
4508
4508
  this.stats = this._getValue(this._options.stats, false);
4509
4509
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
4510
4510
  this.fsStatSettings = new fsStat.Settings({
@@ -5098,7 +5098,7 @@ var require_sync$2 = /* @__PURE__ */ __commonJSMin(((exports) => {
5098
5098
  //#region node_modules/@nodelib/fs.walk/out/settings.js
5099
5099
  var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5100
5100
  Object.defineProperty(exports, "__esModule", { value: true });
5101
- const path$4 = __require("path");
5101
+ const path$3 = __require("path");
5102
5102
  const fsScandir = require_out$2();
5103
5103
  var Settings = class {
5104
5104
  constructor(_options = {}) {
@@ -5108,7 +5108,7 @@ var require_settings$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5108
5108
  this.deepFilter = this._getValue(this._options.deepFilter, null);
5109
5109
  this.entryFilter = this._getValue(this._options.entryFilter, null);
5110
5110
  this.errorFilter = this._getValue(this._options.errorFilter, null);
5111
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$4.sep);
5111
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$3.sep);
5112
5112
  this.fsScandirSettings = new fsScandir.Settings({
5113
5113
  followSymbolicLinks: this._options.followSymbolicLinks,
5114
5114
  fs: this._options.fs,
@@ -5160,7 +5160,7 @@ var require_out$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
5160
5160
  //#region node_modules/fast-glob/out/readers/reader.js
5161
5161
  var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
5162
5162
  Object.defineProperty(exports, "__esModule", { value: true });
5163
- const path$3 = __require("path");
5163
+ const path$2 = __require("path");
5164
5164
  const fsStat = require_out$3();
5165
5165
  const utils = require_utils$1();
5166
5166
  var Reader = class {
@@ -5173,7 +5173,7 @@ var require_reader = /* @__PURE__ */ __commonJSMin(((exports) => {
5173
5173
  });
5174
5174
  }
5175
5175
  _getFullEntryPath(filepath) {
5176
- return path$3.resolve(this._settings.cwd, filepath);
5176
+ return path$2.resolve(this._settings.cwd, filepath);
5177
5177
  }
5178
5178
  _makeEntry(stats, pattern) {
5179
5179
  const entry = {
@@ -5508,7 +5508,7 @@ var require_entry = /* @__PURE__ */ __commonJSMin(((exports) => {
5508
5508
  //#region node_modules/fast-glob/out/providers/provider.js
5509
5509
  var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
5510
5510
  Object.defineProperty(exports, "__esModule", { value: true });
5511
- const path$2 = __require("path");
5511
+ const path$1 = __require("path");
5512
5512
  const deep_1 = require_deep();
5513
5513
  const entry_1 = require_entry$1();
5514
5514
  const error_1 = require_error();
@@ -5522,7 +5522,7 @@ var require_provider = /* @__PURE__ */ __commonJSMin(((exports) => {
5522
5522
  this.entryTransformer = new entry_2.default(this._settings);
5523
5523
  }
5524
5524
  _getRootDirectory(task) {
5525
- return path$2.resolve(this._settings.cwd, task.base);
5525
+ return path$1.resolve(this._settings.cwd, task.base);
5526
5526
  }
5527
5527
  _getReaderOptions(task) {
5528
5528
  const basePath = task.base === "." ? "" : task.base;
@@ -5853,7 +5853,7 @@ var import_out = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((export
5853
5853
  * Async iterable filename pattern matcher
5854
5854
  */
5855
5855
  async function* glob(dir, pattern, options = {}) {
5856
- const absoluteDir = path.resolve(dir);
5856
+ const absoluteDir = Path.resolve(dir);
5857
5857
  const stats = await fsp.stat(absoluteDir);
5858
5858
  for await (const entry of import_out.default.stream(pattern, {
5859
5859
  ...options,
@@ -6023,7 +6023,7 @@ var NextToLast = class {
6023
6023
  };
6024
6024
  }
6025
6025
  decode(str) {
6026
- let fileName = path.basename(str);
6026
+ let fileName = Path.basename(str);
6027
6027
  if (fileName.endsWith(this.extension)) fileName = fileName.substring(0, fileName.length - this.extension.length);
6028
6028
  return CID.decode(this.base.decoder.decode(fileName));
6029
6029
  }
@@ -6049,7 +6049,7 @@ var NextToLast = class {
6049
6049
  async function writeFile$1(file, contents, options) {
6050
6050
  try {
6051
6051
  options?.signal?.throwIfAborted();
6052
- await raceSignal(fsp.mkdir(path.dirname(file), { recursive: true }), options?.signal);
6052
+ await raceSignal(fsp.mkdir(Path.dirname(file), { recursive: true }), options?.signal);
6053
6053
  const writer = new Writer(file);
6054
6054
  options?.signal?.throwIfAborted();
6055
6055
  await writer.write(contents);
@@ -6074,7 +6074,7 @@ var FsBlockstore = class {
6074
6074
  deleteManyConcurrency;
6075
6075
  shardingStrategy;
6076
6076
  constructor(location, init = {}) {
6077
- this.path = path.resolve(location);
6077
+ this.path = Path.resolve(location);
6078
6078
  this.createIfMissing = init.createIfMissing ?? true;
6079
6079
  this.errorIfExists = init.errorIfExists ?? false;
6080
6080
  this.deleteManyConcurrency = init.deleteManyConcurrency ?? 50;
@@ -6100,7 +6100,7 @@ var FsBlockstore = class {
6100
6100
  async put(key, val, options) {
6101
6101
  const { dir, file } = this.shardingStrategy.encode(key);
6102
6102
  try {
6103
- await writeFile$1(path.join(this.path, dir, file), val, options);
6103
+ await writeFile$1(Path.join(this.path, dir, file), val, options);
6104
6104
  return key;
6105
6105
  } catch (err) {
6106
6106
  throw new PutFailedError(String(err));
@@ -6119,7 +6119,7 @@ var FsBlockstore = class {
6119
6119
  let handle;
6120
6120
  try {
6121
6121
  options?.signal?.throwIfAborted();
6122
- handle = await raceSignal(fsp.open(path.join(this.path, dir, file)), options?.signal);
6122
+ handle = await raceSignal(fsp.open(Path.join(this.path, dir, file)), options?.signal);
6123
6123
  yield* handle.createReadStream();
6124
6124
  } catch (err) {
6125
6125
  if (handle != null) await raceSignal(handle.close(), options?.signal);
@@ -6140,7 +6140,7 @@ var FsBlockstore = class {
6140
6140
  const { dir, file } = this.shardingStrategy.encode(key);
6141
6141
  try {
6142
6142
  options?.signal?.throwIfAborted();
6143
- await raceSignal(fsp.unlink(path.join(this.path, dir, file)), options?.signal);
6143
+ await raceSignal(fsp.unlink(Path.join(this.path, dir, file)), options?.signal);
6144
6144
  } catch (err) {
6145
6145
  if (err.code === "ENOENT") return;
6146
6146
  throw new DeleteFailedError(String(err));
@@ -6158,14 +6158,14 @@ var FsBlockstore = class {
6158
6158
  const { dir, file } = this.shardingStrategy.encode(key);
6159
6159
  try {
6160
6160
  options?.signal?.throwIfAborted();
6161
- await raceSignal(fsp.access(path.join(this.path, dir, file)), options?.signal);
6161
+ await raceSignal(fsp.access(Path.join(this.path, dir, file)), options?.signal);
6162
6162
  } catch (err) {
6163
6163
  return false;
6164
6164
  }
6165
6165
  return true;
6166
6166
  }
6167
6167
  async *getAll(options) {
6168
- const pattern = `**/*${this.shardingStrategy.extension}`.split(path.sep).join("/");
6168
+ const pattern = `**/*${this.shardingStrategy.extension}`.split(Path.sep).join("/");
6169
6169
  const files = glob(this.path, pattern, { absolute: true });
6170
6170
  for await (const file of files) try {
6171
6171
  options?.signal?.throwIfAborted();
@@ -6217,7 +6217,7 @@ async function createBlockstoreForLibp2pJsClient({ dataPath, key }) {
6217
6217
  defaultMaxBytes: DEFAULT_IN_MEMORY_BLOCKSTORE_MAX_BYTES,
6218
6218
  close: async () => {}
6219
6219
  };
6220
- const store = new FsBlockstore(path$1.join(dataPath, "blockstore", key));
6220
+ const store = new FsBlockstore(path.join(dataPath, "blockstore", key));
6221
6221
  await store.open();
6222
6222
  return {
6223
6223
  blockstore: store,
@@ -1,2 +1,2 @@
1
- import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-BY1ouP1-.js";
1
+ import { n as createNewLocalCommunityDb, r as updateInstancePropsWithStartedCommunityOrDb, t as LocalCommunity } from "./local-community-dVaQtJNM.js";
2
2
  export { LocalCommunity, createNewLocalCommunityDb, updateInstancePropsWithStartedCommunityOrDb };