aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-09-19 12:07:12 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-09-19 12:07:12 -1000
commit73022a68b920123bf3c150dbce5d5872f6f00669 (patch)
treeb202e72455e26785e91cd11ee4a2b63b0d4b486c /lib
parent00472915a4fb29399109ec9c088ab1e6a3f9b0ec (diff)
downloadpatchfoo-73022a68b920123bf3c150dbce5d5872f6f00669.tar.gz
patchfoo-73022a68b920123bf3c150dbce5d5872f6f00669.zip
Fix npm-packages view
Diffstat (limited to 'lib')
-rw-r--r--lib/serve.js33
1 files changed, 21 insertions, 12 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 9686927..b3f886f 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1891,18 +1891,27 @@ Serve.prototype.npm = function (url) {
version ? [ph('code', version), ' '] : '',
distTag ? [ph('code', distTag), ' '] : ''
]),
- pull(
- self.app.blobMentions({
- name: {$prefix: prefix}
- }),
- distTag && !version && pull.filter(function (link) {
- return link.name.split(':')[3] === distTag
- }),
- pull.map(function (link) {
- return self.app.render.npmPackageMention(link)
- }),
- pull.map(u.toHTML)
- )
+ ph('table', [
+ ph('thead', ph('tr', [
+ ph('td', 'package'),
+ ph('td', 'version'),
+ ph('td', 'tag'),
+ ph('td', 'size'),
+ ph('td', 'tarball')
+ ])),
+ ph('tbody', pull(
+ self.app.blobMentions({
+ name: {$prefix: prefix}
+ }),
+ distTag && !version && pull.filter(function (link) {
+ return link.name.split(':')[3] === distTag
+ }),
+ pull.map(function (link) {
+ return self.app.render.npmPackageMention(link)
+ }),
+ pull.map(u.toHTML)
+ ))
+ ])
]),
self.wrapPage('npm:'),
self.respondSink(200)