npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ssb-fetch

v1.5.2

Published

use fetch to get ssb messages

Downloads

57

Readme

developing with insomnia / postman

Since insomnia and postman can't fetch ssb urls, we get around that by proxying through http.

npm run proxy

To run on a testnet set the ssb_appname env var as usual (defaults to ssb at ~/.ssb) before running proxy.

export ssb_appname=ssb-test

Creates an http server at http://locahost:4080

In insomnia you can either: http://locahost:4080/ssb://xxx=== or set a base url in your environment:

{
  "base_url": "http://localhost:4080/"
}

And then use {{ _.base_url }}ssb://xxx===

If you have a raw sigil id from the database you'll need to convert it to an ssb url. Simplest way is to paste it into the agregore omnibox where it's automatically converted for you. Or programmatically use ssb-uri2 from npm.

readme driven development below (work in progress)

GET is implemented for blobs and json messages; what to do about publishing?

I would prefer to use:

  • PUT for uploading blobs
  • PUT for new posts (have no root or branch)
    • check hash of author,type,content,timestamp-within-range for idempotency?
  • POST for replies (root, branch etc) because they can't be truly idempotent; because of the tangle?
  • DELETE for removing blobs from local store
  • DELETE for tombstoning messages

All the browsers that matter are supporting get, put, post, delete using fetch

html5 forms only support get and post

Would be nice to support html forms so that @cel could potentially use it as per his patchfoo client. What happens currently in agregore when submitting a form?

<form action="" method="get">... name & email inputs</form>

<!-- ?name=bob&email=bob%40bob.com appended to url -->
<form action="" method="post">... name & email inputs</form>

<!-- Content-Type: application/x-www-form-urlencoded -->
<!-- name=bob&email=bob%40bob.com -->

querying by url

querystring api

patchfox, oasis, and patchfoo all seem to have their own ways so that's a good excuse to invent a new standard!

there's always a relevant xkcd!