Comparing version 5.0.5 to 5.1.0
@@ -48,2 +48,3 @@ const events = require('events') | ||
this.alwaysReconnect = !!opts.alwaysReconnect | ||
this.subtype = opts.subtype | ||
@@ -101,3 +102,7 @@ const feedOpts = Object.assign({}, opts, { valueEncoding: 'binary' }) | ||
if (self.feed.length || !self.feed.writable) return done(null) | ||
self.feed.append(Header.encode({type: 'hypertrie', metadata: self.metadata}), done) | ||
self.feed.append(Header.encode({ | ||
type: 'hypertrie', | ||
metadata: self.metadata, | ||
subtype: this.subtype | ||
}), done) | ||
@@ -104,0 +109,0 @@ function done (err) { |
@@ -52,2 +52,6 @@ // This file is auto generated by the protocol-buffers compiler | ||
} | ||
if (defined(obj.subtype)) { | ||
var len = encodings.string.encodingLength(obj.subtype) | ||
length += 1 + len | ||
} | ||
return length | ||
@@ -69,2 +73,7 @@ } | ||
} | ||
if (defined(obj.subtype)) { | ||
buf[offset++] = 26 | ||
encodings.string.encode(obj.subtype, buf, offset) | ||
offset += encodings.string.encode.bytes | ||
} | ||
encode.bytes = offset - oldOffset | ||
@@ -81,3 +90,4 @@ return buf | ||
type: "", | ||
metadata: null | ||
metadata: null, | ||
subtype: "" | ||
} | ||
@@ -104,2 +114,6 @@ var found0 = false | ||
break | ||
case 3: | ||
obj.subtype = encodings.string.decode(buf, offset) | ||
offset += encodings.string.decode.bytes | ||
break | ||
default: | ||
@@ -106,0 +120,0 @@ offset = skip(prefix & 7, buf, offset) |
{ | ||
"name": "hypertrie", | ||
"version": "5.0.5", | ||
"version": "5.1.0", | ||
"description": "Distributed single writer key/value store", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,2 +36,3 @@ # hypertrie | ||
valueEncoding: 'json', // set value encoding | ||
subtype: undefined, // set subtype in the header message at feed.get(0) | ||
alwaysUpdate: true // perform an ifAvailable update prior to every head operation | ||
@@ -38,0 +39,0 @@ } |
Sorry, the diff of this file is not supported yet
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
132209
4079
223