hypercore-storage 2.1.0 → 2.2.0

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 (2) hide show
  1. package/index.js +4 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -83,6 +83,10 @@ class HypercoreStorage {
83
83
  this.view.readStart()
84
84
  }
85
85
 
86
+ get readOnly() {
87
+ return this.store.readOnly
88
+ }
89
+
86
90
  get dependencies() {
87
91
  return this.core.dependencies
88
92
  }
@@ -464,19 +468,6 @@ class CorestoreStorage {
464
468
  return this.db.closed
465
469
  }
466
470
 
467
- async _openDeviceFile() {
468
- if ((this.bootstrap && !this.readOnly && !this.allowBackup) || this.wait) {
469
- const corestoreFile = path.join(this.path, 'CORESTORE')
470
-
471
- this.deviceFile = new DeviceFile(corestoreFile, {
472
- wait: this.wait,
473
- data: { id: this.id }
474
- })
475
-
476
- await this.deviceFile.ready()
477
- }
478
- }
479
-
480
471
  async ready() {
481
472
  if (this.version === 0) await this._migrateStore()
482
473
  return this.db.ready()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hypercore-storage",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "main": "index.js",
5
5
  "files": [
6
6
  "index.js",