hyperdrive
Advanced tools
Comparing version 11.8.2 to 11.9.0
15
index.js
@@ -34,2 +34,3 @@ const Hyperbee = require('hyperbee') | ||
this._active = opts.active !== false | ||
this._openingBlobs = null | ||
@@ -160,2 +161,10 @@ this._onwait = opts.onwait || null | ||
setActive (bool) { | ||
const active = !!bool | ||
if (active === this._active) return | ||
this._active = active | ||
this.core.setActive(active) | ||
if (this.blobs) this.blobs.core.setActive(active) | ||
} | ||
async flush () { | ||
@@ -195,3 +204,4 @@ await this.db.flush() | ||
encryptionKey: this.encryptionKey, | ||
keyPair: (!contentKey && this.db.core.writable) ? this.db.core.keyPair : null | ||
keyPair: (!contentKey && this.db.core.writable) ? this.db.core.keyPair : null, | ||
active: this._active | ||
}) | ||
@@ -231,2 +241,3 @@ await blobsCore.ready() | ||
compat: this.db.core.core.compat, | ||
active: this._active, | ||
keyPair: (m && this.db.core.writable) ? this.db.core.keyPair : null | ||
@@ -632,3 +643,3 @@ }) | ||
const name = key ? undefined : 'db' | ||
const core = corestore.get({ key, name, exclusive: true, onwait: opts.onwait, encryptionKey: opts.encryptionKey, compat: opts.compat }) | ||
const core = corestore.get({ key, name, exclusive: true, onwait: opts.onwait, encryptionKey: opts.encryptionKey, compat: opts.compat, active: opts.active }) | ||
@@ -635,0 +646,0 @@ return new Hyperbee(core, { |
{ | ||
"name": "hyperdrive", | ||
"version": "11.8.2", | ||
"version": "11.9.0", | ||
"description": "Hyperdrive is a secure, real-time distributed file system", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
40195
539