git ssb

3+

cel / ssb-npm-registry



Commit ce05fb2c50cfb9d2b323670012d96c5e7dbc8ce4

Use links2 mentions along with msg scope mentions

cel committed on 12/16/2017, 12:54:32 AM
Parent: c06265915b5e5980e714b509676313cf0b0bd61f

Files changed

index.jschanged
package-lock.jsonchanged
package.jsonchanged
index.jsView
@@ -8,8 +8,9 @@
88 var toPull = require('stream-to-pull-stream')
99 var pull = require('pull-stream')
1010 var tar = require('tar-stream')
1111 var zlib = require('zlib')
12+var cat = require('pull-cat')
1213 var hash = require('pull-hash')
1314 var multicb = require('multicb')
1415 var memo = require('asyncmemo')
1516 var lru = require('hashlru')
@@ -636,9 +637,10 @@
636637 }
637638 }
638639
639640 Req.prototype.getMentions = function (name) {
640- return this.headMsgId ? pull(
641+ var serverMentions = this.server.getMentions(name)
642+ var msgMentions = this.headMsgId ? pull(
641643 this.server.streamTree([this.headMsgId], 'dependencyBranch'),
642644 // decryption could be done here
643645 pull.map(function (msg) {
644646 var c = msg.value && msg.value.content
@@ -660,9 +662,10 @@
660662 return link.name.substr(0, name.$prefix.length) === name.$prefix
661663 } : function () {
662664 throw new TypeError('unsupported name filter')
663665 }),
664- ) : this.server.getMentions(name)
666+ ) : pull.empty()
667+ return cat([msgMentions, serverMentions])
665668 }
666669
667670 Req.prototype.getMentionLinks = function (blobId) {
668671 return pull(
package-lock.jsonView
@@ -66,8 +66,13 @@
6666 "version": "1.0.7",
6767 "resolved": "http://localhost:8989/blobs/get/&Z0yzuiU+O2uiIdBVjunggUeZ4SH034vsGpH7snC1UK4=.sha256",
6868 "integrity": "sha256-Z0yzuiU+O2uiIdBVjunggUeZ4SH034vsGpH7snC1UK4="
6969 },
70+ "pull-cat": {
71+ "version": "1.1.11",
72+ "resolved": "http://localhost:8989/blobs/get/&+uVE8RHNwJIJa68sQGICGbxnCTCOdLLhSt/Pb4NmgL0=.sha256",
73+ "integrity": "sha256-+uVE8RHNwJIJa68sQGICGbxnCTCOdLLhSt/Pb4NmgL0="
74+ },
7075 "pull-hash": {
7176 "version": "1.0.0",
7277 "resolved": "http://localhost:8989/blobs/get/&mVOLtd5e8OPAoi/ARUMfEkgZlHrlkPzgapIlv2a9FwI=.sha256",
7378 "integrity": "sha256-mVOLtd5e8OPAoi/ARUMfEkgZlHrlkPzgapIlv2a9FwI="
package.jsonView
@@ -12,8 +12,9 @@
1212 "dependencies": {
1313 "asyncmemo": "^1.0.0",
1414 "hashlru": "^2.2.0",
1515 "multicb": "^1.2.2",
16+ "pull-cat": "^1.1.11",
1617 "pull-hash": "^1.0.0",
1718 "pull-stream": "^3.6.1",
1819 "semver": "^5.4.1",
1920 "stream-to-pull-stream": "^1.7.2",

Built with git-ssb-web