hyperdrive
Advanced tools
Comparing version 11.0.0-alpha.14 to 11.0.0-alpha.15
19
index.js
@@ -8,2 +8,3 @@ const Hyperbee = require('hyperbee') | ||
const ReadyResource = require('ready-resource') | ||
const safetyCatch = require('safety-catch') | ||
@@ -90,13 +91,17 @@ module.exports = class Hyperdrive extends ReadyResource { | ||
if (this._batching) return this.files.close() | ||
try { | ||
if (this._checkout === null || this.blobs !== this._checkout.blobs) await this.blobs.core.close() | ||
if (this.blobs !== null && (this._checkout === null || this.blobs !== this._checkout.blobs)) { | ||
await this.blobs.core.close() | ||
} | ||
await this.db.close() | ||
} catch {} | ||
} catch (e) { | ||
safetyCatch(e) | ||
} | ||
if (this._checkout) return | ||
try { | ||
await this.corestore.close() | ||
} catch {} | ||
} catch (e) { | ||
safetyCatch(e) | ||
} | ||
} | ||
@@ -425,2 +430,6 @@ | ||
} | ||
static normalizePath (name) { | ||
return normalizePath(name) | ||
} | ||
} | ||
@@ -427,0 +436,0 @@ |
{ | ||
"name": "hyperdrive", | ||
"version": "11.0.0-alpha.14", | ||
"version": "11.0.0-alpha.15", | ||
"description": "Hyperdrive is a secure, real-time distributed file system", | ||
@@ -29,2 +29,3 @@ "main": "index.js", | ||
"ready-resource": "^1.0.0", | ||
"safety-catch": "^1.0.2", | ||
"streamx": "^2.12.4", | ||
@@ -31,0 +32,0 @@ "unix-path-resolve": "^1.0.2" |
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
21944
375
8
+ Addedsafety-catch@^1.0.2