What does "Top 5 plugin downloads in the past 7 days" on the packages stats site mean?

General Discussion
  • So, I'm a bit scared. Could you please explain to me what "Top 5 plugin downloads in the past 7 days" means on https://packages.nodebb.org/stats?

    Two of my plugins make up 75% of all plugin downloads in the last 7 days? Are you sure this data is correct? I'm a bit afraid of the possible responsibility coming from this... 😨

  • 👏

    The "top downloads" pie chart is a little misleading, actually. The package manager itself doesn't have any visibility on package downloads because those are done through npm, and not nbbpm itself. What it does track is how many people ask nbbpm to suggest a version to download.

    For example, if you run v1.8.1 and you want to download a plugin, the latest version might not be compatible, so the ACP will query nbbpm for a suggested version. That's counted as a "download" (since the "suggest" call is done behind the scenes and is opaque to the end user).

    So you could be seeing true downloads... people downloading your plugins... or someone's just hammering GET /api/v1/suggest?package=nodebb-plugin-prometheus a lot 😄


Suggested Topics


  • S3 plugin?

    General Discussion
    2
    0 Votes
    2 Posts
    119 Views

    The one by LouiseMcMahon is the fork which I usually recommend, but if it is incompatible, let us know and maybe we can fork it into the NodeBB-Community org.

    As an aside, I also just discovered https://github.com/zhivkoangelov/nodebb-plugin-s3-uploads-digitalocean by @zhivkoangelov... that one seems maintained, but it uses DO Spaces as a backend.

    Given that DO spaces is "S3-compatible" maybe this will work with S3 😆 who knows.,

  • 0 Votes
    2 Posts
    980 Views

    So I ended up answering my own question:

    If you would like to tap into your db object from within a plugin and use mongoDB's native functions, 'db.client' will provide them.

    Example:

    var db = module.parent.require('./database'); function getResult(req, res, next, callback){ var data = db.client.collection('objects').find({cid: "1"}).toArray()//Query whatever .then(function(data) {//Pass the promise through a callback console.log(data.length); // Use this to debug callback(req, res, data, next)//Send data to your render function or where ever }) }

    Hope this saves someone else some time if they're trying to achieve the same thing!

  • 0 Votes
    7 Posts
    2k Views

    @julian Thanks! everything is great now!

    Upon npm i I received this at the end

    npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/user/nodebb/npm-debug.log npm ERR! not ok code 0

    Is that normal?

  • 0 Votes
    2 Posts
    843 Views

    Looks like a bug / UX enhancement.

  • 0 Votes
    6 Posts
    3k Views

    @julian "windows 4 lyf" 😆 Waiting for my Pi b+ to arrive! then I'll load ubuntu on that and use it as my development board, keep the normal b model pi for XBMC. Not sure how easy it is to cluster the raspberry pi.

    However for something that's made in the UK, it takes long enough to post to me...