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

@mfup/server

v3.1.0

Published

MFUP/3 Node server with streamed multipart, durable receipts and interactive publication

Readme

@mfup/server

Node 22.13+ MFUP/3 server: streamed multipart, durable receipts, user questions, per-session roots and application hooks. One process owns the metadata directory.

import { createServer } from "node:http";
import { createMfup } from "@mfup/server";
const mfup = createMfup({
  baseDir: "./state",
  prefix: "/api",
  authorize: async ({ headers, meta }) => {
    const user = await resolveUser(headers); // application
    const scope = resolveScope(user, meta); // application
    return scope
      ? {
          baseDir: scope.root,
          targetDir: `${user.id}/${scope.name}`,
          context: { uid: user.id, scope: scope.name },
        }
      : null;
  },
});
const server = createServer(async (req, res) => {
  if (!(await mfup.handle(req, res))) {
    res.writeHead(404);
    res.end();
  }
});
mfup.attach(server);
server.listen(3000);
// Shutdown: await mfup.close(); server.close();

The browser uses serverUrl: location.origin + '/api'. Scopes and identity belong to the application. publishedDirectory(baseDir,targetDir) resolves the corresponding directory for application listing/download handlers.

mapFile runs during manifest reception, returns a relative path or null, and persists validated destinations before reading bodies. onCommitted receives roots, counts, meta/context; engine.listStaged and openStaged expose accepted files for processing. A boolean callback result overrides server autoPublish (default false). clientPublish: false reserves publication for engine.publish(id) on the backend. The SDK's own autoPublish controls its automatic request only. Errors in onCommitted leave commit successful with processing: 'failed'; engine.retryCommitted(id) explicitly retries the processing step.

Exports include AuthRequest, AuthResult, FileMapRequest, CommitEvent, StagedFile, Options, ProtocolError (code/status), createMfup, Engine and configFromEnv. Standalone: MFUP_AUTHORIZE='./hooks.mjs#authorize' mfup-server. See the repository's docs/EXTENDING.md and examples/ for the complete contract.

Extension API · HTTP protocol

Russian