aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)