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

@pumped-fn/lite-tanstack-start

v1.0.0

Published

TanStack Start middleware helpers for @pumped-fn/lite execution contexts

Downloads

459

Readme

@pumped-fn/lite-tanstack-start

TanStack Start middleware helpers for carrying @pumped-fn/lite execution contexts through request middleware, function middleware, and typed server-function handlers.

import { createServerFn } from "@tanstack/react-start"
import { createScope, flow, tag, tags, typed } from "@pumped-fn/lite"
import { tanstackStart } from "@pumped-fn/lite-tanstack-start"

const requestId = tag<string>({ label: "request.id" })
const echo = flow({
  parse: typed<{ message: string }>(),
  deps: { requestId: tags.required(requestId) },
  factory: (ctx, deps) => ({ message: ctx.input.message, requestId: deps.requestId }),
})

const lite = tanstackStart.adapter()
const scope = createScope({ extensions: [lite] })
const req = lite.request({
  tags: (request) => [requestId(request.headers.get("x-request-id") ?? "missing")],
})
const serverFn = lite.call({ middleware: [req] })

export const echoMessage = createServerFn({ method: "POST" })
  .middleware([serverFn])
  .validator((input: { message: string }) => input)
  .handler(lite.handler(echo))

API

tanstackStart.adapter(options) creates a Lite extension with TanStack Start middleware methods. Install the adapter object in createScope({ extensions }), then use lite.request(), lite.call(), and lite.handler(flow).

lite.request(options) creates a TanStack Start request middleware. The middleware creates a request execution context and passes it to next(...) as context.lite.

lite.call(options) creates a server-function middleware. Pass native TanStack middleware through middleware to let Start carry and dedupe context through its own middleware graph. The call middleware reads the request execution context from context.lite, creates a child execution context for the function call, and passes that child to next(...).

lite.handler(flow, options) converts a typed Lite flow into a TanStack Start handler. The handler uses the server function's validated data as the Lite flow input.

Use tags.required(...) for framework-provided request tags that a flow needs. This keeps tag requirements visible to dependency analysis instead of hiding them in ad hoc context reads. Flows and resources that consume request-derived values should declare those values in deps; Start middleware seeds tags at the framework boundary and handlers execute public Lite units.

Pass key to use another context property. Pass close: false when another boundary owns ctx.close(...).

Migration to v1

Version 1 is ESM-only because TanStack Start is ESM-only. Replace CommonJS require() calls with ESM imports. A CommonJS application can load the adapter with dynamic import().


Part of pumped-fn — start with the docs or the mental model.