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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flowscripter/io-gateway-http

v1.0.6

Published

Local HTTP gateway serving pluggable-io-framework IOProvider locations to tools that only speak HTTP

Readme

io-gateway-http

version build docs license: MIT

A local HTTP gateway serving pluggable-io-framework locations to tools that only speak HTTP, such as ffmpeg, ffprobe and mediainfo

Key Features

  • Serves any js IOProvider location, so a tool can read from and write to s3:, http(s):, file: or a composite provider without knowing about them.
  • Listens on a loopback ephemeral port. Access is by grant: each grant has a random token as the first path segment (http://127.0.0.1:<port>/<token>/<path>), so relative references such as HLS playlists, image sequences and segment outputs resolve against the grant root with no client configuration.
  • A grant is a root (a container or a single entry) plus a scope, read or read-write. Paths are decoded and normalised, and anything that would escape the root is rejected.
  • Request mapping:
    • HEAD reports size, last modified, content type and etag. Accept-Ranges: bytes is only sent when the handle is range readable.
    • GET with a single range (a-b, a-, -n) answers 206 or 416. A multi-range or malformed bytes range, or one starting past the end, answers 416 with Content-Range: bytes */<size>. Other units, and entries that are not range readable, serve the whole entry.
    • PUT and POST stream the request body to the provider, chunked or not.
    • DELETE calls the provider's delete.
    • Unbounded sources are streamed as a chunked 200 with Accept-Ranges: none.
  • Reads are lazy with backpressure, and a client disconnect cancels the provider read, so a seek (dropping an open-ended range request and opening a new one) does not cost the data it skipped.
  • Responses are never capped below the requested range, because curl-based clients treat a short 206 as the end of the file.
  • Connection: close is echoed when the client sends it, and keep-alive is supported.
  • Transient provider failures are retried by the gateway with withRetry, including resuming a read part way through, so the client does not see them.
  • Every write and delete is recorded per grant. A tool's exit code says nothing about whether its uploads committed, so wait for settled() and take success or failure from the results.

Usage

import { HttpGateway } from "@flowscripter/io-gateway-http";

const gateway = HttpGateway.start();

// `registry` is a pluggable-io-framework ProviderResolver
const grant = await gateway.grantLocation(registry, "s3://bucket/media/", {
  scope: "read-write",
});

// pass grant.urlFor("input.mkv") and grant.urlFor("out/playlist.m3u8") to the tool

const results = await grant.settled();
const failed = results.filter((result) => result.error !== undefined);

await grant.revoke();
await gateway.close();

grant(provider, target, options) serves a provider the caller already owns. grantLocation(resolver, location, options) resolves a js provider for the location and disposes it when the grant is revoked.

Future Work

  • Serve native payload providers by converting their payloads to bytes. The gateway only serves js providers today.

Further Details

License

MIT © Flowscripter