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

ssb-crut

Package Overview
Dependencies
Maintainers
4
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-crut - npm Package Compare versions

Comparing version 2.1.1 to 2.1.2

19

lib/resolve-tangle.js

@@ -5,13 +5,7 @@ const pull = require('pull-stream')

module.exports = function tangleTips (server, spec, id, cb) {
const attachTransformation = m => {
m.T = spec.getTransformation(m)
return m
// NOTE we pass the whole message along because isValidNextStep is guarenteed the msg
}
server.get({ id, private: true, meta: true }, (err, root) => {
if (err) return cb(err)
const rootNode = attachTransformation(root)
if (!spec.isRoot(rootNode.T)) return cb(new Error(`not a valid ${spec.type}, ${spec.isRoot.errorsString}`))
const rootNodeT = spec.getTransformation(root, 0)
if (!spec.isRoot(rootNodeT)) return cb(new Error(`not a valid ${spec.type}, ${spec.isRoot.errorsString}`))

@@ -44,11 +38,10 @@ if (isEmpty(root.value.content.authors)) {

server.backlinks.read({ query }),
pull.map(attachTransformation),
pull.filter(m => spec.isUpdate(m.T)),
pull.collect((err, updateNodes) => {
pull.filter(m => spec.isUpdate(spec.getTransformation(m, 0))), // here we fake the distance = 0 just for this test
pull.collect((err, updates) => {
if (err) return cb(err)
const msgs = [rootNode, ...updateNodes]
const msgs = [root, ...updates]
const reduce = new Reduce(spec.props, {
nodes: msgs,
getTransformation: m => m.T,
getTransformation: spec.getTransformation,
getBacklinks: m => m.value.content.tangles[spec.tangle].previous,

@@ -55,0 +48,0 @@ isValid: spec.isValidNextStep

{
"name": "ssb-crut",
"version": "2.1.1",
"version": "2.1.2",
"description": "easy CRUT methods for secure scuttlebutt",

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

@@ -28,3 +28,3 @@ const overwrite = require('@tangle/overwrite')()

(content) => true
],
]
// isUpdate: []

@@ -31,0 +31,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