hyperdrive
Advanced tools
Comparing version 11.1.3 to 11.2.0
18
index.js
@@ -19,3 +19,3 @@ const Hyperbee = require('hyperbee') | ||
} | ||
const { _checkout, _db, _files, onwait, readonly } = opts | ||
const { _checkout, _db, _files, onwait } = opts | ||
this._onwait = onwait || null | ||
@@ -31,3 +31,2 @@ | ||
this._openingBlobs = null | ||
this._readonly = !!readonly | ||
this._checkout = _checkout || null | ||
@@ -64,3 +63,3 @@ this._batching = !!_files | ||
get writable () { | ||
return this._readonly ? false : this.core.writable | ||
return this.core.writable | ||
} | ||
@@ -87,3 +86,2 @@ | ||
onwait: this._onwait, | ||
readonly: this._readonly, | ||
_checkout: this._checkout || this, | ||
@@ -102,3 +100,2 @@ _db: snapshot, | ||
onwait: this._onwait, | ||
readonly: this._readonly, | ||
_checkout: null, | ||
@@ -174,3 +171,3 @@ _db: this.db, | ||
if (this.db.core.writable && !this.blobs && !this._readonly) { | ||
if (this.db.core.writable && !this.blobs) { | ||
const blobsCore = this.corestore.get({ | ||
@@ -229,2 +226,7 @@ name: 'blobs', | ||
compare (a, b) { | ||
const diff = a.seq - b.seq | ||
return diff > 0 ? 1 : (diff < 0 ? -1 : 0) | ||
} | ||
async clear (name, opts) { | ||
@@ -556,4 +558,4 @@ if (!this.opened) await this.ready() | ||
const metadataOpts = key | ||
? { key, cache: true, onwait } | ||
: { name: 'db', cache: true, onwait } | ||
? { key, cache: true, exclusive: true, onwait } | ||
: { name: 'db', cache: true, exclusive: true, onwait } | ||
const core = corestore.get(metadataOpts) | ||
@@ -560,0 +562,0 @@ const metadata = { contentFeed: null } |
{ | ||
"name": "hyperdrive", | ||
"version": "11.1.3", | ||
"version": "11.2.0", | ||
"description": "Hyperdrive is a secure, real-time distributed file system", | ||
@@ -35,8 +35,7 @@ "main": "index.js", | ||
"devDependencies": { | ||
"@hyperswarm/testnet": "^3.0.0", | ||
"b4a": "^1.6.0", | ||
"brittle": "^3.1.0", | ||
"corestore": "^6.1.1", | ||
"corestore": "^6.8.1", | ||
"hypercore-crypto": "^3.2.1", | ||
"hyperdht": "^6.5.2", | ||
"hyperdht": "^6.6.0", | ||
"hyperswarm": "^4.0.0", | ||
@@ -43,0 +42,0 @@ "random-access-memory": "^6.0.0", |
@@ -154,2 +154,6 @@ # Hyperdrive | ||
#### `const comparison = drive.compare(entryA, entryB)` | ||
Returns `0` if entries are the same, `1` if `entryA` is older, and `-1` if `entryB` is older. | ||
#### `const cleared = await drive.clear(path, [options])` | ||
@@ -156,0 +160,0 @@ |
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
35884
8
436
364