diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-09-30 23:58:01 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-10-01 12:17:30 -1000 |
commit | ab3a0ab5900e05e5c2227eca74196d9460a5354d (patch) | |
tree | a8f86c87cb885eb2dfa3e2600384e4680e484f16 /lib/render-msg.js | |
parent | 3643ae071dc1e2ba89f67606bd267eb3e3f0f312 (diff) | |
download | patchfoo-ab3a0ab5900e05e5c2227eca74196d9460a5354d.tar.gz patchfoo-ab3a0ab5900e05e5c2227eca74196d9460a5354d.zip |
Render npm prebuilds
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js index 9b69603..186bb9f 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -255,6 +255,7 @@ RenderMsg.prototype.message = function (cb) { case 'mutual/account': return this.mutualAccount(cb) case 'npm-publish': return this.npmPublish(cb) case 'npm-packages': return this.npmPackages(cb) + case 'npm-prebuilds': return this.npmPrebuilds(cb) default: return this.object(cb) } } @@ -540,7 +541,8 @@ RenderMsg.prototype.gitUpdate = function (cb) { var done = multicb({pluck: 1, spread: true}) self.link(self.c.repo, done()) self.render.npmPackageMentions(self.c.mentions, done()) - done(function (err, a, pkgMentionsEl) { + self.render.npmPrebuildMentions(self.c.mentions, done()) + done(function (err, a, pkgMentionsEl, prebuildMentionsEl) { if (err) return cb(err) self.wrap(h('div.ssb-git-update', 'git push ', a, ' ', @@ -583,7 +585,8 @@ RenderMsg.prototype.gitUpdate = function (cb) { '+ ' + self.c.commits_more + ' more commits') : '', self.c.tags_more ? h('div', '+ ' + self.c.tags_more + ' more tags') : '', - pkgMentionsEl + pkgMentionsEl, + prebuildMentionsEl ), cb) }) } @@ -959,6 +962,14 @@ RenderMsg.prototype.npmPackages = function (cb) { }) } +RenderMsg.prototype.npmPrebuilds = function (cb) { + var self = this + self.render.npmPrebuildMentions(self.c.mentions, function (err, el) { + if (err) return cb(err) + self.wrap(el, cb) + }) +} + RenderMsg.prototype.npmPublishTitle = function (cb) { var pkg = this.c.meta || {} var name = pkg.name || pkg._id || '?' |