Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperdrive

Package Overview
Dependencies
Maintainers
0
Versions
273
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperdrive - npm Package Compare versions

Comparing version 11.11.0 to 11.12.0

lib/monitor.js

16

index.js

@@ -13,2 +13,3 @@ const Hyperbee = require('hyperbee')

const { BLOCK_NOT_AVAILABLE, BAD_ARGUMENT } = require('hypercore-errors')
const Monitor = require('./lib/monitor')

@@ -34,2 +35,3 @@ const keyEncoding = new SubEncoder('files', 'utf-8')

this.encryptionKey = opts.encryptionKey || null
this.monitors = new Set()

@@ -193,2 +195,4 @@ this._active = opts.active !== false

}
await this.closeMonitors()
}

@@ -284,2 +288,14 @@

monitor (name, opts = {}) {
const monitor = new Monitor(this, { name, ...opts })
this.monitors.add(monitor)
return monitor
}
async closeMonitors () {
const closing = []
for (const monitor of this.monitors) closing.push(monitor.close())
await Promise.allSettled(closing)
}
async get (name, opts) {

@@ -286,0 +302,0 @@ const node = await this.entry(name, opts)

3

package.json
{
"name": "hyperdrive",
"version": "11.11.0",
"version": "11.12.0",
"description": "Hyperdrive is a secure, real-time distributed file system",

@@ -32,2 +32,3 @@ "main": "index.js",

"safety-catch": "^1.0.2",
"speedometer": "^1.1.0",
"streamx": "^2.12.4",

@@ -34,0 +35,0 @@ "sub-encoder": "^2.1.1",

@@ -197,2 +197,8 @@ # Hyperdrive

#### `await drive.truncate(version, [options] })`
Truncates the Hyperdrive to a previous version (both the file-structure reference and the blobs).
A `blobs: <length>` option can be passed in if you know the corresponding blobs length, but it is recommended to let the method figure it out for you.
#### `await drive.purge()`

@@ -380,4 +386,8 @@

#### `const blobsLength = await drive.getBlobsLength(checkout)`
Returns the length of the Hyperblobs instance at the time of the specified Hyperdrive version (defaults to the current version).
## License
Apache-2.0
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc