New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

autobase

Package Overview
Dependencies
Maintainers
0
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autobase - npm Package Compare versions

Comparing version

to
7.0.8

43

lib/store.js

@@ -20,3 +20,2 @@ const b4a = require('b4a')

this.batch = null
this.atomicCore = null
this.atomicBatch = null

@@ -44,2 +43,30 @@ this.extension = null

async matchesKey (key) {
if (!this.core.opened) await this.core.ready()
if (b4a.equals(this.core.key, key)) return true
if (!this.atomicBatch) return false
if (!this.atomicBatch.opened) await this.atomicBatch.ready()
return b4a.equals(this.atomicBatch.key, key)
}
async matchesNamespace (target) {
if (!this.core.opened) await this.core.ready()
if (this.core.manifest && this.core.manifest.signers.length > 0) {
const ns = this.core.manifest.signers[0].namespace
if (b4a.equals(ns, target)) return true
}
if (!this.atomicBatch) return false
if (this.atomicBatch.manifest && this.atomicBatch.manifest.signers.length > 0) {
const ns = this.atomicBatch.manifest.signers[0].namespace
if (b4a.equals(ns, target)) return true
}
return false
}
async commit (atom, length, signature) {

@@ -55,7 +82,2 @@ // TODO: is this how its supposed be done atomic wise?

}
if (this.atomicCore) {
await this.atomicCore.close()
this.atomicCore = null
}
}

@@ -301,4 +323,3 @@

for (const v of this.byName.values()) {
if (!v.core.opened) await v.core.ready()
if (b4a.equals(v.core.key, key)) return v
if (await v.matchesKey(key)) return v
}

@@ -313,7 +334,3 @@

for (const v of this.byName.values()) {
if (!v.core.opened) await v.core.ready()
if (!v.core.manifest) continue
if (!v.core.manifest.signers.length) continue
const ns = v.core.manifest.signers[0].namespace
if (b4a.equals(ns, target)) return v
if (await v.matchesNamespace(target)) return v
}

@@ -320,0 +337,0 @@

{
"name": "autobase",
"version": "7.0.7",
"version": "7.0.8",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",